0

I have application that is running on ATG. I have added filter servlet also. While login(using ATGForm), I am passing one parameter. I am able to get that param in DynamoHttpServletRequest. But, after I do forward or redirect to some JSP page, I am not able to get that param in the Filter servlet.

Filter Servlet as below:

public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)

I am not able to get the same param in request. Anything I am missing here?

Manan Kapoor
  • 675
  • 1
  • 11
  • 28

1 Answers1

0

You can follow the doc for more : https://docs.oracle.com/cd/E35319_01/Platform.10-2/ATGPlatformProgGuide/html/s0704filterexample01.html

import atg.servlet.ServletUtil;
import atg.servlet.DynamoHttpServletRequest;
import atg.servlet.DynamoHttpServletResponse;

import javax.servlet.*;
import javax.servlet.http.*;


public class MyFilter
  implements Filter {

   public void doFilter(ServletRequest request,
                       ServletResponse response,
                       FilterChain chain)
    throws IOException, ServletException
  {
    // Get the Dynamo Request/Response Pair
   DynamoHttpServletRequest dRequest =
         ServletUtil.getDynamoRequest(request);

   // Get param value
   String paramValue =
     (String)dRequest.resolveName("paramName");

   // Pass control on to the next filter
   chain.doFilter(request,response);
   return;
  }
}
Alin
  • 314
  • 1
  • 3
  • 9