Results 1 to 4 of 4

Thread: Is it possible to use Message Resources in a login page?

  1. #1

    Default Is it possible to use Message Resources in a login page?

    Hi,
    When I try to access a protected URL in my webapp and get redirected to my form-based login page, the spring:message custom tags (and the fmt:message ones too) throw an exception because the message resource cannot be found. I guess it's got something to do with the request not going via the Spring DispatcherServlet. Is it possible to use message resources in the login page?

    Cheers

  2. #2

    Default

    Hi,

    certainly, this should work as well. What does your redirect, respectively your new handling controller, exactly look like?

    Regards,
    Simon

  3. #3

    Default

    Hi Simon,
    I guess you are referring to a handler controller for the login page. I don't have one. I'm using container-based security, so the app server is intercepting requests for protected URLs before they reach the Spring Dispatcher Servlet.

    I'm not sure how to do it any other way. It would be nice to have a little more control over the login process. For example, if login fails, i'd like to reload the same login page but when it loads, how does it know if its because of a failed login attempt or a normal request for protected URLs?

  4. #4
    Join Date
    Mar 2005
    Posts
    11

    Default

    You can still use <fmt:message> tag, but have to configure your resource bundle in web.xml file or use <fmt:setBundle...>

    <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContex t</param-name>
    <param-value>BundleFileName</param-value>
    </context-param>

Similar Threads

  1. Replies: 2
    Last Post: Sep 14th, 2008, 09:21 PM
  2. Pageable data list with Hibernate
    By robmorgan in forum Data
    Replies: 23
    Last Post: Jul 24th, 2006, 06:12 PM
  3. UpgradeAcegi Security System from 0.6.1 to 0.8.3
    By mannobug in forum Security
    Replies: 3
    Last Post: Sep 23rd, 2005, 07:00 PM
  4. Replies: 0
    Last Post: Aug 30th, 2005, 08:01 AM
  5. passing a message to an included page
    By pir8ped in forum Web
    Replies: 1
    Last Post: Jun 1st, 2005, 12:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •