Tomcat and Struts installation


We will use Windows environment to develop Struts application and Tomcat servlet container to deploy and test Struts applications. Precisely we will use Tomcat-5.0.14 Beta, the latest milestone release of Tomcat. You can download Tomcat 5.0.14 from http://jakarta.apache.org/tomcat and follow the link to download. There are several binaries available ‚ several variations of tar, exe and zip files. Choose the 5.0.14.zip file and unzip it. A folder called jakarta-tomcat-5.0.14 is created automatically. This is the TOMCAT_HOME directory. Under the TOMCAT_HOME, there are a lot of folders of which two are important ‚ bin and webapps folders. The bin folder contains two batch files - startup.bat , used to start the Tomcat and shutdown.bat , used to stop the Tomcat. All the WAR files are dropped in the webapps directory and get deployed automatically.

Installing Struts is very easy. In the Struts web site, http://jakarta.apache.org/struts, go to download section and select the 1.1 Release Build. This is the latest production quality build available. Once you download the zipped archive of Struts 1.1 release, unzip the file to a convenient location. It automatically creates a folder named ‚“ jakarta-struts-1.1 ‚½. It has three sub-folders. The lib sub-folder contains the struts.jar ‚ the core library that you want to use and other jars on which the Struts depends. You would normally copy most of these jars into the WEB-INF/lib of your web application. The webapps sub-folder contains a lot of WAR files that can just dropped into any J2EE application server and tested .

You can test your Tomcat installation and also study Struts at the same time. Start Tomcat using startup.bat and then drop the struts-documentation.war from your Struts webapps folder into Tomcat ‚ s webapps folder. The WAR is immediately deployed. You can access the Struts documentation at the URL http://localhost:8080/struts-documentation. You should also download the Struts 1.1 source and refer to it and probably study it to get more insights about its internals. However be sure to read through this book before you dive into the Struts source code.




Struts Survival Guide. Basics to Best Practices
Struts Survival Guide: Basics to Best Practices (J2ee Survival Series)
ISBN: 0974848808
EAN: 2147483647
Year: 2004
Pages: 96

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net