When you learn the JSP in the Java Web, you want to see where the Java and class files are generated after their published access, but don't know where they are placed.
When you use the Tomcat deployment project in Eclipse, you will build a project for the server
There is no information related to the various views ... (This project cannot be closed and will result in Tomcat not being deployed.)
The location where you try to print the file in the JSP is where you want to be.
<% out.print (Application.getrealpath ("/")); %>
Access to get
D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\JSPDemo\
It turns out this ...
If the Web project is published directly under Tomcat under the WebApps directory, the JSP resolves the compiled directory (dynamically compiled) in the Work/catalina/localhost directory under Tomcat when it is published, and is generated in the Web project. The project directory under WebApps is used directly by the compiled servlet and other files for access.
But by using server to add Tomcat to deploy the project in eclipse, we found that eclipse did not deploy directly under our default Tomcat, but instead used a temporary location to deploy the Web project, and the print get the following full path to the KO.
This temporary location is similar to this position in our workspace:
D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\JSPDemo\org\apache\ Jsp
Here you can see the Java files and the compiled class files using JSP parsing.
Post-deployment location using Tomcat in eclipse