<url-pattern>/GwtEjbSrc</url-pattern>
I believe that you need
<url-pattern>/module_name/GwtEjbSrc</url-pattern>
I'm assuming GwtEjbSrc is the name of your RPC service.
Here's a snippet from the web.xml of my GWT 1.6 project:
<!-- Servlets -->
<!-- Login -->
<servlet>
<servlet-name>loginServlet</servlet-name>
<servlet-class>ece456.server.rpc.LoginServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>loginServlet</servlet-name>
<url-pattern>/sacredheart/login</url-pattern>
</servlet-mapping>
sacredheart is the module name. "login" is the name the of the service (as
an aside, as of 1.6 you don't specify them in the gwt.xml file anymore).
Make sure also that you have the correct annotation for your service -
@RemoteServiceRelativePath("GwtEjbSrc") in your case.
Did that fix it for ya?
Also, in 1.5, if I remember correctly, you have to make sure you create the
servlet with the proper path.
GWT Documentation for RPC
calls<http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideRemoteProcedureCalls>
On Sat, Mar 21, 2009 at 4:10 PM, stsch <[email protected]> wrote:
>
> I am referring to this chapter from the FAQ: Google Web Toolkit 1.5 >
> FAQ > Deploying a GWT Application > How do I package a GWT application
> into a WAR file?
>
> -->
> http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=FAQ_PackageAppInWARFile
>
> It says:
> # The application's RPC Servlet classes (and any dependencies) must be
> in the WEB-INF/classes directory or the WEB-INF/lib directory as
> appropriate. (This is standard J2EE practice.)
> # Each RPC Servlet must be configured in WEB-INF/web.xml to have the
> appropriate Servlet-Mapping. That is, if the GWT application expects
> to see an RPC Servlet at the URL /servlet-context/gwtrpc, then the
> Servlet mapping in web.xml must properly configure the RPC class to
> appear at the /gwtrpc path. (This is also standard J2EE practice.)
>
> My very small sample application is working fine in hosted mode. I
> would like to package into a WAR file and deploy it to JBoss. As soon
> as you click a button my GWT application calls an RPC service which
> only returns a String which is displayed in an alert window.
>
> That's what I have in my *.gwt.xml-file:
> <servlet path="/GwtEjbSrc"
> class="de.stsch.gwtejb.server.GwtEjbSrcImpl"/>
>
> And that's what I have in my web.xml-file:
> <servlet>
> <servlet-name>gwtejbsrc</servlet-name>
> <servlet-class>de.stsch.gwtejb.server.GwtEjbSrcImpl</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>gwtejbsrc</servlet-name>
> <url-pattern>/GwtEjbSrc</url-pattern>
> </servlet-mapping>
>
> This is my onFailure()-method:
>
> public void onFailure(Throwable caught) {
> Window.alert(caught.getMessage());
> }
>
> which tells me "The requested resource (/gwtejb/de.stsch.gwtejb.GwtEjb/
> GwtEjbSrc) is not available.".
>
> Any idea what could go wrong here and how to fix it?
>
> -StSch-
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---