Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Duplicate
-
6.0.0
-
None
-
None
Description
In wicket 1.5 I initialize wicket this way:
WicketFilter wicket = new WicketFilter(webApplication);
wicket.setFilterPath("");
FilterRegistration.Dynamic filter = servletContext.addFilter("wicket", wicket);
In 6.0.0 I get "Filter path is write-once. You can not change it. Current value=''
That's because the logic in WicketFilter#init changed a bit and it re-sets the filter even though it has already been set (there's already a comment that it should be allowed but it's broken now).
This
if (configureFilterPath != null)
{ setFilterPath(configureFilterPath); }needs to be
if (getFilterPath() == null && configureFilterPath != null)
{ setFilterPath(configureFilterPath); }
Attachments
Issue Links
- duplicates
-
WICKET-4737 IllegalStateException on WicketFilter.init() after calling setFilterPath()
- Resolved