Redirecting from a legacy Servlet to Spring 3 and from Spring 3 to a legacy Servlet - spring

I'm learning Spring by integrating Spring 3 into a legacy Servlet application and gradually converting the legacy app over.
A web.xml *-servlet.xml similar to the ones I am using are posted below. Basically things are set up such that retrieving a string like "search", Spring will route it to a Controller and the view resolver will convert "search" into "/jsp/search.jsp"
I ran into problems doing a response.sendRedirect("search") from a legacy Servlet and a legacy ServletFilter To Spring. The URL came out correctly, but I got a blank page despite System.out.println() calls indicating that the JSP was reached. No error messages from Spring and the browser only told me something went wrong with the redirect.
I fixed that problem by forwarding, instead of redirecting from the legacy Servlets and ServletFilters:
request.getRequestDispatcher("search").forward(request,response);
getServletConfig().getServletContext().getRequestDispatcher("search").forward(request,response);
Going in the OTHER direction from a new JSP done in Spring 3 to a legacy Servlet, I have buttons on screens so I just used a javascript call to "location.href=/helloworld". I will need to send some parameters, so I will likely convert those buttons into submitting tiny HTML forms.
What I am wondering is, is there a better approach to getting Spring 3 and the Legacy Servlets communicating in a better way.
Legacy Servlet => Spring 3
and
Spring 3 => Legacy Servlet
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>Acme</display-name>
<!--welcome-file-list>
<welcome-file>/login</welcome-file>
</welcome-file-list-->
<servlet>
<servlet-name>acme</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>acme</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<!-- Help Find The Spring Config Files -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/nsd-servlet.xml,
/WEB-INF/nsd-security.xml
</param-value>
</context-param>
<!-- Spring Security -->
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Integrate A Legacy Screen Done With A Servlet -->
<servlet>
<servlet-name>HelloWorldServlet</servlet-name>
<servlet-class>
com.legacy.HelloWorldServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorldServlet</servlet-name>
<url-pattern>/helloworldservlet</url-pattern>
</servlet-mapping>
</web-app>
My acme-servlet.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="com.acme.controller" />
<mvc:resources mapping = "/**" location = "/,file:/apps1/bea/user_projects/domains/acme/common/,file:/c:/weblogic_common_files/acme/"/>
<mvc:annotation-driven/>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name = "prefix" value = "/jsp/"/>
<property name = "suffix" value = ".jsp"/>
</bean>
</beans>

When you use response.sendRedirect(String url) you are essentially passing in a URL that you want to redirect to.
sendRedirect observes the following rules:
/*
* Destination, it can be any relative or context specific path.
* if the path starts without '/' it is interpreted as relative to the current request URI.
* if the path starts with '/' it is interpreted as relative to the context.
*/
String destination ="/jsp/destination.jsp";
response.sendRedirect(response.encodeRedirectURL(destination));
When you type in "search", this is relative to the current request URI. Thus, unless your current request was to /acme/something, and assuming /acme/search is your servlet, the request will fail.
However, if you put the path relative to the root, using /acme/search, then the request will work from any context.
With that said, I'm not convinced this is really the best approach, as a redirect involves sending a response back to the client browser telling it to once again fetch content from yet another URL. This seems like a wasted trip to and from the server.
A better method may be to just wire in your servlets into Spring using something like Spring MVC. It's pretty flexible in that you can wrap new controller classes around your existing servlets and then invoke them directly by passing in the HttpServletRequest and HttpServletResponse objects. Once done, you can then slowly eliminate anything redundant with a working, efficient system instead of one chained together with redirects.
package samples;
public class SampleController extends AbstractController {
private int cacheSeconds;
// for wiring in cacheSeconds
public void setCacheSeconds(int cacheSeconds) {
this.cacheSeconds = cacheSeconds;
}
public int getCacheSeconds() {
return cacheSeconds;
}
public ModelAndView handleRequestInternal(
HttpServletRequest request,
HttpServletResponse response) throws Exception {
// you now have a Spring Controller wired in, and you could delegate to
// your legacy servlet in this manner
YourServlet servlet = new YourServlet();
servlet.doGet(request, response);
ModelAndView mav = new ModelAndView("hello");
mav.addObject("message", "Hello World!");
return mav;
}
}
<bean id="sampleController" class="samples.SampleController">
<property name="cacheSeconds" value="120"/>
</bean>
Note that manually instantiating a servlet is not really considered a good practice or good design. Instead, this is more of a stepping stone to get your Spring Controllers wired in and connected so that you can then systematically refactor your code and eliminate the legacy servlets by moving your business logic to service layers.
This approach jives with your plan to systematically migrate to and learn more about Spring, tackle some technical debt, all while still working on business goals related to your site.

Related

spring mvc; contextConfigLocation load order

I'm reconfiguring a webapp. I want to move everything out of dispatcher servlet into ContextLoaderListener. (This is due to changes in security configuration beyond the scope of this question)
Question 1, if I have multiple application context xml files, does it matter what order they are loaded? For example does the xml file containing context:component-scan need to be loaded before the xml file specifying DAO and service beans?
Question 2, (or is this moot?) how would I specify the order in which *_applicationContext.xml are loaded assuming that A_applicationContext.xml should be loaded before B_applicationContext.xml which should be loaded before C_applicationContext.xml
My web.xml is as follows:
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>AssessmentDelivery</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AssessmentDelivery</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/config/*_applicationContext.xml</param-value>
</context-param>
<!-- security filter -->
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
</web-app>
Some suggestions:
For these days consider do the configuration for Spring through Javaconfig.
To answer questions 1 and 2 is very important you understand the following:
When you run the app Spring creates an Application Context where exists all the beans created and managed by Spring. Now consider that for that Application Context it should be created from two 'sub' applications contexts, normally they are 'mentioned' in the documentation how ServletApplicationContext and RootApplicationContext
The former should scan all about the Web, such as your #Controllers and #Bean's about infrastructure such as for ViewResolver etc..
The later should scan all about the Server, such as #Service and #Repositories and #Bean's about infrastructure such as for a DataSource etc.
Is very important understand the following:
ServletApplicationContext --> RootApplicationContext
It means the former can get access the latter (it about use dependencies i.e: a #Controller needs a #Service). Therefore it reflects that the Web side can access the server side.
Once said this the following is not possible
RootApplicationContext --> ServletApplicationContext
has no sense that a Bean from the server side want access the web side (a bad practice)
Long time ago I don't use web.xml but
DispatcherServlet + contextConfigLocation (through <init-param>) represents the ServletApplicationContext
ContextLoaderListener + contextConfigLocation (through <context-param>) represents the RootApplicationContext
It does not matter if the beans are declared through:
XML
JavaConfig
annotations #Controller etc.
Spring manages the cycle about in what order the beans are created. So do not matter how the .xml files (in your case) are declared (about the order).

Why two instances of spring bean controllers are created in a Spring MVC application?

I have simple Spring MVC application with a jsp and a controller class, deployed in a tomcat server. The setup works fine for multiple requests. I have named the controller class as com.mypackage.mvcController.
Now I used jvisualvm to find the number of instances this particular controller class is created. It shows 2.
Why number of instances of this particular controller bean is two?
By default spring beans are singleton. Of course here the instances does not vary with multiple requests, but should have been one.
Here is my configuration:
web.xml
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Archetype Created Web Application</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/mvc-dispatcher-servlet.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>mvc-dispatcher</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/WEB-INF/pages/welcome.jsp</welcome-file>
</welcome-file-list>
</web-app>
mvc-dispatcher-servlet.xml file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="com.myPackage" />
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/pages/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
</beans>
and the project structure:
controller class:
package com.myPackage;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
#Controller
#RequestMapping("serverHit")
public class mvcController {
#RequestMapping
public String sayHello() {
System.out.println("spring test");
return "result";
}
}
You are loading the context twice.
Using the dispatcherservlet servlet definition.
Using the contextloader listener as I mentioned in the comment too. -> you don't need to do this step.
Have a look at this:
Why use context loader listener?
Spring beans are, by default, "Spring singleton". That means one instance per context. A web application typically has at least two contexts - the root one and the web one. Most likely you have the controller instantiated for both of those. #ComponentScan is the most likely fault - try adding filters that will exclude any controllers from the root context.

Can Spring "live" alongside other servlets in the same webapp?

I've got the a WEB-INF/web.xml file with a couple of servlets, along with a context
listener which I use to bootstrap the application. I'd like to use Spring in this
web application. What's the best way to work Spring into this so I can use Spring's
injection mechanisms throughout the entire application - even in the servlets which
exists today?
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Company's XMLRPC service</display-name>
<!-- Servlet Listeners -->
<listener>
<listener-class>com.company.download.context.DefaultServletContextListener</listener-class>
</listener>
<!-- Servlet Declarations -->
<servlet>
<servlet-name>DefaultTrackDownloadServlet</servlet-name>
<servlet-class>com.company.download.web.impl.DefaultTrackDownloadServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>DefaultXmlRpcServlet</servlet-name>
<servlet-class>com.company.download.web.impl.DefaultXmlRpcServlet</servlet-class>
</servlet>
<!-- Servlet Configurations -->
<servlet-mapping>
<servlet-name>DefaultTrackDownloadServlet</servlet-name>
<url-pattern>/track</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DefaultXmlRpcServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>
Can Spring “live” alongside other servlets in the same webapp?
Yes, Spring MVC is basically just a DispatcherServlet that can make use of a ContextLoaderListener.
These two classes are already setup to interact with one or more ApplicationContext instances and have Spring manage the declared beans.
Your custom Servlet classes are not. If you need to inject a bean into your own Servlet instances, you need to get a reference to the ApplicationContext from the ContextLoaderListener and get the beans you want. There are a few options, whether you do it yourself or use built-in features.
The ContextLoaderListener stores the ApplicationContext it loads into a ServletContext attribute named
org.springframework.web.context.WebApplicationContext.ROOT
So you can retrieve it with that (there's a constant for easy use)
ApplicationContext ac = (ApplicationContext) config.getServletContext().getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
Other options exist, see some of them here:
Autowiring in servlet
I want to inject an object in servlet using Spring

How to change Spring MVC default controller name and it's location

I am new to Java and Spring Framework. Iam using Spring STS 3.1.0.RELEASE with tomcat 7. I creating Spring MVC project by using following directions . File > Spring Template Project > Spring MVC Project. Follwoing is web.xml file code :
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/root-context.xml</param-value>
</context-param>
<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Processes application requests -->
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
And following is servlet-contxt.xml file :
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
<!-- Enables the Spring MVC #Controller programming model -->
<annotation-driven />
<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
<resources mapping="/resources/**" location="/resources/" />
<!-- Resolves views selected for rendering by #Controllers to .jsp resources in the /WEB-INF/views directory -->
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="org.dave.foo" />
</beans:beans>
I want ot change default name and location of controller. For this purpose, I create new package org.dave.bar and move IndexController to this package. I also make change as mentioned below in servlet-context.xml file :
<context:component-scan base-package="org.dave.bar" />
But I receive 404 error after restaring web server and running the code on this url (http://localhost:8080/bar/). Can some one guied me what Iam doing wrong and how it can be rectified.
Thanks in advance
First in the web.xml you will need to define the URL Mapping for which you want the Spring MVC Dispatcher Servlet to handle(via request mapped methods in the controllers).
From what I understand in your question you will want to set the URL Mapping as follow (in web.xml)
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
Second,
Under org.dave.foo you will need to place your Spring MVC controllers (classes annotated with #Controller and the URL mapped methods).
In your controller you will need a method mapped to the root of the spring dispatcher servlet URL mapping (defined in web.xml DispatcherServlet):
So for the definition in above you will need a method like this:
#RequestMapping(value = "/")
public ModelAndView index(HttpServletRequest request,
HttpServletResponse response) {
...
}
Note that in general the most specific requests mapping "wins". This means that if you have a request mapping of "/abc" in a controller in addition to the "/" request mapping, then, a request localhost/myapp/abc will "win" localhost/myapp/
You can take a look at a more detailed example here:
http://www.commonj.com/blogs/2012/11/30/spring-mvc-default-controller-name/
Hope it helped.

How to change the character encoding for Servlet 3.0 Spring MVC multipart upload forms?

I have a pretty simple JSP/Servlet 3.0/Spring MVC 3.1 application.
On one of my pages, I have multiple forms. One of these forms allows the user to upload a file and it is thus configured with enctype="multipart/form-data". I configured the multipart upload in the web.xml file with the multipart-config element that is available since Servlet 3.0, combined with <bean id="multipartResolver" class="org.springframework.web.multipart.support.StandardServletMultipartResolver"/> in my spring configuration.
I also have Spring's org.springframework.web.filter.CharacterEncodingFilter configured.
The problem I have is that I cannot find a way to set the StandardServletMultipartResolver's default encoding to UTF-8, which often causes the contents of the textfields in the multipart form to be all garbled up.
Is there any way to fix this?
Thanks in advance.
web.xml config:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>foo-web</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
WEB-INF\applicationContext.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>foo</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>0</load-on-startup>
<multipart-config>
<max-file-size>52428800</max-file-size>
<file-size-threshold>5242880</file-size-threshold>
</multipart-config>
</servlet>
<servlet-mapping>
<servlet-name>foo</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>login</welcome-file>
</welcome-file-list>
Since I found no way to set the default encoding using the StandardMultipartResolver, I dumped the servlet 3.0 config and went for the good old CommonsMultipartResolver.
I configured it like this in my spring servlet context:
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- one of the properties available; the maximum file size in bytes -->
<property name="maxUploadSize" value="157286400" />
<property name="maxInMemorySize" value="5242880"/>
<property name="defaultEncoding" value="utf-8"/>
</bean>
In the end, there isn't much difference, since under the hood of the StandardMultipartResolver, it just delegates to CommonsMultipartResolver.
I actually find the servlet 3.0 approach more troublesome, since it requires configuration in both web.xml and your servlet context, and you lose the ability to set the default encoding.
I also had the problem with encoding when using the Servlet 3 API. After some research, I have found that there is a bug in Tomcat 7 which makes the parameters not to be read with the correct encoding under certain conditions. There is a work-around. First, you need to tell which encoding it actually is (if it is not default iso-8859-1):
request.setCharacterEncoding("UTF-8");
This is basically what the CharacterEncodingFilter in Spring does. Nothing strange so far. Now the trick. Call this:
request.getParameterNames()
Make sure this method is invoked before getParts(). If you are using Spring I guess you need to do this in a filter before the request ends up in Spring. The order which the methods are invoked are crucial.
Update: The Tomcat bug has been fixed in 7.0.41 onwards, so if you use a recent version of Tomcat you only need to set the character encoding to get correct result.
I created my own multipart filter as holmis83 suggested, and worked fine
public class MyMultiPartFilter extends MultipartFilter {
Logger logger = LoggerFactory.getLogger(MyMultiPartFilter.class);
#Override
protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
request.setCharacterEncoding("UTF-8");
request.getParameterNames();
super.doFilterInternal(request, response, filterChain);
}
}

Resources