I was using a little tutorial from this place and tried to implement that in my site to try and understand it a little better. But it doesn't even work. Apache can't fails to start my web app.
Among other stuff, the logs state:
MyAuthenticationProcessingFilter.javaThe type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files
The type javax.servlet.http.HttpServletResponse cannot be resolved. It is indirectly referenced from required .class files
The type javax.servlet.FilterChain cannot be resolved. It is indirectly referenced from required .class files
The type javax.servlet.ServletException cannot be resolved. It is indirectly referenced from required .class files
The import javax.servlet.http.HttpServletRequest cannot be resolved
The import javax.servlet.http.HttpSession cannot be resolved
The hierarchy of the type MyAuthenticationProcessingFilter is inconsistent
The type javax.servlet.Filter cannot be resolved. It is indirectly referenced from required .class files
HttpServletRequest cannot be resolved to a type
HttpServletResponse cannot be resolved to a type
I don't know what's wrong with the code, I don't understand why it won't work. It looks very similar to the rest of the examples I have found as well.Code:package com.security; import org.springframework.security.Authentication; import org.springframework.security.AuthenticationException; import org.springframework.security.providers.UsernamePasswordAuthenticationToken; import org.springframework.security.ui.AbstractProcessingFilter; import org.springframework.security.ui.FilterChainOrder; import org.springframework.security.ui.webapp.AuthenticationProcessingFilter; import org.springframework.security.util.TextUtils; import org.springframework.util.Assert; import org.springframework.jdbc.datasource.DriverManagerDataSource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import java.io.IOException; import java.io.FileInputStream; import java.util.Properties; public class MyAuthenticationProcessingFilter extends AuthenticationProcessingFilter { protected void onSuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, Authentication authResult) throws IOException { super.onSuccessfulAuthentication(request, response, authResult); request.getSession().setAttribute("myValue", "My value is set"); } }
For some reason the HttpSession and HttpServletRequest imports can't be resolved and the hierarchy of the type MyAuthenticationProcessingFilter is inconsistent.
Can anyone please help me out?
Thanks in advance any help I can get.


