Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with running servlets using tomcat3.2.4

 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have put my class file in //install_dir/webapps/Root/classes directory.
When I enter http://localhost/HelloWWW in the browser I get following error in the server dos window.
2002-07-04 14:51:09 - Ctx( ): 404 R( + /HelloWWW + null) null
Some one suggested me to edit web.xml. But according to core servlets book it is not needed for this basic servlet.
Urgent help needed.
Kishore.
 
sim sim
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kishore,
The path should be
'install_dir/webapps/root/web-inf/classes'
Sim Sim
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
also the url to the servlet if you are not going to modify the web.xml file should be
http://localhost/servlet/HelloWWW
so that tomcat knows to look for a servlet
 
bernd pier
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey chanoch
excuse my simple question,but if a want to start a servlet with http://localhost:8080/servlet/servletname
it won`t go.
when i call the servlet with
http://localhost:8080/examples/servlet/servletname
yiiippeee no problems.
if the first possibility is a general way to call a servlet,i think it had to work without configure the server.xml.
and if i had to configure the server.xml, what must i configure?
you see i`m just a beginner in servlets, so i`m grateful for help.
bernd
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It worked.
Thanks a bunch for the suggestions. I am gonna crack this for couple of days.
Kishore.
 
Bosun Bello
Ranch Hand
Posts: 1510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kishore, how you access your servlet depends on where you put your clases. If you access it as
http://localhost:8080/examples/servlet/servletname
Then your classes must have been in TomcatDirectory\webapps\examples\WEB-INF\classes folder.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic