Filters, Struts Actions, and Tomcat

Discussion in 'Java' started by rjweytens, Jun 30, 2004.

  1. rjweytens

    rjweytens Guest

    I am trying to implement a filter in my struts web app, but I don't
    know how to get the filter to forward to an action. I have tried a
    RequestDispatcher class, but when it goes to the new page it doesn't
    seem to pick up my style sheet specification.

    My forward code looks like this:

    String target = new String("/Search.do");
    RequestDispatcher requestDispatcher =
    request.getRequestDispatcher(target);
    requestDispatcher.forward(request,response);

    My web.xml's descriptors look like this:

    <filter>
    <filter-name>MyFilter</filter-name>
    <display-name>MyFilter</display-name>
    <description>Test Filter</display-name>
    <filter-class>rfc.filter.MyFilter</filter-class>
    </filter>

    <filter-mapping>
    <filter-name>MyFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    I am using Tomcat 4.1.30.

    Thanks,

    Randy
    rjweytens, Jun 30, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. veera maria

    Struts and filters

    veera maria, Sep 22, 2003, in forum: Java
    Replies:
    0
    Views:
    337
    veera maria
    Sep 22, 2003
  2. Pavel
    Replies:
    1
    Views:
    5,964
    Pavel
    Nov 14, 2003
  3. rjweytens
    Replies:
    0
    Views:
    3,408
    rjweytens
    Jun 30, 2004
  4. LeeBase
    Replies:
    4
    Views:
    6,599
    LeeBase
    Aug 4, 2004
  5. Dieter Vanderelst

    using the Filters DLL (image filters)

    Dieter Vanderelst, Feb 15, 2006, in forum: Python
    Replies:
    1
    Views:
    411
    Michele Petrazzo
    Feb 15, 2006
Loading...

Share This Page