I got this worked out using apache's reverse proxy module.

Workstation --> apache proxy ---> (rpc call?)
(192.168.2.2)                         |-- yes --> ejb server
                                      |-- no --> workstation port 8888

Basically, you just need to set up mod_proxy like this:

===============
httpd.conf
==============
ProxyRequests Off
<Proxy *>
Order deny,allow
Deny from all
allow from 192.168
</Proxy>

ProxyPass /mywebmodule/gwt-rpc-service 
http://ejbserver.com/mywebmodule/gwt-rpc-service
ProxyPassReverse /mywebmodule/gwt-rpc-service
http://ejbserver.com/mywebmodule/gwt-rpc-service

ProxyPass /com.mygwtapp.UIModule http://192.168.2.2:8888/com.mygwtapp.UIModule
ProxyPassReverse /com.mygwtapp.UIModule 
http://192.168.2.2:8888/com.mygwtapp.UIModule

================

Please note that 192.168.2.2 is my workstation where I develop the
code. Thus, when I
start hosted mode in that box, the tomcat instance will listen to port
8888 of my
workstation.  Thus, this proxy server will contact the tomcat in my
workstation for
any queries that has /com.mygwtapp.UIModule in its path, and will
contact my real EJB
server, when the hosted mode browser does rpc call.

This way, it is "clean", the proxy server separate the calls for you.

Here is my hosted mode batch file:
@java -Xmx512M -cp
"%~dp0\src;%~dp0\bin;C:/javadev/lib/gwt-windows/gwt-user.jar;N:/
javadev/lib/gwt-maps.jar;C:/javadev/lib/gwt-windows/gwt-dev-
windows.jar"
com.google.gwt.dev.GWTShell -out "%~dp0\www" %*
http://theproxyserver/com.mygwtapp.UIModule/UIModule.html -whitelist
"^http[:][/][/]theproxyserver"


On Dec 12, 5:36 pm, Brad LaRonde <[email protected]> wrote:
> r3731 (merge of r3728) is the culprit:
>
> --- user/src/com/google/gwt/user/client/impl/HTTPRequestImplIE6.java
> +++ user/src/com/google/gwt/user/client/impl/HTTPRequestImplIE6.java
> @@ -24,6 +24,14 @@
>
>   �...@override
>    protected native JavaScriptObject doCreateXmlHTTPRequest() /*-{
> -    return new ActiveXObject("Microsoft.XMLHTTP");
> +    if ($wnd.XMLHttpRequest) {
> +      return new XMLHttpRequest();
> +    } else {
> +      try {
> +        return new ActiveXObject('MSXML2.XMLHTTP.3.0');
> +      } catch (e) {
> +        return new ActiveXObject("Microsoft.XMLHTTP");
> +      }
> +    }
>    }-*/;
>  }
>
> Revert and rebuild gwt-user.jar. Would be cool if there was a way to
> do it only for hosted mode.
>
> On Oct 20, 9:15 am, Brian <[email protected]> wrote:
>
> > I'm seeing a same-origin security restriction exception in 1.5.3 where
> > I didn't see it in 1.5.2. That is, I  can switch my project back and
> > forth between using 1.5.2 (no exception) and 1.5.3 (exception), with
> > the same source code.
>
> > I'm doing a RequestBuilder to "locahost:8080/url" in order to hit my
> > server to POST some data.
>
> > Means I'll be using 1.5.2 until I can figure out how to hit my local
> > server from 1.5.3.
>
> > Brian
>
> > On Oct 20, 11:17 am, "nicolas.deloof" <[email protected]>
> > wrote:
>
> > > Hi,
>
> > > for maven users, this release will be available via maven central
> > > repository in few hours (after rsync does its job).
>
> > > Nicolas
>
> > > On 18 oct, 00:22, Ray Ryan <[email protected]> wrote:
>
> > > > Hi, all.
>
> > > > We have just deprecated GWT 1.5.2, and replaced it with GWT 1.5.3.
> > > > This new release has a small handful of patches, mainly aimed at
> > > > fixing RPC problems with Android. You can download the update from the
> > > > usual location:
>
> > > >  http://code.google.com/webtoolkit/download.html
>
> > > > You may find that this pretty page hasn't updated yet in your neck of
> > > > the woods. If so, try going straight to the download 
> > > > server:http://code.google.com/p/google-web-toolkit/downloads/list.
>
> > > > Enjoy,
> > > > rjrjr
>
> > > > Release Notes for 1.5.3
>
> > > > Fixed Issues
>
> > > >  - RPC requests no longer fail on the embedded Android web browser
>
> > > >  - Leaf TreeItems now line up with their non-leaf siblings
>
> > > >  - Removing the last child node from a TreeItem no longer creates
> > > > extra margins on the left
>
> > > >  - HTTPRequest no longer uses POST instead of GET on some IE installs
> > > > because of incorrect XHR selection
>
> > > >  - Compiler now uses a more reliable check to prevent methods with
> > > > local variables from being inlined
> > > > getAbsoluteTop()/Left() can no longer return non-integral values
>
> > > >  - Time.valueOf() no longer fails to parse "08:00:00" or incorrectly
> > > > accepts "0xC:0xB:0xA".- Hide quoted text -
>
> > - Show quoted text -

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to