• 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

Tomcat-Servlet configuration(urgent)

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tomcat installed for using with servlets have configured it but can someone tell me after i write a servlet where do i place it in my tomcat server and wht do i do with it and how do i access it.I placed it in the webapps dir but it just keeps givin me errors like http404 file not found .Can someone help me its urgent
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, if Tomcat is configured following the standard configuration, i.e. you haven't altered where servlets go, then servlets (you really only need to put the .class files here but you can also put the .java files here if you want also) should be placed in TomcatHome\webapps\ROOT\WEB-INF\classes.
To access your servlet, start Tomcat, and assuming you're using the default port number 8080, type http://localhost:8080/servlet/YourServletName into your browser.
This should work provided you've got Tomcat configured correctly - if not, there's a wonderful step-by-step guide to configuration here
Hope that helps,
Gillian
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This will not work for Tomcat versions 4.1.12 and above. By default, the servlet/* invoker is disabled. Moving this from Servlets - > Apache/Tomcat
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic