encoding of url appended values in WORedirect
encoding of url appended values in WORedirect
- Subject: encoding of url appended values in WORedirect
- From: Susanne Schneider <email@hidden>
- Date: Tue, 15 Sep 2009 17:11:33 +0200
Hi list,
I have problems with the handling of encoding in url send values with
the WORedirect component.
Environment:
WO 5.4.2, Eclipse 3.4.2, WOLips 3.4.583
Description:
We have two separate applications which communicate via direct actions.
Because the applications are on different servers and no direct
connection is allowed, this is handled via redirects through the client
browser. To hand over some status information it is appended to the
relocation url like this (shortened):
public WOComponent redirectToPidDispatcher(WOContext context, Centre
centre) {
Project project = centre.project();
String pidURL = project.projectadministration().pidurl();
String sessionString = context.session().sessionID();
WORedirect redirectPage = new WORedirect(context);
String url = pidURL + "/wa/pidForm?token=" + sessionString +
"&group=" + centre.agname() + "&project=" + project.projectname();
redirectPage.setUrl(url);
return redirectPage;
}
The called direct action in the other application extract the values
like this (shortened):
public WOActionResults pidFormAction() {
String requestToken = (String) request().formValueForKey("token");
String requestGroup = (String) request().formValueForKey("group");
String project = (String) request().formValueForKey("project");
Session session = (Session) session();
PidForm resultPage = (PidForm) pageWithName(PidForm.class.getName());
session.setSessionIDToken(requestToken);
StatusData status = new StatusData(project, requestGroup);
session.setStatus(status);
resultPage.setPData(new PatientData());
return resultPage;
}
In both application constructors all possible encodings are set to UTF-8:
WOMessage.setDefaultURLEncoding(_NSUtilities.UTF8StringEncoding);
WOMessage.setDefaultEncoding(_NSUtilities.UTF8StringEncoding);
WOMessage.setDefaultHeaderEncoding(_NSUtilities.UTF8StringEncoding);
Problem:
If I add the name "München" to the url, the result is not encoded in
UTF-8 but seems to be encoded in ISO-8859-15. The redirect url (part) is:
"pidForm?token=90sEQBeHA33FlDLpALGqf0_0IAS&group=München"
Logging or display from the extracting direct action is: "M�nchen"
So, could anybody give me a hint where the set url is encoded into bytes
or how to set or retrieve it in the wanted encoding? In the rest of the
application the encoding seems to be ok, all pages are set to UTF-8 and
the normal form value handling has been no problem so far.
It is a bit frustrating to know what the problem is, but not to know
where and how to fix it.
Regards,
Susanne
--
Susanne Schneider
Coordinator secuTrial Development
iAS interActive Systems GmbH
Dieffenbachstraße 33 c, D-10967 Berlin
fon +49(0)30 22 50 50 - 498
fax +49(0)30 22 50 50 - 451
mail email@hidden
web http://www.interActive-Systems.de
----------------------------------------------------
Geschäftsführer: Dr. Marko Reschke, Thomas Fritzsche
Sitz der Gesellschaft: Berlin
Amtsgericht Berlin Charlottenburg, HRB 106103B
----------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden