SCWCD 1. get post - url (cap1 - cap2 )

723 views

Published on

Refe

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
723
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SCWCD 1. get post - url (cap1 - cap2 )

  1. 1. SCWCD Francesco Ierna
  2. 2. Objectives <ul><li>Obiettivi: </li><ul><ul><li>1.1 For every method of the protocol HTTP(get, post, etc) describe: </li><ul><li>Benificts
  3. 3. Feautures
  4. 4. List of the case studes that should happen using those methods </li></ul><li>1.4 Lifecicle servlet
  5. 5. 2.1 Build web app with jsp, html, servlet, web.xml, tag, jar and java files
  6. 6. 2.2. servlet in web.xml </li></ul></ul></ul>
  7. 7. Get <ul><li>La get is a type of request from the client to the server. It's is composed from: </li><ul><ul><li>Header in which we set info (key/value) connected to the info on the client. </li><ul><li>Example: Host(www.prova.com), User-Agent (mozilla etc), Accept( what browser accepts) etc. </li></ul><li>No body, but the data are sent through an optional query string.
  8. 8. Query String is composed from a prefix ? -> format name=value attached at the url. Esempio . www.mysite.com ?par1=valore
  9. 9. The dimension of the query string is limited.
  10. 10. We can call throught </li><ul><li>an url
  11. 11. No value into the property method in the tag form
  12. 12. Set get in the property method in the tag form </li></ul></ul></ul></ul>
  13. 13. Post <ul><li>As get Post is another types of request which the client sent to a server </li><ul><ul><li>Has a body. We send the parameters from the client to a server within the body
  14. 14. We use Post </li><ul><li>Setting POST in the property method of the tag form </li></ul><li>It's not idempotente
  15. 15. It's not limited </li></ul></ul></ul>
  16. 16. Container <ul><li>It's manage a lot of things about servlet. It's has the responsability about: </li><ul><ul><li>Comunications . Connections with the server
  17. 17. LifeCicle : lifecycle about the servlet / jsp
  18. 18. MultiThread : creations and distruction of thread when a client acts a request
  19. 19. Security : authenthication, authoritation, confidentiality, integrity within a file xml.
  20. 20. JSP : translate a jsp iinto a java file and manager his lifecicle </li></ul></ul></ul>
  21. 21. Web.xml <ul><li>Tells to the container what it must manage and how without touching java code but through a n XML file
  22. 22. Beneficts: </li><ul><ul><li>Little changes within xml to manage info which refers to the entire web-app
  23. 23. Focus on unique file to manage a lot of things
  24. 24. Adaptability for multiple web-app </li></ul></ul><li>For example: </li></ul><servlet> <servlet-name>FirstServlet</servlet-name> <servlet-class>capitolo3.FirstServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>FirstServlet</servlet-name> <url-pattern>/FirstServlet</url-pattern> </servlet-mapping>
  25. 25. Url <ul><li>Http://www.mysite.com:80/dir1/subdir2/index.html E sta per Uniform Resource Locator </li><ul><ul><li>Http -> protocol
  26. 26. Www.mysite.com -> address
  27. 27. 80 -> port
  28. 28. Dir1/subdir2 -> path ( servlet)
  29. 29. Index.html -> resource
  30. 30. Optional query string ?par=val&par2=val2 </li></ul></ul></ul>

×