4.1. Understand more details of the HTTP protocol
HTTP protocol is used to transfer resources between a client and a server.
HTTP is stateless.
HTTP is stateless.
The information is identified by URL (uniform resource locator).
URL structure: protocol://machine:port/context/resource
URL structure: protocol://machine:port/context/resource
Methods in HTTP
- HEAD : get metainfo contained in headers
- GET : get a resource from the server
- POST : send data included in the body to the server to be processed (get,add or update)
- PUT : send a resource(file) to the server by a new connection.
- DELETE: delete a resource
- TRACE : to obtain a response code from the server
- OPTIONS : to obtain http methods supported
- CONNECT : to transform connection to https
- PATCH : to modify partially a resource in the server.
Response codes in HTTP
The most common are:
- 4XX - Error in client side
- 5XX - Error in server
4.2. Understand fundamentals of HTML forms
A html form has these attributes:
- action : resource
- method : GET or POST
- GET : add form data to the URL using ? as separator (QueryString)
- POST : the data is sent into the body.
The above form contains these different elements:
- Textfield
- Radiobutton
- Checkbox
- Buttons
- SelectionList
- TextArea
When the submit button is clicked the form-data is sent to a page on the server called "order.jsp"
See next post The Servlet's Environment (part2)
OCEJWCD (SCWCD) - 1Z0-899 - Web Component Developer Certification
No comments:
Post a Comment