JS to build its own JSP app directory
1. To the WebApps directory of Tomcat's installation directory, you can see the directory of Tomcat from Root,examples etc;
2. Create a new directory under the WebApps directory, named MyApp;
3.myapp Create a new directory Web-inf, note that the directory name is case-sensitive;
4.web-inf a new file Web.xml, which reads as follows:
<?xml version= "1.0" encoding= "Iso-8859-1"?>
<! DOCTYPE Web-app
Public "-//sun Microsystems, INC.//DTD Web application 2.3//en"
"Http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>my Web application</display-name>
<description>
A Application for test.
</description>
</web-app>
5. Under MyApp, create a new JSP page for the test, the file name is index.jsp, and the contents are as follows:
<body>
<% out.println ("Hello everyone, my first JSP program"); %>
</body>
6. Restart Tomcat
7. Open the browser, enter the http://localhost:8080/myapp/index.jsp can be.
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.