This installation guide shows you how to configure OSCache for use inside your JSP pages. It assumes you have downloaded the latest version, which requires at least Java 1.4 and a Servlet 2.3 container (included in J2EE 1.3).
For Java 1.3 and/or Servlet 2.2 container (included in J2EE 1.2) developers we created a Legacy Installation Guide.
If you intend to use OSCache via the API rather than via the taglibs, these instructions do not apply. Just make sure oscache.jar and commons-collections.jar is somewhere on your application's classpath.
- Extract the downloaded file to a directory of your choosing.
- Put the oscache.jar file in the /WEB-INF/lib directory
- Make sure commons-logging.jar is on your classpath (normally this also means putting it in /WEB-INF/lib). With Java 1.4 and higher, you can omit adding commons-collections.jar.
- Put the /etc/oscache.properties file in the /WEB-INF/classes directory and edit the properties contained within it (for example if you want disk caching, configure the persistence listener and edit the cache.path property to point to where you want the cache files stored on disk). See the Configuration Guide for further details on what options are available.
- Your directory structure should now look something like this:
$WEB_APPLICATION/WEB-INF/lib/oscache.jar
$WEB_APPLICATION/WEB-INF/classes/oscache.properties
- Now add the appropriate JSP Tags to your JSP files and you're done.
- It should work properly. Tell us on the mailing list if it doesn't work in your container.
|