• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Tomcat

 
Patrik Nilsson
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a problem with running the first servlet Example, page 76 in the Head first Servlets & JSP.
I don't know if something is wrong configured but I don't get the page when trying to run it.

I have put it in the following dir: <JakartaInstallDir>\webapps\Beer-v1\form.html

and try to run it with: http://localhost/Beer-v1/form.html

I have changed the Port to 80(didn't work with 8080 either) so I don't have to type in the portnumber every single time and the tomcat welcome page and all the files that I put in ROOT works, but not the one under webapps.

Anyone can see what I'm doing wrong or has any ideas what could be wrong here or do I have to put all pages under ROOT???
 
Venu Reddy
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If deploying under ROOT works, but not under YOUR-APP, enable the context for YOUR-APP as outlined in Step 3 in the following:

http://www.coreservlets.com/Apache-Tomcat-Tutorial/#Summary
 
Me
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have Beer-v1/WEB-INF directory?

Have a look on discussion going on in this thread
http://www.coderanch.com/t/168184/java-Web-Component-SCWCD/certification/Where-place-under-webapps-or
 
Patrik Nilsson
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I have a WEB-INF directory as well.

If I call the Beer directory for only Beer or even Beer-v it works but I can't have 2 characters after the - .
Strange?? I also tried without he WEB-INF dir and it works fine there as well.
Guess I rename my directory instead but it's very strange.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic