MySQL & Apache Derby as jdbcRealm for Apache Shiro | Nabil Hachicha - 0 views
-
http://localhost:8080/ShiroDemo/auth/secured.jsp
-
kuni katsuya on 03 Sep 12should be: http://localhost:8080/ShiroJdbcRealmDemo/auth/BackOffice.jsp
-
- ...36 more annotations...
-
Create a new directory “auth” and add a new JSP under it, let’s call it “BackOffice.jsp“
-
<filter-class>05 org.apache.shiro.web.servlet.IniShiroFilter06 </filter-class>
-
10 <filter-mapping>11 <filter-name>ShiroFilter</filter-name>12 <url-pattern>/*</url-pattern>13 </filter-mapping>
-
map the URLs to be protected, all the url under /auth should be authenticated with basic HTTP authentication
-
Add a new directory under src let’s call it production we will create a new shiro configuration file compatible with MySQL
-
13 <jdbc.user>APP</jdbc.user>14 <jdbc.passwd>APP</jdbc.passwd>15 <jdbc.url>jdbc:derby://localhost:1527/shiro_schema</jdbc.url>16 <jdbc.driver>org.apache.derby.jdbc.ClientDriver</jdbc.driver>
-
45 <jdbc.user>ADM</jdbc.user>46 <jdbc.passwd>secret123</jdbc.passwd>47 <jdbc.ds>com.mysql.jdbc.jdbc2.optional.MysqlDataSource</jdbc.ds>48 <jdbc.serverName>localhost</jdbc.serverName>49 <jdbc.databaseName>shiro_schema</jdbc.databaseName>