• Post Reply Bookmark Topic Watch Topic
  • New Topic

saving my servlets and html files?  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In tomcat where should I save my servlets /html/jsp files.
I saved my servlets under tomcat4/classes and it works but am I correct???
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The servlet API lays out exactly where everything should go. Download a copy from java.sun.com and you will have the solution to this and many other problems at hand.
Bill
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Save my java files here
tomcat\webapps\examples\WEB-INF\classes
Save my html/jsp here
tomcat4\webapps\examples\jsp
but to retrieve the servlet
http://loalhost:8080/servlet/hello
how come this happens??? I haven't understood the above
 
Christopher Dixon
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
Take a look at the file:
%CATALINA_HOME%/conf/web.xml
You'll find a <servlet> named invoker declared, and farther down a <servlet-mapping> of invoker-/servlet/*
This maps any requests that fit the mask /servlet/* will be processed by the servlet named invoker.
If some of these things don't make sense, I would recommend taking a look at the Servlet Spec, as mentioned above.
Chris
 
Tim Holloway
Bartender
Posts: 18715
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just because a URL resembles a directory path doesn't mean that it is one!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!