Open GoogleCodeExporter opened 9 years ago
Thx
Original comment by gauthier...@gmail.com
on 3 Apr 2008 at 1:34
in case that the gwt module is not deployed together with the rpc server
module, you
will have to additionally override doGetSerializationPolicy in GWTServlet to
load the
policy file.
in my case,
protected SerializationPolicy doGetSerializationPolicy(HttpServletRequest
request,
String moduleBaseURL, String strongName) {
String modulePath = null;
if (moduleBaseURL != null) {
try {
modulePath = new URL(moduleBaseURL).getPath();
} catch (MalformedURLException ex) {
// log the information, we will default
getServletContext().log("Malformed moduleBaseURL: " + moduleBaseURL, ex);
}
}
//as usual, the rpc file is deployed with gwt compiled html/js
String policyPath = request.getScheme() + "://" + request.getServerName() + ":" +
request.getServerPort() + "" + modulePath;
String policyURL =
SerializationPolicyLoader.getSerializationPolicyFileName(policyPath +
strongName);
SerializationPolicy serializationPolicy = null;
InputStream is = null;
try {
is = new URL(policyURL).openStream();
serializationPolicy = SerializationPolicyLoader.loadFromStream(is, null);
} catch (Exception e) {
getServletContext().log("ERROR: Could not read the policy file '" + policyURL +
"'", e);
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
// Ignore this error
}
}
}
return serializationPolicy;
}
Original comment by m123...@gmail.com
on 13 May 2008 at 4:05
It would be awesome to see this implemented in the next version. I see that
this
project has stagnated for a while. Hopefully you'll bring it back to life -
it's
very useful!!!
Original comment by greensu...@gmail.com
on 14 Oct 2008 at 4:40
This is really a great feature. But the patch doesn't work for the 1.0 version.
Hope
there will be a fix soon.
Original comment by jackie.s...@gmail.com
on 15 Dec 2009 at 11:40
Original issue reported on code.google.com by
miguel.p...@gmail.com
on 20 Nov 2007 at 4:41Attachments: