Skip to main content

Posts

Showing posts with the label Cookies

Session tracking using Http Cookies

 Session tracking using Http Cookies index.html ======== <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> <style type="text/css"> div { width: 500px; margin: auto; margin-top: 100px; } </style> </head> <body> <div> <form action="firsturl" method="post"> Name: <br> <input type="text" name="name"> <br> Choose any one: <br> <select name="dish"> <option value="sweet">Sweet</option> <option value="spicy">Spicy</option> </select> <br> <input type="submit" value="submit"> </form> </div> </body> </html> FirstServlet.java ------------------- package com.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.Servl