DSP"
Line 3: | Line 3: | ||
Package: <tt>org.zkoss.web.servlet.dsp</tt> | Package: <tt>org.zkoss.web.servlet.dsp</tt> | ||
− | 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 | + | 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. |
However, you cannot embed Java codes in DSP pages. Actions of DSP, though extensible through TLD files, are different from JSP tags. | However, you cannot embed Java codes in DSP pages. Actions of DSP, though extensible through TLD files, are different from JSP tags. | ||
Line 10: | Line 10: | ||
<source lang="xml" > | <source lang="xml" > | ||
− | |||
− | |||
<servlet> | <servlet> | ||
<description><![CDATA[ | <description><![CDATA[ |
Revision as of 10:05, 27 November 2010
Package: org.zkoss.web.servlet.dsp
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.
However, you cannot embed Java codes in DSP pages. Actions of DSP, though extensible through TLD files, are different from JSP tags.
If you want to use DSP in your Web applications, you have to set up WEB-INF/web.xml to add the following lines.
<servlet>
<description><![CDATA[
The servlet loads the DSP pages.
]]></description>
<servlet-name>dspLoader</servlet-name>
<servlet-class>org.zkoss.web.servlet.dsp.InterpreterServlet</servlet-class>
<!-- Specify class-resource, if you want to access TLD defined in jar files -->
<init-param>
<param-name>class-resource</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dspLoader</servlet-name>
<url-pattern>*.dsp</url-pattern>
</servlet-mapping>
The mapping of the DSP loader is optional. Specify it only if you want to write Web pages in DSP syntax.
Though standard components of ZK use DSP as a template technology, they are handled directly by ZK loader.
Version History
Version | Date | Content |
---|---|---|