index.jsp (EXT) in the root directory of Tomcat __js

Source: Internet
Author: User

Tomcat has been in use for more than a year, has not been carefully studied its default page how to come out, today boring research a bit. At first, it was thought that Tomcat's starting file was index.jsp in the root directory, but when I deleted index.jsp I found that the default page was still available, and then I looked at the Root/web-inf under classes and Lib under the drum, Discover that both are org.apache.jsp.index_jsp.class, and then I looked back at it, so it hard-coded the contents of the index.jsp into this file. And look at the Web.xml file.
<servlet>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<servlet-class>org.apache.jsp.index_jsp</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<url-pattern>/index.jsp</url-pattern>
</servlet-mapping>
So, because the tomcat default starting file is index.jsp and index.htm, this is not the default Start page mapping to the Org.apache.jsp.index_jsp class, so I deleted this paragraph, You can go straight to the index.jsp, haha.
Related Article

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.