GWT can debug the complete instance of the customer and service in the eclipse and Tomcat (database connection pool) Step by Step-expand tomcat in the Host Mode

Source: Internet
Author: User
Use Tomcat for browsing, instead of the built-in GWT, so that Tomcat context information can be obtained and the client can be submitted in one step.

Complete source code (for the convenience of the compiled files): wylpeace-Tomcat

Environment Establishment
1, download eclipse3.2: http://download.eclipse.org/eclipse/downloads/index.php
2, download tomcat5.5: http://tomcat.apache.org/download-55.cgi
3, download Tomcat Plugin: http://www.sysdeo.com/eclipse/tomcatplugin
4, download googlipse plug-in: http://sourceforge.net/projects/googlipse
5. Install the SDK (go to Google for installation)

Officially started
Create a GWT project developed with eclipse (use the eclipse and googlipse plug-ins. If you do not want to build it, you can download the source code)
There are two methods: a gwt Command Line Method B googlipse plug-in
The B method is used here.
1. download and install the googlipse plug-in
2. Configure the googlipse plug-in.
Window -- preferances -- googlipse: enter the correct location of the GWT development kit.
3. Create a "googlipse -- GWT project" project named wylpeace
In the following steps of the wizard, modify

Note the modifications made in "Default Output Folder" below the Graph

4. Create the directory structure "wylpeace/samples/select" under "src"
5. Right-click the select package and choose "New"> "GWT module"
Add your own content (refer to the source code)

Configuration of Tomcat database connection pool

Reference: http://www.blogjava.net/peacess/archive/2006/06/29/55778.html
The simplest method is to copy the two files "server. xml" and "context. xml" under the source code directly to tomcat5.5/CONF.

Configure the Tomcat runtime environment in eclipse

Configure the plug-in first
Window -- "preference --" Tomcat: Configure "Tomcat home" and "Tomcat vesion" -- "advanced: Configure" Tomcat base "(the same as" Tomcat home ") --" JVM setting: select "JRE". Note that it must be the JRE under JDK. Otherwise, the server code cannot be debugged.

Then (there are a lot of configuration content, there is no way)
1, add the file "Web. xml" content under "WEB-INF" such as source code
2. Create a directory "lib" under "WEB-INF"
3, process the gwt-user.jar file (cannot directly put into the lib directory), here ant to operate, create an ant file "build. XML, note to modify the gwt-user.jar path, open it, right-click on the right and choose stripgwt-lib -- run. In this way, a gwt-user.jar file that can be used under Tomcat is generated under the "lib" directory.

Configure hosted of GWT

1, extract the gwt-user.jar (under the original GWT)
2. Copy the "GWT-user/COM/Google/GWT/CORE/public/gwt-hosted.html#history.html" file to "www/wylpeace. samples. select. wylpeaceselect (this is a key step for One-Step client debugging)
3. Right-click the project "wylpeace" -- "Debug as --" debug ", as shown in

Note the selected part "-noserver-port 8080" in the figure (in this way, the default port 8888 of GWT can be changed ),
Modify the "classpath" label in this figure as follows:
Select "User entries" -- "Advanced --" OK -- "and select" wylpeace/Web-INF/classes "--" OK.

All configurations are complete. We can start single-step debugging.
Restart Tomcat (in eclipse) and run "wylpeace. samples. Select. wylpeaceselect" in debugging"
The webpage cannot be found. The URL is changed to http: // localhost: 8080/www/wylpeace. samples. Select. wylpeaceselect/wylpeaceselect.html.
Okay. The whole process is over. If you have any questions, please contact
Mail: peacess@163.com
QQ: 64407724
You can also refer to: http://jroller.com/page/masini? Entry = deploy_and_debug_google_web
You can also refer to: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/338c4b765d7dfc39/c9382d0e65266248? Q = Tomcat & rnum = 3 # c9382d0e65266248
 

Related Article

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.