From 39636be7b018b9121696ce7bdc462ab2c3c8185d Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 11 Jan 2013 17:11:28 +0100 Subject: o Creating bin/web for running the web application. --- src/main/resources/webapp/WEB-INF/shiro.ini | 18 +++++ .../webapp/WEB-INF/tags/common/footer.tagx | 9 +++ .../resources/webapp/WEB-INF/tags/common/head.tagx | 42 ++++++++++++ .../webapp/WEB-INF/tags/common/headjs.tagx | 10 +++ src/main/resources/webapp/WEB-INF/urlrewrite.xml | 38 +++++++++++ src/main/resources/webapp/WEB-INF/web.xml | 76 ++++++++++++++++++++++ 6 files changed, 193 insertions(+) create mode 100644 src/main/resources/webapp/WEB-INF/shiro.ini create mode 100644 src/main/resources/webapp/WEB-INF/tags/common/footer.tagx create mode 100755 src/main/resources/webapp/WEB-INF/tags/common/head.tagx create mode 100644 src/main/resources/webapp/WEB-INF/tags/common/headjs.tagx create mode 100755 src/main/resources/webapp/WEB-INF/urlrewrite.xml create mode 100644 src/main/resources/webapp/WEB-INF/web.xml (limited to 'src/main/resources/webapp/WEB-INF') diff --git a/src/main/resources/webapp/WEB-INF/shiro.ini b/src/main/resources/webapp/WEB-INF/shiro.ini new file mode 100644 index 0000000..21015af --- /dev/null +++ b/src/main/resources/webapp/WEB-INF/shiro.ini @@ -0,0 +1,18 @@ +[main] + +authc.loginUrl=/login.jspx +roles.unauthorizedUrl = /access-denied.jsp + +sha256Matcher = org.apache.shiro.authc.credential.Sha256CredentialsMatcher + +myCredentialsMatcher = org.apache.shiro.authc.credential.AllowAllCredentialsMatcher + +myRealm = io.trygvis.esper.testing.web.MissingShiroJdbcRealm +myRealm.authenticationQuery = select 'wat' from person where mail = ? +myRealm.credentialsMatcher = $myCredentialsMatcher + +[urls] + +/external/** = anon + +/login.jspx = authc diff --git a/src/main/resources/webapp/WEB-INF/tags/common/footer.tagx b/src/main/resources/webapp/WEB-INF/tags/common/footer.tagx new file mode 100644 index 0000000..7f686ee --- /dev/null +++ b/src/main/resources/webapp/WEB-INF/tags/common/footer.tagx @@ -0,0 +1,9 @@ + +
+
+ +

Footer, yo!

+ +
+
+
diff --git a/src/main/resources/webapp/WEB-INF/tags/common/head.tagx b/src/main/resources/webapp/WEB-INF/tags/common/head.tagx new file mode 100755 index 0000000..f651c2b --- /dev/null +++ b/src/main/resources/webapp/WEB-INF/tags/common/head.tagx @@ -0,0 +1,42 @@ + + + + + + + + + <c:if test="${not empty title }">${title } - </c:if>Yeah + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/webapp/WEB-INF/tags/common/headjs.tagx b/src/main/resources/webapp/WEB-INF/tags/common/headjs.tagx new file mode 100644 index 0000000..4e39e63 --- /dev/null +++ b/src/main/resources/webapp/WEB-INF/tags/common/headjs.tagx @@ -0,0 +1,10 @@ + + + + + + + diff --git a/src/main/resources/webapp/WEB-INF/urlrewrite.xml b/src/main/resources/webapp/WEB-INF/urlrewrite.xml new file mode 100755 index 0000000..cc02ca8 --- /dev/null +++ b/src/main/resources/webapp/WEB-INF/urlrewrite.xml @@ -0,0 +1,38 @@ + + + + + + + + + / + /index.jspx + + + + + + ^/build/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$ + $1 + /build/build.jspx + + + diff --git a/src/main/resources/webapp/WEB-INF/web.xml b/src/main/resources/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..ed33a8f --- /dev/null +++ b/src/main/resources/webapp/WEB-INF/web.xml @@ -0,0 +1,76 @@ + + + + org.apache.shiro.web.env.EnvironmentLoaderListener + + + + ShiroFilter + org.apache.shiro.web.servlet.ShiroFilter + + + + Url Rewrite Filter + org.tuckey.web.filters.urlrewrite.UrlRewriteFilter + + + + confReloadCheckInterval + 60 + + + + + logLevel + slf4j + + + + + Jersey + com.sun.jersey.spi.container.servlet.ServletContainer + + javax.ws.rs.Application + io.trygvis.esper.testing.web.JerseyApplication + + + jersey.config.servlet.filter.staticContentRegex + /(image|css|external)/.* + + + com.sun.jersey.config.feature.FilterForwardOn404 + true + + + com.sun.jersey.api.json.POJOMappingFeature + true + + + + + ShiroFilter + /* + + + + Url Rewrite Filter + /* + + + + Jersey + /* + + + + index.jspx + + -- cgit v1.2.3