Core Java| JSP| Servlets| XML| EJB| JEE5| Web Services| J2ME| Glossary| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials:
 

Software Solutions and Services
 

 
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments
 
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.

 

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.

                         

» View all related tutorials
Related Tags: c io sed page tag if for example to exam ci e use in m ad age xa xamp s

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

1 comments so far (
post your own) View All Comments Latest 10 Comments:

I want to check out diff projects in jsp.

Posted by meher on Saturday, 11.3.07 @ 10:28am | #35443

Training Courses
Tell A Friend
Your Friend Name
Website Designing Services
 
Web Designing Packages From $150!
 
Website Designing Company Web Hosting
 
Website Designing Quotation
 
Search Tutorials:

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.