Guide for JAVA statement

You can writer java code in JAVA statement.JAVA statement begin with <% and end with %> .

You can't define a class or an interface or a function in JAVA statement. Import statement and package statement are not supported too.

Template tags such as article tags and global tags can be used in java code and none statement can be nested in JAVA statement directly.

JAVA grammar

<%
    --input java code here
%>

Variables and Methods

All variables and methods defined by nps.compiler.ArticleClassBase can be used in article template.
All variables and methods defined by nps.compiler.PageClassBase can be used in page template.

Sample coding

Codes for only output even line.
<rs id="rs1" sql="select name,price from product">
<%
     if((Integer)<$rs1.rowno$>%2==0)
      {
%>
         <$rs1.name$>:<$rs1.price$>
<%
     }
%>
</rs>