<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <form action="CheckBox" method="get"> <input type="checkbox" name="maths">Maths<br> <input type="checkbox" name="social">Social<br> <input type="checkbox" name="scince">Scince <input type="submit" value="select subject"> </form> </body> </html>
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub response.setContentType("textt/html"); PrintWriter out=response.getWriter(); String statusofmaths=request.getParameter("maths"); String statusforsocial=request.getParameter("social"); String statusforscince=request.getParameter("scince"); out.println("Status for Maths:"+statusofmaths); out.println("Status for scince:"+statusforscince); out.println("Status for socail:"+statusforsocial); out.println(); }
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request, response); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)