Results 1 to 5 of 5

Thread: Spring Portlet MVC Question

  1. #1
    Join Date
    Mar 2008
    Posts
    16

    Default Spring Portlet MVC Question

    Hi,
    How can I tell if I am in an action or a render using the request object from a JSP?

    Thanks.

  2. #2
    Join Date
    Sep 2004
    Location
    Arizona, USA
    Posts
    383

    Default

    Given that the action phase of an overall portlet request doesn't do any rendering, I doubt you would ever be processing a JSP in an action phase.

  3. #3
    Join Date
    Mar 2008
    Posts
    16

    Default

    Quote Originally Posted by johnalewis View Post
    Given that the action phase of an overall portlet request doesn't do any rendering, I doubt you would ever be processing a JSP in an action phase.
    Thanks for responding johnalewis.
    I will try to explain my issue better.

    I have a JSP which uses a bean to render a chart.

    Inside the bean I want to know if execution of the JSP
    is after an action + render, rather than just a render.

    So I only build the chart when needed ,after an action.

    Does that make more/any sense?

    Thanks.

  4. #4
    Join Date
    Sep 2004
    Location
    Arizona, USA
    Posts
    383

    Default

    Yes, that makes more sense.

    AFAIK, there is nothing in the JSR 168 spec that tells you that you are performing the first render request following an action request. You could either stick something in the session to tell you this, or set some kind of 'dirty' flag on your bean during an action request.

    In JSR 286 there will be a new validation-based caching mechanism that uses an ETAG property as a validation token -- you could likely use that to accomplish your goal. Once 286 is widely available...

  5. #5
    Join Date
    Mar 2008
    Posts
    16

    Default

    thanks johnalewis

    I will put a put a dirty flag in the bean.
    Cheers.

Posting Permissions

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