Home Jsp How to handle a form in JSP
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

How to handle a form in JSP

Advertisement
This section teaches you about the creating a from and the procedure of handling the form through the JSP code.

How to handle a form in JSP

     

This section teaches you about the creating a from and the procedure of handling the form through the JSP code. This section provides JSP code which used the HTML code for creating a form and this form is handled by the JSP code.

All the HTML code are the client side code i.e. executed on your browser while all the JSP code is the server side code which executes on the server.

 

Here is the code of the program: 

 

<html>
	<head><title>Handling Form in JSP.</title></head>
	<body>
		<form method="post">
			<table border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td>Enter your name: </td>
					<td><input type="text" name="txtName"
 size="20"/></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><input type="submit" name="B1" 
value="Submit"/><input type="reset" name="B2" value="Reset"/></td>
				</tr>
			</table>
		</form>
		<%
			if(request.getParameter("txtName") != null){
				out.println(request.getParameter("txtName"));
			}
		%>
	</body>
</html>

Output of the program:

Download this example.

Advertisements

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: February 7, 2008

Ask Questions?    Discuss: How to handle a form in JSP   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
Banti Singh
September 3, 2011
java,jsp,javascript,oracle,php

provided a good resource
Clement
January 18, 2013
GGXjRyxGdrSYT

Hi all,I would like to contribute my coeanlidstod.db. Of course I already installed the iOS-Update, so I can no longer extract it from the default backup location.Instead I would like to extract coeanlidstod.db's from my TimeMachine backups. I also think that this would be an easy way to still get db's even from people who already updated.I could imagine some kind of Choose backup location -button or something similar. It would be great if someone could add this to the applet. I actually found the right line in the source, change it to a static TM location, but then failed to compile due to lack of experience with java Thanks in advanceljr
DMCA.com