XSLT In JSP
/*
Java, XML, and Web Services Bible
Mike Jasnowski
ISBN: 0-7645-4847-6
*/
<HTML>
<H1> Enter card Info</H1>
<FORM NAME="CARDINFO" ACTION="/test/svgcard/process.jsp" TARGET="VIEWCARD">
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="2">
<TR><TD>Card To:</TD><TD><INPUT TYPE="TEXT" SIZE="20" NAME="cardto"></TD></TR>
<TR><TD>Card From:</TD><TD><INPUT TYPE="TEXT" SIZE="20" NAME="cardfrom"></TD></TR>
<TR><TD>Message:</TD><TD><INPUT TYPE="TEXT" SIZE="60" NAME="message"></TD></TR>
<TR><TD COLSPAN="2"> </TD></TR>
<TR><TD><INPUT TYPE="SUBMIT" VALUE="PREVIEW"></TD><TD> </TD>
</TABLE>
</FORM>
</HTML>
<%@ page contentType="image/svg-xml" %>
<%
String cardTo = request.getParameter("cardto");
String cardFrom = request.getParameter("cardfrom");
String message = request.getParameter("message");
%>
<svg width="400" height="200">
<g style="font-family:Arial;font-size:12pt;">
<text x="10" y="20">
<%= cardTo %>, someone has sent you a message
</text>
<text x="10" y="60">
<%= cardFrom %> would like to tell you
</text>
<text x="10" y="140">
<%= message %>
</text>
</g>
</svg>
Related examples in the same category