• 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
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

help please

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please sum1 temme watzz wrong in my procedure.my servlet compiles fine n i've put the class file in C:\apache-tomcat-5.5.26\webapps\ROOT\WEB-INF\classes and when i type the foll in my browser address bar http://localhost:8080/servlet/HelloServlet i get a 404 error.. help me to fix it
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you do the servlet configuration in web.xml file? Please check the below..
Put the servlet entry in web.xml and user servlet mapping for your servlet as "/servlet/HelloServlet"

<servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>foo.HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<uri-pattern>/servlet/HelloServlet</uri-pattern>
</servlet-mapping>
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jothi, welcome to the Ranch.

Please take the time to read our page on HowToAskQuestionsOnJavaRanch

In particular,

http://faq.javaranch.com/java/UseRealWords - Use Real Words
http://faq.javaranch.com/java/UseAMeaningfulSubjectLine - Use a meaningful subject line.

If you ask questions correctly then I can spend my time answering your question rather than asking you to ask questions correctly.

Enjoy your stay!
Dave
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, if you've put your servlet class directly under ROOT/WEB-INF/classes, make sure that you have modified web.xml and put in the correct servlet entry. Also, I don't think you need to append servlet after localhost:8080 unless you have mapped it that way.

Please also detail your problem a little so that we could help easily.
 
permaculture is giving a gift to your future self. After reading this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic