Jsp & amp; Servelet Study Notes (4)

Source: Internet
Author: User

1.4 package and release the servlets and jsp programs

Create a directory structure first. Then you can use the jar tool or Ant to create a War file.
 
/Mywebapp
/Images
WEB-INF
/Classes
/Lib
A servlet specification specifies to contain a WEB-INF directory where two subdirectories classer and lib directory WEB-INF contain a deployment description file for a web application. It is called web. xml. Jsp AND htm files will be placed under/mywebapp.
Servlets and javaBeans will be placed under the classes directory.
For example: com. mydev. MyServlet, this servlet class must be under the WEB-INF/classes/com/myorg/MyServlet. class.
 
The Lib folder contains some other jar packages required by the web application. For example, log4j. jar, database connection driver, and jstl
And so on .....
· Enter the root directory: jar cvf mywebapp. war. Do not forget the last point (.)
· Unpackage command: jar tvf xxxx. war

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.