summaryrefslogtreecommitdiffstats
path: root/src/main/java/WEB-INF/web.xml
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-12-11 23:12:12 -0500
committerJames Moger <james.moger@gitblit.com>2013-12-11 23:12:12 -0500
commit65d5bb3f1cbfb42be5a3c4aa077b7ab2504082af (patch)
tree4d4c709c499c0ed46c237a7e2cb04dec28acdea2 /src/main/java/WEB-INF/web.xml
parente55930b4a3c657eb71fad3aa3f2d276439fc4a8c (diff)
downloadgitblit-65d5bb3f1cbfb42be5a3c4aa077b7ab2504082af.tar.gz
gitblit-65d5bb3f1cbfb42be5a3c4aa077b7ab2504082af.zip
Rollback to Servlet 2.5
Combining Dagger and Servlet 3 works really well on stock Tomcat and Jetty but it is a troublesome combination on JEE containers with their own ideas on how to instantiate classes. JBoss AS 7 has been particularly nasty and it is just simpler to scaleback and stay with Servlet 2.5 than it is to fight all permuations of containers. Instead of using constructor DI, the servlets and filters each have an inject(ObjectGaph) method which is automatically called during initialization. Each servlet or filter is responsible for retrieving the required dependency from the graph. The Dagger object graph is created in the context listener and stuffed into the context as an attribute. Change-Id: Ib5714584fe73e2a6b9c6fda12af080a43356cbda
Diffstat (limited to 'src/main/java/WEB-INF/web.xml')
-rw-r--r--src/main/java/WEB-INF/web.xml273
1 files changed, 273 insertions, 0 deletions
diff --git a/src/main/java/WEB-INF/web.xml b/src/main/java/WEB-INF/web.xml
index 6ce5daf8..c082b944 100644
--- a/src/main/java/WEB-INF/web.xml
+++ b/src/main/java/WEB-INF/web.xml
@@ -35,4 +35,277 @@
</display-name>
<!-- PARAMS -->
+
+
+<!-- Gitblit Context Listener --><!-- STRIP
+ <listener>
+ <listener-class>com.gitblit.servlet.GitblitContext</listener-class>
+ </listener>STRIP -->
+
+
+ <!-- Git Servlet
+ <url-pattern> MUST match:
+ * GitFilter
+ * com.gitblit.Constants.GIT_PATH
+ * Wicket Filter ignorePaths parameter -->
+ <servlet>
+ <servlet-name>GitServlet</servlet-name>
+ <servlet-class>com.gitblit.servlet.GitServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>GitServlet</servlet-name>
+ <url-pattern>/git/*</url-pattern>
+ </servlet-mapping>
+ <servlet>
+ <servlet-name>GitServlet2</servlet-name>
+ <servlet-class>com.gitblit.servlet.GitServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>GitServlet2</servlet-name>
+ <url-pattern>/r/*</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- SparkleShare Invite Servlet
+ <url-pattern> MUST match:
+ * com.gitblit.Constants.SPARKLESHARE_INVITE_PATH
+ * Wicket Filter ignorePaths parameter -->
+ <servlet>
+ <servlet-name>SparkleShareInviteServlet</servlet-name>
+ <servlet-class>com.gitblit.servlet.SparkleShareInviteServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>SparkleShareInviteServlet</servlet-name>
+ <url-pattern>/sparkleshare/*</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- Syndication Servlet
+ <url-pattern> MUST match:
+ * SyndicationFilter
+ * com.gitblit.Constants.SYNDICATION_PATH
+ * Wicket Filter ignorePaths parameter -->
+ <servlet>
+ <servlet-name>SyndicationServlet</servlet-name>
+ <servlet-class>com.gitblit.servlet.SyndicationServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>SyndicationServlet</servlet-name>
+ <url-pattern>/feed/*</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- Zip Servlet
+ <url-pattern> MUST match:
+ * ZipServlet
+ * com.gitblit.Constants.ZIP_PATH
+ * Wicket Filter ignorePaths parameter -->
+ <servlet>
+ <servlet-name>ZipServlet</servlet-name>
+ <servlet-class>com.gitblit.servlet.DownloadZipServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ZipServlet</servlet-name>
+ <url-pattern>/zip/*</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- Federation Servlet
+ <url-pattern> MUST match:
+ * com.gitblit.Constants.FEDERATION_PATH
+ * Wicket Filter ignorePaths parameter -->
+ <servlet>
+ <servlet-name>FederationServlet</servlet-name>
+ <servlet-class>com.gitblit.servlet.FederationServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>FederationServlet</servlet-name>
+ <url-pattern>/federation/*</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- Rpc Servlet
+ <url-pattern> MUST match:
+ * com.gitblit.Constants.RPC_PATH
+ * Wicket Filter ignorePaths parameter -->
+ <servlet>
+ <servlet-name>RpcServlet</servlet-name>
+ <servlet-class>com.gitblit.servlet.RpcServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RpcServlet</servlet-name>
+ <url-pattern>/rpc/*</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- Pages Servlet
+ <url-pattern> MUST match:
+ * PagesFilter
+ * com.gitblit.Constants.PAGES_PATH
+ * Wicket Filter ignorePaths parameter -->
+ <servlet>
+ <servlet-name>PagesServlet</servlet-name>
+ <servlet-class>com.gitblit.servlet.PagesServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>PagesServlet</servlet-name>
+ <url-pattern>/pages/*</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- Logo Servlet
+ <url-pattern> MUST match:
+ * Wicket Filter ignorePaths parameter -->
+ <servlet>
+ <servlet-name>LogoServlet</servlet-name>
+ <servlet-class>com.gitblit.servlet.LogoServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>LogoServlet</servlet-name>
+ <url-pattern>/logo.png</url-pattern>
+ </servlet-mapping>
+
+ <!-- Branch Graph Servlet
+ <url-pattern> MUST match:
+ * Wicket Filter ignorePaths parameter -->
+ <servlet>
+ <servlet-name>BranchGraphServlet</servlet-name>
+ <servlet-class>com.gitblit.servlet.BranchGraphServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>BranchGraphServlet</servlet-name>
+ <url-pattern>/graph/*</url-pattern>
+ </servlet-mapping>
+
+ <!-- Robots.txt Servlet
+ <url-pattern> MUST match:
+ * Wicket Filter ignorePaths parameter -->
+ <servlet>
+ <servlet-name>RobotsTxtServlet</servlet-name>
+ <servlet-class>com.gitblit.servlet.RobotsTxtServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>RobotsTxtServlet</servlet-name>
+ <url-pattern>/robots.txt</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- Git Access Restriction Filter
+ <url-pattern> MUST match:
+ * GitServlet
+ * com.gitblit.Constants.GIT_PATH
+ * Wicket Filter ignorePaths parameter -->
+ <filter>
+ <filter-name>GitFilter</filter-name>
+ <filter-class>com.gitblit.servlet.GitFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>GitFilter</filter-name>
+ <url-pattern>/git/*</url-pattern>
+ </filter-mapping>
+
+
+ <!-- Syndication Restriction Filter
+ <url-pattern> MUST match:
+ * SyndicationServlet
+ * com.gitblit.Constants.SYNDICATION_PATH
+ * Wicket Filter ignorePaths parameter -->
+ <filter>
+ <filter-name>SyndicationFilter</filter-name>
+ <filter-class>com.gitblit.servlet.SyndicationFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>SyndicationFilter</filter-name>
+ <url-pattern>/feed/*</url-pattern>
+ </filter-mapping>
+
+
+ <!-- Download Zip Restriction Filter
+ <url-pattern> MUST match:
+ * DownloadZipServlet
+ * com.gitblit.Constants.ZIP_PATH
+ * Wicket Filter ignorePaths parameter -->
+ <filter>
+ <filter-name>ZipFilter</filter-name>
+ <filter-class>com.gitblit.servlet.DownloadZipFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ZipFilter</filter-name>
+ <url-pattern>/zip/*</url-pattern>
+ </filter-mapping>
+
+
+ <!-- Rpc Restriction Filter
+ <url-pattern> MUST match:
+ * RpcServlet
+ * com.gitblit.Constants.RPC_PATH
+ * Wicket Filter ignorePaths parameter -->
+ <filter>
+ <filter-name>RpcFilter</filter-name>
+ <filter-class>com.gitblit.servlet.RpcFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>RpcFilter</filter-name>
+ <url-pattern>/rpc/*</url-pattern>
+ </filter-mapping>
+
+
+ <!-- Pges Restriction Filter
+ <url-pattern> MUST match:
+ * PagesServlet
+ * com.gitblit.Constants.PAGES_PATH
+ * Wicket Filter ignorePaths parameter -->
+ <filter>
+ <filter-name>PagesFilter</filter-name>
+ <filter-class>com.gitblit.servlet.PagesFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>PagesFilter</filter-name>
+ <url-pattern>/pages/*</url-pattern>
+ </filter-mapping>
+
+ <filter>
+ <filter-name>EnforceAuthenticationFilter</filter-name>
+ <filter-class>com.gitblit.servlet.EnforceAuthenticationFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>EnforceAuthenticationFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+
+ <!-- Wicket Filter -->
+ <filter>
+ <filter-name>wicketFilter</filter-name>
+ <filter-class>
+ com.gitblit.wicket.GitblitWicketFilter
+ </filter-class>
+ <init-param>
+ <param-name>ignorePaths</param-name>
+ <!-- Paths should match
+ * SyndicationFilter <url-pattern>
+ * SyndicationServlet <url-pattern>
+ * com.gitblit.Constants.SYNDICATION_PATH
+ * GitFilter <url-pattern>
+ * GitServlet <url-pattern>
+ * com.gitblit.Constants.GIT_PATH
+ * SparkleshareInviteServlet <url-pattern>
+ * com.gitblit.Constants.SPARKLESHARE_INVITE_PATH
+ * Zipfilter <url-pattern>
+ * ZipServlet <url-pattern>
+ * com.gitblit.Constants.ZIP_PATH
+ * FederationServlet <url-pattern>
+ * RpcFilter <url-pattern>
+ * RpcServlet <url-pattern>
+ * PagesFilter <url-pattern>
+ * PagesServlet <url-pattern>
+ * com.gitblit.Constants.PAGES_PATH -->
+ <param-value>r/,git/,feed/,zip/,federation/,rpc/,pages/,robots.txt,logo.png,graph/,sparkleshare/</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>wicketFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
</web-app> \ No newline at end of file