> Overview (Steps)

Import the Struts framework (into Eclipse)

For this document and all references (links) please obey the hints and regulations concerning copyright, disclaimer and trademarks.

Last revision of this document:
2005-06-13

This document gives instructions how to install the Struts framework into an Eclipse IDE.

The Struts framework contains all Struts specific Java classes and sets up a project-structure.
The imported framework is a base for the development of own projects.

Prerequisites:

Installation-instructions:

The installation is split into
   a Base-Installation and
   an Improved Configuration .

The Base-Installation creates a project and imports the Struts-framework into the just created project.

The Improved Configuration
◊  sets up additional directories to separate source-code and generated files and
  imports additional Java-Archive- (JAR-)Files containing additional classes.

Base-Installation:

The most current version (1.2.7 at the time of the last revision of this document) can be downloaded as zipped file from the following internet-site:
http://archive.apache.org/dist/struts/binaries/
.

Download the zipped file to a directory of your choice (furtheron referred as download_directory).

After the download is complete, change to the download_directory and unzip:
cd
/download_directory
unzip struts-1.2.7.zip

Import the framework (struts-blank.war) into an Eclipse project

Create a new project (named JS_Struts00) in Eclipse:



Import the Struts framework (struts-blank.war) into the project:

top.

Test:

top.

Improved Configuration:

Create separate directories for the source-code:

This step is a prerequisite for the Tutorial 'JS_Struts01 – HTML in a WAR' .

First, the existing directory 'pages' is deleted.
It is intended to hold the web-pages (*.html, *.jsp). This directory will be replaced by an adequate one under the directory 'src' (source).

Next, new directories for the source (Java-code and Web-pages) are created
A source directory for Java-Code is not already a prerequisite for 'JS_Struts01 – HTML in a WAR', but it is easier to create it now in one go.



Next, the 'Build Path' (were the compiler looks for Java-source-code) is defined.



Finally, the 'index.jsp'-file in the root-folder is deleted.
(It will be created again in the folder 'src/web-pages' in the following lessons.)

To verify the changes, expand the project ('JS_Struts00') by clicking onto the triangle left.
You should see, that the 'src/java' folder is displayed directly under the project-folder.

top.