RPC setup in WCE V1.1 with Java 1.5 and GWT 1.3.1

0 views
Skip to first unread message

gkhosrow

unread,
Feb 19, 2007, 9:26:39 PM2/19/07
to Google Web Toolkit
After some effort, I finally got RPC working in both Hosted mode and
external servers using Eclipse 3.2 with Tomcat 5.x and Websphere
Community Edition 1.1 and Java 1.5 - here it is in a nutshell:

1) To keep this post short, I leave the actual RPC programming to
other posts and google docs - it's very niceley explained.

2) Make sure you get it working first in the hosted mode - I used try/
catch to make sure I caught all exceptions and displayed meaningful
messages instead.

3) example: MYAPP.gwt.xml

<module>
<inherits name='com.google.gwt.user.User' />
<inherits name="com.google.gwt.xml.XML" />
<entry-point class='com.mydomain.client.MYAPP' />
<servlet path="/MYAPPServiceImpl"
class="com.mydomain.server.MYAPPServiceImpl"/>
<stylesheet src='MYAPP.css' />
</module>

3.1) make sure you also setup the web.xml properly: web.xml
<servlet>
<servlet-name>MYAPPServiceImpl</servlet-name>
<servlet-class>com.mydomain.server.MYAPPServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MYAPPServiceImpl</servlet-name>
<url-pattern>/www/com.mydomain.MYAPP/MYAPPServiceImpl</url-pattern>
</servlet-mapping>

4) Make sure your build and compile commands include all jar files and
classes.

5) you should be able to run in hosted mode withour any problem at
this point.

6) gwt-user.jar includes javax package - you need to open it with a
jar tool or rar and remove the javax package - make sure you also
adjust the index.list in the META-INF diretory. repackage it and
either include it in the war file's lib or copy it to common/lib for
tomcat - for WCE, i just placed the jar file in the lib of my
application war file.

7) deploy your war file - it should run withour any errors....

8) If you have problem on the server side - you can always cut and
paste the url-path for your servelt and test it to see it's avalable
and working....

Reply all
Reply to author
Forward
0 new messages