Acegi security / Login-Logout and remember ok (next step: dynamical menu and user info when authentified)
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<link rel="icon" type="image/png" href="./images/favicon.png" />
|
||||||
<title><fmt:message key="title" /></title>
|
<title><fmt:message key="title" /></title>
|
||||||
<link rel="stylesheet" href="./stylesheets/base.css" type="text/css" />
|
<link rel="stylesheet" href="./stylesheets/base.css" type="text/css" />
|
||||||
<decorator:head />
|
<decorator:head />
|
||||||
|
|||||||
10
YACOSWeb/WebContent/WEB-INF/jsp/errors/403error.jsp
Normal file
10
YACOSWeb/WebContent/WEB-INF/jsp/errors/403error.jsp
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
File doesn't exist.
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
10
YACOSWeb/WebContent/WEB-INF/jsp/errors/404error.jsp
Normal file
10
YACOSWeb/WebContent/WEB-INF/jsp/errors/404error.jsp
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
Error : page not found
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -30,9 +30,13 @@
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<authz:authentication operation="username"></authz:authentication>
|
|
||||||
<authz:authorize ifAllGranted="ROLE_AUTHOR">
|
|
||||||
|
|
||||||
|
<authz:authorize ifNotGranted="ROLE_ANONYMOUS">
|
||||||
|
<a href="j_acegi_logout">Logout</a>
|
||||||
|
</authz:authorize>
|
||||||
|
|
||||||
|
|
||||||
|
<authz:authorize ifAllGranted="ROLE_AUTHOR">
|
||||||
<h1>Welcome: <%= SecurityContextHolder.getContext().getAuthentication().getName() %></h1>
|
<h1>Welcome: <%= SecurityContextHolder.getContext().getAuthentication().getName() %></h1>
|
||||||
</authz:authorize>
|
</authz:authorize>
|
||||||
|
|
||||||
|
|||||||
@@ -43,20 +43,6 @@
|
|||||||
<filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
|
<filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
<!-- SiteMesh Integration declaration Start -->
|
|
||||||
<filter>
|
|
||||||
<filter-name>sitemesh</filter-name>
|
|
||||||
<filter-class>
|
|
||||||
com.opensymphony.module.sitemesh.filter.PageFilter
|
|
||||||
</filter-class>
|
|
||||||
</filter>
|
|
||||||
|
|
||||||
<filter-mapping>
|
|
||||||
<filter-name>sitemesh</filter-name>
|
|
||||||
<url-pattern>/*</url-pattern>
|
|
||||||
</filter-mapping>
|
|
||||||
<!-- SiteMesh Integration declaration End -->
|
|
||||||
|
|
||||||
<!-- Acegi Security declaration Start -->
|
<!-- Acegi Security declaration Start -->
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
<filter-name>Acegi Filter Chain Proxy</filter-name>
|
||||||
@@ -72,6 +58,21 @@
|
|||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SiteMesh Integration declaration Start -->
|
||||||
|
<filter>
|
||||||
|
<filter-name>sitemesh</filter-name>
|
||||||
|
<filter-class>
|
||||||
|
com.opensymphony.module.sitemesh.filter.PageFilter
|
||||||
|
</filter-class>
|
||||||
|
</filter>
|
||||||
|
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>sitemesh</filter-name>
|
||||||
|
<url-pattern>/*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<!-- SiteMesh Integration declaration End -->
|
||||||
|
|
||||||
<!-- Load Context for Acegi security -->
|
<!-- Load Context for Acegi security -->
|
||||||
<listener>
|
<listener>
|
||||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||||
@@ -91,11 +92,22 @@
|
|||||||
</filter-class>
|
</filter-class>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
<filter-name>SessionService</filter-name>
|
<filter-name>SessionService</filter-name>
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
<!-- SessionService Integration declaration End -->
|
<!-- SessionService Integration declaration End -->
|
||||||
|
|
||||||
|
<!-- no access error -->
|
||||||
|
<error-page>
|
||||||
|
<error-code>403</error-code>
|
||||||
|
<location>/WEB-INF/jsp/errors/403error.jsp</location>
|
||||||
|
</error-page>
|
||||||
|
|
||||||
|
<!-- page not found error -->
|
||||||
|
<error-page>
|
||||||
|
<error-code>404</error-code>
|
||||||
|
<location>/WEB-INF/jsp/errors/404error.jsp</location>
|
||||||
|
</error-page>
|
||||||
|
|
||||||
</web-app>
|
</web-app>
|
||||||
BIN
YACOSWeb/WebContent/images/favicon.png
Normal file
BIN
YACOSWeb/WebContent/images/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
Reference in New Issue
Block a user