NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Please follow carefully the steps mentioned in this the Installing_LexEVS_6.0_Local_Runtime guide.

Once all the steps have been followed successfully you should have a functional LexEVS Local Runtime instance.

...

Make note of your installation folder.

Installing Tomcat 6

  1. Navigate to the Tomcat 6 download page and download the appropriate package for your system. The binary core distribution (zip) is the most usual one.
  2. Unzip the content of the file in the desired folder and make note of it.

Installing SpringSource Tool Suite (Tested with Version 2.7.1)

  1. Navigate to the STS download page to download the software. Please note that you don't have to fill out the form. If you do not wish to fill it all, just check the checkbox to accept the license terms and click on the link "Download Page" bellow the "Download Now" button.
  2. Choose the appropriate version for your environment and install it. Make sure that you have the Java JDK 1.6 (or less ideally 1.5) installed.
  3. During setup, make sure to make a note of where you installed the program. During step 4, make sure "Apache Maven 2..." in selected.
  4. You can launch STS and select the location of your workspace. You will then be presented with the Welcome page. You can close it with the "x" next to the tab on top left. This will bring a Spring perspective.

Setting up Tomcat 6 in STS

  1. Open STS. It should be enabled by default but make sure you're in the Spring perspective. In the left lower corner should be the server view.
  2. Right-click in the view and choose "New -> Server" in the context menu.
  3. Type "Tomcat" in the "Select the server type:" textbox. Then scroll down in the selectbox bellow and choose Tomcat v6.0 Server. Click "Next".
  4. On the next screen, browse to your tomcat install folder and select it.
  5. Click on "Finish"
    You should now see an entry named "Tomcat v6.0 Server at localhost" in the server view.

Creating a New Spring MVC 3 Project

  1. Click on the menu File -> New - > Spring Template Project.
  2. Select Spring MVC Project from the list and click

...

  1. Next.
    1. It will ask you if you want to download file: click Proceed.
  2. Enter a project name. For this guide we will name it "testlex".
  3. Enter the top level package (x.x.x). We will name it "org.test.test".
  4. Click on Finish.
    It might take some time before your back to a responsive Spring perspective. STS will need to download some dependencies for the project.
    You should then see your project testlex in the package explorer view on top left part of the windows.

Small STS Warning That Can be Fixed

...

The issue has been described in a Spring forum post but the "Key" that needs to be entered is ":

No Format
-//APACHE//DTD LOG4J 1.2//EN

" and NOT "-//LOGGER" ( - this changed from the previous STS version).

The solution is:

  1. Menu Windows -> Preferences -> XML -> XML Catalog
  2. Click on add
  3. Click on File System and select the jar. It should be something similar to: {SpringSource install folder}\sts-2.7.1.RELEASE\plugins\org.apache.log4j_1.2.15.v201012070815.jar
  4. Add "jar:file:" in front of the path and !/org/apache/log4j/xml/log4j.dtd at the end of the path (without the ")
  5. In the key textbox, enter -//APACHE//DTD LOG4J 1.2//EN (without the ")
  6. Click Ok to close this window, then ok again to close the preference window.
  7. Once you follow the instructions, you need to add and remove a space to trigger a modification then save the file. The warning should be gone. Do this for both log4j.xml files:
    • one in src/main/resources
    • one in src/test/resources

Verification

  1. Select the textlex folder project in the package explorer window then click on play button or click on the menu "Run" -> Run
    The next window will ask you how you want to run the project. Select "Run on server".
  2. In the list on the next window, you should see the "Tomcat v6.0 Server at localhost" entry that you created earlier. Select it and check the box "Always use this server..."
  3. Click Next, then click Finish.
    You should then see the "Hello world!" page with the current time on it.
    You now have a functioning Spring 3 MVC project.

...

As these Maven dependencies are not available in a public repository, we you will need to add them to our local repository.

Open a command window and navigate to the {SpringSource install folder}\maven-2.2.1.RELEASE\bin folder. On windows Windows 7, you can use the file explorer to navigate to this folder and then "Shift+right click" in the folder and select "Open command window here".

...

Should you have an error message stating the need for a JAVA_HOME system variable when you execute the MVN commands, please follow the appropriate steps for your system to add it (steps provided bellow for Windows 7).

  1. On Windows 7, click on the start button, then right-click on computer and select properties.
  2. Select Advanced system settings in the left pane and select the advanced tab in the window that opens up. Click on Environment Variables button.
  3. Click on the button New in the lower half of the window and add JAVA_HOME as a name and the path to your JRE installation as a value. Click OK 3 times to close the windows. Close and reopen your commmand window and it should now work.

MVN Commands

For all the following commands, please change *E:* to the path of the folder chosen to place the four files above.

...