viewexpiredexception

jsf login times out

青春壹個敷衍的年華 提交于 2020-01-29 08:43:25
问题 Ok simple question. I have a JSF application, containing a login page. The problem is if the user loads the login page, leaves it for a while, then tries to login the session expires and a ViewExpiredException is thrown. I could redirect back to the login when this happens, but that isn't very smooth. How can I allow this flow to properly login without an additional attempt? 回答1: Update As of Mojarra 2.1.19 / 2.2.0 you can now set the transient attribute of the <f:view> to true: <f:view

ViewExpiredException - why different behaviour?

Deadly 提交于 2019-12-24 06:45:51
问题 I have a JSF 2 application and configured the following in web.xml : <error-page> <exception-type>javax.faces.application.ViewExpiredException</exception-type> <location>/error.html</location> </error-page> For testing purposes I have the following code in a @SessionScoped class within an init Method annotated with @PostConstruct in order to let the session quickly expire: ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext(); HttpSession session = (HttpSession) ec

Can you POST to JSF2 page with an expired session?

谁都会走 提交于 2019-12-21 20:36:34
问题 I have been using JSF1.2 for login pages. If the user sits on the login page for too long (timeout situatation) and then tries to enter the id and password it fails with ViewExpired error (even though the id/password are correct). This all makes sense from JSF perspective to me. My solution has been to simply use Client for javax.faces.STATE_SAVING_METHOD. But that feels like a hack. My app is migrating to JSF2.0. I would like my app to go back to server for STATE_SAVING_METHOD. But my

Handling ViewExpiredException depending on the current view

我与影子孤独终老i 提交于 2019-12-21 20:32:56
问题 I am using JSF 2.0 and Primefaces in my project. I have two xhtml pages namely Cars.xhtml and Bikes.xhtml. I am using ViewScoped backing beans. Currently If get view expired exception from any of the two pages,im handling it in the web.xml. through the error-page tag and directing to welcome.xhtml. Now If i get a viewexpired exception from Bikes.xhtml I need to direct to another page which is BikesHome.xhtml instead of welcome.xhtml. If the exception is from Cars.xhtml, welcome.xhtml should

JSF 2.0 ViewExpiredException on Glassfish 3.1 when using iframe in Safari

六月ゝ 毕业季﹏ 提交于 2019-12-19 10:43:50
问题 I have a JSF 2.0 web application running on glassfish 3.1 that is working fine on IE, FF, Safari and Chrome. When I added the url of my website inside a iframe of another website then I am getting ViewExpiredException after clicking any button inside iframe - This happens only on Safari, works fine in IE, FF, Chrome. <iframe style="width: 100%; height: 800px" src="url_of_my_website" frameBorder="0"></iframe> Following are my observations Deployed the same application on glassfish 3.0.1 and

JSF 2.0 ViewExpiredException on Glassfish 3.1 when using iframe in Safari

谁说我不能喝 提交于 2019-12-19 10:43:07
问题 I have a JSF 2.0 web application running on glassfish 3.1 that is working fine on IE, FF, Safari and Chrome. When I added the url of my website inside a iframe of another website then I am getting ViewExpiredException after clicking any button inside iframe - This happens only on Safari, works fine in IE, FF, Chrome. <iframe style="width: 100%; height: 800px" src="url_of_my_website" frameBorder="0"></iframe> Following are my observations Deployed the same application on glassfish 3.0.1 and

com.sun.faces.enableRestoreView11Compatibility what use instead in JSF 1.2

耗尽温柔 提交于 2019-12-19 06:19:05
问题 When I have javax.faces.application.ViewExpiredException I want to send user to login page. web.xml ... <context-param> <param-name>com.sun.faces.enableRestoreView11Compatibility</param-name> <param-value>true</param-value> </context-param> ... <error-page> <exception-type>javax.faces.application.ViewExpiredException</exception-type> <location>/errors/sessionExpired.jsf</location> </error-page> sessionExpired.jsf .... <c:redirect url="/index.jsf" /> but enableRestoreView11Compatibility is

Handle ViewExpiredException in the background and restore form values

廉价感情. 提交于 2019-12-19 04:32:08
问题 Is there a database-, primefaces- and "keep-session-alive"-free solution to prevent or to handle a ViewExpiredException silently in the background while restoring the form-inputs? for example a user with a "stay logged-in cookie" would prefer not to be redirected to some kind of an error- or start-page; he fills out some form values, comes back in an hour and then, when he submits the form, the same view is re-created with its previous inputs and the submit-action of the underlying

Keep a session alive for an indefinite amount of time

若如初见. 提交于 2019-12-18 10:57:22
问题 Is there a way to keep a page's session active without resorting to sending the state to the client? I'm not able to set the STATE_SAVING_METHOD to client and I'd prefer to not use the a4j:keepalive . I've tried using a simple hidden iframe that submits to the Bean in question but it invalidates the main page. I am using JSF 1.2 and myfaces. This is to get around a ViewExpiredException on a page that does not require the user to log in. The majority of the existing site requires the user to

Object doesn't support this property or method with primefaces omnifaces timeout combination

瘦欲@ 提交于 2019-12-18 07:10:41
问题 Setup: JSF, PrimeFaces 3.2, Omnifaces 1.1, JBoss AS 7.1.1, Final, Mojarra 2.1.7 I have a simple page (listed below) and I have set up omnifaces to deal with ViewExpiredExceptions for ajax calls. When the listed below page expires and I click on a primefaces button (ajax) on IE8, the expired error page shows up but with the following javascript error: Message: Object doesn't support this property or method, Line: 1 Char: 5500 Code: 0 URI: blah blah/mywebapp/javax.faces.resource/primefaces.js