When I am running a Tomcat with a deployed application to "/myApp1"
And a WebServer having a proxy set from "
http://myServer:80/myApps/
myApp1" to "
http://localhost:8080/myApp1"
Then I am running into a big problem with the standard
RemoteServiceServlet.doGetSerializationPolicy(..) - method.
The code:
if (modulePath == null || !modulePath.startsWith(contextPath)) {
String message = "ERROR: The module path requested, "
+ modulePath
+ ", is not in the same web application as this servlet, "
+ contextPath
+ ". Your module may not be properly configured or your
client and server code maybe out of date.";
getServletContext().log(message);
} else {
... policy-file-retrieving ...
}
where modulePath = "/myApps/myApp1" and contextPath = "/myApp1", will
log the error-message and won´t try to get any policy file.
Currently I overwrite this method and retrieve the policy file just
with:
String string =
SerializationPolicyLoader.getSerializationPolicyFileName("http://
localhost:"+request.getServerPort()+modulePath+strongName);
Input Stream is = new URL(string).openStream();
Edit all hosted GWT-Application-Servlets doesn´t sound reasonable for
me, but as far as I can see I can not configure another policy-file-
retrieving for all applications!?