Quand j'essaie d'accéder à certaines pages protégées comme writerPage.jsp, Shiro me rediriger vers la page loging.jsp même après authentification.
Voilà le fichier shiri.ini
Le log du Server GlassFish
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 [users] admin = p mike = p, reader, writer joe = p, writer [urls] /success/** = authc /writer/** = authc
Et voila le fichier web.xml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 INFO: PWC1412: WebModule[/ShiroTest3_mvn] ServletContext.log():Cleaning up Shiro Environment INFO: PWC1412: WebModule[/ShiroTest3_mvn] ServletContext.log():Initializing Shiro environment GRAVE: 105 [http-thread-pool-4848-(1)] INFO org.apache.shiro.web.env.EnvironmentLoader - Starting Shiro environment initialization. GRAVE: 997 [http-thread-pool-4848-(1)] INFO org.apache.shiro.web.env.EnvironmentLoader - Shiro environment initialized in 882 ms. INFO: Loading application com.mycompany_ShiroTest3_mvn_war_1.0-SNAPSHOT at /ShiroTest3_mvn INFO: com.mycompany_ShiroTest3_mvn_war_1.0-SNAPSHOT was successfully deployed in 1*606 milliseconds.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <session-config> <session-timeout> 30 </session-timeout> </session-config> <listener> <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class> </listener> <filter> <filter-name>shiroFilter</filter-name> <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class> </filter> <filter-mapping> <filter-name>shiroFilter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> <dispatcher>ERROR</dispatcher> </filter-mapping> </web-app>
Partager