Announcement Announcement Module
Collapse
No announcement yet.
How do I use GenericFilterBean to require filter properties Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I use GenericFilterBean to require filter properties

    I'm try to use GenericFilterBean to set a required property in my ServletFilter. The problem is I'm not sure where I'm suppose to call the addRequiredProperty() method. In my subclasses constructor?

    In my example, I have servlet filter that specifies a param name of "urlPrefix" in the web.xml. My filter extends GenericFilterBean and I've added a setUrlPrefix(String) method. In the constructor I have:
    Code:
    {
     super();
     addRequiredProperty("urlPrefix");
    }
    But when I deploy my web application I get an error message. If I remove the addRequiredProperty, my filter starts okay, but the setUrlPrefix isn't called.

    What am I doing wrong?

    /Scott

  • #2
    Found the problem

    Found the problem! It was between the keyboard and the chair. :oops:

    Comment

    Working...
    X