<partial-response> XML shown as plain text after redirecting ajax to a security constraint in WildFly
I have this weird issue with redirecting ajax to a security constraint:
When an ajax call is made (by clicking on a sortable column p:dataTableor triggers p:poll) on a page protected by a role after my session has expired, the <partial-response><redirect-url=...OmniFaces XML code is displayed on the screen.
When I delete OmniFaces, ajax calls seem to fail and I don't get the XML shown.
Security is configured as follows in web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>Pages</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Resources</web-resource-name>
<url-pattern>/javax.faces.resource/*</url-pattern>
</web-resource-collection>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>myRealm</realm-name>
<form-login-config>
<form-login-page>/login.xhtml</form-login-page>
<form-error-page>/login.xhtml?error=true</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>user</role-name>
</security-role>
. / WildFly.
?
OmniFaces, , HTML-, <form-login-page> , . , , JSF- ajax, JavaScript, ajax, HTML- , XML-. . , OmniFaces 1.2 OmniPartialViewContext, : ViewExpiredException ajax, JSF j_security_check.
OmniFaces JAF ajax redirect <partial-response><redirect url="originalURL">, , ajax JSF, <form-login-page>, .
WildFly ( 10.0.0 ), , , <form-login-page> 1- ( , ) . XML- <partial-response>.
this commit , , ajax OmniPartialViewContext. OmniFaces 2.3.