Handles session timeouts much better now!
This commit is contained in:
parent
65acd42f11
commit
ab9255d3d4
|
@ -23,7 +23,7 @@ public class SpringPrimeFacesApplication {
|
||||||
|
|
||||||
final String errorPage = "/error/error.html";
|
final String errorPage = "/error/error.html";
|
||||||
final String error404Page = "/error/error404.html";
|
final String error404Page = "/error/error404.html";
|
||||||
final String expiredPage = "/error/viewExpired.html";
|
final String expiredPage = "/error/viewExpired.xhtml";
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(SpringPrimeFacesApplication.class,
|
SpringApplication.run(SpringPrimeFacesApplication.class,
|
||||||
|
|
|
@ -130,8 +130,8 @@ public class UserSession implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Primefaces handle session timeout
|
// Primefaces handle session timeout
|
||||||
// Session timeout, ms
|
// Session timeout, ms (25 minutes)
|
||||||
long sessionTimeoutInterval = 30000L;
|
long sessionTimeoutInterval = 25 * 60_000L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the sessionTimeoutInterval
|
* @return the sessionTimeoutInterval
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<faces-config
|
||||||
|
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
|
||||||
|
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
|
||||||
|
version="2.2"
|
||||||
|
>
|
||||||
|
<name>GourmetJ</name>
|
||||||
|
<navigation-rule>
|
||||||
|
<from-view-id>*</from-view-id>
|
||||||
|
<navigation-case>
|
||||||
|
<from-outcome>home</from-outcome>
|
||||||
|
<to-view-id>/main.jsf</to-view-id>
|
||||||
|
</navigation-case>
|
||||||
|
</navigation-rule>
|
||||||
|
</faces-config>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:f="http://xmlns.jcp.org/jsf/core">
|
||||||
|
|
||||||
|
<h:head>
|
||||||
|
<title>View Expired</title>
|
||||||
|
</h:head>
|
||||||
|
<h:body>
|
||||||
|
<h2>View Expired.</h2>
|
||||||
|
<h:form>
|
||||||
|
The user session has timed out. Return to main page.
|
||||||
|
<h:commandButton value="OK" action="home"></h:commandButton>
|
||||||
|
</h:form>
|
||||||
|
</h:body>
|
||||||
|
</html>
|
BIN
src/main/resources/META-INF/resources/favicon.ico
Normal file
BIN
src/main/resources/META-INF/resources/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
|
@ -47,7 +47,7 @@
|
||||||
<p:commandButton
|
<p:commandButton
|
||||||
value="Back" ajax="false"
|
value="Back" ajax="false"
|
||||||
icon="ui-icon-arrowthick-1-w"
|
icon="ui-icon-arrowthick-1-w"
|
||||||
action="main.jsf"
|
action="home"
|
||||||
immediate="true"
|
immediate="true"
|
||||||
/>
|
/>
|
||||||
<p:commandButton ajax="false"
|
<p:commandButton ajax="false"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user