Struts installation

xiaoxiao2021-03-06  57

7. Installation of Struts 7.1 Installing Software required for Struts

Java Development Kit - You need Download and Install 1.2 (or after) JDK. Download address: http://java.sun.com/j2SerseRvlet Container - The usual selection is to download Tomcat (at least version 3.1, recommended using version 3.2). Download address: http://jakarta.apache.org/tomcatant building system - If you install the package through the Struts Source Code, you must download the 1.1 or later version of the Ant Build System. In your own web app, you also recommend using Ant to build your application. Download address: http://jakarta.apache.org/antservlet API Classes - To compile Structs yourself, or the application uses Struts, you need a servlet.jar package with the servlet and JSP API objects. Most servlet containers (such as Tomcat) have come with this file. Otherwise, you must download: http://jakarta.apache.org/builds/jakarta-servletapixml Parser - Structs requires an XML processor compatible with the Java API for XML Parsing (JAXP) specification. I recommend using Xerces. Download address: http://xml.apache.org/xerces-jxalan 帖子  - If you construct your Structs system via Structs source code, you must download and install 1_2_d01 or later version of the Xalan XSLT processor (Xerces It has been brought to Xalan. This processor is used to convert XML-based Structs documents to HTML documents.

7.2 Constructing Structs via the source code

1. Download the Structs source code release package. 2. Set an ANT_HOME environment variable to point to your Ant directory. 3. Set the java_home environment variable to point to your JDK directory. 4. Set the servletapi_home environment variable, point to your servlet API directory (if your ClassPath already contains servlet.jar, you do not need to specify the directory) 5. Unpack the StruCTS source code package. 6. Go to the STRUCTS directory, run the following command: ./build.sh Dist This command will create a Struts binary package, directory in ../ dist / structs (relative to your compile directory).

7.3 Installing Structs with Binary Release Package with Struts

1. Download the Struts binary release. 2. Unpack the Struts binary release. (If you construct struts through the Struts source code, the result of Build is already unconnected Struts). Unpacking Struts contains the following: lib / struts.jar - This file contains all Java objects for Struts. You need to copy it to your web-inf / lib directory for your web application. LIB / STRUCTS.TLD - This is a "Tag Library Descriptor" file that describes the free TAG of the Struts library. Need to copy it to the web-INF directory of your web application. WebApps / Struts-Documentation.war - This is a "Web Application Archive" file that contains all Struts documents. You can install it into the servlet container that supports Servlet API 2.2 or later (recommended using Tomcat). WebAPPS / Struts-Example.war - This is a web application instance that extensively demonstrates many of the Struts. You can install it into a servlet container that is compatible with servlet2.2 or later and the JSP1.1 or later version of the servlet container (recommended using Tomcat). WebApps / Struts-Test.war - This web application contains many TAG test web pages supported by Struts, which can be used as an example of using Struts Tag.

转载请注明原文地址:https://www.9cbs.com/read-112951.html

New Post(0)