Added @Override and @Deprecated annotations to web module
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@156 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
573b39a790
commit
ae9ce5ac15
|
|
@ -105,6 +105,7 @@ public class BurlapClientInterceptor extends UrlBasedRemoteAccessor implements M
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void afterPropertiesSet() {
|
public void afterPropertiesSet() {
|
||||||
super.afterPropertiesSet();
|
super.afterPropertiesSet();
|
||||||
prepare();
|
prepare();
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ public class BurlapProxyFactoryBean extends BurlapClientInterceptor implements F
|
||||||
private Object serviceProxy;
|
private Object serviceProxy;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void afterPropertiesSet() {
|
public void afterPropertiesSet() {
|
||||||
super.afterPropertiesSet();
|
super.afterPropertiesSet();
|
||||||
this.serviceProxy = new ProxyFactory(getServiceInterface(), this).getProxy(getBeanClassLoader());
|
this.serviceProxy = new ProxyFactory(getServiceInterface(), this).getProxy(getBeanClassLoader());
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ class Hessian1SkeletonInvoker extends HessianSkeletonInvoker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void invoke(InputStream inputStream, OutputStream outputStream) throws Throwable {
|
public void invoke(InputStream inputStream, OutputStream outputStream) throws Throwable {
|
||||||
HessianInput in = new HessianInput(inputStream);
|
HessianInput in = new HessianInput(inputStream);
|
||||||
HessianOutput out = new HessianOutput(outputStream);
|
HessianOutput out = new HessianOutput(outputStream);
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ class Hessian2SkeletonInvoker extends HessianSkeletonInvoker {
|
||||||
this.debugLogger = debugLog;
|
this.debugLogger = debugLog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void invoke(final InputStream inputStream, final OutputStream outputStream) throws Throwable {
|
public void invoke(final InputStream inputStream, final OutputStream outputStream) throws Throwable {
|
||||||
InputStream isToUse = inputStream;
|
InputStream isToUse = inputStream;
|
||||||
OutputStream osToUse = outputStream;
|
OutputStream osToUse = outputStream;
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,7 @@ public class HessianClientInterceptor extends UrlBasedRemoteAccessor implements
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void afterPropertiesSet() {
|
public void afterPropertiesSet() {
|
||||||
super.afterPropertiesSet();
|
super.afterPropertiesSet();
|
||||||
prepare();
|
prepare();
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ public class HessianProxyFactoryBean extends HessianClientInterceptor implements
|
||||||
private Object serviceProxy;
|
private Object serviceProxy;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void afterPropertiesSet() {
|
public void afterPropertiesSet() {
|
||||||
super.afterPropertiesSet();
|
super.afterPropertiesSet();
|
||||||
this.serviceProxy = new ProxyFactory(getServiceInterface(), this).getProxy(getBeanClassLoader());
|
this.serviceProxy = new ProxyFactory(getServiceInterface(), this).getProxy(getBeanClassLoader());
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,7 @@ public class CommonsHttpInvokerRequestExecutor extends AbstractHttpInvokerReques
|
||||||
* @see #validateResponse
|
* @see #validateResponse
|
||||||
* @see #getResponseBody
|
* @see #getResponseBody
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected RemoteInvocationResult doExecuteRequest(
|
protected RemoteInvocationResult doExecuteRequest(
|
||||||
HttpInvokerClientConfiguration config, ByteArrayOutputStream baos)
|
HttpInvokerClientConfiguration config, ByteArrayOutputStream baos)
|
||||||
throws IOException, ClassNotFoundException {
|
throws IOException, ClassNotFoundException {
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ public class HttpInvokerClientInterceptor extends RemoteInvocationBasedAccessor
|
||||||
return this.httpInvokerRequestExecutor;
|
return this.httpInvokerRequestExecutor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void afterPropertiesSet() {
|
public void afterPropertiesSet() {
|
||||||
super.afterPropertiesSet();
|
super.afterPropertiesSet();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ public class HttpInvokerProxyFactoryBean extends HttpInvokerClientInterceptor
|
||||||
private Object serviceProxy;
|
private Object serviceProxy;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void afterPropertiesSet() {
|
public void afterPropertiesSet() {
|
||||||
super.afterPropertiesSet();
|
super.afterPropertiesSet();
|
||||||
if (getServiceInterface() == null) {
|
if (getServiceInterface() == null) {
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ public class SimpleHttpInvokerRequestExecutor extends AbstractHttpInvokerRequest
|
||||||
* @see #validateResponse
|
* @see #validateResponse
|
||||||
* @see #readResponseBody
|
* @see #readResponseBody
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected RemoteInvocationResult doExecuteRequest(
|
protected RemoteInvocationResult doExecuteRequest(
|
||||||
HttpInvokerClientConfiguration config, ByteArrayOutputStream baos)
|
HttpInvokerClientConfiguration config, ByteArrayOutputStream baos)
|
||||||
throws IOException, ClassNotFoundException {
|
throws IOException, ClassNotFoundException {
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ public class JaxRpcPortProxyFactoryBean extends JaxRpcPortClientInterceptor
|
||||||
this.beanClassLoader = classLoader;
|
this.beanClassLoader = classLoader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void afterPropertiesSet() {
|
public void afterPropertiesSet() {
|
||||||
if (getServiceInterface() == null) {
|
if (getServiceInterface() == null) {
|
||||||
// Use JAX-RPC port interface (a traditional RMI interface)
|
// Use JAX-RPC port interface (a traditional RMI interface)
|
||||||
|
|
|
||||||
|
|
@ -46,18 +46,22 @@ public class JaxRpcSoapFaultException extends SoapFaultException {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFaultCode() {
|
public String getFaultCode() {
|
||||||
return getOriginalException().getFaultCode().toString();
|
return getOriginalException().getFaultCode().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public QName getFaultCodeAsQName() {
|
public QName getFaultCodeAsQName() {
|
||||||
return getOriginalException().getFaultCode();
|
return getOriginalException().getFaultCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFaultString() {
|
public String getFaultString() {
|
||||||
return getOriginalException().getFaultString();
|
return getOriginalException().getFaultString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFaultActor() {
|
public String getFaultActor() {
|
||||||
return getOriginalException().getFaultActor();
|
return getOriginalException().getFaultActor();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ public class JaxWsPortProxyFactoryBean extends JaxWsPortClientInterceptor
|
||||||
this.beanClassLoader = classLoader;
|
this.beanClassLoader = classLoader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void afterPropertiesSet() {
|
public void afterPropertiesSet() {
|
||||||
super.afterPropertiesSet();
|
super.afterPropertiesSet();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,18 +47,22 @@ public class JaxWsSoapFaultException extends SoapFaultException {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFaultCode() {
|
public String getFaultCode() {
|
||||||
return getFault().getFaultCode();
|
return getFault().getFaultCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public QName getFaultCodeAsQName() {
|
public QName getFaultCodeAsQName() {
|
||||||
return getFault().getFaultCodeAsQName();
|
return getFault().getFaultCodeAsQName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFaultString() {
|
public String getFaultString() {
|
||||||
return getFault().getFaultString();
|
return getFault().getFaultString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getFaultActor() {
|
public String getFaultActor() {
|
||||||
return getFault().getFaultActor();
|
return getFault().getFaultActor();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,7 @@ public class SimpleHttpServerJaxWsServiceExporter extends AbstractJaxWsServiceEx
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void afterPropertiesSet() throws Exception {
|
public void afterPropertiesSet() throws Exception {
|
||||||
if (this.server == null) {
|
if (this.server == null) {
|
||||||
InetSocketAddress address = (this.hostname != null ?
|
InetSocketAddress address = (this.hostname != null ?
|
||||||
|
|
@ -163,6 +164,7 @@ public class SimpleHttpServerJaxWsServiceExporter extends AbstractJaxWsServiceEx
|
||||||
super.afterPropertiesSet();
|
super.afterPropertiesSet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void publishEndpoint(Endpoint endpoint, WebService annotation) {
|
protected void publishEndpoint(Endpoint endpoint, WebService annotation) {
|
||||||
String fullPath = this.basePath + annotation.serviceName();
|
String fullPath = this.basePath + annotation.serviceName();
|
||||||
HttpContext httpContext = this.server.createContext(fullPath);
|
HttpContext httpContext = this.server.createContext(fullPath);
|
||||||
|
|
@ -175,6 +177,7 @@ public class SimpleHttpServerJaxWsServiceExporter extends AbstractJaxWsServiceEx
|
||||||
endpoint.publish(httpContext);
|
endpoint.publish(httpContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
super.destroy();
|
super.destroy();
|
||||||
if (this.localServer) {
|
if (this.localServer) {
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ public class SimpleJaxWsServiceExporter extends AbstractJaxWsServiceExporter {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void publishEndpoint(Endpoint endpoint, WebService annotation) {
|
protected void publishEndpoint(Endpoint endpoint, WebService annotation) {
|
||||||
String fullAddress = this.baseAddress + annotation.serviceName();
|
String fullAddress = this.baseAddress + annotation.serviceName();
|
||||||
endpoint.publish(fullAddress);
|
endpoint.publish(fullAddress);
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ public class ContextLoaderServlet extends HttpServlet {
|
||||||
/**
|
/**
|
||||||
* Initialize the root web application context.
|
* Initialize the root web application context.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void init() throws ServletException {
|
public void init() throws ServletException {
|
||||||
this.contextLoader = createContextLoader();
|
this.contextLoader = createContextLoader();
|
||||||
this.contextLoader.initWebApplicationContext(getServletContext());
|
this.contextLoader.initWebApplicationContext(getServletContext());
|
||||||
|
|
@ -101,6 +102,7 @@ public class ContextLoaderServlet extends HttpServlet {
|
||||||
/**
|
/**
|
||||||
* Close the root web application context.
|
* Close the root web application context.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
if (this.contextLoader != null) {
|
if (this.contextLoader != null) {
|
||||||
this.contextLoader.closeWebApplicationContext(getServletContext());
|
this.contextLoader.closeWebApplicationContext(getServletContext());
|
||||||
|
|
@ -113,6 +115,7 @@ public class ContextLoaderServlet extends HttpServlet {
|
||||||
* ever be created in web.xml. That's why a correctly invoked Servlet 2.3
|
* ever be created in web.xml. That's why a correctly invoked Servlet 2.3
|
||||||
* listener is much more appropriate for initialization work ;-)
|
* listener is much more appropriate for initialization work ;-)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||||
getServletContext().log(
|
getServletContext().log(
|
||||||
"Attempt to call service method on ContextLoaderServlet as [" +
|
"Attempt to call service method on ContextLoaderServlet as [" +
|
||||||
|
|
@ -121,6 +124,7 @@ public class ContextLoaderServlet extends HttpServlet {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getServletInfo() {
|
public String getServletInfo() {
|
||||||
return "ContextLoaderServlet for Servlet API 2.3 " +
|
return "ContextLoaderServlet for Servlet API 2.3 " +
|
||||||
"(deprecated in favor of ContextLoaderListener for Servlet API 2.4)";
|
"(deprecated in favor of ContextLoaderListener for Servlet API 2.4)";
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@ public class FacesWebRequest extends FacesRequestAttributes implements NativeWeb
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "FacesWebRequest: " + getDescription(true);
|
return "FacesWebRequest: " + getDescription(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ package org.springframework.web.context.request;
|
||||||
*/
|
*/
|
||||||
public class RequestScope extends AbstractRequestAttributesScope {
|
public class RequestScope extends AbstractRequestAttributesScope {
|
||||||
|
|
||||||
|
@Override
|
||||||
protected int getScope() {
|
protected int getScope() {
|
||||||
return RequestAttributes.SCOPE_REQUEST;
|
return RequestAttributes.SCOPE_REQUEST;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,7 @@ public class ServletRequestAttributes extends AbstractRequestAttributes {
|
||||||
* Update all accessed session attributes through <code>session.setAttribute</code>
|
* Update all accessed session attributes through <code>session.setAttribute</code>
|
||||||
* calls, explicitly indicating to the container that they might have been modified.
|
* calls, explicitly indicating to the container that they might have been modified.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void updateAccessedSessionAttributes() {
|
protected void updateAccessedSessionAttributes() {
|
||||||
// Store session reference for access after request completion.
|
// Store session reference for access after request completion.
|
||||||
this.session = this.request.getSession(false);
|
this.session = this.request.getSession(false);
|
||||||
|
|
@ -245,6 +246,7 @@ public class ServletRequestAttributes extends AbstractRequestAttributes {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.request.toString();
|
return this.request.toString();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,7 @@ public class ServletWebRequest extends ServletRequestAttributes implements Nativ
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ServletWebRequest: " + getDescription(true);
|
return "ServletWebRequest: " + getDescription(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ public class SessionScope extends AbstractRequestAttributesScope {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
protected int getScope() {
|
protected int getScope() {
|
||||||
return this.scope;
|
return this.scope;
|
||||||
}
|
}
|
||||||
|
|
@ -84,6 +85,7 @@ public class SessionScope extends AbstractRequestAttributesScope {
|
||||||
return RequestContextHolder.currentRequestAttributes().getSessionId();
|
return RequestContextHolder.currentRequestAttributes().getSessionId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object get(String name, ObjectFactory objectFactory) {
|
public Object get(String name, ObjectFactory objectFactory) {
|
||||||
Object mutex = RequestContextHolder.currentRequestAttributes().getSessionMutex();
|
Object mutex = RequestContextHolder.currentRequestAttributes().getSessionMutex();
|
||||||
synchronized (mutex) {
|
synchronized (mutex) {
|
||||||
|
|
@ -91,6 +93,7 @@ public class SessionScope extends AbstractRequestAttributesScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object remove(String name) {
|
public Object remove(String name) {
|
||||||
Object mutex = RequestContextHolder.currentRequestAttributes().getSessionMutex();
|
Object mutex = RequestContextHolder.currentRequestAttributes().getSessionMutex();
|
||||||
synchronized (mutex) {
|
synchronized (mutex) {
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
|
||||||
return this.namespace;
|
return this.namespace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getConfigLocations() {
|
public String[] getConfigLocations() {
|
||||||
return super.getConfigLocations();
|
return super.getConfigLocations();
|
||||||
}
|
}
|
||||||
|
|
@ -133,6 +134,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
|
||||||
/**
|
/**
|
||||||
* Register request/session scopes, a {@link ServletContextAwareProcessor}, etc.
|
* Register request/session scopes, a {@link ServletContextAwareProcessor}, etc.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
|
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
|
||||||
beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext, this.servletConfig));
|
beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext, this.servletConfig));
|
||||||
beanFactory.ignoreDependencyInterface(ServletContextAware.class);
|
beanFactory.ignoreDependencyInterface(ServletContextAware.class);
|
||||||
|
|
@ -147,6 +149,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
|
||||||
* This implementation supports file paths beneath the root of the ServletContext.
|
* This implementation supports file paths beneath the root of the ServletContext.
|
||||||
* @see ServletContextResource
|
* @see ServletContextResource
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected Resource getResourceByPath(String path) {
|
protected Resource getResourceByPath(String path) {
|
||||||
return new ServletContextResource(this.servletContext, path);
|
return new ServletContextResource(this.servletContext, path);
|
||||||
}
|
}
|
||||||
|
|
@ -155,6 +158,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
|
||||||
* This implementation supports pattern matching in unexpanded WARs too.
|
* This implementation supports pattern matching in unexpanded WARs too.
|
||||||
* @see ServletContextResourcePatternResolver
|
* @see ServletContextResourcePatternResolver
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected ResourcePatternResolver getResourcePatternResolver() {
|
protected ResourcePatternResolver getResourcePatternResolver() {
|
||||||
return new ServletContextResourcePatternResolver(this);
|
return new ServletContextResourcePatternResolver(this);
|
||||||
}
|
}
|
||||||
|
|
@ -162,6 +166,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
|
||||||
/**
|
/**
|
||||||
* Initialize the theme capability.
|
* Initialize the theme capability.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void onRefresh() {
|
protected void onRefresh() {
|
||||||
this.themeSource = UiApplicationContextUtils.initThemeSource(this);
|
this.themeSource = UiApplicationContextUtils.initThemeSource(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ public class ContextExposingHttpServletRequest extends HttpServletRequestWrapper
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object getAttribute(String name) {
|
public Object getAttribute(String name) {
|
||||||
if ((this.explicitAttributes == null || !this.explicitAttributes.contains(name)) &&
|
if ((this.explicitAttributes == null || !this.explicitAttributes.contains(name)) &&
|
||||||
(this.exposedContextBeanNames == null || this.exposedContextBeanNames.contains(name)) &&
|
(this.exposedContextBeanNames == null || this.exposedContextBeanNames.contains(name)) &&
|
||||||
|
|
@ -88,6 +89,7 @@ public class ContextExposingHttpServletRequest extends HttpServletRequestWrapper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setAttribute(String name, Object value) {
|
public void setAttribute(String name, Object value) {
|
||||||
super.setAttribute(name, value);
|
super.setAttribute(name, value);
|
||||||
if (this.explicitAttributes == null) {
|
if (this.explicitAttributes == null) {
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ public class GenericWebApplicationContext extends GenericApplicationContext
|
||||||
* Register ServletContextAwareProcessor.
|
* Register ServletContextAwareProcessor.
|
||||||
* @see ServletContextAwareProcessor
|
* @see ServletContextAwareProcessor
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
|
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
|
||||||
beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext));
|
beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext));
|
||||||
beanFactory.ignoreDependencyInterface(ServletContextAware.class);
|
beanFactory.ignoreDependencyInterface(ServletContextAware.class);
|
||||||
|
|
@ -111,6 +112,7 @@ public class GenericWebApplicationContext extends GenericApplicationContext
|
||||||
* This implementation supports file paths beneath the root of the ServletContext.
|
* This implementation supports file paths beneath the root of the ServletContext.
|
||||||
* @see ServletContextResource
|
* @see ServletContextResource
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected Resource getResourceByPath(String path) {
|
protected Resource getResourceByPath(String path) {
|
||||||
return new ServletContextResource(this.servletContext, path);
|
return new ServletContextResource(this.servletContext, path);
|
||||||
}
|
}
|
||||||
|
|
@ -119,6 +121,7 @@ public class GenericWebApplicationContext extends GenericApplicationContext
|
||||||
* This implementation supports pattern matching in unexpanded WARs too.
|
* This implementation supports pattern matching in unexpanded WARs too.
|
||||||
* @see ServletContextResourcePatternResolver
|
* @see ServletContextResourcePatternResolver
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected ResourcePatternResolver getResourcePatternResolver() {
|
protected ResourcePatternResolver getResourcePatternResolver() {
|
||||||
return new ServletContextResourcePatternResolver(this);
|
return new ServletContextResourcePatternResolver(this);
|
||||||
}
|
}
|
||||||
|
|
@ -126,6 +129,7 @@ public class GenericWebApplicationContext extends GenericApplicationContext
|
||||||
/**
|
/**
|
||||||
* Initialize the theme capability.
|
* Initialize the theme capability.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void onRefresh() {
|
protected void onRefresh() {
|
||||||
this.themeSource = UiApplicationContextUtils.initThemeSource(this);
|
this.themeSource = UiApplicationContextUtils.initThemeSource(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,12 +51,14 @@ public class HttpRequestHandlerServlet extends HttpServlet {
|
||||||
private HttpRequestHandler target;
|
private HttpRequestHandler target;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void init() throws ServletException {
|
public void init() throws ServletException {
|
||||||
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
|
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
|
||||||
this.target = (HttpRequestHandler) wac.getBean(getServletName(), HttpRequestHandler.class);
|
this.target = (HttpRequestHandler) wac.getBean(getServletName(), HttpRequestHandler.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void service(HttpServletRequest request, HttpServletResponse response)
|
protected void service(HttpServletRequest request, HttpServletResponse response)
|
||||||
throws ServletException, IOException {
|
throws ServletException, IOException {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,7 @@ public class RequestHandledEvent extends ApplicationEvent {
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return ("RequestHandledEvent: " + getDescription());
|
return ("RequestHandledEvent: " + getDescription());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@ public class ServletContextPropertyPlaceholderConfigurer extends PropertyPlaceho
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
protected String resolvePlaceholder(String placeholder, Properties props) {
|
protected String resolvePlaceholder(String placeholder, Properties props) {
|
||||||
String value = null;
|
String value = null;
|
||||||
if (this.contextOverride && this.servletContext != null) {
|
if (this.contextOverride && this.servletContext != null) {
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
|
||||||
* This implementation checks <code>ServletContext.getResource</code>.
|
* This implementation checks <code>ServletContext.getResource</code>.
|
||||||
* @see javax.servlet.ServletContext#getResource(String)
|
* @see javax.servlet.ServletContext#getResource(String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean exists() {
|
public boolean exists() {
|
||||||
try {
|
try {
|
||||||
URL url = this.servletContext.getResource(this.path);
|
URL url = this.servletContext.getResource(this.path);
|
||||||
|
|
@ -124,6 +125,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
|
||||||
* but throws a FileNotFoundException if no resource found.
|
* but throws a FileNotFoundException if no resource found.
|
||||||
* @see javax.servlet.ServletContext#getResource(String)
|
* @see javax.servlet.ServletContext#getResource(String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public URL getURL() throws IOException {
|
public URL getURL() throws IOException {
|
||||||
URL url = this.servletContext.getResource(this.path);
|
URL url = this.servletContext.getResource(this.path);
|
||||||
if (url == null) {
|
if (url == null) {
|
||||||
|
|
@ -138,6 +140,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
|
||||||
* but throws a FileNotFoundException if not found or not resolvable.
|
* but throws a FileNotFoundException if not found or not resolvable.
|
||||||
* @see javax.servlet.ServletContext#getRealPath(String)
|
* @see javax.servlet.ServletContext#getRealPath(String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public File getFile() throws IOException {
|
public File getFile() throws IOException {
|
||||||
String realPath = WebUtils.getRealPath(this.servletContext, this.path);
|
String realPath = WebUtils.getRealPath(this.servletContext, this.path);
|
||||||
return new File(realPath);
|
return new File(realPath);
|
||||||
|
|
@ -148,6 +151,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
|
||||||
* relative to the path of the underlying file of this resource descriptor.
|
* relative to the path of the underlying file of this resource descriptor.
|
||||||
* @see org.springframework.util.StringUtils#applyRelativePath(String, String)
|
* @see org.springframework.util.StringUtils#applyRelativePath(String, String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Resource createRelative(String relativePath) {
|
public Resource createRelative(String relativePath) {
|
||||||
String pathToUse = StringUtils.applyRelativePath(this.path, relativePath);
|
String pathToUse = StringUtils.applyRelativePath(this.path, relativePath);
|
||||||
return new ServletContextResource(this.servletContext, pathToUse);
|
return new ServletContextResource(this.servletContext, pathToUse);
|
||||||
|
|
@ -158,6 +162,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
|
||||||
* resource refers to.
|
* resource refers to.
|
||||||
* @see org.springframework.util.StringUtils#getFilename(String)
|
* @see org.springframework.util.StringUtils#getFilename(String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getFilename() {
|
public String getFilename() {
|
||||||
return StringUtils.getFilename(this.path);
|
return StringUtils.getFilename(this.path);
|
||||||
}
|
}
|
||||||
|
|
@ -178,6 +183,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
|
||||||
/**
|
/**
|
||||||
* This implementation compares the underlying ServletContext resource locations.
|
* This implementation compares the underlying ServletContext resource locations.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (obj == this) {
|
if (obj == this) {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -193,6 +199,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
|
||||||
* This implementation returns the hash code of the underlying
|
* This implementation returns the hash code of the underlying
|
||||||
* ServletContext resource location.
|
* ServletContext resource location.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return this.path.hashCode();
|
return this.path.hashCode();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ public class ServletContextResourceLoader extends DefaultResourceLoader {
|
||||||
* This implementation supports file paths beneath the root of the web application.
|
* This implementation supports file paths beneath the root of the web application.
|
||||||
* @see ServletContextResource
|
* @see ServletContextResource
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected Resource getResourceByPath(String path) {
|
protected Resource getResourceByPath(String path) {
|
||||||
return new ServletContextResource(this.servletContext, path);
|
return new ServletContextResource(this.servletContext, path);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ public class ServletContextResourcePatternResolver extends PathMatchingResourceP
|
||||||
* @see ServletContextResource
|
* @see ServletContextResource
|
||||||
* @see javax.servlet.ServletContext#getResourcePaths
|
* @see javax.servlet.ServletContext#getResourcePaths
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected Set doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException {
|
protected Set doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException {
|
||||||
if (rootDirResource instanceof ServletContextResource) {
|
if (rootDirResource instanceof ServletContextResource) {
|
||||||
ServletContextResource scResource = (ServletContextResource) rootDirResource;
|
ServletContextResource scResource = (ServletContextResource) rootDirResource;
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ public class ServletRequestHandledEvent extends RequestHandledEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getShortDescription() {
|
public String getShortDescription() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
sb.append("url=[").append(getRequestUrl()).append("]; ");
|
sb.append("url=[").append(getRequestUrl()).append("]; ");
|
||||||
|
|
@ -125,6 +126,7 @@ public class ServletRequestHandledEvent extends RequestHandledEvent {
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
sb.append("url=[").append(getRequestUrl()).append("]; ");
|
sb.append("url=[").append(getRequestUrl()).append("]; ");
|
||||||
|
|
@ -135,6 +137,7 @@ public class ServletRequestHandledEvent extends RequestHandledEvent {
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ServletRequestHandledEvent: " + getDescription();
|
return "ServletRequestHandledEvent: " + getDescription();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ public class StaticWebApplicationContext extends StaticApplicationContext
|
||||||
/**
|
/**
|
||||||
* Register request/session scopes, a {@link ServletContextAwareProcessor}, etc.
|
* Register request/session scopes, a {@link ServletContextAwareProcessor}, etc.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
|
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
|
||||||
beanFactory.registerScope(SCOPE_REQUEST, new RequestScope());
|
beanFactory.registerScope(SCOPE_REQUEST, new RequestScope());
|
||||||
beanFactory.registerScope(SCOPE_SESSION, new SessionScope(false));
|
beanFactory.registerScope(SCOPE_SESSION, new SessionScope(false));
|
||||||
|
|
@ -146,6 +147,7 @@ public class StaticWebApplicationContext extends StaticApplicationContext
|
||||||
* This implementation supports file paths beneath the root of the ServletContext.
|
* This implementation supports file paths beneath the root of the ServletContext.
|
||||||
* @see ServletContextResource
|
* @see ServletContextResource
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected Resource getResourceByPath(String path) {
|
protected Resource getResourceByPath(String path) {
|
||||||
return new ServletContextResource(this.servletContext, path);
|
return new ServletContextResource(this.servletContext, path);
|
||||||
}
|
}
|
||||||
|
|
@ -154,6 +156,7 @@ public class StaticWebApplicationContext extends StaticApplicationContext
|
||||||
* This implementation supports pattern matching in unexpanded WARs too.
|
* This implementation supports pattern matching in unexpanded WARs too.
|
||||||
* @see ServletContextResourcePatternResolver
|
* @see ServletContextResourcePatternResolver
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected ResourcePatternResolver getResourcePatternResolver() {
|
protected ResourcePatternResolver getResourcePatternResolver() {
|
||||||
return new ServletContextResourcePatternResolver(this);
|
return new ServletContextResourcePatternResolver(this);
|
||||||
}
|
}
|
||||||
|
|
@ -161,6 +164,7 @@ public class StaticWebApplicationContext extends StaticApplicationContext
|
||||||
/**
|
/**
|
||||||
* Initialize the theme capability.
|
* Initialize the theme capability.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void onRefresh() {
|
protected void onRefresh() {
|
||||||
this.themeSource = UiApplicationContextUtils.initThemeSource(this);
|
this.themeSource = UiApplicationContextUtils.initThemeSource(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ public abstract class WebApplicationObjectSupport extends ApplicationObjectSuppo
|
||||||
* @see #getServletContext()
|
* @see #getServletContext()
|
||||||
* @see #getTempDir()
|
* @see #getTempDir()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected boolean isContextRequired() {
|
protected boolean isContextRequired() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -65,6 +66,7 @@ public abstract class WebApplicationObjectSupport extends ApplicationObjectSuppo
|
||||||
* Calls {@link #initServletContext(javax.servlet.ServletContext)} if the
|
* Calls {@link #initServletContext(javax.servlet.ServletContext)} if the
|
||||||
* given ApplicationContext is a {@link WebApplicationContext}.
|
* given ApplicationContext is a {@link WebApplicationContext}.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void initApplicationContext(ApplicationContext context) {
|
protected void initApplicationContext(ApplicationContext context) {
|
||||||
super.initApplicationContext(context);
|
super.initApplicationContext(context);
|
||||||
if (context instanceof WebApplicationContext) {
|
if (context instanceof WebApplicationContext) {
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ public class XmlWebApplicationContext extends AbstractRefreshableWebApplicationC
|
||||||
* @see #initBeanDefinitionReader
|
* @see #initBeanDefinitionReader
|
||||||
* @see #loadBeanDefinitions
|
* @see #loadBeanDefinitions
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException {
|
protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException {
|
||||||
// Create a new XmlBeanDefinitionReader for the given BeanFactory.
|
// Create a new XmlBeanDefinitionReader for the given BeanFactory.
|
||||||
XmlBeanDefinitionReader beanDefinitionReader = new XmlBeanDefinitionReader(beanFactory);
|
XmlBeanDefinitionReader beanDefinitionReader = new XmlBeanDefinitionReader(beanFactory);
|
||||||
|
|
@ -131,6 +132,7 @@ public class XmlWebApplicationContext extends AbstractRefreshableWebApplicationC
|
||||||
* and "/WEB-INF/test-servlet.xml" for a context with the namespace "test-servlet"
|
* and "/WEB-INF/test-servlet.xml" for a context with the namespace "test-servlet"
|
||||||
* (like for a DispatcherServlet instance with the servlet-name "test").
|
* (like for a DispatcherServlet instance with the servlet-name "test").
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected String[] getDefaultConfigLocations() {
|
protected String[] getDefaultConfigLocations() {
|
||||||
if (getNamespace() != null) {
|
if (getNamespace() != null) {
|
||||||
return new String[] {DEFAULT_CONFIG_LOCATION_PREFIX + getNamespace() + DEFAULT_CONFIG_LOCATION_SUFFIX};
|
return new String[] {DEFAULT_CONFIG_LOCATION_PREFIX + getNamespace() + DEFAULT_CONFIG_LOCATION_SUFFIX};
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,7 @@ public abstract class AbstractRequestLoggingFilter extends OncePerRequestFilter
|
||||||
* @see #beforeRequest
|
* @see #beforeRequest
|
||||||
* @see #afterRequest
|
* @see #afterRequest
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void doFilterInternal(
|
protected void doFilterInternal(
|
||||||
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
|
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
|
||||||
throws ServletException, IOException {
|
throws ServletException, IOException {
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@ public class CharacterEncodingFilter extends OncePerRequestFilter {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void doFilterInternal(
|
protected void doFilterInternal(
|
||||||
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
|
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
|
||||||
throws ServletException, IOException {
|
throws ServletException, IOException {
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ public class CommonsRequestLoggingFilter extends AbstractRequestLoggingFilter {
|
||||||
/**
|
/**
|
||||||
* Writes a log message before the request is processed.
|
* Writes a log message before the request is processed.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void beforeRequest(HttpServletRequest request, String message) {
|
protected void beforeRequest(HttpServletRequest request, String message) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug(message);
|
logger.debug(message);
|
||||||
|
|
@ -45,6 +46,7 @@ public class CommonsRequestLoggingFilter extends AbstractRequestLoggingFilter {
|
||||||
/**
|
/**
|
||||||
* Writes a log message after the request is processed.
|
* Writes a log message after the request is processed.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void afterRequest(HttpServletRequest request, String message) {
|
protected void afterRequest(HttpServletRequest request, String message) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug(message);
|
logger.debug(message);
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,7 @@ public class DelegatingFilterProxy extends GenericFilterBean {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void initFilterBean() throws ServletException {
|
protected void initFilterBean() throws ServletException {
|
||||||
// If no target bean name specified, use filter name.
|
// If no target bean name specified, use filter name.
|
||||||
if (this.targetBeanName == null) {
|
if (this.targetBeanName == null) {
|
||||||
|
|
@ -167,6 +168,7 @@ public class DelegatingFilterProxy extends GenericFilterBean {
|
||||||
invokeDelegate(delegateToUse, request, response, filterChain);
|
invokeDelegate(delegateToUse, request, response, filterChain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
Filter delegateToUse = null;
|
Filter delegateToUse = null;
|
||||||
synchronized (this.delegateMonitor) {
|
synchronized (this.delegateMonitor) {
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ public class Log4jNestedDiagnosticContextFilter extends AbstractRequestLoggingFi
|
||||||
* Logs the before-request message through Log4J and
|
* Logs the before-request message through Log4J and
|
||||||
* adds a message the Log4J NDC before the request is processed.
|
* adds a message the Log4J NDC before the request is processed.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void beforeRequest(HttpServletRequest request, String message) {
|
protected void beforeRequest(HttpServletRequest request, String message) {
|
||||||
if (log4jLogger.isDebugEnabled()) {
|
if (log4jLogger.isDebugEnabled()) {
|
||||||
log4jLogger.debug(message);
|
log4jLogger.debug(message);
|
||||||
|
|
@ -69,6 +70,7 @@ public class Log4jNestedDiagnosticContextFilter extends AbstractRequestLoggingFi
|
||||||
* Removes the log message from the Log4J NDC after the request is processed
|
* Removes the log message from the Log4J NDC after the request is processed
|
||||||
* and logs the after-request message through Log4J.
|
* and logs the after-request message through Log4J.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void afterRequest(HttpServletRequest request, String message) {
|
protected void afterRequest(HttpServletRequest request, String message) {
|
||||||
NDC.pop();
|
NDC.pop();
|
||||||
if (NDC.getDepth() == 0) {
|
if (NDC.getDepth() == 0) {
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ public class RequestContextFilter extends OncePerRequestFilter {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void doFilterInternal(
|
protected void doFilterInternal(
|
||||||
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
|
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
|
||||||
throws ServletException, IOException {
|
throws ServletException, IOException {
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ public class ServletContextRequestLoggingFilter extends AbstractRequestLoggingFi
|
||||||
/**
|
/**
|
||||||
* Writes a log message before the request is processed.
|
* Writes a log message before the request is processed.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void beforeRequest(HttpServletRequest request, String message) {
|
protected void beforeRequest(HttpServletRequest request, String message) {
|
||||||
getServletContext().log(message);
|
getServletContext().log(message);
|
||||||
}
|
}
|
||||||
|
|
@ -43,6 +44,7 @@ public class ServletContextRequestLoggingFilter extends AbstractRequestLoggingFi
|
||||||
/**
|
/**
|
||||||
* Writes a log message after the request is processed.
|
* Writes a log message after the request is processed.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void afterRequest(HttpServletRequest request, String message) {
|
protected void afterRequest(HttpServletRequest request, String message) {
|
||||||
getServletContext().log(message);
|
getServletContext().log(message);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@ public abstract class DecoratingNavigationHandler extends NavigationHandler {
|
||||||
* NavigationHandler as argument.
|
* NavigationHandler as argument.
|
||||||
* @see #handleNavigation(javax.faces.context.FacesContext, String, String, javax.faces.application.NavigationHandler)
|
* @see #handleNavigation(javax.faces.context.FacesContext, String, String, javax.faces.application.NavigationHandler)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public final void handleNavigation(FacesContext facesContext, String fromAction, String outcome) {
|
public final void handleNavigation(FacesContext facesContext, String fromAction, String outcome) {
|
||||||
handleNavigation(facesContext, fromAction, outcome, this.decoratedNavigationHandler);
|
handleNavigation(facesContext, fromAction, outcome, this.decoratedNavigationHandler);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,7 @@ public class DelegatingNavigationHandlerProxy extends NavigationHandler {
|
||||||
* as argument will be used. Else, the standard <code>handleNavigation</code>
|
* as argument will be used. Else, the standard <code>handleNavigation</code>
|
||||||
* method will be called.
|
* method will be called.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void handleNavigation(FacesContext facesContext, String fromAction, String outcome) {
|
public void handleNavigation(FacesContext facesContext, String fromAction, String outcome) {
|
||||||
NavigationHandler handler = getDelegate(facesContext);
|
NavigationHandler handler = getDelegate(facesContext);
|
||||||
if (handler instanceof DecoratingNavigationHandler) {
|
if (handler instanceof DecoratingNavigationHandler) {
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ public class DelegatingVariableResolver extends VariableResolver {
|
||||||
* Delegate to the original VariableResolver first, then try to
|
* Delegate to the original VariableResolver first, then try to
|
||||||
* resolve the variable as Spring bean in the root WebApplicationContext.
|
* resolve the variable as Spring bean in the root WebApplicationContext.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException {
|
public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException {
|
||||||
Object value = resolveOriginal(facesContext, name);
|
Object value = resolveOriginal(facesContext, name);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ public class SpringBeanVariableResolver extends DelegatingVariableResolver {
|
||||||
super(originalVariableResolver);
|
super(originalVariableResolver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException {
|
public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException {
|
||||||
Object bean = resolveSpringBean(facesContext, name);
|
Object bean = resolveSpringBean(facesContext, name);
|
||||||
if (bean != null) {
|
if (bean != null) {
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,7 @@ public class WebApplicationContextVariableResolver extends VariableResolver {
|
||||||
* <p>If no WebApplicationContext is available, all requests
|
* <p>If no WebApplicationContext is available, all requests
|
||||||
* will be delegated to the original VariableResolver.
|
* will be delegated to the original VariableResolver.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Object resolveVariable(FacesContext context, String name) throws EvaluationException {
|
public Object resolveVariable(FacesContext context, String name) throws EvaluationException {
|
||||||
Object value = null;
|
Object value = null;
|
||||||
if (WEB_APPLICATION_CONTEXT_VARIABLE_NAME.equals(name)) {
|
if (WEB_APPLICATION_CONTEXT_VARIABLE_NAME.equals(name)) {
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ public class SpringBeanFacesELResolver extends SpringBeanELResolver {
|
||||||
* @param elContext the current JSF ELContext
|
* @param elContext the current JSF ELContext
|
||||||
* @return the Spring BeanFactory (never <code>null</code>)
|
* @return the Spring BeanFactory (never <code>null</code>)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected BeanFactory getBeanFactory(ELContext elContext) {
|
protected BeanFactory getBeanFactory(ELContext elContext) {
|
||||||
return getWebApplicationContext(elContext);
|
return getWebApplicationContext(elContext);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ public class WebApplicationContextFacesELResolver extends ELResolver {
|
||||||
protected final Log logger = LogFactory.getLog(getClass());
|
protected final Log logger = LogFactory.getLog(getClass());
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object getValue(ELContext elContext, Object base, Object property) throws ELException {
|
public Object getValue(ELContext elContext, Object base, Object property) throws ELException {
|
||||||
if (base != null) {
|
if (base != null) {
|
||||||
if (base instanceof WebApplicationContext) {
|
if (base instanceof WebApplicationContext) {
|
||||||
|
|
@ -103,6 +104,7 @@ public class WebApplicationContextFacesELResolver extends ELResolver {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Class<?> getType(ELContext elContext, Object base, Object property) throws ELException {
|
public Class<?> getType(ELContext elContext, Object base, Object property) throws ELException {
|
||||||
if (base != null) {
|
if (base != null) {
|
||||||
if (base instanceof WebApplicationContext) {
|
if (base instanceof WebApplicationContext) {
|
||||||
|
|
@ -139,9 +141,11 @@ public class WebApplicationContextFacesELResolver extends ELResolver {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setValue(ELContext elContext, Object base, Object property, Object value) throws ELException {
|
public void setValue(ELContext elContext, Object base, Object property, Object value) throws ELException {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isReadOnly(ELContext elContext, Object base, Object property) throws ELException {
|
public boolean isReadOnly(ELContext elContext, Object base, Object property) throws ELException {
|
||||||
if (base instanceof WebApplicationContext) {
|
if (base instanceof WebApplicationContext) {
|
||||||
elContext.setPropertyResolved(true);
|
elContext.setPropertyResolved(true);
|
||||||
|
|
@ -150,10 +154,12 @@ public class WebApplicationContextFacesELResolver extends ELResolver {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext elContext, Object base) {
|
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext elContext, Object base) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Class<?> getCommonPropertyType(ELContext elContext, Object base) {
|
public Class<?> getCommonPropertyType(ELContext elContext, Object base) {
|
||||||
return Object.class;
|
return Object.class;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -440,6 +440,7 @@ public abstract class ExpressionEvaluationUtils {
|
||||||
this.hashCode = this.value.hashCode() * 29 + this.resultClass.hashCode();
|
this.hashCode = this.value.hashCode() * 29 + this.resultClass.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (!(obj instanceof ExpressionCacheKey)) {
|
if (!(obj instanceof ExpressionCacheKey)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -448,6 +449,7 @@ public abstract class ExpressionEvaluationUtils {
|
||||||
return (this.value.equals(other.value) && this.resultClass.equals(other.resultClass));
|
return (this.value.equals(other.value) && this.resultClass.equals(other.resultClass));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return this.hashCode;
|
return this.hashCode;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,12 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
*/
|
*/
|
||||||
public class Log4jConfigServlet extends HttpServlet {
|
public class Log4jConfigServlet extends HttpServlet {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void init() {
|
public void init() {
|
||||||
Log4jWebConfigurer.initLogging(getServletContext());
|
Log4jWebConfigurer.initLogging(getServletContext());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
Log4jWebConfigurer.shutdownLogging(getServletContext());
|
Log4jWebConfigurer.shutdownLogging(getServletContext());
|
||||||
}
|
}
|
||||||
|
|
@ -67,6 +69,7 @@ public class Log4jConfigServlet extends HttpServlet {
|
||||||
* ever be created in web.xml. That's why a correctly invoked Servlet 2.3
|
* ever be created in web.xml. That's why a correctly invoked Servlet 2.3
|
||||||
* listener is much more appropriate for initialization work ;-)
|
* listener is much more appropriate for initialization work ;-)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||||
getServletContext().log(
|
getServletContext().log(
|
||||||
"Attempt to call service method on Log4jConfigServlet as [" +
|
"Attempt to call service method on Log4jConfigServlet as [" +
|
||||||
|
|
@ -74,6 +77,7 @@ public class Log4jConfigServlet extends HttpServlet {
|
||||||
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
|
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getServletInfo() {
|
public String getServletInfo() {
|
||||||
return "Log4jConfigServlet for Servlet API 2.3 " +
|
return "Log4jConfigServlet for Servlet API 2.3 " +
|
||||||
"(deprecated in favor of Log4jConfigListener for Servlet API 2.4)";
|
"(deprecated in favor of Log4jConfigListener for Servlet API 2.4)";
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ public class NestedServletException extends ServletException {
|
||||||
* Return the detail message, including the message from the nested exception
|
* Return the detail message, including the message from the nested exception
|
||||||
* if there is one.
|
* if there is one.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getMessage() {
|
public String getMessage() {
|
||||||
return NestedExceptionUtils.buildMessage(super.getMessage(), getCause());
|
return NestedExceptionUtils.buildMessage(super.getMessage(), getCause());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,18 +45,21 @@ public class UrlPathHelper {
|
||||||
* @deprecated as of Spring 2.0, in favor of <code>WebUtils.INCLUDE_REQUEST_URI_ATTRIBUTE</code>
|
* @deprecated as of Spring 2.0, in favor of <code>WebUtils.INCLUDE_REQUEST_URI_ATTRIBUTE</code>
|
||||||
* @see org.springframework.web.util.WebUtils#INCLUDE_REQUEST_URI_ATTRIBUTE
|
* @see org.springframework.web.util.WebUtils#INCLUDE_REQUEST_URI_ATTRIBUTE
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static final String INCLUDE_URI_REQUEST_ATTRIBUTE = WebUtils.INCLUDE_REQUEST_URI_ATTRIBUTE;
|
public static final String INCLUDE_URI_REQUEST_ATTRIBUTE = WebUtils.INCLUDE_REQUEST_URI_ATTRIBUTE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated as of Spring 2.0, in favor of <code>WebUtils.INCLUDE_CONTEXT_PATH_ATTRIBUTE</code>
|
* @deprecated as of Spring 2.0, in favor of <code>WebUtils.INCLUDE_CONTEXT_PATH_ATTRIBUTE</code>
|
||||||
* @see org.springframework.web.util.WebUtils#INCLUDE_CONTEXT_PATH_ATTRIBUTE
|
* @see org.springframework.web.util.WebUtils#INCLUDE_CONTEXT_PATH_ATTRIBUTE
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static final String INCLUDE_CONTEXT_PATH_REQUEST_ATTRIBUTE = WebUtils.INCLUDE_CONTEXT_PATH_ATTRIBUTE;
|
public static final String INCLUDE_CONTEXT_PATH_REQUEST_ATTRIBUTE = WebUtils.INCLUDE_CONTEXT_PATH_ATTRIBUTE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated as of Spring 2.0, in favor of <code>WebUtils.INCLUDE_SERVLET_PATH_ATTRIBUTE</code>
|
* @deprecated as of Spring 2.0, in favor of <code>WebUtils.INCLUDE_SERVLET_PATH_ATTRIBUTE</code>
|
||||||
* @see org.springframework.web.util.WebUtils#INCLUDE_SERVLET_PATH_ATTRIBUTE
|
* @see org.springframework.web.util.WebUtils#INCLUDE_SERVLET_PATH_ATTRIBUTE
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public static final String INCLUDE_SERVLET_PATH_REQUEST_ATTRIBUTE = WebUtils.INCLUDE_SERVLET_PATH_ATTRIBUTE;
|
public static final String INCLUDE_SERVLET_PATH_REQUEST_ATTRIBUTE = WebUtils.INCLUDE_SERVLET_PATH_ATTRIBUTE;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue