-
Notifications
You must be signed in to change notification settings - Fork 0
JEE Web Application Setup
rbackhouse edited this page Apr 15, 2012
·
6 revisions
-
Create a Web Application directory that will hold the contents of your JEE Web Application.
-
Download the latest optimizer runtime from downloads and unzip into the created web app dir
-
You can either use the web.xml samples in the WEB-INF directory (filter_web.xml or inject_web.xml) or add your own web.xml file to the WEB-INF dir ensuring it contains the following :
<context-param> <param-name>compressJS</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>jsHandlerType</param-name> <param-value>zazl</param-value> </context-param> ..... <servlet> <description/> <display-name>JSServlet</display-name> <servlet-name>JSServlet</servlet-name> <servlet-class>org.dojotoolkit.optimizer.servlet.JSServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>JSServlet</servlet-name> <url-pattern>/_javascript/*</url-pattern> </servlet-mapping> -
If you plan to use the HTML Filter to add script tags to your HTML then you will also have to add :
<filter> <filter-name>JSFilter</filter-name> <filter-class>org.dojotoolkit.optimizer.servlet.JSFilter</filter-class> </filter> <filter-mapping> <filter-name>JSFilter</filter-name> <url-pattern>*.html</url-pattern> </filter-mapping>