Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4747

WicketFilter#setFilterPath is broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • 6.0.0
    • None
    • wicket
    • 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

          Activity

            People

              Unassigned Unassigned
              cleiter Christoph Leiter
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: