Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

servlet wont work

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i have the following servlet which seems to compile though the command prompt displays nothing when i compile it in the tomcat webapps/test/WEB-INF/classes directory



here is the jsp page i'm using



i'm getting a 404 saying the /servlet/ExampServlet

description The requested resource (/servlet/ExampServlet) is not available.

and the page is trying to go to the url -

http://localhost:8080/servlet/ExampServlet

how is it going there ? is it ok to compile servlet java files in the WEB-INF/classes directory of an application ?

cheers

chris
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris
I also had the same problem with running servlets.Go through the previous posts
"How to set conf file file" maha devan
"servlet error" maha devan

U will get all the info u want

Bye
Maha
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this FAQ on the use of the invoker servlet. The "/servlet/" in the url implies that the invoker servlet is required, but it is typically off by default.
Also put your ExampServlet in a package - you will be glad you did.
Bill
 
If you were a tree, what sort of tree would you be? This tiny ad is a poop beast.
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic