*Deprecated* This material is for historical purposes only See https://wiki.duraspace.org/display/VIVODOC/All+Documentation for current documentation
*Deprecated* See https://wiki.duraspace.org/display/VIVODOC/All+Documentation for current documentation
If you wish, you can modify Tomcat's settings to reduce the amount of white space in HTML that is created from JSPs (Java Server Pages). White space is controlled by the trimSpaces
parameter in the JSP compiler.
In your tomcat/conf
directory, edit the file web.xml
, adding four lines, so this:
<servlet> <servlet-name>jsp</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> <init-param> <param-name>fork</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>xpoweredBy</param-name> <param-value>false</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet>
becomes this:
<servlet> <servlet-name>jsp</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> <init-param> <param-name>fork</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>xpoweredBy</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>trimSpaces</param-name> <param-value>true</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet>
In practice, this will make little difference to VIVO, since most VIVO pages are produced from FreeMarker templates, not from JSPs. However, the "back-end editing" pages still use JSPs extensively, and this configuration can reduce the size of the HTML files they generate.