jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: General TAGLIB Question.
Date Thu, 12 Apr 2001 09:11:55 GMT
Hi Dylan

From: "Dylan Parker" <dylan@mindstech.com>

> I've added functionality to do basic caching of compiled XSL
> stylesheets and periodic checks for updates of the XSL files
> themselves... and I want to know if there is some easy/conformant way
> to have init-time parameters set on a Taglib.

You could configure your XSL caching configuration on a per-web-application
basis using the ServletContext. It can be configured in a web.xml and your
individual tags could access it via the pageContext.getServletContext()
method. Here's a sample web.xml - the context-param is an example of
configuring your XSL caching...

<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
  <display-name>Some WebApp</display-name>
  <description>a description goes here</description>

 <context-param>
    <param-name>myXSLCachingThingy</param-name>
    <param-value>yes</param-value>
 </context-param>

  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

  <taglib>
    <taglib-uri>http://jakarta.apache.org/taglibs/io/1.0</taglib-uri>
    <taglib-location>/WEB-INF/io.tld</taglib-location>
  </taglib>
  <taglib>
    <taglib-uri>http://www.xtags.org/taglib/1.0</taglib-uri>
    <taglib-location>/WEB-INF/xtags.tld</taglib-location>
  </taglib>

</web-app>


<James/>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Mime
View raw message