jsf - Using Post when doing a sendRedirect -


I need a user to launch a JSF page from a custom thin client in the browser (thin client is an http post ). Since the jsf page can be applied multiple times, I use JSP with the parameters on the redirect URL on the jsf page. In Jsp I have a session invalid Jsp code is below:

   & Lt;% response.setHeader ("cache-control", "no-cache"); Response.setHeader ("Pagera", "No-Cash"); Session.invalidate (); String result = request.getParameter ("result"); String query string = "result =" + result; Response.sendRedirect (". / Faces / MyPage.jspx?" + Query string); & Gt%; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content type" content = "text / html; charset = window-1252" & gt; & Lt; / Meta & gt; & Lt; Title & gt; Title here & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

My JSF page uses several drop down items with autobombilable items. I set the consultation on the session when the form first writes and after that it is used when an action button is finally clicked by the user I use the following code to get the JSF backing bean constructor Ultimate:

  FacesContext ctx = getFacesContext (); Map sessionStat = CTXGetEXCERNcontext (). GetSessionMap (); Result = (string) sessionState.get ("result"); If not (result == blank) // session, get result of url = (string) JSFUtils.getManagedBeanValue ("param.outcome");  

In this way I can get the ultimate after many auto-submissions of drop down.

My problem is that I can not show the parameters on the browser address bar. I need a way to get the parameters to the JSP page. I can not post JSP directly to the thin client because whenever the customer launches the browser, I need to give a new session to the JSF page. This is due to the code snippet above when using the parameter in JSF page.

Is there no way to use the post while rendering a dispatch so that I can not find the parameters on the url? Ever since an autosuitant fire appears on the JSF page, I can not use it since, causing the browser to refresh the jsp page.

Is there a better way to handle JSF pages so that I do not have to rely on submitting parameters on the session between auto-submitting events?

Since you cancel the session, no, you can not.

The only way it will be put in the scope of the session. Why are you in the way of canceling the session on the first request? It does not really make any sense.

is not related to your actual problem, having a bunch of HTML in the scriptlet instead of sendRedirect () in

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -