Game Development Tutorials In Android Hi Guys, We are shortly started Game Development Tutorials in Android Studio. So everyone supports me and share this blogs to your friends. Guys, At this time everyone is freely available to source code and we are provide a video for step by step game developments. you are learn free and feel free to support us. Guys, if you have any question to me, so feel free to comment us. I will try to answer all the question as long as possible. Thank's ...
Get link
Facebook
X
Pinterest
Email
Other Apps
Passing Checkbox Data to JSP Program example program
Passing
Checkbox Data to JSP Program
Checkboxes are used when more than
one option is required to be selected.
Here is example HTML code,
CheckBox.htm, for a form with two checkboxes
Below is main.jsp JSP program to
handle input given by web browser for checkbox button.
<html>
<head>
<title>Reading Checkbox Data</title>
</head>
<body>
<center>
<h1>Reading Checkbox Data</h1>
<ul>
<li><p><b>Maths Flag:</b>
<%= request.getParameter("maths")%>
</p></li>
<li><p><b>Physics Flag:</b>
<%= request.getParameter("physics")%>
</p></li>
<li><p><b>Chemistry Flag:</b>
<%= request.getParameter("chemistry")%>
</p></li>
</ul>
</body>
</html>
For the above example, it would display following result:
Reading Checkbox Data
Maths Flag : : on
Physics Flag: : null
Chemistry Flag: : on
Reading
All Form Parameters:
Following is the generic example
which uses getParameterNames() method of HttpServletRequest to read all
the available form parameters. This method returns an Enumeration that contains
the parameter names in an unspecified order.
Once we have an Enumeration, we can
loop down the Enumeration in the standard manner, using hasMoreElements()
method to determine when to stop and using nextElement() method to get
each parameter name.
Now try calling JSP using above
Hello.htm, this would generate a result something like as below based on the
provided input:
Reading All Form Parameters
Param
Name
Param
Value(s)
maths
on
chemistry
on
You can try above JSP to read any
other form's data which is having other objects like text box, radio button or
drop down box etc.
If you have any problem to this program , so plz send your feedback ! we'll reply you soon. If this information is important to you , and you want to , I will continue writing some more details of programming language, so click on the advertising, available on this page. This is motivate me for writing some more blogs.
Comments
Post a Comment