Build a simple process for creating a web App for "Bare Hands"
1, in any directory, create a folder, take the name Webdemo. This applies the name.
2. Create a Web-inf folder within Webdemo, which is case sensitive.
3. In the Tomcat Project example (there is an example in Tomcat's WebApps directory), copy a Web. xml file. Put it in the Web-inf folder.
4. Modify the copied Web. xml file to modify the file to a single root directory. The modified Web. XML looks like this:
<?XML version= "1.0" encoding= "Iso-8859-1"?><Web-appxmlns= "Http://java.sun.com/xml/ns/javaee"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"xsi:schemalocation= "Http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"version= "3.0"Metadata-complete= "true"> </Web-app>
5, under the Web-inf folder Xinjiang two folders classes and Lib. These two folders are basically the same, all of which are placed in JAVA class files. The difference is that classes put all the *.class files, and Lib contains the packaged jar files.
6, after the above steps, has already established the empty Java Web application. Copy the Webdemo to the Tomcat WebApps directory. You can access this app by opening Tomcat.
7, in order to see the effect, in the application and directory (Webdemo), the creation of JSP files. You can access it. For example, establish a.jsp. The Access path is:
http://localhost:8888/webDemo/A.jsp
The simplest structure of a Java Web project