DSP Loader"
Maya001122 (talk | contribs) |
Tmillsclare (talk | contribs) m |
||
Line 17: | Line 17: | ||
It specifies the default charset for the output of the DSP interpreter. | It specifies the default charset for the output of the DSP interpreter. | ||
− | If an empty string is specified as follows, the container's default is used. In other words, the <tt>setCharacterEncoding</tt> method of | + | If an empty string is specified as follows, the container's default is used. In other words, the <tt>setCharacterEncoding</tt> method of ''javax.servlet.ServletResponse'' is not called. |
|- | |- |
Revision as of 07:07, 12 July 2010
[Optional] Class: InterpreterServlet
InterpreterServlet is a servlet used to process the DSP files. DSP is a JSP-like template technology. It takes the same syntax as that of JSP. Unlike JSP, DSP is interpreted at the run time, so it is easy to deploy DSP pages. No Java compiler is required in your run-time environment. In addition, you could distribute DSP pages in jar files. This is the way ZK is distributed.
However, you cannot embed Java codes in DSP pages. Actions of DSP, though extensible through TLD files, are different from JSP tags.
The Initial Parameters
charset | [Optional][Default: UTF-8]
It specifies the default charset for the output of the DSP interpreter. If an empty string is specified as follows, the container's default is used. In other words, the setCharacterEncoding method of javax.servlet.ServletResponse is not called. |
class-resource | [Optional][Default: false]
Specifies whether to load resources, such as TLD files, from the class loader, in addition to the servlet context. |
compress | [Optional][Default: true]
It specifies whether to compress the output if the browser supports the compression (Accept-Encoding) and this Servlet is not included by other Servlets. |
How to Specify in web.xml
<servlet>
<servlet-name>zkLoader</servlet-name>
<servlet-class>org.zkoss.web.servlet.dsp.InterpreterServlet</servlet-class>
</servlet>