myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Georg F├╝chsle <giofy...@googlemail.com>
Subject how to add post-data to a redirect from an action
Date Tue, 21 Apr 2009 07:23:32 GMT
hallo,


I have to call another application out from JSF.
To call this application i have to send (xml) data via post to the
start-url of this application.

I found some example on the web:

<code>
ExternalContext extContext =
FacesContext.getCurrentInstance().ctx.getExternalContext();
String name = URLEncoder.encode("INTERFACENAME", "utf-8");
String someData = "<?xml version='1.0' encoding='UTF-8'?> <data>
<caller value='giofyxle'/><app value='2'/></data></xml>";
String value = URLEncoder.encode(someData , "UTF-8");
String viewId = "http://www.server.com/startapp/index.html"+ '?' +
name + "=" + value;
String urlLink = extContext.encodeActionURL(viewId);
extContext.redirect(urlLink);
</code>


I tried this code. its calls the new application, but the data is sent via GET:

http://www.server.com/startapp/index.html?INTERFACENAME==%3C%3Fxml+version%3D%271.0%27+encoding.....

So the intefacedata is easily be read by the user. Has anyone any idea
how i can make a rediract with POST data?

Thanks

Gio

Mime
View raw message