Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

A Quick Guide to Installing Tomcat on Windows  : Page 4

Get started using Java Server Pages (JSP) by installing the Open Source Jakarta Tomcat Servlet and JSP container.


advertisement

Step 3: Create Application Directories
You are now ready to deploy your Web applications onto Tomcat. Several sample applications ship with the Tomcat binary distribution. If you don't already have an application to deploy, you can use one of the sample applications for practice. The deployment process can be complicated depending on your application.

A typical Web application consists of HTML pages, images, JSPs, Servlets, Beans, and configuration files. Tomcat requires you to package your application in a special way, but all your application's files go into a subdirectory of the webapps directory.

First, create a directory for your application, for example: webapps\foo. Next, create a subdirectory called WEB-INF and place your deployment descriptor file there. A deployment descriptor is an XML file called web.xml that contains information about your application. The file is secure because Tomcat will not serve files contained in the WEB-INF directory directly to clients. You can easily copy and modify one of the existing sample web.xml files to customize it for your application. Next, create a subdirectory under the WEB-INF folder called classes. Place any Servlets or utility classes your application may use in the classes folder. For example, if you create an application called foo, the directory hierarchy for an application called foo becomes:

   \foo
   \foo\WEB-INF\web.xml
   \foo\WEB-INF\classes


Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date