In our JSF app(MyFaces Trinidad) we have a link clicking on that will launch a application running using aspx (http://crd-dev:1890/Timeandreviews/Login.aspx). Since we have authenticated user already, we have to pass the user id to the ASPX application. They dont want to receive this s a GET param in URL, they need it as POST data. Is that possible to send it as POST data? If possible how to send in JSF and how to read it in ASPX.
I have tried setting like below in JSF (.XHTML page)
ExternalContext ext = FacesContext.getCurrentInstance().getExternalContext();
HttpServletRequest httpRequest = (HttpServletRequest) ext.getRequest();
HttpSession httpSession = (HttpSession) ext.getSession(true);
httpRequest.setAttribute("USER_HTREQ", "TST_USR");
httpSession.setAttribute("USER_HTSES", "TST_USR");
ext.getRequestMap().put("USER_REQMP", "TST_USR");
try {
ext.redirect("http://crd-dev:1890/Timeandreviews/Login.aspx");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
and tried reading in aspx as Method 1:
string[] keys = Request.Form.AllKeys;
for (int i= 0; i < keys.Length; i++)
{
Response.Write(keys[i] + ": " + Request.Form[keys[i]] + "<br>");
}
Method 2: var oSR = new StreamReader(Request.InputStream);
string sContent = oSR.ReadToEnd();
But both of them dint work. Please help