Tutorial Eclipse
From Plex-XML
Tutorial workflow: Plex-XML tutorial main page → Preparing your environment → Extract the tutorial from CVS → Restore the tutorial DB → Tutorial Plex → Tutorial Eclipse → Tutorial application user guide → Tutorial debug → Tutorial Log → Help text Wiki
Contents |
Prepare your Plex-XML-Tutorial project for the first usage
Usually you have to do this only once per project. There are two files with properties that need to be adjusted to your local configuration.
- Open Eclipse
- Open the navigator perspective, if not already done. To open the navigator perspective select (Menu: Window -> Open Perspective -> Other... /Select Resource)
- Open the "Plex-XML-Tutorial" project in the navigator perspective.
- Check the properties in your .ant.properties file.
See .ant.properties for details.
- Check the properties in your .localtomcat.properties file.
See .localtomcat.properties for details.
- Prepare ANT
- Open the ANT-View in Eclipse (Menu: Window -> Show view -> ANT)
- Drag & drop the build.xml from your project into the ANT View
- The result should look like the screenshot above where you can see the ANT-View in the right with the tutorial in the tree.
Your ANT-View must not be in the right part of Eclipse. The location depends on your configuration.
Build and deploy your first Plex-XML application
- Execute the 'plexCopy' task in ANT with a double click. The 'plexCopy' task is moving all sources form your Plex gen directory into your Eclipse project.
- After that you should be able to find the sources in your project. They have been separated by the packages you have defined bevor in Plex.
- Depending of your Eclipse configuration you have to do a refresh in your project. Right click on the directory and refresh.
- Optional step: Have a tentative look at the already prepared XML and XSLT configuration files.
- Execute the 'generate' task in ANT with a double click. This task generates a bean and a handler class for each for your Plex-XML functions. These bean and handler classes are responsible for the correct parameter mapping between Plex functions and our java servlet that handles the web requests.
- Execute the 'deployLocal' task in ANT with a double click. This task is going to build and depoly the application on your Tomcat server.
Test your application
The tutorial includes some of the all about base pattern like user managment, security and formats.
As a result you can't call the functions of you application without a valid login and session. So the first step is to login into your application.
- Open your browser and try the tutorial http://127.0.0.1/tutorial
(if your Tomcat listens on another port you have to adjust the URL e.g. http://127.0.0.1:8080/tutorial)- Username is: demo
- Password is: test
- Once you have a login you can call each function in the same browser window via it's URL:
In case your tutorial won't work:
- Check that you have the jtds-1.2.jar (JDBC-Driver JAR) or a later version in your tomcat/common/lib directory. Otherwise you could copy it from your tomcat/webapps/tutorial/WEB-INF/lib directory. Restart your Tomcat after copy. See Tomcat Data Sources for more information.
What if ...
... I can't see the Ant view?
You can open the Ant view in the Eclipse menu: Window -> Show view -> ANT
... I can't see the Ant scripts properly?
If you are seeing something like this
instead of this within the Ant view ...
you might have forgotten to set the the home directory of the base project properly. In order to set this home directory you need to edit the .ant.propterties as shown in the example below. But keep in mind that your Eclipse workspace might have a different address on your PC.
Next steps
In the next steps you are going to
- investigate the XML that is generated,
- analyze the execution and performance log and
- expand the tutorial by a format and some XSLT functions.




