By: Emiley J Viewed: 614 times Printer Friendly Format
This tutorial uses 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. 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-tomcat5.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. 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.
Most Viewed Articles (in Struts )
Latest Articles (in Struts)
Comment on this tutorial
- Cloud Computing
- Java Beans
- Mac OS X
- Office 365
- Tech Reviews