Downloading and configuring Struts2.0 Framework

Downloading and configuring Struts2.0 Framework

Previous Home Next

 

The minimum requirements for Struts2 applications are jdk, a web server(like tomcat) and any application server(like GlassFish , Weblogic etc) and the Jars of the Struts2 Frameworks. Then you need to install jdk and server and then configure the JDK, web server like tomcat and GlassFish Server and struts2 frameworks. Here you will learn from where you can download? and how you can configure it?

 
Note:- We are using jdk1.5 and tomcat 5.0 in our all examples you can choose latest one .

  • Download:- JDK ,Tomcat and Struts2 jar file. You can download it from following given like.
  • Java Development Kits: Download jdk1.6 http://developers.sun.com/downloads/
  • Struts Frameworks (Jars): Download Struts 2.0.14 http://struts.apache.org/download.cgi#struts2014
  • Servers Download Tomcat 6.0.26:Released Tomcat http://tomcat.apache.org/
  • Install JDK, Tomcat and GlassFish Server.
  • Set Java_Home (if you are using IDEs only)
  • Make a Web Work Space (like R4RSTrutsExaples) or make a j2ee workspace in C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT directory.Which includes WEB-INF . WEB-INF includes lib, web.xml, classes The structure of Web Work Space (like R4RSTrutsExamples will be : R4RSTrutsExamples WEB-INF Lib web.xml classes index.jsp Now extract the struts framework and copy all jars from lib and past it into lib folder of your workspace.
  • Make a struts.xml into your src and configure it into deployment descriptor file ( web.xml file) e.g. R4R Struts Examples action org.apache.struts2.dispatcher.FilterDispatcher  /WEB-INF/web.xml 1 action *.do Or R4R Struts2 Examples action org.apache.struts2.dispatcher.FilterDispatcher  /WEB-INF/web.xml 1 action /do/* 
  • We will cover more about this web.xml configuration files into our next section. Following is black struts.xml .In struts.xml we configure Action classes , plug-in etc We will discus more about struts.xml in our next topic.
  • Your final workspace looks like R4RSTrutsExamples WEB-INF Lib(All jars will put into lib folder) *****.jar ****.jar web.xml struts.xml classes(All classes will put here) index.jsp All JSP files,images,CSS etc will put here Now your Struts Workspace is ready. Now you can start to develop a struts2.0 application. Download this blank Workspace from our website.Just copy and past on your http://r4r.co.in/java/struts2/basic/tutorial/R4RSTruts2Examples.zip Here we had added only struts core jar file you can add rest all as per as your need. 
  • We will cover full example into our next topic.

Previous Home Next