JSP
July 19, 2006
JSP / XSLT combo
The following is an XSLT sheet dynamically generated from JSP and demonstrating use of <xsl:sort/> and batching:
<xsl:sort select="metadata/dc:title"
order="ascending"
data-type="text"/>
<xsl:if test="position() >= ($page * $pagesize) + 1">
<xsl:if test="position() <= $pagesize + ($pagesize * $page)">
<xsl:apply-templates/>
</xsl:if>
</xsl:if>
keys.xsl.jsp
Posted by pj at 10:06 AM | Comments (0)
February 27, 2006
JSP 2.0 Expression Language Tutorial
Posted by pj at 09:37 AM
February 22, 2006
Really good JSP 2.0 / JSTL cheat sheet
Posted by pj at 05:04 PM
January 26, 2006
HTTP headers beyond Content-Type in JSP/JSTL
Use setHeader
before the contentType
statement:
<%
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setHeader("Content-disposition","attachment; filename=annual_finance_report.csv"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>
<%@ page contentType="application/vnd.ms-excel"%>
Though you can't do CSV in JSTL because of whitespace issues.
Posted by pj at 03:19 PM