您的位置:首页 > 运维架构 > Tomcat

tomcat 中部署GWT的问题解决方案

2008-03-25 20:08 351 查看
 
OK got it running on Tomcat. Here are the steps

1. Strip the javax.* packages from gwt-user.jar . You can do it with
winzip/winrar etc. Open the jar in such tools and delete all files in
javax folder including the folder

2. Copy the stripped jar in your webapps/YourApp/WEB-INF/lib. Copy the
compiled classes (e.g copy the folder "com" in samples/dynatable/bin )
to webapps/YourApp/WEB-INF/classes

3. Modify your Service Entry point code (if required). Note the text
you put in place /calendar line. You will use this text in web.xml
later
ServiceDefTarget target = (ServiceDefTarget) calService;
String staticResponseURL = GWT.getModuleBaseURL();
staticResponseURL += "/YourApp/calendar";
target.setServiceEntryPoint(staticResponseURL);
4. Run DynaTable-compile.cmd (replace dynatable with app name). File
will be generated in www/com.google.gwt.sample.dynatable.DynaTable/ .
Copy all files within this folder to webapps/YourApp/

5. Create modify web.xml and place it in WEB-INF
<?xml version="1.0" encoding="UTF-8"?>
SchoolCalendarServicecom.google.gwt.sample.dynatable.server.SchoolCalendarService-ImplSchoolCalendarService/calendar
5. Launch tomcat. Open browser e.g.
localhost:8080/YourApp/DynaTable.html
6. Enjoy

该文章的原文地址为:http://javava.blogspot.com/2006/11/gwttomcat.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息