Configure the development environment for myeclipse to develop Webtop

Source: Internet
Author: User

In EMC's Documentum, in current version 6.5, using wdk to develop Webtop is a standard method, but wdk is quite complicated, it is difficult to understand wdk only by reading the development documentation. Therefore, debugging wdk through debug becomes an urgent requirement. After a day of trial, the configuration is successfully configured and shared with you, avoid detours for others.

1. install Tomcat and deploy Webtop

1. Install tomcat6.0

Install Tomcat in c: \ Tomcat 6.0.

2. Deploy webtop6.5

(1) copy the downloaded webtop6.5 to c: \ Tomcat 6.0 \ webapps \. The virtual directory is Webtop.

(2) modify the DFC. properties file under Webtop \ WEB-INF \ classes so that it can find the repository of Documentum, as shown on my machine:

Dfc.doc broker. Host [0] = Wu
Dfc.doc broker. Port [0] = 1489

DFC. globalregistry. Password = kmywfpemmrpphrf5lwazxg =
DFC. globalregistry. repository = Documentum
DFC. globalregistry. Username = dm_bof_registry

DFC. session. allow_trusted_login = false

In the development and testing environment, when the content server and the Web server are installed on the same machine, you can also reference DFC. properties to the content server configuration, as shown below:

# Include D: \ Documentum \ config \ DFC. Properties
DFC. session. allow_trusted_login = false

3. Configure Tomcat

(1) Tag library support

When the tag library support is not set, the prompt "Export com.doc umentum." is displayed when you open the website. web. form. control. tagpoolingenabledexception: JSP tag pooling is not supported. please refer to the product deployment guide for instructions on turning off tag pooling for the application server."

By viewing the relevant documentation, you know that you need to modify the Web. xml file in Webtop \ WEB-INF and add a servlet section in it, as shown below:

 
   
     JSP 
    
   
     Org. apache. jasper. servlet. jspservlet 
    
    
    
      enablepooling 
     
    
      false 
      
     
     
       fork 
      
     
       false 
      
     
     
     
       xpoweredby 
      
     
       false 
      
    
    
   
     3 
     

After modification, restart the Tomcat service and you will see the Webtop interface (Note: if the error persists, delete all files in c: \ Tomcat 6.0 \ work ):
(2) If JVM performance settings are not configured with relevant performance parameters of the Java Virtual Machine, memory overflow may occur when running Webtop, in this case, you need to set the memory and other parameters of the Java Virtual Machine in Tomcat. Open "Apache Tomcat 6.0" and "Configure Tomcat" in the program in the Start menu, select the Java page in the pop-up window, and add the following parameters in the following Java options:

-Xms512m
-Xmx512m
-XX: permsize = 256 m
-XX: maxpermsize = 256 m
-XX: reservedcodecachesize = 48 m

Parameters can be selected based on the actual situation of the machine, but an error is reported when the-xms512m memory setting and-xmx512m exceeds GB on a 32-bit machine. You need to set the parameters for trial, for more information, seeArticle.

2. Configure the development environment

1. Install jdk1.5

In the current wdk 6.5sp3, jdk1.5 must be used, and 1.5 must be used for the corresponding JRE. Otherwise, a compatibility error may occur. In the experiment, I used jre6, therefore, the class implementing the resetset interface in the source file of wdk needs to implement a large number of abstract methods. This problem can be solved only after jre5 is used.

2. Install myeclipse

3. Set myeclipse

(1) Open myeclipse and set the workspace. Then, click "Windows-> Preferences" and "Java-> compiler-> building"

, Deselect "scrub output folders when cleaning projects ",:

Click installed jres, click Add, and enter the jdk1.5 path in JRE home directory, as shown in:

Click "OK" and then confirm that only jre1.5 is used in the returned list.

(2) Open myeclipse, set the workspace, click "file", "new", and "Java Project", and set the settings in the displayed window:

After clicking Next, do not set any source folder and keep the default output directory Webtop/WEB-INF/classes ,:

Click Finish.

Right-click Webtop in navigator on the left, select "new" and "folder" in the pop-up menu, and make the following settings in the pop-up window:

Where the folder name is arbitrary, in advanced, you need to link this folder to Webtop \ WEB-INF \ classes, which will be set later, use it as the library introduced in the build path of the project.

Click "finish" to create the folder.

(2) Set build path

Right-click "Webtop", click "properties", in the pop-up window, click "Java build path", if the current configuration has not introduced the \ WEB-INF \ lib directory package, you can introduce it manually.

After adding the DFC jar package, you also need to add the servlet and JSP jar packages. The two Java packages must use, in my machine, these two jar packages are in c: \ Tomcat 6.0 \ Lib ,:

Click "open" and click "add class folder" in the returned window to add the wdkclasses directory created above ,:

Click OK and click OK in the returned window to exit the settings.

Now, using Ctrl + B for build may cause errors. The error message may be strange. The error message is: the type comparable is not generic; it cannot be parameterized with arguments <string>. To solve this problem, select order and export in the Java build path, and check the above mentioned JRE System Library ,:

Click OK and then re-compile.

(3) IntroduceSource code

In the wdk Development Kit, EMC provides some sourcesCode, This part of the source code is very important for us to debug, which needs to be introduced into the myeclipse environment.

Create the SRC folder in webcomponent In The Webtop directory on the left ,:

Paste all the files in the src directory of wdk. War \ webcomponent In the downloaded wdk folder to the src directory above ::

To enable myeclipse to compile these files, you need to click the Add folder button on the Source Page of Java build path and select SRC under webcomponent in the pop-up window ,:

The following error occurs when you build a project by pressing CTRL + B: the project was not built since its build path is incomplete. cannot find the class file for javax. portlet. portletrequest. fix the build path then try building this project. This shows that the jar package of the corresponding Portlet is missing. Although we are not a porltet environment, this jar package is required for the wdk source code environment, so we need to introduce this jar package. The jar package is: portlet-api-1.0.jar. On the Libraries page of Java build path, click "add external jars" to introduce this jar package ,:

There should be no errors after building again.

The downloaded wdk folder also contains a SRC folder, which contains some control-related source code. To introduce these source codes, right-click the wdk folder in the left-side directory tree, "New" and "folder" to create a SRC Folder ,:

Copy the downloaded SRC file in the wdk to the src directory created above ,:

Similarly, you need to add webcompoent to the source page in the Java build path so that myeclipse can compile it. In my machine compilation, datetimetag is found. A compilation error occurs in the Java file. If a problem occurs in the annotation, delete the annotation.

If a large number of errors are found, you can try to right-click the myeclipse Webtop project and change "text file encoding to UTF-8" on the Resources page, as shown in:

(4) Add the Tomcat server to myeclipse

In the Preferences Field in the window menu, click my Eclipse, servers, tomcat, and 6.x to set the parameters as shown in.

Click OK to save the settings.

(5) set and debug the custom environment

In wdk development, custom configuration and code must be placed in the Custom folder. Therefore, you must create the SRC folder in the Custom folder, put it in the source of Java build path as above, and add the wdk tutorial Hello Webtop for testing, as shown in:

After you set a breakpoint in hellowebtop. Java and enable tomcat in my eclipse (which must be enabled in my eclipse), when you run hello_world.jsp, the breakpoint is displayed, as shown in:

 

The configuration environment is successfully tested.

Note:

1. if you encounter a large number of compilation errors, it may be because of the class file. In this case, use the original WEB-INF \ Classes \ com \ Documentum to overwrite the same directory in the development environment, and then delete wdkclass in myeclipse, and then create a new link, and then put it in the library in build path.

2. the type comparable is not generic; it cannot be parameterized with arguments <E> error: Select JRE in order and export and put it to the top.

3. If an error occurs when Tomcat is added and started, check whether the Tomcat SDK 1.5 is used in myeclipse.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.