How to configure my web.xml

8 views
Skip to first unread message

Dave

unread,
Jan 9, 2010, 10:51:51 PM1/9/10
to Google Web Toolkit
I have had some success in setting up a single service which is called
through GWT-RPC. Now I have set up 2 services and I get this error:
This application is out of date, please click the refresh button on
your browser. ( Blocked attempt to access interface
'com.server.ServiceImpl1', which is not implemented by
com.server.ServiceImpl2'; this is either misconfiguration or a hack
attempt ).

I think the problem is in web.xml.
The URI's are implemented as follows: http://localhost:8888/my_App.html?gwt.codesvr=127.0.1.1:9997#page1
calls com.server.ServiceImpl1 and http://localhost:8888/my_App.html?gwt.codesvr=127.0.1.1:9997#page2
calls com.server.ServiceImpl2. These are some additional info of my
web.xml.

<servlet>
<servlet-name>service1</servlet-name>
<servlet-class>com.server.ServiceImpl1</servlet-class>
</servlet>
<servlet>
<servlet-name>service2</servlet-name>
<servlet-class>com.server.ServiceImpl2</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>service1</servlet-name>
<url-pattern>/page1</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>service2</servlet-name>
<url-pattern>/page2</url-pattern>
</servlet-mapping>

Could someone tell me what the problem is?

Dave

unread,
Jan 10, 2010, 1:28:05 PM1/10/10
to Google Web Toolkit
When I made the the following changes and I navigate to
http://localhost:8888/my_App.html?gwt.codesvr=127.0.1.1:9997#page1. I
am getting "HTTP ERROR: 404 NOT_FOUND RequestURI=/my_app/service1".

Changes:

web.xml.
<servlet>
<servlet-name>service1</servlet-name>
<servlet-class>com.server.ServiceImpl1</servlet-class>
</servlet>
<servlet>
<servlet-name>service2</servlet-name>
<servlet-class>com.server.ServiceImpl2</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>service1</servlet-name>
<url-pattern>/my_app/service1</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>service2</servlet-name>
<url-pattern>/my_app/service2</url-pattern>
</servlet-mapping>

My client side service interface is as follows
@RemoteServiceRelativePath("service1")
public interface MyService extends RemoteService
{
//some function prototype
//some function prototype
}

I am following instruction found at:
http://code.google.com/webtoolkit/doc/1.6/tutorial/appengine.html#test.
What am I doing wrong?

Dave

unread,
Jan 10, 2010, 8:42:03 PM1/10/10
to Google Web Toolkit
I fixed the error. I was unaware that I had to compile the application
before. I can't recall any literature which tells you to compile
before running. I felt that by running it as a web app, then the
requisite compilation would have been done automatically.

On Jan 10, 1:28 pm, Dave <ladjo...@gmail.com> wrote:
>  When I made the the following changes and I navigate tohttp://localhost:8888/my_App.html?gwt.codesvr=127.0.1.1:9997#page1. I

Manny

unread,
Feb 7, 2010, 1:50:47 AM2/7/10
to Google Web Toolkit
I have the same error. there is no help out there and documentation on
these
common errors are TERRIBLE. thanks for posting this

Nathan Wells

unread,
Feb 9, 2010, 8:46:01 AM2/9/10
to Google Web Toolkit
If you are running in hosted mode or OOPHM, you should only have to
restart the web server, not trigger compilation. It should work like
this:

Change server source file = restart web server
Change client source file (hosted mode) = reload page
Change any source file (compiled mode) = recompile

Is this not the case?

Reply all
Reply to author
Forward
0 new messages