404 error, exposed spring beans as services uging gwt-sl are not working in Hosted mode

12 views
Skip to first unread message

bala

unread,
Dec 5, 2009, 7:57:38 AM12/5/09
to gwt-sl
Hi There,

When i use the Hosted mode and try to call any of the services
(exposed spring beans) im getting 404 error, below are the
configuration details i have in my setup

<bean id="testUtilService"
class="com.example.view.user.server.rpc.service.TestServiceImpl" />

<bean id="urlMapping"
class="org.gwtwidgets.server.spring.GWTHandler">
<property name="mappings">
<map>
<entry key="/testservice" value-ref="testUtilService" />
</map>
</property>
</bean>

Has any one faced similar issue before? could any one share the
solution please.

your help is appreciated.

Thank you,
bala.

Jacek Żebrowski

unread,
Dec 5, 2009, 9:16:28 AM12/5/09
to gwt...@googlegroups.com
bala pisze:
Hi bala !

Please read the FAQ - its impossible to use spring-rpc beans with hosted
mode because it requires container configuration - hosted mode runs its
own container wchich isnt aware of servlets/spring configuration
therfore no beans are exposed as rpc and 404 is returned.

Solution to this is to use noserver option + use external server -
however tht implies project compilation on each update (correct me if im
wrong here)

--
Jacek Zebrowski

Emerout

unread,
Dec 11, 2009, 5:08:18 AM12/11/09
to gwt-sl
Hi,

GWT-SL and spring-rpc is working in hosted mode.

You have to provided to gwt your own web.xml that will contains the
needed spring context configuration.

I'm using gwt-maven plugin, here is a snippet of its configuration :

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<module>your.module.name</module>
<runTarget>index.jsp</runTarget>
<warSourceDirectory>war</warSourceDirectory>
<inplace>true</inplace>
</configuration>
</plugin>

Hope it helps,
Emeric

Jacek Zebrowski

unread,
Dec 11, 2009, 5:51:57 AM12/11/09
to gwt...@googlegroups.com
Emerout pisze:
> Hi,
>
> GWT-SL and spring-rpc is working in hosted mode.
>
> You have to provided to gwt your own web.xml that will contains the
> needed spring context configuration.
>
> I'm using gwt-maven plugin, here is a snippet of its configuration :
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>gwt-maven-plugin</artifactId>
> <version>1.1</version>
> <configuration>
> <module>your.module.name</module>
> <runTarget>index.jsp</runTarget>
> <warSourceDirectory>war</warSourceDirectory>
> <inplace>true</inplace>
> </configuration>
> </plugin>
>
> Hope it helps,
> Emeric
Is it possible to achieve that without maven ?

Where should i put web.xml in order to jetty actually see it ?

--
Jacek Zebrowski

Hermod Opstvedt

unread,
Dec 11, 2009, 2:04:40 PM12/11/09
to gwt...@googlegroups.com
Hi

In WEB-INF directory where it allways goes.

Hermod

-----Opprinnelig melding-----
Fra: gwt...@googlegroups.com [mailto:gwt...@googlegroups.com] På vegne av
Jacek Zebrowski
Sendt: 11. desember 2009 11:52
Til: gwt...@googlegroups.com
Emne: Re: 404 error, exposed spring beans as services uging gwt-sl are not
working in Hosted mode
--

You received this message because you are subscribed to the Google Groups
"gwt-sl" group.
To post to this group, send an email to gwt...@googlegroups.com.
To unsubscribe from this group, send email to
gwt-sl+un...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gwt-sl?hl=en-GB.


Jacek Żebrowski

unread,
Dec 11, 2009, 6:17:22 PM12/11/09
to gwt...@googlegroups.com
Hermod Opstvedt pisze:
> Hi
>
> In WEB-INF directory where it allways goes.
>
> Hermod
>
Yea thats right but i cant find the webserver path - im using eclipse
google plugin - can you please point me to it ?

--
Jacek

Hermod Opstvedt

unread,
Dec 12, 2009, 4:06:29 AM12/12/09
to gwt...@googlegroups.com
Hi

It should be wwww as pr. GWT standard.

Hermod

-----Opprinnelig melding-----
Fra: gwt...@googlegroups.com [mailto:gwt...@googlegroups.com] På vegne av
Jacek Zebrowski
Sendt: 12. desember 2009 00:17
Til: gwt...@googlegroups.com
Emne: Re: SV: 404 error, exposed spring beans as services uging gwt-sl are
not working in Hosted mode

lazinskip

unread,
Dec 14, 2009, 10:41:29 AM12/14/09
to gwt-sl
Hi Jacek (Cześć miło znaleźć rodaka:)

If you use eclipse plugin you have automatically generated web.xml and
jetty is able to see it. If you properly configure web.xml for spring
it have to works.
Reply all
Reply to author
Forward
0 new messages