Announcement Announcement Module
Collapse
No announcement yet.
Response headers Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Response headers

    Hello

    I have a question about response headers.

    If I use a SimpleFormController and inspect the response headers that are returned to the browser then I see the following:

    Server: Apache-Coyote/1.1
    Pragma: no-cache
    Expires: Thu, 01 Jan 1970 00:00:00 GMT
    Cache-Control: no-cache, no-store
    Content-Type: text/html;charset=ISO-8859-1
    Content-Language: en-GB
    Content-Length: 5664
    Date: Tue, 21 Oct 2008 10:47:15 GMT

    If I use an AbstractController then I see the following response headers:

    Server: Apache-Coyote/1.1
    Content-Type: text/html;charset=ISO-8859-1
    Content-Language: en-GB
    Content-Length: 896
    Date: Tue, 21 Oct 2008 11:22:43 GMT

    I do not set any response headers in my JSPs.

    The only difference between my JSPs is that one contains <form:form> (for the SimpleFormController) and the other one doesn't.

    Any ideas where the response headers are set?

    Thanks

    Mark

  • #2
    MultiActionController

    Hello

    An update. AbstractController works fine. It is MultiActionController that is causing problems.

    I have tried defining my controller with and without the following:

    <property name="useCacheControlHeader" value="true" />
    <property name="useCacheControlNoStore" value="true" />
    <property name="useExpiresHeader" value="true" />

    Either way, the headers are not set:

    Server: Apache-Coyote/1.1
    Content-Type: text/html;charset=ISO-8859-1
    Content-Language: en-GB
    Content-Length: 0
    Date: Tue, 21 Oct 2008 14:23:57 GMT

    It seems particular to the MultiActionController.

    Thanks

    Mark

    Comment


    • #3
      Resolved

      Hello

      Took me a while to work it out.

      Buried in the documentation for AbstractFormController.java is this:

      "cacheSeconds" is by default set to 0 (-> no caching for all form controllers).

      By default, cacheSeconds is -1.

      So, if I want to disable caching for my MultiActionController then I need to set cacheSeconds to 0.

      Regards

      Mark

      Comment

      Working...
      X