Tutorial Eclipse

From Plex-XML
Jump to: navigation, search

Tutorial workflow: Plex-XML tutorial main pagePreparing your environmentExtract the tutorial from CVSRestore the tutorial DBTutorial PlexTutorial EclipseTutorial application user guideTutorial debugTutorial LogHelp 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.
Hint.png Hint: Be aware to use the normal '/' instead of the '\' when you change any path details in ANT.
TutEclipse10.png
Localtomcat.properties.png
  • 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.
Tutorial SRC.png
  • 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.

Hint.png 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 AntShowsLessContent.png

instead of this within the Ant view ... AntShowsAllContent.png

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.

AntPropertiesBaseHome.png


Next steps

In the next steps you are going to

Take the next steps...

Personal tools