1 Reply Latest reply on Aug 4, 2008 1:15 PM by Manik Surtani

    Caching JSP output does JBoss cache support this

    Krzysztof Hycnar Newbie

      Hi,

      I've skimmed through the JBoss cache users guide looking for any info about the possibility to employ JBoss Cache for caching jsp/servlet responses. There's a very old entry on this forum ( see http://www.jboss.com/index.html?module=bb&op=viewtopic&t=56775 ) suggesting that this was considered once.

      A bit more about what caching functionality needed.
      We need to cache documents generated by JSPs and servlets, but the content returned to the client may vary depending on the IP address the user connects from. For example it is entirely possible that a url address typed in a browser from the US territory will result in a different response than exactly the same url but requested from the UK. We already have a mechanism for obtaining the territory code based on the IP address as returned by the ServletRequest.getRemoteAddr().

      I would imagine the solution in form of an intercepting filter (which all requests to be cached pass through) getting the territory info based on the IP and then preparing the caching key and consulting the cache for potentially ready response.

      Is there anything like this already available in the JBoss Cache? Assuming the solution exists, is this solution configurable enough to cater the above described needs?

      Will be grateful for any suggestions!
      Cheers
      Krzysztof