-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jonathan,

On 3/25/20 09:51, Jonathan Yom-Tov wrote:
> I think I phrased my question incorrectly. What I want to do is to
> cache the HTML resulting from the JSPs evaluation so I can serve
> the cached result. The reason is that I'm working on an application
> which makes a lot of requests per page. This makes the page very
> slow. What I want to do is to serve some of the requests which
> build the page out of a cache. Rewriting the offending endpoints
> would be a very lengthy process. There are a lot of them and
> they're part of a legacy project which is very hard to get into.>
> So is pre-evaluating the JSPs the correct strategy or is there a
> better way?

I think the better way would be to use a caching (reverse) proxy.
mod_proxy and mod_cache in httpd can help you out a lot, here. Other
proxies are certainly capable of caching as well.

Remember that your "dynamic" page needs to return caching-control
headers that are appropriate for your needs.

- -chris

> On Tue, Mar 24, 2020 at 11:59 PM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> Jonathan,
>
> On 3/24/20 10:44, Jonathan Yom-Tov wrote:
>>>> I have a set of jsp files. These jsps' compilation result
>>>> changes whenever a variable in my cache changes. I want to
>>>> compile them whenever that variable changes so they're ready
>>>> to serve without going through the normal pipeline. Is that
>>>> possible?
>
> I completely agree with Olaf's response.
>
> That being said, there is a spec-defined way to invoke compilation
> of a JSP without evaluating it: make a request to
> /context/path/to/my.jsp?jsp_precompile
>
> This is defined in JSP 2.3 section 11.4.2. I wasn't able to find
> the JSP spec 3.0 publication, but I'll bet it will be in there once
> it's published (it may have been subsumed into Jakarta EE at this
> point).
>
> -chris
>>
>> ---------------------------------------------------------------------
>>
>>
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl57pAEACgkQHPApP6U8
pFiruA//XN+A+NfhOb5StY4vkKBlb7N95NgvNyap8lV7zFMDKwpPZ9SFtY3KHRtd
dHFtWafAuJpIdSHorPlxCZLZ0vkBKIR4vyOM00LLDJbxn6CJgQdv9ktbtFT5KOBA
0ZOv31AuFBkCwv3t0cjioyoxkEL9e9oFDONz3e7CelJsGTVnRjsqpVHrn12MnLze
WoscQh/iLg1vtqkqbUrAFqXCui88ffEShiSM6+feYetsoSKI64ZtH9yX1EbGINUe
f1FjluCnLfi7ZxIw9V60ohFVj8dfPLLegRiT/B4Dqy2EKFYf+HY/2Dy5D+qWXfWw
02c54KDz6uRc4gkcYn9jjgSbwrUbKh77FB/aRq0T5CLG5RCUHR2pM9j6f7LZ82rK
wgQTTg+125XEaCq6l09xJqw87cG8lNP+Ft4eObtt1s27Ae50Z9+PvFm7Q3EcEWPj
c2Gr39w4XPK9fnfx3molN3zb+yIb8EEUOw/4oR+bnDdTnQsqtAExn/DqOswESNFc
K87NWIg/5zm0yeQw7A27BM+SVUXJUhSFDKEyW+JJcQ6KF0ZYDUnJrOPK7Th/tpEL
4SyRijwDwtd552FnISR2XK+w5dSAfvHyon/McBrQtDXMksh9snBB8E76L+BIrTjR
8yj/K+pjVpOsZkR38BiQaDstUQQJPQBC1hwQ8bOXu1efCfxdbi8=
=V4eM
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to