Hello Dejan, You could have Apache act as the front server and forward all requests to a specific URL to a tomcat server, have a look at [1]. This way they both share the same server and port for an external visitor.
[1] http://www.serverwatch.com/article.php/10819_2203891_1 On Aug 10, 12:59 pm, dstefanox <[email protected]> wrote: > I am working on a project which requires integration of the CMS > (Drupal, almost certainly) and the GWT. Since GWT files in my case > should be served by Tomcat and CMS pages by Apache server, Same Origin > Policy problem occurs. Configuration is the following (for feasibility > experiment): > - Page into which GWT app is embeded is served by Apache web > server:http://localhost/SOP/PHPSOP/TestSOP.html > - This page includes Java Script and CSS which are served by Tomcat, > and which are actual GWT > application:http://localhost:8080/testsop/testsop.nocache.js > Inclusion example: > <script type="text/javascript" language="javascript" src="http:// > localhost:8080/testsop/testsop.nocache.js"></script> > Note that here we use port 8080. > When page loads, following error occurs: > > Permission denied for <http://localhost:8080> to get property > Window.document from > <http://localhost>.http://localhost:8080/testsop/E00BCFA70A4A65848519BCCCE10E89FF.cache.... > Line 1 > > I know that if I use Apache web server to serve all files, this would > not happen, but I wonder, is there a way to make it work this way? > > If I use Apache server to serve all files - main page into which GWT > app embeds and GWT files, this problem does not occur. In this case, I > have url like:http://localhost/SOP/TestSOP/war/LocalSOP.html > JS is included as: > <script type="text/javascript" language="javascript" src="testsop/ > testsop.nocache.js"></script> > Application is loaded, and at this moment we do not have the problem. > But when I want to make RPC call from my application, GWT creates URL > for RPC call:http://localhost/SOP/TestSOP/war/testsop/greet > Of course, this URL does not exist on my server. Actually, good URL on > which Tomcat would respond would be:http://localhost:8080/testsop/greet > How can I make my application served by Apache on one URL to call RPC > managed by Tomcat on other URL? Please note that having Apache and > Tomcat at same time is MUST, so don't try to explain how other > configuration would work perfectly... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
