2 * Copyright (C) 2007-2012 Argeo GmbH
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.
16 package org
.argeo
.jackrabbit
.remote
;
18 import javax
.servlet
.ServletException
;
19 import javax
.servlet
.http
.HttpServletRequest
;
20 import javax
.servlet
.http
.HttpServletResponse
;
22 import org
.apache
.commons
.logging
.Log
;
23 import org
.apache
.commons
.logging
.LogFactory
;
24 import org
.argeo
.ArgeoException
;
25 import org
.springframework
.web
.servlet
.DispatcherServlet
;
28 * Overrides Spring {@link DispatcherServlet}, see
29 * http://forum.springsource.org/showthread.php?t=53472.
31 public class ExtendedDispatcherServlet
extends DispatcherServlet
{
32 private static final long serialVersionUID
= -5584673209855752009L;
34 private final static Log log
= LogFactory
35 .getLog(ExtendedDispatcherServlet
.class);
37 protected void service(HttpServletRequest request
,
38 HttpServletResponse response
) throws ServletException
,
41 if (log
.isTraceEnabled()) {
42 log
.trace("SessionID = " + request
.getSession().getId());
43 log
.trace(" ContextPath = " + request
.getContextPath());
44 log
.trace(" ServletPath = " + request
.getServletPath());
45 log
.trace(" PathInfo = " + request
.getPathInfo());
46 log
.trace(" Method = " + request
.getMethod());
47 log
.trace(" User-Agent = " + request
.getHeader("User-Agent"));
49 doService(request
, response
);
50 } catch (Exception e
) {
51 throw new ArgeoException("Cannot process request", e
);