NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

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

...

You will need internet access to complete this guide.

LexEVS Local Runtime Install

Please follow carefully the steps mentioned in this guide.

...

Make note of your installation folder.

Installing Tomcat 6

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.

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)

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.

...

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

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.

...

You should now see an entry named "Tomcat v6.0 Server at localhost" in the server view.

Creating a

...

New Spring MVC 3

...

Project

  • Click on the menu File -> New - > Spring Template Project
  • Select Spring MVC Project from the list and click next
    • It will ask you if you want to download file: click Proceed.
  • Enter a project name. For this guide we will name it "testlex"
  • Enter the top level package (x.x.x). We will name it "org.test.test"
  • Click on Finish

...

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

There's a little bug that is annoying in STS regarding missing XML definition. You should see a tiny warning icon on your project and if you drill down, it relates to the file "log4j.xml".

...

  • one in src/main/resources
  • one in src/test/resources

Verification

Select the textlex folder project in the package explorer window then click on play button or click on the menu "Run" -> Run

...

You now have a functioning Spring 3 MVC project.

Adding LexEVS as a Maven

...

Dependency

The Spring 3 MVC project being a Maven compliant project, we will add LexEVS as dependency. It is not available in a public repository so we will need to install in our local repository first.

Downloading the

...

Required Files

You will need 4 files to successfully add LexEVS as a dependency.

  1. LexEVS jar: Can be found in your local LexEVS install: {LEXEVS_HOME}\runtime-components\lexbig.jar
    • For easier access, copy it to a short location. We will use E:\
  2. Wiki Markup
    LexEVS POM file: This includes the information on the dependencies LexEVS will rely on. You can download it !Lexevs-6.0.0.pom.zip|thumbnail,width=10px!
    • Unzip it to the same location [E:]
  3. LexEVS uses a patched version of the dependency ddlutils. You need to download it here
    • Place it in the same directory [E:]
  4. Wiki Markup
    This dependency also has a POM file which you can download !Ddlutils-1.0-PATCHED.pom.zip|thumbnail,width=10px!
    • Unzip it to the same location [E:]

Installing a LexEVS

...

Dependency

As these Maven dependencies are not available in a public repository, we 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 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".

JAVA_HOME Environment Variable Missing

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).

...

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 4 files above _

...

Right-click Local Repository and select Rebuild Index from the context menu. Click Ok when asked if you're sure you want to rebuild it.

Adjusting

...

Scope of JUnit

LexEVS currently uses JUnit during runtime. This is a bit unusual and might change in a future release but for now, it needs to be adjusted.

...

Click on menu File -> Save or press Ctrl-s.

Including LexEVS in the MVC Project

Select the textlex project. Right-click on it and select Maven -> Add Dependency from the context menu.

...

STS will now download all the dependencies needed to work with LexEVS. You can follow the progress in the progress view (tab).

Creating a

...

Test File

Select and unfold the project folder testlex in the package explorer.

...

Make sure to change the package name if you didn't use org.test.test initially. Save the file.

Adding a JVM

...

Parameter to

...

Locate the lbconfig.props

In STS, select the menu Run -> Run Configurations...

...

You should then see a successful completion of a JUnit test. The console log will also show "The currently active terminologies are:" followed by the name of the terminologies Automobiles if you loaded it.

Integrating LexEVS in a

...

Web Page

Adding a JVM

...

Parameter to

...

Locate the lbconfig.props

In STS, double-click on the "Tomcat v6.0..." entry in the server view (left lower corner).

...

Click Apply then click OK.

Adjusting the

...

Controller

Although this is unlikely the way in which you will integrate LexEVS in a MVC project, it will confirm that using the project with Tomcat works. This assumes that you have at least one loaded and active terminology in your local LexEVS Server.

...

Make sure to change the package name if you didn't use org.test.test initially. Save the file.

Adjusting the JSP

...

Page

In the Package Explorer, nagivate to src/main/webapp/WEB-INF/views and open home.jsp by double-clicking.

...

Save the file and close it.

Running the

...

Project

Select the project testlex in the Package Explorer.

...

You now have a functional Spring 3 MVC project interacting successfully with a local instance of LexEVS.

...

Aknowledgement

This guide was contributed by the TRANSFoRM group / INSERM U936.

...