Solution:
The files used to run the application are:
1. User.jsp
2. UserDisplay.jsp
<html>Save the code as User.jsp in the C:\Tomcat 5.5\Webapps\basic directory
<head>
<title>Example of Implicit Objects</title>
</head>
<body>
<h1>User submission form</h1>
<form action="UserDisplay.jsp" method="post">
Enter User Name:
<input type="text" name="uname">
<br>
<br>
Enter Password:
<input type="password" name="pname">
<br>
<br>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
<html>Save the code as UserDisplay.jsp in the C:\Tomcat 5.5\Webapps\basic directory.
<head>
<title>Example of Implicit objects</title>
</head>
<body>
<font face=Times New Roman size=3>
Thank you for your submission. Your information has been
successfully added to the database:
<br>
<br>
<%
String sUName = request.getParameter("uname");
String sPName = request.getParameter("pname");
%>
User Name:<%=sUName%><br>
Password:<%=sPName%><br>
</font>
</body>
</html>
The output of the program is as shown in Figure 4.1.
3 nhận xét:
good work
thanx...
tanks
www.fatfreeonline.com
Post a Comment