Java Server Pages (basic)

JSP

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://pandonia.canberra.edu.au)
jan@ise.canberra.edu.au
Last modified: Tue Aug 22 16:06:02 EST 2000
Copyright ©Jan Newmarch