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

Wicket 1.5 violates servlet standard, Glassfish spews warnings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5-RC5.1
    • 1.5-RC6
    • wicket
    • SVN Revision: 1147931

    Description

      This seems to be a re-occurance of WICKET-1816.

      Deploying wicket-examples to Glassfish produces tens of warnings on each request in the server log with the following text:
      WARNING: PWC4011: Unable to set request character encoding to UTF-8 from context /wicket-examples, because request parameters have already been read, or ServletRequest.getReader() has already been called

      According to Glassfish faq http://wikis.sun.com/display/glassfish/FaqWebAppUnableToSetRequestCharEncoding:
      """
      This warning message means that the web container is complaining about the fact that the web application deployed at /your_webapp is trying to set the request encoding too late in the request's lifecycle, when it is impossible for the container to honor it.

      See the javadocs of javax.servlet.ServletRequest.setCharacterEncoding():

      This method must be called prior to reading request parameters or reading input using getReader(). Otherwise, it has no effect.

      The container issues a warning to let you know that a call to ServletRequest.setCharacterEncoding() by your_webapp has no effect and is being ignored, because one of the above conditions is met.

      To avoid this warning, your_webapp should move its invocation of ServletRequest.setCharacterEncoding() to an earlier stage, before it acquires any input reader from the request, or before it reads any request parameters. In case your_webapp is not responsible for this warning, one if its dependencies might be, in which case that library needs to be fixed.
      """

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              berniegp Bertrand Guay-Paquet
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: