2 Replies Latest reply on May 12, 2009 10:50 AM by souravm

    Usage scenario of Resource Serving through resourceURL in 28

      Hi,

      I'm bit confused to understand what are the real usage scenarios of Resource Serving through resourceURL.

      I can achieve everything what resourceURL (or serverResource method) provides if I create actionURL.

      Only difference I see that serverResource method gives me the flexibility of writing my own markup (as such I can create a complete HTML document) without loosing the Portal context. However, I'm not sure in which scenario I may need to use the same.

      There are many examples which show how to make Ajax calls through resourceURL. However, I can achieve that even by creating an actionURL and sending the output to my target div.

      Any explanations would be really appreciated.

      Regards,
      Sourav

        • 1. Re: Usage scenario of Resource Serving through resourceURL i

          In short, a call to ActionURL will return an entire portal page (with theme, renderers, and all), whereas a ResourceURL serves your markup raw but still provides access to the portal context.

          Pre-JSR286, this was accomplished with backing servlets, which did not have implicit access to the PortletContext.

          • 2. Re: Usage scenario of Resource Serving through resourceURL i

            Andy,

            Thanks for your response.

            My question is what could be the real usage scenario where I would like to serve a raw markup without the portal's theme, renders etc.

            For the end user, if all of a sudden I show him a page without the Portal look and feel - he will feel that he has been logged out of the portal (though may be technically I'm within the Portal context).

            Regards,
            Sourav