Re: jsp precompile options
Hi Alex, how are you? For option (a) and using maven, you can use this plugin: jetty-jspc-maven plugin: https://www.eclipse.org/jetty/documentation/9.3.x/jetty-jspc-maven-plugin.html I have being using this plugin por a long time and it fits my needs. Hope it helps, Juan On Sat, Jan 27, 2018 at 10:35 AM Alex O'Reewrote: > Using tomcat 8.5... > > I have a web app that still uses jsp's and i'm looking into a few options > to (a) aid development and (b) reduce or eliminate the need for the JDK in > a production setup and just run a JRE. > > (a) Making development easier. My project is maven based and I'd like to > run some kind of JSP precompile at build time to ensure that all jsp files > can be compiled (no typos). I've tried a bunch of examples from SO but > haven't found anything that functionally works. > > (b) Along the same lines, if the solution to question a can inject the > precompiled jsp files into the WAR, and that is deployed to tomcat, my > assumption is that the JDK and thus javac would not be necessary at > runtime. Is this an accurate statement or do other elements within tomcat > require the JDK? This is assuming that all JSP's deployed to tomcat are > precompiled somehow. >
jsp precompile options
Using tomcat 8.5... I have a web app that still uses jsp's and i'm looking into a few options to (a) aid development and (b) reduce or eliminate the need for the JDK in a production setup and just run a JRE. (a) Making development easier. My project is maven based and I'd like to run some kind of JSP precompile at build time to ensure that all jsp files can be compiled (no typos). I've tried a bunch of examples from SO but haven't found anything that functionally works. (b) Along the same lines, if the solution to question a can inject the precompiled jsp files into the WAR, and that is deployed to tomcat, my assumption is that the JDK and thus javac would not be necessary at runtime. Is this an accurate statement or do other elements within tomcat require the JDK? This is assuming that all JSP's deployed to tomcat are precompiled somehow.
Re: Modify JspServlet config in application web.xml?
Thanks a lot, Christopher and Mark! Wow, lot of knowledge and pointers to move forward. I've debugged a bit around both ContextConfig and JspServlet, and it is exactly as you described. This saves a hell lot of work for me and helps avoid some stressful meetings :D Thanks a lot! Also for the reference of the Servlet spec, I think it's time to go through it. Have a nice weekend, guys! Best, Richard On 25 January 2018 at 11:33, Mark Thomaswrote: > On 25/01/18 05:25, Christopher Schultz wrote: > > > > > You can also use in WEB-INF/web.xml for the JSP servlet. > > You will probably have to copy those settings you want from the JSP > > configuration in conf/web.xml because I don't think Tomcat will merge > > init-param between the two files. > > Tomcat should merge the init-param entries. The rules for merging the > default web.xml file are as follows. > > 1. Web fragments, annotations etc. are merged into the main web.xml as > per the Servlet spec merge rules to created an updated main web.xml. > > 2. The default web.xml is them merged into the updated main web.xml as > if the default web.xml was a web fragment again following the Servlet > spec rules with one exception. If there is a conflict, rather than > triggering an error, the updated main web.xml always takes precedence. > > The code that does this is in ContextConfig and WebXml. > > Mark > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >