Java Server Pages (basic)
JSP
- Java Server Pages are equivalent to IIT ASP and Apache ASP
except they use Java instead of VB or Perl
- Other scripting languages such as JavaScript or tcl that
are "Java aware" may be supported in the future
- JSP support can be done as Apache modules, or you can use
the standalone TomCat server
Name.pl as JSP
<%@ include file=header.inc %>
<h1> Hobby </h1>
<% String name = request.getParameter("name");
session.setAttribute("name", name);
%>
<p>
Hi <%= name =%>, please select a hobby
<form action="hobbies.pl">
<input
<select name="hobby">
<option value="tennis">tennis
<option value="chess">chess
<option value="eating">eating
<option value="dancing">dancing
</select>
<input type="submit">
</form><hr>
</body></html>
Jan Newmarch (http://jan.newmarch.name)
[email protected]
Last modified: Tue Aug 22 16:06:02 EST 2000
Copyright ©Jan Newmarch
Copyright © Jan Newmarch under the terms of the
Creative Commons Attribution 2.1 Australia License.