]> source.dussan.org Git - gitblit.git/commitdiff
Updated servlet-api to 3.0 and ported ServletRequestWrapper (issue 23)
authorJames Moger <james.moger@gitblit.com>
Sat, 8 Oct 2011 01:08:52 +0000 (21:08 -0400)
committerJames Moger <james.moger@gitblit.com>
Sat, 8 Oct 2011 01:08:52 +0000 (21:08 -0400)
.classpath
docs/00_index.mkd
docs/04_releases.mkd
src/com/gitblit/ServletRequestWrapper.java
src/com/gitblit/build/Build.java

index cb616da7338766a9a898ddf862c3193341a4d46d..8d2ad71a3639fe5b5faba583fed84f0e689ac596 100644 (file)
@@ -9,7 +9,6 @@
                        <attribute name="javadoc_location" value="jar:platform:/resource/gitblit/ext/log4j-1.2.16-javadoc.jar!/"/>\r
                </attributes>\r
        </classpathentry>\r
-       <classpathentry kind="lib" path="ext/servlet-api-2.5.jar" sourcepath="ext/servlet-api-2.5-sources.jar"/>\r
        <classpathentry kind="lib" path="ext/slf4j-api-1.6.1.jar" sourcepath="ext/slf4j-api-1.6.1-sources.jar">\r
                <attributes>\r
                        <attribute name="javadoc_location" value="jar:platform:/resource/gitblit/ext/slf4j-api-1.6.1-javadoc.jar!/"/>\r
@@ -97,5 +96,6 @@
                        <attribute name="javadoc_location" value="jar:platform:/resource/gitblit/ext/org.eclipse.jgit-1.1.0.201109151100-r-javadoc.jar!/"/>\r
                </attributes>\r
        </classpathentry>\r
+       <classpathentry kind="lib" path="ext/javax.servlet-3.0.1.jar" sourcepath="ext/javax.servlet-3.0.1-sources.jar"/>\r
        <classpathentry kind="output" path="bin"/>\r
 </classpath>\r
index 17ca428e1aa0a1c27eccba713ed3c491ac0fb136..cf165db5a7dca950d06668d05d2a7bbdfd715666 100644 (file)
@@ -30,6 +30,7 @@ Gitblit requires a Java 6 Runtime Environment (JRE) or a Java 6 Development Kit
 \r
 - improved: updated ui with Twitter's Bootstrap CSS toolkit\r
 <br/>**New:** *web.loginMessage = gitblit*\r
+- fixed: Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8)\r
 - fixed: Set the RSS content type for Firefox 4 (issue 22)\r
 - fixed: Null pointer exception if did not set federation strategy (issue 20)\r
 - fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later\r
index 01b531d652f469d51cfb0253fe228b79078253d9..214e35cb5aea983b3960db4dc6626b84eebdec70 100644 (file)
@@ -5,6 +5,7 @@
 \r
 - improved: updated ui with Twitter's Bootstrap CSS toolkit\r
 <br/>**New:** *web.loginMessage = gitblit*\r
+- fixed: Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8)\r
 - fixed: Set the RSS content type for Firefox 4 (issue 22)\r
 - fixed: Null pointer exception if did not set federation strategy (issue 20)\r
 - fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later\r
index 9110ebf70c0a40e236518b0cb0dc68fa172b895f..d74a9ecb14d57c294cebfaaa41f3e1a135eb6294 100644 (file)
@@ -19,15 +19,24 @@ import java.io.BufferedReader;
 import java.io.IOException;\r
 import java.io.UnsupportedEncodingException;\r
 import java.security.Principal;\r
+import java.util.Collection;\r
 import java.util.Enumeration;\r
 import java.util.Locale;\r
 import java.util.Map;\r
 \r
+import javax.servlet.AsyncContext;\r
+import javax.servlet.DispatcherType;\r
 import javax.servlet.RequestDispatcher;\r
+import javax.servlet.ServletContext;\r
+import javax.servlet.ServletException;\r
 import javax.servlet.ServletInputStream;\r
+import javax.servlet.ServletRequest;\r
+import javax.servlet.ServletResponse;\r
 import javax.servlet.http.Cookie;\r
 import javax.servlet.http.HttpServletRequest;\r
+import javax.servlet.http.HttpServletResponse;\r
 import javax.servlet.http.HttpSession;\r
+import javax.servlet.http.Part;\r
 \r
 /**\r
  * ServletRequestWrapper is a pass-through/delegate wrapper class for a servlet\r
@@ -324,4 +333,68 @@ public abstract class ServletRequestWrapper implements HttpServletRequest {
        public boolean isRequestedSessionIdFromUrl() {\r
                return req.isRequestedSessionIdFromUrl();\r
        }\r
+       \r
+       /*\r
+        * Servlet 3.0 Methods \r
+        */\r
+       \r
+       @Override\r
+       public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {\r
+               return false;\r
+       }\r
+       \r
+       @Override\r
+       public void login(String username, String password) throws ServletException {\r
+       }\r
+\r
+       @Override\r
+       public void logout() throws ServletException {\r
+       }\r
+\r
+               \r
+       @Override\r
+       public Part getPart(String arg0) throws IOException, ServletException {\r
+               return req.getPart(arg0);\r
+       }\r
+\r
+       @Override\r
+       public Collection<Part> getParts() throws IOException, ServletException {\r
+               return req.getParts();\r
+       }\r
+\r
+       @Override\r
+       public AsyncContext getAsyncContext() {\r
+               return req.getAsyncContext();\r
+       }\r
+\r
+       @Override\r
+       public DispatcherType getDispatcherType() {\r
+               return req.getDispatcherType();\r
+       }\r
+\r
+       @Override\r
+       public ServletContext getServletContext() {\r
+               return req.getServletContext();\r
+       }\r
+\r
+       @Override\r
+       public boolean isAsyncStarted() {\r
+               return req.isAsyncStarted();\r
+       }\r
+\r
+       @Override\r
+       public boolean isAsyncSupported() {\r
+               return req.isAsyncStarted();\r
+       }\r
+\r
+       @Override\r
+       public AsyncContext startAsync() throws IllegalStateException {\r
+               return req.startAsync();\r
+       }\r
+\r
+       @Override\r
+       public AsyncContext startAsync(ServletRequest arg0, ServletResponse arg1)\r
+                       throws IllegalStateException {\r
+               return req.startAsync(arg0, arg1);\r
+       }\r
 }
\ No newline at end of file
index 684f2787fb52c07e8f40738791e955c4522943bc..c4f373e8c9313bef23fdf63d0c071832209c31db 100644 (file)
@@ -361,10 +361,10 @@ public class Build {
                                "bc75f05dd4f7fa848720ac669b8b438ee4a6b146",\r
                                "dcd42f672e734521d1a6ccc0c2f9ecded1a1a281");\r
 \r
-               public static final MavenObject SERVLET = new MavenObject("Servlet 2.5", "javax/servlet",\r
-                               "servlet-api", "2.5", 105000, 158000, 0,\r
-                               "5959582d97d8b61f4d154ca9e495aafd16726e34",\r
-                               "021599814ad9a605b86f3e6381571beccd861a32", null);\r
+               public static final MavenObject SERVLET = new MavenObject("Servlet 3.0", "org/glassfish",\r
+                               "javax.servlet", "3.0.1", 84000, 211000, 0,\r
+                               "58f17c941cd0607bb5edcbcafc491d02265ac9a1",\r
+                               "63f2f8bcdd3f138020bbadd5c847e8f3847b77d2", null);\r
 \r
                public static final MavenObject SLF4JAPI = new MavenObject("SLF4J API", "org/slf4j",\r
                                "slf4j-api", "1.6.1", 25500, 45000, 182000,\r