Did everything as in docu and I get error on servlet init

9 views
Skip to first unread message

Yacho

unread,
Nov 17, 2009, 8:01:52 PM11/17/09
to gwt-sl
i did everything as the documentation says - heres my web.xml :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<!-- Servlets -->


<!--
Mapping an RPC service defined in handler-servlet.xml
-->
<servlet>
<servlet-name>handler</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet <!--
This is a Spring configuration
-->
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>handler</servlet-name>
<url-pattern>/handler/*</url-pattern>
</servlet-mapping>

<!-- Default page to serve -->
<welcome-file-list>
<welcome-file>Projektgwt.html</welcome-file>
</welcome-file-list>

</web-app>

And handler-servlet.xml :
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://
www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean class="org.gwtwidgets.server.spring.GWTHandler">
<property name="mappings">
<map>
<entry key="/rpctest" value-ref="RPCTest" />
</map>
</property>
</bean>

<bean id="RPCTest"
class="com.pl.jzebrowski.server.ServiceTestImpl" />
</beans>

</beans>

And i get :
java.lang.ClassNotFoundException:
org.springframework.web.servlet.DispatcherServlet

Despite i have Spring jars in the build path - any ideas ?

George Georgovassilis

unread,
Nov 18, 2009, 3:28:16 AM11/18/09
to gwt...@googlegroups.com
Some things to check:

1. the spring.jar and spring-web.jar is in WEB-INF/lib
2. remove the comments, whitespaces and linebreaks from <servlet-class>
3. don't run the application in the webserver which is started by the
hosted mode

Jacek Zebrowski

unread,
Nov 18, 2009, 6:52:55 AM11/18/09
to gwt...@googlegroups.com
George Georgovassilis pisze:

> Some things to check:
>
> 1. the spring.jar and spring-web.jar is in WEB-INF/lib
>
> 2. remove the comments, whitespaces and linebreaks from <servlet-class>
> 3. don't run the application in the webserver which is started by the
> hosted mode
>

Okay one question - im Using google plugin for Eclipse - how do I export
my GWT project as WAR ?
I cant find the option and manually creating WAR is a pain...

and when i hook up my beans as rpc services for GWT should i access them
by GWT.create() or via ApplicationContext ?

--
Yacho

George Georgovassilis

unread,
Nov 18, 2009, 12:37:55 PM11/18/09
to gwt...@googlegroups.com
Ok, before anybody else goes off: that's not an SL related question ;-)

Now that we settled that: when you right-click on your project, there
should be something like Export->WAR.

Reply all
Reply to author
Forward
0 new messages