WebSphere Application Server Network Deployment, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Configuring alternate URL

Why and when to perform this task

Alternate URL is a method for edge caching JavaServer Pages (JSP) files and servlet responses that you can not request externally. Dynamic cache provides support to recognize the presence of an Edge Side Include (ESI) processor and to generate ESI include tags and appropriate cache policies for edge cacheable fragments. However, for a fragment to be edge cacheable, you must be able to externally request it from the application server. In other words, if a user types the URL in their browser with the appropriate parameters and cookies for the fragment, WebSphere Application Server must return the content for that fragment.

One of the standard Java 2 Platform, Enterprise Edition (J2EE) programming architectures is the model-view-controller (MVC) architecture, where a call to a controller servlet might include one or more child JSP files to construct the view. When using the MVC programming model, the child JSP files are edge cacheable only if you can request these JSP files externally, which is not usually the case. For example, if a child JSP file uses one or more request attributes that are determined and set by the controller servlet, you cannot cache that JSP file on the edge. You can use alternate URL support to overcome this limitation by providing an alternate controller servlet URL used to invoke the JSP file.

The alternate URL for a JSP file or a servlet is set in the cachespec.xml file as a property with the name alternate_url. You can set the alternate URL either on a per cache-entry basis or on a per cache-id basis. It is valid only if the EdgeCacheable property is also set for that entry. If the EdgeCacheable property is not set, the alternate_url property is ignored. The following is a sample cache policy using the alternate_url property:


<cache-entry>
<class>servlet</class>
<name>/AltUrlTest2.jsp</name>
<property name="EdgeCacheable">true</property>
<property name="alternate_url">/alturlcontroller2</property>
<cache-id>
<timeout>600</timeout>
<priority>2</priority>
</cache-id>
</cache-entry>

What to do next

For more information on the cachespec.xml file, see Cachespec.xml file.



Task topic    

Terms of Use | Feedback

Last updated: Mar 17, 2005 4:28:29 AM CST
http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/tprf_alternateurl.html

© Copyright IBM Corporation 2003, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)