]> git.argeo.org Git - lgpl/argeo-commons.git/blob - ExtendedDispatcherServlet.java
cff2c3b01053fac19d6333cbda0e0bce38981e96
[lgpl/argeo-commons.git] / ExtendedDispatcherServlet.java
1 /*
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.argeo.jackrabbit.remote;
18
19 import javax.servlet.ServletException;
20 import javax.servlet.http.HttpServletRequest;
21 import javax.servlet.http.HttpServletResponse;
22
23 import org.apache.commons.logging.Log;
24 import org.apache.commons.logging.LogFactory;
25 import org.argeo.ArgeoException;
26 import org.springframework.web.servlet.DispatcherServlet;
27
28 public class ExtendedDispatcherServlet extends DispatcherServlet {
29 private static final long serialVersionUID = -5584673209855752009L;
30
31 private final static Log log = LogFactory
32 .getLog(ExtendedDispatcherServlet.class);
33
34 protected void service(HttpServletRequest request,
35 HttpServletResponse response) throws ServletException,
36 java.io.IOException {
37
38 // see http://forum.springsource.org/showthread.php?t=53472
39 try {
40 if (log.isTraceEnabled())
41 log.trace("Received request " + request);
42 // log.debug("PathTranslated="+request.getPathTranslated());
43 log.debug("PathInfo="+request.getPathInfo());
44 // log.debug("ServletPath="+request.getServletPath());
45 // log.debug("ContextPath="+request.getContextPath());
46 doService(request, response);
47 } catch (Exception e) {
48 // e.printStackTrace();
49 // log.debug(request.getMethod());
50 throw new ArgeoException("Cannot process request", e);
51 }
52 }
53
54 }