Thanks. I kept the servlet mapping in web.xml like this, <servlet-mapping> <servlet-name>greetServlet</servlet-name> <url-pattern>/myproject/greet</url-pattern> </servlet-mapping>
this one is for the URI of the servlet and is to be appended to the moduleBaseURL. In principle, if the moduleBaseURL changes, should not have a problem for finding the servlet. But the case seems not that simple. For example, if I deploy the whole thing under Tomcat's webapps/f1/f2 folder, then the moduleBaseURL is http://localhost:8080/f1/f2/myproject/ and the request is sent to the listening servlet, http://localhost:8080/f1/f2/project/greet Seemed no problem. But it returned an 404 error. if we go up one step and deploy the app to, webapps/f1 folder, the moduleBaseURL is http://localhost:8080//f1/myproject/ and the request is sent to, http://localhost: 8080/f1/greet and it worked fine. Can any body tell me what the problem is? Thanks, Mike J. On May 6, 5:24 pm, "Tiago A. Silva" <tiago...@gmail.com> wrote: > Correct is > > <servlet-mapping> > <servlet-name>greetServlet</servlet-name> > <url-pattern>/myproject/greet</url-pattern> > </servlet-mapping> > > to > > <servlet-mapping> > <servlet-name>greetServlet</servlet-name> > <url-pattern>/myproject/greet</url-pattern> > </servlet-mapping> > > 2010/5/6 Mike Jiang <mikej1...@gmail.com> > > > > > > > Thanks for the reply. > > the url should be corrected as > > >http://localhost:8080/f1/f2/myproject.html<http://localhost:8080/myproject/f1/f2/myproject.html> > > > <http://localhost:8080/myproject/f1/f2/myproject.html>the original one > > was not right. Sorry for confusion. > > > Changing the annotation @RemoteServiceRelativePath in the interface seemed > > only changing the relative path to the module, i.e., to myproject. Since the > > module is not under the webapps folder, but under webapps/f1/f2, the change > > would not reflect the structure. For example, if changing from the current > > one, > > > �...@remoteservicerelativepath("greet") > > > to > > > �...@remoteservicerelativepath("/f1/f2/myproject/greet") > > > then should I change the servlet mapping from > > > <servlet-mapping> > > <servlet-name>greetServlet</servlet-name> > > <url-pattern>/myproject/greet</url-pattern> > > </servlet-mapping> > > > to > > > <servlet-mapping> > > <servlet-name>greetServlet</servlet-name> > > <url-pattern>/*/*/myproject/greet</url-pattern> > > </servlet-mapping> > > > ? > > > On Thu, May 6, 2010 at 2:09 PM, Sripathi Krishnan < > > sripathikrish...@gmail.com> wrote: > > >> Change the annotation @RemoteServiceRelativePath in the interface > >> GreetingService.java > > >> --Sri > > >> On 5 May 2010 21:51, Mike J <mikej1...@gmail.com> wrote: > > >>> Hi, > >>> I am new for the GWT project. I have run a simple GWT app with the > >>> default setting. I deployed it on a Tomcat by simply dropping the > >>> wrapped war file into the webapps folder. The war file will be > >>> expanded to a folder automatically. No problem for everything. It > >>> worked as expected. > > >>> Now what I like to do is: instead of placing the war file into the > >>> default webapps folder, I would like to drop it to a sub folder f2 > >>> under the webapps folder like, > >>> webapps/f1/f2 > > >>> Then I manually unzip the war file into a folder. No problem for > >>> that. > > >>> When I loaded the page from the browser like, > > >>> http://localhost:8080/myproject/f1/f2/myproject.html > > >>> the page was loaded. But any RPC to the servlet, > >>> GreetingServiceImpl, would not be found. And the error is, > > >>> HTTP STATUS: 404--/f1/f2/myproject/greet > > >>> That is, could not find the servlet. > > >>> What should I change in the GWT.XML or in the web.xml? > > >>> in Web.xml: > > >>> <servlet> > >>> <servlet-name>greetServlet</servlet-name> > >>> <servlet-class>com.bp.myproject.server.GreetingServiceImpl</ > >>> servlet-class> > >>> </servlet> > > >>> <servlet-mapping> > >>> <servlet-name>greetServlet</servlet-name> > >>> <url-pattern>/myproject/greet</url-pattern> > >>> </servlet-mapping> > > >>> in GWT.XML, there is nothing related to the servlet. > > >>> Thanks in advance, > > >>> Mike J > > >>> -- > >>> You received this message because you are subscribed to the Google Groups > >>> "Google Web Toolkit" group. > >>> To post to this group, send email to google-web-toolkit@googlegroups.com > >>> . > >>> To unsubscribe from this group, send email to > >>> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2Bunsubs > >>> cr...@googlegroups.com> > >>> . > >>> For more options, visit this group at > >>>http://groups.google.com/group/google-web-toolkit?hl=en. > > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "Google Web Toolkit" group. > >> To post to this group, send email to google-web-tool...@googlegroups.com. > >> To unsubscribe from this group, send email to > >> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2Bunsubs > >> cr...@googlegroups.com> > >> . > >> For more options, visit this group at > >>http://groups.google.com/group/google-web-toolkit?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Web Toolkit" group. > > To post to this group, send email to google-web-tool...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2Bunsubs > > cr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-web-toolkit?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-tool...@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.