A
aerotops
Hi,
I would like to know if there is a convenience method for obtaining
the servlet context for an application. I have read through many posts
about how this can be done via the servlet config object. My problem
is as:
I have a Java class (a utility class) running in a webapp. I would
like to set a XSLT transformer object as an application level
attribute so I don't have to read it from the file system on every
request. Since the XSLT does not change, I think this would be a
better solution than using caching.
Currently, I have created a servlet which loads on startup and sets
the transformer object as a application level attribute, I would like
to not use an init servlet just for this purpose, rather, get the
ServletContext in a clean way and set the attribute to it.
Thanks.
I would like to know if there is a convenience method for obtaining
the servlet context for an application. I have read through many posts
about how this can be done via the servlet config object. My problem
is as:
I have a Java class (a utility class) running in a webapp. I would
like to set a XSLT transformer object as an application level
attribute so I don't have to read it from the file system on every
request. Since the XSLT does not change, I think this would be a
better solution than using caching.
Currently, I have created a servlet which loads on startup and sets
the transformer object as a application level attribute, I would like
to not use an init servlet just for this purpose, rather, get the
ServletContext in a clean way and set the attribute to it.
Thanks.