• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet not running

 
soven rout
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


the xml page is:-


the following web-component is not getting executed and shoeing error 404
as follows
HTTP Status 404 - /helloworldapplication/hello

type Status report

message /helloworldapplication/hello

description The requested resource (/helloworldapplication/hello) is not available

and the folder hierarchy is absolutely correct.
can anyone help me out
thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, please see the ServletsFaq for more tips.
 
soven rout
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think every thing is ok abt deployment descriptor and there is no need of the lib files ,only the folder lib is enough.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
soven rout wrote:I think every thing is ok abt deployment descriptor


Please use real words when posting to the forums. Abbreviations such as "abt" in place of "about" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please click this link ⇒ UseRealWords for more information.

and there is no need of the lib files ,only the folder lib is enough.


I have no idea what you mean by that.

But if you check the ServletsFaq you will see that one problem you have is that the servlet class is not in a package.
 
Karn Kumar
Ranch Hand
Posts: 153
Eclipse IDE Java Tomcat Server
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,


Your class is not servlet , as HelloWorldServlet the one you have written is not extending HttpServlet.

So this class will not get any servletness and second thing is in the deployment descriptor the package name is not menltioned.

 
Rob Spoor
Sheriff
Posts: 20819
68
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good call on the missing extends / implements clause, I hadn't even noticed.
 
soven rout
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry even if after implementing the servlet class ,the 404 error is coming and no change in the error and I don't get the "Hello Web World " in the tomcat console .
 
Rob Spoor
Sheriff
Posts: 20819
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Why don't you extend HttpServlet like Chetan suggested?
2) Have you put the servlet class in a package already?
 
Karn Kumar
Ranch Hand
Posts: 153
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Soven ,

Please check the below links these might help you


http://www.servletworld.com/servlet-tutorials/simple-servlet-example.html


http://docs.oracle.com/cd/E13222_01/wls/docs92/webapp/configureservlet.html


Also can you check whether you are getting context itself or not .Then only hit the servlet pattern after that.

If you are not getting your context helloworldapplication then might be problem with project setup.

If you have created dynamic web project then check for the Build path(should be classes folder in the WEB-INF ) and the servlet jars in the lib folder


 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!