You are 100% correct. Thanks! Thanks for that. To have the first slash or not have the first slash has always been a point of confusion for me. Thank you for clearing that up!
On May 23, 2:49 pm, Ian Petersen <ispet...@gmail.com> wrote: > You missed the slash character at the start of observationServiceURL. > The work you do in a later post to take a substring of > GWT.getModuleBaseURL() is successful because it leaves the slash > between "http://localhost:8080" and "celticlock/" behind because you > look for the index of "celticlock" and not "/celticlock". > > When you set the service URL, you're actually telling the underlying > XMLHttpRequest to use a relative URL (you have to because of the > same-origin policy). The browser is resolving that relative URL by > looking at where the current document is in URL space and coming up > with an absolute URL. The rules for absolutizing relative URLs say > that if the first character is a slash, the URL is relative to the > host, otherwise it's relative to the page. > > Ian > > On Sat, May 23, 2009 at 6:26 AM, Sean <slough...@gmail.com> wrote: > > > I thought that would work, but even with: > > > String observationServiceURL = "servlets/celticlocks/greet"; > > > ((ServiceDefTarget) greetingService).setServiceEntryPoint > > (observationServiceURL); > > > I still get the message: > > > HTTP ERROR: 404 > > NOT_FOUND > > RequestURI=/celticlock/servlets/celticlocks/greet > > > I even added the 's' to the 2nd cleticlock just to make sure my > > changes were going through. > > > I wonder if it's built down deeper to add the /celticlock. > > > On May 22, 6:47 pm, Rajeev Dayal <rda...@google.com> wrote: > >> You're getting the first celticlock in becuase you're appending > >> GWT.getModuleBaseURL() to the front of observationServiceURL. Since you > >> know > >> that your servlets are hosted at /servlets, change: > > >> String observationServiceURL = GWT.getModuleBaseURL() + > >> "servlets/celticlock/greet"; > > >> to > > >> String observationServiceURL = "/servlets/celticlock/greet"; > > >> On Fri, May 22, 2009 at 3:22 PM, Sean <slough...@gmail.com> wrote: > > >> > Hi, > > >> > I'm trying to deploy an RPC, but I can't figure out how to do it in > >> > 1.6. The problem is, the new RPC seems to always have the request > >> > being > > >> > [projectname]/[RPC entry Point] > > >> > My problem with this is, on my shared Tomcat account, the way I can > >> > tell the server to have Tomcat execute this service instead of it > >> > being a normal http request is > > >> > servlets/[whatever you want] > > >> > The servlets/ tells the server it's an RPC. But even if I set my Entry > >> > point explicitly like: > > >> > String observationServiceURL = GWT.getModuleBaseURL() + > >> > "servlets/ > >> > celticlock/greet"; > > >> > ((ServiceDefTarget) greetingService).setServiceEntryPoint > >> > (observationServiceURL); > > >> > The request turns to: /celticlock/servlets/celticlock/greet > > >> > How can I get the RPC to stop automatically putting the first / > >> > celticlock in? I want it to just request my RPC Service Entry point. > > >> > Thank you, --~--~---------~--~----~------------~-------~--~----~ 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 For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---