Hi,
I am testing a Servlet Filter usage. And somehow, my application doesn't
even start in Tomcat 5.5. Please help me in debugging, where I am going
wrong.
Here is what did:
SampleFilter.java
package app;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class SampleFilter implements Filter {
private FilterConfig config = null;
public void init(FilterConfig config) throws ServletException {
this.config = config;
}
public void destroy() {
// config = null;
}
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException
{
// creating a dummy session to check if i am hitting it
HttpSession session =((HttpServletRequest) request).getSession( );
session.setAttribute("ReallyValue", "Testesttest");
chain.doFilter(request, response);
}
}
Snippet from web.xml that i added:
<filter>
<filter-name> SampleFilter </filter-name>
<filer-class> app.SampleFilter </filer-class>
</filter>
<filter-mapping>
<filter-name> SampleFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
--
View this message in context:
http://www.nabble.com/Please-Help%3A--Struts-1.3-Getting-a-ServletFilter-Sample-working-tf4699884.html#a13435852
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]