post and get methods
DESCRIPTION
Post and get methodsTRANSCRIPT
![Page 1: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/1.jpg)
![Page 2: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/2.jpg)
Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
![Page 3: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/3.jpg)
Week Target Achieved
1 40 23
2 40 27
3 40 28
Typing Speed
![Page 4: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/4.jpg)
Jobs AppliedWeek Company Designation Applied Date Current Status
1 Intel info group System Engineer 16-9-2013 Short listed
2 Alcatel-lucent Software Engineer 10-9-2013 Waiting
3
![Page 5: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/5.jpg)
POST and GET methods
Muhammed Noufal V [email protected]
mwww.facebook.com/vtnoufalvttwitter.com/noufalurnappyin.linkedin.com/pub/
muhammed-noufal9744003056
![Page 6: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/6.jpg)
Request-Response Cycle
• When enter an address (URL) into the address bar of a web browser or click on a link, we generate a request for a file
• The request is routed to a Web server, which sends back a response, usually an HTML page
URLWeb
Browser
request
responseHTML, images, files
WebServer
![Page 7: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/7.jpg)
Get Method
• Send parameters in the URL http://localhost:8081/fstpro/sec.jsp?name=sonia
• sec.jsp
<%session.setAttribute("name",request.getParameter("name"));
session.setAttribute("age",request.getParameter("age"));session.setAttribute("sex",request.getParameter("sex"));%>
• The amount of information you can send back using a GET is restricted as URLs can only be 1024 characters.
![Page 8: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/8.jpg)
![Page 9: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/9.jpg)
HTML Forms
• Send parameters via forms <FORM ACTION="printname.jsp" METHOD="get"> <INPUT TYPE="text" NAME="firstname" SIZE=40> <INPUT TYPE="submit" value="Print Name"> </FORM>
• Access these with the request object
<% String name = request.getParameter("firstname"); . . . %>
![Page 10: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/10.jpg)
Post Method
• Post attaches parameter values to request
• A POST on the other hand will (typically) send the information through a socket back to the webserver and it won't show up in the URL bar.
• You can send much more information to the server this way - and it's not restricted to textual data either.
![Page 11: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/11.jpg)
![Page 12: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/12.jpg)
![Page 13: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/13.jpg)
![Page 14: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/14.jpg)
![Page 15: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/15.jpg)
![Page 16: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/16.jpg)
![Page 17: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/17.jpg)
Get & Post
• Get puts parameters and values in the URL page.jsp?param1=value1¶m2=value2&...– Send with a link or in a form with method="get"
• Post attaches parameters to request– Send in a form with method="post“
GET POST• Parameters encoded in URL attached to
request• data limit URL length no limit• Bookmarks yes no
![Page 18: Post and get methods](https://reader036.vdocument.in/reader036/viewer/2022062405/555e3530d8b42a63048b486f/html5/thumbnails/18.jpg)
Contact Us
Emarald Mall (Big Bazar Building)Mavoor Road, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550
NC Complex, Near Bus StandMukkam, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550
Start up VillageEranakulam,Kerala, India.
Email: [email protected]