Spring Security
  1. Spring Security
  2. SEC-1111

DefaultLoginPageGeneratingFilter does not work with messages_ko_KR.properties

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 3.0.0 M1
    • Component/s: Core
    • Labels:
      None
    • Environment:
      JDK 1.6.0_11
      Tomcat 6.0.18
      Eclipse 3.4 (Ganymede JEE SR1)

      Description

      (attachement is eclipse project and screenshot)

      I made messages_ko_KR.properties.
      (C:\workspace\codelabor-spring-security-template\src\main\resources\org\springframework\security\messages_ko_KR.properties)

      And I try default form-login with empty username and password.
      500 Error occures like screenshot image.
      ---------------------------------------------------------------------
      java.io.CharConversionException: Not an ISO 8859-1 character: 비
      at javax.servlet.ServletOutputStream.print(ServletOutputStream.java:89)
      ---------------------------------------------------------------------

      I retry login with correct username and password.
      Login is sucess.
      In index.jsp page, I test messageSource like this:
      -------------------------------------------------------------------------
      WebApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(application);
      MessageSource messageSource = (MessageSource) context.getBean("messageSource");
      out.println(messageSource.getMessage("AbstractUserDetailsAuthenticationProvider.badCredentials", null, Locale.getDefault()));
      -------------------------------------------------------------------------
      index.jsp page works, like attachement image.
      So my message_ko_KR.properties is good.

      What's wroing with DefaultLoginPageGeneratingFilter?

        Activity

        Hide
        Luke Taylor added a comment -

        Looks like the problem was due to not using response.getWriter(). Printing directly to the ServletOutputStream doesn't appear to encode the data properly.

        Show
        Luke Taylor added a comment - Looks like the problem was due to not using response.getWriter(). Printing directly to the ServletOutputStream doesn't appear to encode the data properly.

          People

          • Assignee:
            Luke Taylor
            Reporter:
            Shin Sang Jae
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: