NOTE: This page is a translation from the original Japanese version of setup.html, rev 692 as of 2008-08-15.

Menu

Setting up

Setting up Tutorial

The tutorial project is configured for use with Eclipse, Tomcat and Tomcat launcher. Though SAStruts itself does not depend on any specific IDEs or app servers, you should use Eclipse, Tomcat and Tomcat Launcher for tutorial.

1. Tutorial project

Download sa-struts-tutorial-xxx.zip from the download page and extract the archive.

Import a directory named sa-struts-tutorial in the extracted contents as an Eclipse project.

2. Tomcat and related plugin

Install Tomcat from this link following the instrunctions. Select a release of version 5.5 or later. Installation is not needed if you have already installed one.

Tomcat Launcher is a plugin developed by EclipseTotale. You can install it from the Eclipse3.2 update site of Seasar Project. From Eclipse menu, select [Help]-> [Software Updates] -> [Find and Install…] to show Install/Update dialog.

Check [Search for new features to install] radio button then click [Next]. Click [New Remote site], enter [Seasar Plugin3.2] to [Name], enter [http://eclipse.seasar.org/updates/3.2/] to [URL], then click [OK].

Click [Finish], then Tomcat Launcher appears as an option. Check it and install. Installation is not needed if you have already installed one.

3. Plugins to facilitate development with SAStruts

SAStrutsPlugin is an Eclipse plugin to assist your development work with SAStruts. You can switch between a Java file and a corresponding JSP. For datails, see SAStrutsPlugin page.

To use SAStrutsPlugin, WST2.0 is required. WTP2.0 is already installed if you use Eclipse IDE for JAVA EE Developers. If you use other distributions, check Eclipse site and install required packages before you proceed.

ResourceSynchronizer is a plugin to operate Eclipes from your web browser. By using it, you can display stack trace and the appropriate part of the source code when an JAVA exception is thrown.

You can install SAStrutsPlugin and ResourceSynchronizer from the Eclipse3.3 update site of Seasar Project.

From Eclipse menu, select [Help]-> [Software Updates] -> [Find and Install…] to show Install/Update dialog.

Check [Search for new features to install] radio button then click [Next]. Click [New Remote site], enter [Seasar Plugin3.3] to [Name], enter [http://eclipse.seasar.org/updates/3.3/] to [URL], then click [OK].

Click [Finish], then ResourceSynchronizer and SAStrutsPlugin will appear as options. Check them and install. Installation is not needed if you have already installed one.

4. PropertiesEditor Plugin

Optionally, you can install PropertiesEditor plugin to edit .properties file in a native language, e.g. Japanese. Though this plugin is optional, it is very useful for developers who handle properties with i18n characters.

From Eclipse menu, select [Help]-> [Software Updates] -> [Find and Install…] to show Install/Update dialog.

Check [Search for new features to install] radio button then click [Next]. Click [New Remote site], enter [PropertiesEditor] to [Name], enter [http://propedit.sourceforge.jp/eclipse/updates/] to [URL], then click [OK].

Click [Finish], then PropertiesEditorForEclipse3.x appears as an option. Install it. Installation is not needed if you have already installed one.

5. Setting after the installation and checking that it works

After the installation, let us configure Tomcat Launcher. In the menu, select [Window] -> [Preferences…]-> [Tomcat]. Specify Tomcat version and Tomcat home to the version you have downloaded and the directory you have installed Tomcat. Select Context files as Context declaration mode, then click [OK].

Right-click the project of sa-struts-tutorial then select [Tomcat project] -> [Update context definition]. That's all for Tomcat Launcher configuration.

The next step is to configure Tomcat. Modify conf/server.xmlconf/context.xmlconf/web.xml following the instructions found in the links.

Now let's start Tomcat. From the Menu, select [Tomcat]->[Start Tomcat] to start Tomcat. Confirm that the startup process is complete with no errors, then access
http://localhost:8080/sa-struts-tutorial with your web browser. If index page is displayed, that indicates that the setup prcess goes well.

Please proceed to Tutorial.

Setting up Blank

You can create a new SAStruts project with an Eclipse plugin named Dolteng. For installation of Dolteng, see here.

A project made with Dolteng has H2 database installed as a default [but you can use other databases as well, of course ]. If you want to try SAStruts with H2 as the first step, install DbLauncher from the following update site (for Seasar Plugin3.2).
http://eclipse.seasar.org/updates/3.2/

Now we will confirm settings of Dolteng. Open Dolteng Settings Dialog with [Window] - [Preferences]. Uncheck Download resources from online checkbox if you don't use Maven2. Or, in the case you use Maven2, you have to set Maven Repository Path.

See here to know how to create a new project.[While the page of the link above is in Japanese, the outline should be clear from screenshots and the context .] Select "S2JDBC" for Persistence; "SAStruts" for Presentation. Other options include various Seasar and related subproducts which may work with SAStruts, but we are not going to dig into them in detail here.

Primitive Setup

In the case you want to set up without relying on Tutorial nor Blank, download sa-struts-turorial-xxx.zip from the download page and extract the archive to obtain required files.

Add files in sa-struts-tutorial/src/main/resources to your classpath.

Copy files in sa-struts-tutorial/webapp/WEB-INF into WEB-INF.

Copy files in sa-struts-tutorial/webapp/WEB-INF/lib into WEB-INF/lib.

Specify a root package for your project. For details of root package, see Project components.

For configurations of data access, please see here.

For configurations of transaction, please see here.