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:
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.Code:{ super(); addRequiredProperty("urlPrefix"); }
What am I doing wrong?
/Scott


Reply With Quote