Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 115 lines (96 sloc) 3.99 kb
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app id="SimpleShiroSecuredApplication">
<display-name>Simple Secure Application</display-name>

<!-- ==== Servlets ================================================================== -->
<servlet>
<servlet-name>PerformFunctionAndGoBackServlet</servlet-name>
<servlet-class>org.meri.simpleshirosecuredapplication.servlet.PerformFunctionAndGoBackServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>AccountPageServlet</servlet-name>
<servlet-class>org.meri.simpleshirosecuredapplication.servlet.AccountPageServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- ==== Servlets Mapping ========================================================== -->
<servlet-mapping>
<servlet-name>PerformFunctionAndGoBackServlet</servlet-name>
<url-pattern>/simpleshirosecuredapplication/masterservlet</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>AccountPageServlet</servlet-name>
<url-pattern>/simpleshirosecuredapplication/accountpageservlet</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<!-- ==== Security ================================================================== -->
<filter>
<filter-name>ShiroAppSensorIntegrationFilter</filter-name>
<filter-class>org.meri.simpleshirosecuredapplication.intrusiondetection.integration.ShiroAppSensorIntegrationFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>ShiroAppSensorIntegrationFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<filter>
<filter-name>ShiroFilter</filter-name>
<filter-class>org.apache.shiro.web.servlet.IniShiroFilter</filter-class>
<init-param>
<param-name>configPath</param-name>
<param-value>classpath:Shiro.ini</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>ShiroFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<filter>
<filter-name>AppSensorBlockComponent</filter-name>
<filter-class>org.owasp.appsensor.filters.AppSensorRequestBlockingFilter</filter-class>
<init-param>
<param-name>redirectURL</param-name>
<param-value>/simpleshirosecuredapplication/account/accessdenied.jsp</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>AppSensorBlockComponent</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<filter>
<filter-name>IpChangedDetectionPoint</filter-name>
<filter-class>org.owasp.appsensor.filters.IpAddressChangeDetectionFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>IpChangedDetectionPoint</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<!-- ==== Initialize Database on Startup ========================================================== -->

<!-- reference to data source -->
<resource-ref>
<description>Derby Connection</description>
<res-ref-name>jdbc/SimpleShiroSecuredApplicationDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<!-- liquibase configuration -->
<context-param>
<param-name>liquibase.changelog</param-name>
<param-value>src/main/resources/db.changelog.xml</param-value>
</context-param>

<context-param>
<param-name>liquibase.datasource</param-name>
<param-value>jdbc/SimpleShiroSecuredApplicationDB</param-value>
</context-param>

<!-- liquibase sevlet listener to check database on start up and apply new
changes if needed -->
<listener>
<listener-class>liquibase.integration.servlet.LiquibaseServletListener</listener-class>
</listener>

<persistence-unit-ref>
<persistence-unit-ref-name>persistence/SimpleShiroSecuredApplicationPU</persistence-unit-ref-name>
<persistence-unit-name>SimpleShiroSecuredApplicationPU</persistence-unit-name>
</persistence-unit-ref>
</web-app>
Something went wrong with that request. Please try again.