Home Struts Struts2 Download and Installing Struts 2
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Download and Installing Struts 2

Advertisement
In this section we will download and install the Struts 2.0 on the latest version of Tomcat container.

Download Struts 2.0

     

In this section we will download and install the Struts 2.0 on the latest version of Tomcat container. We will first download tomcat and configure it as our development server. Then we will download Struts 2.0 and install the struts-blank application on the tomcat server to check the examples that come with the struts-blank application.

Downloading Struts 2.0

Visit the Struts download site http://struts.apache.org/download.cgi and download the Struts 2.0 for this tutorial. 

We have downloaded the Struts 2.0.6 (struts-2.0.6-all.zip) for this tutorial.

Download the Tomcat

Download the latest version of tomcat from http://tomcat.apache.org/download-55.cgi. We have downloaded apache-tomcat-5.5.20.zip for this tutorial.

I am assuming that latest version of Java is installed on your system. Extract downloaded file and run the C:\apache-tomcat-5.5.20\bin\startup.bat to start the tomcat. Type http://localhost:8080/ in your browser, it should show the welcome page in the browser window as shown below.

Congratulations you have now successfully installed latest version of tomcat for learning Struts 2.0. Now we will install the struts-blank application on the tomcat container and test the application.

Extracting Struts 2.0 distribution and installing on tomcat

Extract the downloaded struts distribution struts-2.0.6-all.zip into your favorite directory. To install the struts blank application copy "struts2-blank-2.0.6" from "<extracted directory>\struts-2.0.6-all\struts-2.0.6\apps" into the webapps directory of tomcat. Tomcat will automatically deploy the application.

Feb 25, 2007 11:42:23 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 25, 2007 11:42:24 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Feb 25, 2007 11:42:24 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/141 config=null
Feb 25, 2007 11:42:24 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Feb 25, 2007 11:42:24 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6672 ms
Feb 25, 2007 11:52:55 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive struts2-blank-2.0.6.war

To test the struts-blank application type http://localhost:8080/struts2-blank-2.0.6 in the browser and the struts-blank application get displayed in your browser window.

Click the English link and familiarize yourself with Struts Blank sample application.

Struts 2.0 distribution also contains the following sample applications that you can try:

  • struts2-mailreader-2.0.6.war
  • struts2-portlet-2.0.6.war
  • struts2-showcase-2.0.6.war

You can simply copy these files to the webapps directory of your tomcat server. Tomcat will automatically deploy these applications and then you can test these applications.

       

Advertisements

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: May 21, 2007

Ask Questions?    Discuss: Download and Installing Struts 2   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
SWATI SATPUTE
March 12, 2011
struts

hello its realy nice
S. Endiran
December 27, 2011
Struts

Working Fine. Thanks
tittu
January 10, 2012
Problem regarding installation

I did all the steps explained above, but an error gets displayed every time i try http://localhost:9999/struts2-blank-2.0.6/. Error being "requested resource is not available ". What should i do?
test
March 7, 2012
test

test
shailesh
January 2, 2012
struts2.0

.nvm file for struts2.0
narashimha
January 25, 2012
struts

exlent
DMCA.com