Solprovider Lenya Kongregate Registration for Free Flash Games and Chat with solprovider

Code Placement Affects Output

Java outside the top-level element in the result does not have access to the standard functions. It is cached the first time the ServerPage is compiled, so you cannot use any dynamic code there.

Example


<?xml version="1.0"?>
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
<xsp:structure>
<xsp:include>java.util.Date</xsp:include>
</xsp:structure>
<xsp:logic>
Date date1 = new Date();
</xsp:logic>
<now>
<xsp:logic>
Date date2 = new Date();
</xsp:logic>
<date1><xsp:expr>date1</xsp:expr></date1>
<date2><xsp:expr>date2</xsp:expr></date2>
</now>
</xsp:page>


date1 is always the time this ServerPage was compiled.
date2 is the current time.


<< How ToParameters >>

Contact Solprovider
Paul Ercolino