jsf - Ajax request while session is expired returns <partial-response> XML plain to browser -


this i'm getting in browser after page makes ajax request , session has been timeout, i'm implementing omnifaces fullajaxexceptionhandler.

this xml file not appear have style information associated it. document tree shown below.

<partial-response id="j_id1">   <changes>     <update id="javax.faces.viewroot">       <![cdata[ <html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/webworkflow/javax.faces.resource/theme.css.xhtml?ln=primefaces-smoothness" /><link type="text/css" rel="stylesheet" href="/webworkflow/javax.faces.resource/css/xpm2.css.xhtml" /><script type="text/javascri ]]>       <![cdata[ pt" src="/webworkflow/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&amp;v=5.1.13&amp;v=5.1.13"></script><script type="text/javascript" src="/webworkflow/javax.faces.resource/primefaces.js.xhtml?ln=primefaces&amp;v=5.1.13&amp;v=5.1.13"></script><link type="text/css" rel="stylesheet" href="/webworkflow/javax.faces.resource/primefaces.css.xhtml?ln=primefaces&amp;v=5.1.13&amp;v=5.1.13" /><script type="text/javascript" src="/webworkflow/javax.faces.resource/jquery/jquery-plugins.js.xhtml?ln=primefaces&amp;v=5.1.13&amp;v=5.1.13"></script> <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="expires" content="0" /> <meta http-equiv="expires" content="tue, 01 jan 1980 1:00:00 gmt" /> <meta http-equiv="pragma" content="no-cache" /><script type="text/javascript" src="/webworkflow/javax.faces.resource/jsf.js.xhtml?ln=js"></script> <title>xpm </title></head><body><span id="j_idt10"><script language="javascript" type="text/javascript"> function faceletsdebug(url) {day = new date();id = day.gettime();eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left = 240,top = 212');"); };(function() { if (typeof jsffaceletsdebug === 'undefined') { var jsffaceletsdebug = false; } if (!jsffaceletsdebug) {var faceletsorigkeyup = document.onkeyup;document.onkeyup = function(e) { if (window.event) e = window.event; if (string.fromcharcode(e.keycode) == 'd' & e.shiftkey & e.ctrlkey) faceletsdebug('/webworkflow/error/expired.xhtml?facelets.ui.debugoutput=1429028952601'); jsffaceletsdebug = true; if (faceletsorigkeyup) faceletsorigkeyup(e); }; }})();</script></span> <div id="wrapper"> <div id="header"> <form id="headerform" name="headerform" method="post" action="/webworkflow/error/expired.xhtml" enctype="application/x-www-form-urlencoded"> <input type="hidden" name="headerform" value="headerform" /> <div id="headercontent"><img src="/webworkflow/javax.faces.resource/img/wf-logo.gif.xhtml" alt="" /><img src="/webworkflow/javax.faces.resource/img/header.gif.xhtml" alt="" /> <div id="welcome"> </div> </div> </form> </div> <div id="section"><div id="exceptiondialog" class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-shadow ui-hidden-container"><div class="ui-dialog-titlebar ui-widget-header ui-helper-clearfix ui-corner-top"><span id="exceptiondialog_title" class="ui-dialog-title">exception: occured!</span><a href="#" class="ui-dialog-titlebar-icon ui-dialog-titlebar-close ui-corner-all"><span class="ui-icon ui-icon-closethick"></span></a></div><div class="ui-dialog-content ui-widget-content"> message: <br /> stacktrace: <button id="j_idt23" name="j_idt23" type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" onclick="document.location.href = document.location.href;;window.open('/webworkflow/error/expired.xhtml','_self')"><span class="ui-button-text ui-c">reload!</span></button><script id="j_idt23_s" type="text/javascript">primefaces.cw("button","widget_j_idt23",{id:"j_idt23",widgetvar:"widget_j_idt23"});</script></div></div><script id="exceptiondialog_s" type="text/javascript">$(function(){primefaces.cw("dialog","exceptiondialog",{id:"exceptiondialog",widgetvar:"exceptiondialog",height:"500px"});});</script> <div id="sectioncontent"> <form id="j_idt25" name="j_idt25" method="post" action="/webworkflow/error/expired.xhtml" enctype="application/x-www-form-urlencoded"> <input type="hidden" name="j_idt25" value="j_idt25" /> session has expired. on page <a href="/webworkflow/faces/web/index.xhtml">back login page</a> </form> </div> </div> <div id="footer"> <div id="footercontent"><img src="/webworkflow/javax.faces.resource/img/stagecoachsignature.gif.xhtml" alt="" /> <ul> <li><a href="/webworkflow/faces/web/index.xhtml"> company </a> </li> <li><a href="/webworkflow/faces/web/index.xhtml"> privacy, cookies, security, legal </a> </li> <li><a href="/webworkflow/faces/web/index.xhtml"> online access agreement </a> </li> <li><a href="/webworkflow/faces/web/index.xhtml"> contact </a> </li> </ul> </div> </div> </div></body> </html> ]]>     </update>     <update id="j_id1:javax.faces.viewstate:0">       <![cdata[ -1772475063786038199:-292459209620208926 ]]>     </update>   </changes> </partial-response> 

this error shown in console:

fullajaxexceptionhandler: exception occurred during processing jsf ajax request. error page '/errorpages/expired.xhtml' shown.: javax.faces.application.viewexpiredexception: viewid:/login.xhtml - view /login.xhtml not restored.

i solved disabling fullajaxexceptionhandler , implementing own viewexpiredexceptionhandler (exceptionhandlerwrapper), , hardcoding response in case of ajax request.

the douglas junior answer post worked me: session timeout , viewexpiredexception handling on jsf/primefaces ajax request

now have problem redirects, post, guys help.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -