What changed in the XML format?

3 views
Skip to first unread message

mike303

unread,
Aug 14, 2006, 1:06:08 PM8/14/06
to Google Web Toolkit
This used to work in the previous version but breaks in 1.1, now it
complains that the login module can not be loaded, classpath issue. I
have tried various combinations of the <source> and <path> tags but
nothing works.

<module>

<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>

<!-- Specify the app entry point class. -->
<entry-point class='com.foobar.client.Main'/>

<servlet path="/com.foobar.Main/gateway"
class="com.foobar.server.GatewayServiceImpl"/>
<servlet path="/com.foobar.Main/login"
class="com.foobar.server.LoginServiceImpl"/>
</module>

cole...@gmail.com

unread,
Aug 14, 2006, 1:56:17 PM8/14/06
to Google Web Toolkit
I think one thing that changed is that instead of:

<servlet path="/com.foobar.Main/gateway"
class="com.foobar.server.GatewayServiceImpl"/>
<servlet path="/com.foobar.Main/login"
class="com.foobar.server.LoginServiceImpl"/>

it's now:

<servlet path="/gateway" class="com.foobar.server.GatewayServiceImpl"/>
<servlet path="/login" class="com.foobar.server.LoginServiceImpl"/>

and you should get rid of the GWT.getModuleBaseURL() in your
setServiceEntryPoint() calls.

Scott Blum

unread,
Aug 14, 2006, 2:45:29 PM8/14/06
to Google Web Toolkit
Mike,

Failure to load a servlet usually means the class file can't be found
on the classpath. I'd double-check your classpath and that the compile
class files for those servlets are on the path.

Colesbury, I actualy recommend sticking with the structure in the top
of your post. If you use the latter one you are forced to deploy your
webapp into the root of a Tomcat install instead of letting it have a
relative path.

Scott

Scott Blum

unread,
Aug 14, 2006, 2:45:30 PM8/14/06
to Google Web Toolkit

mike303

unread,
Aug 14, 2006, 3:10:28 PM8/14/06
to Google Web Toolkit

Changing the servlet path worked.

<servlet path="/gateway" class="com.foobar.server.GatewayServiceImpl"/>
<servlet path="/login" class="com.foobar.server.LoginServiceImpl"/>

Mike

cole...@gmail.com

unread,
Aug 14, 2006, 9:19:33 PM8/14/06
to Google Web Toolkit
> Colesbury, I actualy recommend sticking with the structure in the top
> of your post. If you use the latter one you are forced to deploy your
> webapp into the root of a Tomcat install instead of letting it have a
> relative path.

That's odd. Changing to the structure in the bottom of my post fixed
the module not found errors. I don't think my app is in the root
Tomcat directory. I access it from a URL like
http://localhost:8888/com.abc.App/App.html.

In my case, the GWT shell was givinig an error that it couldn't find
module 'login' (in lowercase) when I used the form:

<servlet path="/com.abc.App/login"
class="com.foobar.server.LoginServiceImpl"/>

I didn't have any class or module called 'login.'

Scott Blum

unread,
Aug 14, 2006, 10:32:40 PM8/14/06
to Google Web Toolkit
Well, I have to admit I'm kind of baffled.

I had to follow certain steps outlined in this thread:

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/3408c38464c57d4a/

to properly deploy DynaTable into a "DynaTable" webapp directory in
Tomcat. I found that I had to change the service entry point from
"/calendar" to GWT.getModuleBaseURL() + "calendar" or the
Tomcat-deployed app would incorrectly try to contact
"http://localhost:8888/calendar" instead of
"http://localhost:8888/DynaTable/calendar". This is with the most
recent stable Tomcat version.

However, this code change messed up hosted mode for me, forcing me to
map my hosted-mode servlet to
"/com.google.gwt.sample.dynatable.DynaTable/calendar" in
DynaTable.gwt.xml.

Do those two changes on DynaTable fail for you?

Scott

Travis

unread,
Aug 15, 2006, 9:15:53 AM8/15/06
to Google Web Toolkit
I noticed the same behavior in my own application.

Travis

Reply all
Reply to author
Forward
0 new messages