j2ee: Deploying JSPs [7/20] ![]() ![]() ![]() |
Basically, treat a JSP like an HTML file. You can place it anywhere inside the document root of your webapp.
Do not copy your JSPs into the WEB-INF directory if you want to access them directly, since they cannot be accessed from there via their name. When you are using a JSP with a Servlet, you can do this. This is an excellent way to implement security on your pages. More on this later
Example:
Copy Hello2.jsp to "tomcat home"/webapps/ROOT and Invoke
http://localhost:8080/Hello2.jsp
When using a war file, just include the JSP in the directory where you want to access it, make the war file, and deploy. You should be able to see the changes when the servlet engine reloads the war file