|Kongregate Registration for Free Flash Games and Chat with solprovider|
How to use ServerPages (XSP) in your Publication
There are two files involved in using a ServerPage.
1. An XMAP file calls the ServerPage with this line:
2. Create the Serverpage "myServerPage.xsp".
A ServerPage is XML.
ServerPages must contain the top-level tag "xsp:page" which defines the language and namespaces.
The "xsp:structure" and "xsp:include" elements replace the "import" lines in normal Java.
The top-level element for the result.
"xsp:logic" elements enclose Java code. They should not enclose elements for the result.
It best to keep the <xsp:logic> and </xsp:logic> lines at the beginning of the line without any indentation. They are more structural than part of the code, and indenting them with the code is difficult to maintain as the code changes, useless because they do not define code blocks, and detrimental because it is much less obvious if a line is inside or outside a logic section.
Add elements to the result.
"xsp:expr" elements enclose simple Java expressions. They are typically a variable name, but they can include a function like "date.toString()".
Close the top-level element for the result.
Close the top-level element of the ServerPage.