Announcement Announcement Module
Collapse
No announcement yet.
getLastModified does not get called Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • getLastModified does not get called

    Hi!

    My public long getLastModified(HttpServletRequest request) in my Controller does not get called.

    In my Controller

    public class ForsideController implements Controller, LastModified {

    I defined the getLastModified method as show above. In this method I wrote a message to the log to see if it is called, and it isn't when accessing a resource using the ForsideController.

    Why? I guess I'm missing something basic here

    From http://www.springframework.org/docs/...-reference.pdf is looks to me like all you need to do to get getLastModified called is to implement it and let your Controller implement the LastModified interface.

    TIA for any feedback!


    -Kaj

  • #2
    Re kajh,
    I suspect an internal problem.
    Could you test against the spring.jar located in http://nausicaa.pcedev.com/~olivier/spring.jar ?

    Olivier

    Comment


    • #3
      Originally posted by ojolly
      Re kajh,
      I suspect an internal problem.
      Could you test against the spring.jar located in http://nausicaa.pcedev.com/~olivier/spring.jar ?
      Thank you for answering!

      When using this spring.jar file my getLastModified method is called!

      Great!

      Thanks again!


      -Kaj

      Comment


      • #4
        great

        I'm checking on the developper mailing list whether we *need* the patch I applied in the .jar I showed you or whether there is a configuration problem we both missed.
        If we need it, it will probably be inserted in the next public version.

        Olivier

        Comment


        • #5
          Quoting myself from the developer list:

          Thanks for spotting this, Olivier! This has effectively been broken since 1.1 RC1, when FrameworkServlet was changed from overriding "doGet"/"doPost" to overriding "service(HttpServletRequest, HttpServletResponse)". Unfortunately, this slipped through, because the test suite just simulates "getLastModified" calls - it doesn't go through Servlet's "service" method.

          I wonder why this hasn't been reported before... Probably because it doesn't cause a failure - it simply sends the response back every time rather than "not modified". Anyway, I've just fixed this through recoding FrameworkServlet to override "doGet"/"doPost" again, and also "doHead" and co. This lets the HttpServlet base class properly call "getLastModified" now.
          Juergen

          Comment

          Working...
          X