Saturday, 2 December 2017

How to use checkbox program in java jsp

Learning Java Programming Made Easy

Page 1:


<%-- 
    Document   : check
    Created on : Feb 9, 2017, 11:40:10 AM
    Author     : my pc
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<body>
    <form action="checkcall.jsp" method="POST" target="_blank">
    <input type="checkbox" name="a" checked="checked" /> A
    <input type="checkbox" name="b"  /> B
    <input type="checkbox" name="c" checked="checked" /> C
<input type="submit" value="Select Subject" />
</form>
</body>
</html>



/************************************************************************/



Page 2:


<%-- 
    Document   : checkcall
    Created on : Feb 9, 2017, 11:40:30 AM
    Author     : my pc
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<body>
<b>A Flag:</b><%= request.getParameter("a")%>
<b>B Flag:</b><%= request.getParameter("b")%>
<b>C Flag:</b><%= request.getParameter("c")%>
</body>
</html>

No comments:

Post a Comment

Welcome, happy learning

Charactor_At_Position

public class Char_At_Position { public static void main(String[] args) { String str = "Wankhede"; String rev=""...