2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org
.argeo
.jackrabbit
.remote
;
19 import javax
.servlet
.ServletException
;
20 import javax
.servlet
.http
.HttpServletRequest
;
21 import javax
.servlet
.http
.HttpServletResponse
;
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
;
28 public class ExtendedDispatcherServlet
extends DispatcherServlet
{
29 private static final long serialVersionUID
= -5584673209855752009L;
31 private final static Log log
= LogFactory
32 .getLog(ExtendedDispatcherServlet
.class);
34 protected void service(HttpServletRequest request
,
35 HttpServletResponse response
) throws ServletException
,
38 // see http://forum.springsource.org/showthread.php?t=53472
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
);