I am using Tomcat 5.028. How to configure tomcat to run jsp files without copy the files to /<tomcat-installation-dir>/webapps/...
For example, c:\myJsp\test.jsp
Thanks.
Michael Ku
Ranch Hand
Joined: Apr 20, 2002
Posts: 510
posted
0
I don't understand your question. Are you trying to run a JSP without going thru the Servlet container as if this werer a little problem with a main method?
chailin fong
Greenhorn
Joined: Oct 15, 2007
Posts: 10
posted
0
What I meant was , if I put all my jsp files in one directory, named "c:\myJSP"
Without placing the file into /tomcat/webapps/.. directory, the URL link will "point" to "c:\myJSP\test.jsp ie, http://localhost:8080/myjsp/test.jsp
Originally posted by chailin fong: I add the line below in server.xml <Context path='/jspbook' docBase='c:\jspbook' debug='0' reloadable='true'> </Context>
I got : HTTP Status 404 - the requested resource (/jspbook/hello.jsp) is not available.
It would be better to follow Bear Bibeault's directions and check the documentation. Adding context entries to the server.xml file is not considered a best practice in Tomcat 5.0 and up. Also, Tomcat will not treat your directory as a web application unless there is a proper directory structure within it.