Friday, 23 June 2017

Servlets in Java : Folder Structure for Tomcat ~ foundjava

Servlets Folder Structure in Apache Tomcat


Webapps directory in Tomcat: 
---------------------------------------------------
C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\





Note: Program Files is the place where software is installed in your computer, there you will find Apache Software Foundation, and there, Tomcat <version_installed>, in it webapps folder is present.

webapps
       |_ project_name
            |           |_ myhtml.html
            |           |_ index.html
            |_ WEB-INF
                  |   |_ classes
                  |          |_ MyServlet.java
                  |          |_ MyServlet.class
                  |_ web.xml


Description: 
-----------------------------------
1. webapps contain project_name folder.
2. project_name folder may contain html files and WEB-INF directory is must.
3. WEB-INF folder contains web.xml and classes folder.
4. classes folder contains servlet classes.

No comments:

Post a Comment