I am migrating an already build application from spring MVC 2.5 to Spring MVC 4.1 .
Facing problems during the process.
1) when i configure SessionFilter in web.xml the formatting of the JSP pages goes off . It totally ignores style.css under /css/ folder .
2) Filter always redirects to Login.jsp page printing in SessionFilter as ( session == null = true ).
Beow is the Filter's doFilter ()
Here is web.xml
This is very weird because same Filter with same configuration works fine in springMVC 2.5 app.
Also in login.jsp <%page session=false%> is not set .. So there is no point that session is not getting created in it.
Below is the LoginController method
Please help ... What i think is when first time logon page arrives it shows login.jsp page .. but when user submits it , form submits action="Welcome" that checks by filter
here it sees session == null
i am not getting why session is null when user clieck on submit button .
I am sorry for poorly writing my problem .
if more clarification is required , please let me know .
My problem seems to be resolved as soon as i set @scope("session") on LoginController .
Spring 4.1 behaves differently ! in spring 2.5 i hadn't set scope=session in <bean ...configuration in app-servlet.xml . There too LoginController is default singleton scope . Here too it is singleton .But if i remove @scope("session") and modify
It prints session null .
Anyway , I need to understand spring mvc 4.1 flow . it seems to be different than 2.5 a lot .