This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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: 67752
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: 67752
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: 22815
132
Eclipse IDE Spring 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: 22815
132
Eclipse IDE Spring 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


 
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic