• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet not running

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, please see the ServletsFaq for more tips.
 
soven rout
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 153
Eclipse IDE Tomcat Server Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic