First Time Setup
Follow the setup process below for the standard ACT development environment.
Requirements:
- Windows
- Java SE Development Kit (JDK)
- Tomcat & decorators webapp
- Eclipse
- ITAG webappCreator
If you are not familiar with the above technologies or want to see how the UXT stack compares with the JLink UI, visit our fundamentals page.
Windows
Most ACT developer workstations run Windows 7 Professional (64-bit). These instructions may work on MacOS 10.6 (Snow Leopard) -- skip the "JDK" section below and change installation paths accordingly.
JDK
If you already have a working JDK, you may skip this section as long as the PATH
environment variable includes your JAVA_HOME\bin
. Otherwise, please follow the instructions below.
- Download latest Java SE Development Kit 1.6 (and 1.7 and 1.8) from (http://java.sun.com/javase/downloads/index.jsp)
- Follow the instructions on Sun’s website (http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html)
Tomcat
If you already have a working servlet container setup with the JLink environment on your desktop, you may skip this section as long as you have the /decorators
webapp. Otherwise, you may follow the instructions below.
The current ACT production environment uses Apache Tomcat 6, which supports Servlet API 2.5 and JSP 2.1.
Most developers put Apache Tomcat on their desktop development environment.
- Follow the installation instructions in Y:\SPT\Tomcat\tomcat_v6.
In this guide, we’ve installed Tomcat 6 to C:\apache-tomcat-6.0.20
.
Eclipse
Install Eclipse
- Download and install "Eclipse IDE for Java EE Developers" (Eclipse Helios 3.6 is the latest version tested with these instructions.)
- Follow the instructions on Eclipse's website for installation.
- Download and save the Java Formatter & JavaScript Formatter xml files to your eclipse directory
- UCSD Java Formatter xml file (i.e save as UCSD-Java.xml)
- in Eclipse goto Window -> Preferences -> Java -> Code Style -> Formatter -> Import
- in Eclipse goto Window -> Preferences -> Java -> Editor -> Save Actions
- Check “Perform the selected actions on save”
- Enable “Format source code, Format all lines” and “Organize imports”
- To turn off formatting in special cases for Java use:
- // @formatter:off
- SPECIAL CODE
- // @formatter:on
- UCSD JavaScript Formatter.xml (i.e save as UCSD-JavaScript.xml)
- in Eclipse goto Window -> Preferences -> JavaScript -> Code Style -> Formatter -> Import
- in Eclipse goto Window -> Preferences -> JavaScript -> Editor -> Save Actions
- Check “Perform the selected actions on save”
- Enable “Format source code”
- Right click on the Java Source folder and select Source -> Format
- Right click on the folder(s) containing your JavaScript and select Source -> Format (DON'T FORMAT 3rd PARTY LIBRARIES OR MINIFIED FILES)
Install Subversive
UXT makes extensive use of the Subversion revision control system, as does the rest of ACT. We recommend the use of the very useful Subversive plugin. To install, go to the Subversive, follow the instruction on polarion'swebsite.
Configure
- Under
Window
>Preferences
>General
>Workspace
, set default character set toUTF-8
and set default line ending toUnix
(Believe me, you don't want to keep cp-1252 as your default.) - Under
Window
>Preferences
> Web, navigate to the CSS, HTML, and JSP menus and set default character set to "ISO 10646/Unicode (UTF-8)" - Under
Window
>Preferences
>Java
>Installed JREs
, add the Java Development Kit you just installed (default path should be possiblyC:\Program Files\Java\jdk1.6.xx
) and check the box on the left to set it as the workbench default. Note you must have a Java Development Kit as the workbench default -- a Java Runtime Environment is not sufficient no matter how recent. - Under
Window
>Preferences
>Server
>Runtime Environments
, addApache Tomcat 6.0
and setTomcat Installation Directory
to the path of the Tomcat 6.0 instance you installed in Step #3.
Configure Common Build
You'll only need to do the folowing steps if you are following the standard setup instructions. If you are following the Eclipse setup instructions, you may skip this step.
Create a file build.properties under ~/build/
. In Windows, this will be C:\Documents and Settings\[YOUR_USER_NAME]\build\build.properties
.
Add the following to build.properties:
local.server.dir=[TOMCAT_HOME]
In this guide, this value is:
local.server.dir=c:\\apache-tomcat-6.0.20
The default webapps directory for Tomcat 6 is [TOMCAT_HOME]\\webapps
and the default lib directory is[TOMCAT_HOME]\\lib
. If you are using Tomcat 4 or any other servlet container that has a different directory setup, please update the following variables:
local.server.webapps.dir=[SERVER_WEBAPPS_DIR] local.server.lib.dir=[SERVER_LIB_DIR]
Eclipse Setup for Decorators Web Application
- Get the currently supported version of the
decorators
webapp from TeamForge. (See "Download" page for current version.) - Find the
build.xml
file at the project root level and right-click - Select
Run As > Ant Build...
- Check
deploy
and click onRun
button
Eclipse Setup for Template Web Application
Install webappCreator
- Get the currently supported version of
webappCreator
from TeamForge. (See "Download" page for current version.) - Look for
build.xml
in the project root folder and one folder webapp" -- if so the import was successful.
Creating a New Webapp
- Find the
build.xml
file at the project root level and right-click - Select
Run As > Ant Build
- Check the Eclipse console to monitor execution
- You will be prompted for the name of the new webapp. Enter the desired name (e.g. "hello")
- Once the Ant build completes, import the new project folder into your workspace:
- Choose
File
>Import
thenGeneral > Existing Project into Workspace
- In the next screen, go to
Root Directory
and navigate to your workspace folder - Select your new project folder
- Make sure
Copy projects into workspace
is unchecked (it's already there) - Click
Finish
and check to make sure the new project is visible in Project Explorer
- Choose
- Right-click on the new project and select
Properties
- Go to
Java Build Path > Libraries
and click on theAdd Library
button - Select
Server Runtime
then chooseApache Tomcat 6.0
- All webapp dependencies should now be resolved. Happy coding!
Want to know more?
If you want to find out more about webappCreator and what it generated for you. Visit the webappCreator section.Launching your webapp
To launch the new webapp from Eclipse:
- Switch to the
Servers
tab - Right-click and select
New > Other
- In the "Select a Wizard" dialog box, select
Server > Server
- In the
Define New Server
window, selectApache Tomcat 6.0
as server type, and changeServer Name
toJLink Tomcat
or other name of your choice - Double-click on the new server in the
Servers
tab, which should open anOverview
window - Under
Server Location
selectUse Tomcat installation
- Close and save to apply changes
- Right-click on your new project in Project Explorer and select
Run As > Run on Server
- In the
Run on Server
dialog, selectChoose an existing server
andJLink Tomcat
- Check the
Always use this server when running this project
box and clickFinish
to launch Tomcat