Re: getting to servlet (non rpc) in hosted mode vs. Tomcat

2008-10-13 Thread Fernando Paz
Hello, You need to write for the both mode: RequestBuilder builder = new RequestBuilder(RequestBuilder. > > GET, URL >.encode("../IDServlet")); try it!!! On Tue, Oct 7, 2008 at 6:05 AM, Michel <[EMAIL PROTECTED]> wrote: > > Hi, > > I need to call a ser

Re: getting to servlet (non rpc) in hosted mode vs. Tomcat

2008-10-07 Thread Michel
Hi again, I tried this now: RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL .encode(GWT.getHostPageBaseURL() +"IDServlet")); as you suggested, and it works fine, both in hosted mode as well as in Tomcat. Thank you very much for your

Re: getting to servlet (non rpc) in hosted mode vs. Tomcat

2008-10-07 Thread Isaac Truett
It's actually a very similar problem, conceptually. The getResourceAsStream() method is the proper way to access your configuration file. You just need to be more explicit about the location of the file: // Look for a file in the package "this" belongs to. this.getClass().getResourceAsStream("mypro

Re: getting to servlet (non rpc) in hosted mode vs. Tomcat

2008-10-07 Thread Michel
Thank you both for the responses. I haven't tried it out yet, because I am right now stuck with another problem. I wonder if it is caused by a similar misunderstanding on my part. My application needs several files on the server (myproject.properties, log4j.properties, hibernate.cfg.xml and so on

Re: getting to servlet (non rpc) in hosted mode vs. Tomcat

2008-10-07 Thread Thomas Broyer
On 7 oct, 14:26, "Isaac Truett" <[EMAIL PROTECTED]> wrote: > Those are two different URLs. /IDServlet meanshttp://host/IDServletwhile > IDServlet meanshttp://host/WhereEverTheCurrentPageIs/IDServlet. In hosted > mode, your servlet is mapped tohttp://localhost:/IDServlet. In web > mode, your

Re: getting to servlet (non rpc) in hosted mode vs. Tomcat

2008-10-07 Thread Isaac Truett
Those are two different URLs. /IDServlet means http://host/IDServlet while IDServlet means http://host/WhereEverTheCurrentPageIs/IDServlet. In hosted mode, your servlet is mapped to http://localhost:/IDServlet. In web mode, your servlet is probably mapped to something like http://localhost/myAp

getting to servlet (non rpc) in hosted mode vs. Tomcat

2008-10-07 Thread Michel
Hi, I need to call a servlet from my GWT application. It all works fine, except that I appear to need different code for hosted mode versus deployment in Tomcat. In hosted mode, this works: RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL