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?

On Tue, Mar 24, 2020 at 11:59 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> 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
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl56gpIACgkQHPApP6U8
> pFjQRg//Sc+dmxwrmjtZEqiI6KIBsvBS6A3jpTPMhUb6akiYy9YqciuuLJnYu8EE
> tTYHkAo+52lIU15csUTRhGXzj1YgLexg3pVEroVChYgg9uwg0hN3+yp0UhbAjgxs
> tZ1eEbVJX5wEm7MiHEFZTxbkQnZ5nQXUGeQnM6cdVaZJKZs7Hu+unMiAKldz+zlP
> oNnfnchf4QEmI+z1L3ktBdwGBXaKCKTkdXXcPJKqzq/pEl/32/ncZS5xYOK0hcK3
> DK3pLLRxC9iBMKt5HSNMWAfiQMDtpVKpR4tLuwP+bB2rEKlkRYfslKzUHnWQlY0F
> afT1dOSQvxEWFpMmnzU5H/d6/G9+xYKSlq/duCBm/7OZndXUe1A+HDr+CUQNbem6
> hHSszZ4kZoyt6B8iIJKigduwY4GcZV2ZKTO334KTscXXNka0B3Um94UK1CQP4CWS
> n0lChV/bkqNviwcsA/Zq4YxrENpisVCvC2n4fILQ2ftqIgXmYR4sdYp5h3+joiEx
> 64saVENrOaLO8gMtGF1nsUhuJlvld4VA9bkdRkHDfO63nvUN4x3McxPG7VxOplmh
> Kws+axYpVekuHw0a7WkMQkPx0tIbIFuTs34KuoDifOjAoPGCCbOGKP9UlhndX9IR
> S0oMMgDKuO6DupVTx28xX9qfjXnNRVSnaSETBhNO6qajiUZA7V4=
> =ZiT1
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 
[image: SysAid Technologies]
<http://www.sysaid.com/?utm_source=signature&utm_medium=email&utm_campaign=sysaid-logo>
Jonathan Yom-Tov
Senior Architect
jonathan.yom...@sysaid.com
Phone (IL): +972 (3) 533-3675 Ext. 932
[image: SysAid Technologies]
<https://www.sysaid.com/?utm_source=signature&utm_medium=email&utm_campaign=sysaid-logo-icon>
  [image: SysAid on Facebook] <https://www.facebook.com/SysAidIT>   [image:
SysAid on Twitter] <https://twitter.com/sysaid>   [image: SysAid on
Linked-in] <https://www.linkedin.com/company/sysaid-technologies-ltd>   [image:
SysAid on YouTube] <https://www.youtube.com/user/SysAidIT>   [image: SysAid
on Instagram] <https://www.instagram.com/sysaid_technologies/>
[image: Banner] <https://www.sysaid.com/sig-link>

Reply via email to