Please enable JavaScript.
Coggle requires JavaScript to display documents.
CHAPTER 4: Reading HTML Form Data with JSP - Coggle Diagram
CHAPTER 4: Reading HTML Form Data with JSP
Review on HTML Forms
Form can contain input elements such as;
Text field, label, textarea, list, combobox
Checkbox, radio button, submit button and etc
Sample syntax <FORM action=“process.jsp” method=“post” name=“myForm””> </FORM>
Used to pass data to a server
This will attach to submit button in HTML
HTML forms are used to get input from the user
Methods
GET
: - Form values are appended to the URI as a query string.
POST
: Form values are supplied in the input stream.
Sharing Data Between JSPs
Session object
– session.getAttribute(“attribute_name)
However, this is not the best practice!
session.setAttribute(“attribute_name”, object_name)
Hidden fields
Query parameter
request.getParameter(“input_name”)
CRUD Operations to Perform
Retrieve (R)
Update (U)
Create (C)
Delete (D)