Post-deployment location using Tomcat in eclipse

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.