How can I configure Tomcat such that I can move my jsp files (that I'm developing) to a directory other than .../tomcat/webapps/examples/jsp/servlet/?

Scott Stanchfield

You can place your JSPs anywhere within the document root of your web application.

When you configure Tomcat to describe the web application, you can set the document root. You do this in file


  tomcat/conf/server.xml

Just add (or edit if it already exists) a line like


  <Context path="/myapp" docBase="webapps/myapp" /> 

You can then place the JSPs anywhere under tomcat/webapps/myapp, or whatever other directory you specify.

NOTE: By default, the above setting is the document root. So even without adding the Context tag, you can place the JSPs anywhere under tomcat/webapps/myapp

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact