SE452: Deploying JSPs [11/16] Previous pageContentsNext page

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 there via their name. When you are using a JSP with a Servlet, you can do this. 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

Previous pageContentsNext page