dm_notes: Documentum Notes

October 10, 2007

Configuring WDK Development Environment in Eclipse

Filed under: documentum, wdk, webtop — Raj V @ 9:49 am

Abstract

This configuration guide is for developers who want to use the Eclipse IDE for WDK development. It discusses one approach for configuring Eclipse for WDK development.

Eclipse 3.1

Note: The configuration assumes that you do not have any plugins installed and that you have a base Eclipse install.

  • Click on the menu item ‘Windows->Preferences’.
    • From the tree view on the left hand side go to ‘Java->Compiler->Building’.
    • From right hand side unselect (clear) the ‘Scrub output folders…’ checkbox, which is under the ‘Output folder’ section. If this option is enabled then all standard WDK/Webtop classes will be scrubbed by Eclipse and you won’t be able to rebuild them if you don’t have the sources.
    • Click on ‘Ok’.
  • Click on ‘File->New Project’.
  • Select ‘Java Project’ and click on ‘Next’.
  • You need to create the project in an external location. There should be a ‘Checkbox’ that allows you to select this option and a ‘Browse’ button that allows you to browse-select the external folder.
  • Select the WDK/Webtop web application directory as the project folder. For example, <TOMCAT_HOME>\webapps\webtop.
  • Click on ‘Next’
  • Do not select any source folders right now. Leave the defaults.
  • Ensure that the output folder has been set to WEB-INF/classes folder. If not, browse and select it explicitly.
  • Click on ‘Finish’.
  • Right click on the new WDK project from the standard tree view in the Java perspective and click on ‘New->Folder’.
    • In the ‘Folder name’ text box, name the folder (e.g wdKClasses). This folder will be added, in a later step, in the classpath of the project so that the existing WDK classes can be referenced.
    • Click on the ‘Advanced’ button (towards bottom of screen) and check (select) the ‘Link to folder in filesystem’ Checkbox. Browse and select the <virtual-root>\WEB-INF\classes folder.
    • The above procedure creates a new folder in the project space that points to the ‘\WEB-INF\classes’ folder.
  • Right click on the new WDK project from the standard tree view in the Java perspective and click on ‘Properties’.
    • From the list on the left hand side of the ‘Properties’ window click on ‘Java Build Path’.
    • From the tabs on the right hand side select ‘Sources’. Select the PROJECT_NAME\custom\src as one of the source folders. You may add any number of additional source folders.
    • Now select the ‘Libraries’ tab and click on ‘Add External Jars’ button. Add the DFC-related jars and any other jars that you need.
    • In the previous step be sure to add the jars that contain the Java servlet and JSP classes. For Tomcat 4.1.30 on our machine, this jar was c:\Tomcat4130\common\lib\servlet.jar. For BEA 8.1 on our machine, this file was c:\bea\weblogic81\server\lib\weblogic.jar. For Tomcat 5.0.28 there are two jars, TOMCAT_HOME\common\lib\servlet-api.jar and TOMCAT_HOME\common\lib\jsp-api.jar
    • On the same tab click on the ‘Add Class Folder’ button and add the folder ‘wdkClasses’ that was created previously. This references all WDK\Webtop classes in the classpath.
    • Click on ‘Ok’

After completing this procedure, you can create your own classes and compile them. The results of compilation will directly go into the WEB-INF\classes folder just like the rest of the WDK/Webtop classes. You can also create XML configuration files and JSPs within the IDE using other Eclipse plugins for XML editing and JSP editing respectively. There is also a WDK Eclipse Plugin available on the Developer site.

Eclipse 2.1.x and 3.0

Note: The configuration assumes that you do not have any plugins installed and that you have a base Eclipse install.

  • Click on the menu item ‘Windows->Preferences’.
    • From the tree view on the left hand side go to ‘Java->Compiler’.
    • From the tabs on the right hand hand side select the ‘Build Path’ tab and unselect (clear) the ‘Scrub output folders…’ checkbox. If this option is enabled then all standard WDK/Webtop classes will be scrubbed by Eclipse and you won’t be able to rebuild them if you don’t have the sources.
    • Click on ‘Ok’.
  • Click on ‘File->New Project’.
  • Select ‘Java Project’ and click on ‘Next’.
  • You need to create the project in an external location. There should be a ‘Checkbox’ that allows you to select this option and a ‘Browse’ button that allows you to browse-select the external folder.
  • Select the WDK/Webtop web application directory as the project folder. For example, <TOMCAT_HOME>\webapps\webtop.
  • Click on ‘Next’ (or ‘Finish’ if it is enabled) and DO NOT select any source or output folders right now. Leave the defaults.
  • Click on ‘Finish’.
  • Right click on the new WDK project from the standard tree view in the Java perspective and click on ‘New->Folder’.
    • In the ‘Folder name’ text box name the project (e.g wdKClasses). This folder will be added, in a later step, in the classpath of the project so that the existing WDK classes can be referenced.
    • Click on the ‘Advanced’ button (towards bottom of screen) and check (select) the ‘Link to folder in filesystem’ Checkbox. Browse and select the <virtual-root>\WEB-INF\classes folder.
    • The above procedure creates a new folder in the project space that points to the ‘\WEB-INF\classes’ folder.
  • Right click on the new WDK project from the standard tree view in the Java perspective and click on ‘Properties’.
    • From the list on the left hand side of the ‘Properties’ window click on ‘Java Build Path’.
    • From the tabs on the right hand side select ‘Sources’. Select the PROJECT_NAME\custom\src as one of the source folders. You may add any number of additional source folders.
    • Now select the ‘Libraries’ tab and click on ‘Add External Jars’ button. Add the DFC-related jars and any other jars that you need.
    • In the previous step be sure to add the jars that contain the Java servlet and JSP classes. For Tomcat 4.1.30 on our machine, this jar was c:\Tomcat4130\common\lib\servlet.jar. For BEA 8.1 on our machine, this file was c:\bea\weblogic81\server\lib\weblogic.jar
    • On the same tab click on the ‘Add Class Folder’ button and add the folder ‘wdkClasses’ that was created previously. This references all WDK\Webtop classes in the classpath.
    • At the bottom of all the tabs there will be a text box that specifies the output folder. Select PROJECT_NAME\ WEB-INF\classes as the output folder.
    • Click on ‘Ok’

After completing this procedure, you can create your own classes and compile them. The results of compilation will directly go into the WEB-INF\classes folder just like the rest of the WDK/Webtop classes. You can also create XML configuration files and JSPs within the IDE using other Eclipse plugins for XML editing and JSP editing respectively. There is also a WDK Eclipse Plugin available on the Developer site.

Reference: Developer Center

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: