• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp & tomcat

 
tony james
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i'm a jsp beginner.how should i modify my web.xml file to run a jsp program using tomcat? where should i place my jsp files?
 
karl koch
Ranch Hand
Posts: 388
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
in the <tomcat>/webapps/ directory, there are several contextes (test, examples) with each it's own web.xml file. you can add a directory (eg. named "tony") in the webapps of tomcat. just build the same structure as in the other contexts. and take a look at their web.xml file.
then modyfy the server.xml in <tomcat>/conf and add your own context (just copy the context of "test" and replace "test" in the path and the docBase with "tomy". path is the name you have to type on the server (eg. localhost/tony) to reach your context and docbase is the path to the files on local file system.
for the web.xml take a look to the web.xml in /example.

karl
 
Tim Holloway
Bartender
Posts: 18408
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a quick-start know-nothing test, just drop the JSP into the same directory as the webapps JSPs. Once you're ready to set up something more realistic, the following short set of instructions should be about all you need to know:
http://jakarta.apache.org/tomcat/tomcat-3.3-doc/appdev/deployment.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!