users@glassfish.java.net

Caching based on URI

From: <forums_at_java.net>
Date: Thu, 27 Oct 2011 05:39:55 -0500 (CDT)

I'm trying to find the correct caching settings in glassfish-web.xml for a
servlet with two GET parameters.

With this settings, the response are the same, no matter of parameters given.

   <cache>     
      <cache-mapping>
         <servlet-name>MyServlet</servlet-name>
         <http-method>GET</http-method>
      </cache-mapping>
   </cache>
 

According to the documentation:

>When caching is based on the URI, this includes user specified parameters
in
the query string. For example, a response from /garden/catalog?category=roses
is different from a response from /garden/catalog?category=lilies. These
responses are stored under different keys in the cache.

It should be possible, but i have been unable to find how ?

Poul


--
[Message sent by forum member 'phansen']
View Post: http://forums.java.net/node/857486