Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

Servlet not working

Thread view: 
dami.gupta@gmail.com - 03 Apr 2007 10:01 GMT
Hello,
This is a newbie question. Any help would be MUCH appreciated.

I am using JBoss. My servlet, HelloServlet, prints a simple Hello
statement. I create a hello.war file with files

welcome.html
META-INF/Manifest.mf
WEB-INF/web.xml
WEB-INF/classes/hello/HelloServlet.class

web.xml is as -

<?xml version="1.0"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
<servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>hello.HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>/HelloServlet</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>welcome.html</welcome-file>
</welcome-file-list>
</web-app>

I place the hello.war in the jboss/server/default/deploy directory.
JBoss starts up fine saying that the war file has been deployed.
In my browser, I type
http://localhost:8080/hello/welcome.html
This works fine.

However when I do
http://localhost:8080/hello/HelloServlet

I get
"Internal Server Error
The server encountered an internal error (Internal Server Error) that
prevented it from fulfilling this request"
..and so on

I have been following the SAMS Teach yourself EJB book.

Further, I have also tried putting my files in jboss/catalina/webapps
The structure is as

webapps/helloapp/welcome.html
webapps/helloapp/META-INF
webapps/helloapp/WEB-INF/web.xml
webapps/helloapp/WEB-INF/classes/hello/HelloServlet.class

At the browser, I do
http://localhost:8080/helloapp/HelloServlet and get

No Context configured to process this request
The server encountered an internal error (No Context configured to
process this request) that prevented it from fulfilling this request.

Please help. Thanks, DG
dami.gupta@gmail.com - 03 Apr 2007 13:03 GMT
On Apr 3, 2:01 pm, dami.gu...@gmail.com wrote:
> Hello,
> This is a newbie question. Any help would be MUCH appreciated.
[quoted text clipped - 58 lines]
>
> Please help. Thanks, DG

Hi All,

I don't know how, but it seems to have all started working now.
I thank you all very very very much.
DG


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.