VisualBuilder
  Home > Jsp > Tutorials > Contents of Request and Response - Java Web Component Tutorial
Tell a friend
Link to us
Total Members
      Members: 84606
     
Sitemap Forum Chat
Home
Java Web Component Tutorial Home
1 . Basics to the web
2 . URI and URL
3 . Contents of Request and Response
4 . When a Servlet is invoked
5 . Servlet Execution Flow
6 . Example Time!
7 . Servlet Execution Flow
8 . Keep Coming Back for more updates.
 
Jsp Group Home
Jsp Discussion (71)
Jsp Members (18673)
Jsp Resources
Jsp Source Code (172)
Jsp Articles (3)
Jsp Blogs
Jsp Jobs
Jsp Components (10)
Jsp Books
Jsp Websites (13)
Jsp News (12)
Jsp Q & A (79)
- Jsp Ask Question
- Jsp Questions
- Jsp Unanswered Questions
 
GROUPS
.NET
ASP.NET
.NET
C#
ASP
Visual Basic
Java
Java
JSP
EJB
Other
Delphi
C++
Ajax
UML
JavaScript
PHP
Web Design
Web Hosting
SQL Server
Oracle
Project Management
More Groups

 
LEARNING CENTER
TUTORIALS
.NET
.NET Tutorial
ASP Tutorial
ASP.NET Database Tutorial
ASP.NET Development Tips
ASP.Net Security,Internationalisation And Deployment
ASP.NET Server Controls Tips
ASP.NET Tutorial
C Sharp Tutorial
Web Development
Flex Tutorial
HTML Tutorial
Learn AJAX Tutorial
PHP Tutorial
Software Development
Database Tutorial
SQL Tutorial
UML Tutorial
Java
Ant Tutorial
EJB 3 Tutorial
Hibernate Tutorial
Java Tutorial
Java Web Component Tutorial
Java XML Tutorial
JDBC Tutorial
JDK1.5 Tutorial
JSF Tutorial
JSP And J2EE Design Tutorial
JSP Tutorial
Spring Tutorial
Struts Tutorial

RESOURCES
Q & A (432 )
Source Code (3217 )
Articles (11 )
Components (1589 )
News (880 )
Websites (1207 )

SUBMISSIONS
Submit Article
Submit Website
Submit News
Submit Source Code
Submit Component

COMMUNITY
Members Directory
Discussion Forum
Chat

SITE
About Us
Sitemap
Search
Contact Us
Link To Us
Feedback
Tell a Friend
Partners
Advertise


Jsp webcomponent Tutorial
 Contents of Request and Response
  << Prev: URI and URL Next: When a Servlet is invoked >>

Contents of Request and Response


There is one last thing we need to know before we actually  start looking at the various methods,and that is the contents of a request  and a response.


A typical request,


request


A typical response,


response


 


 


You must have got a fair idea of how a client request  and how a server response looks like.


Now let us get back to see each of the method one by one.


 


1.      GET


GET is the default method of  browser. If no method is specified them GET method is invoked.


Get method is used for retrieving the resource from the server,e.g. HTML page,image,sound file etc.  All the client form data gets appended to the URL starting with a question mark ? e.g.  http://visulabuilder.com/products/servlet./index.html?id=?09?


The main advantage of get  is that the  page can be bookmarked and sent without a form . However this also results in some drawback. There is a limit to how much data a client can send as most browser limit the URL length to about 255 characters.


Moreover a get method should not be used where it can make changes to the server side [e.g. update a database] unless the system requires so,because each time a client sends a get request,it will result in a server side change.


Only text data can be sent through a get request.


 


2.   POST


Post method is a request for posting data to the server. It transfers data in the body rather than the URL as in get. Unlike the get method post can transfer theoretically limitless data. Post is more secure than get,and the client can send both text as well as binary data to the server.


 


  


3.  PUT


Put is something like upload. Through a PUT method you can request to store static information on the server.


                       


 4. HEAD


Head request is used when the client does not want back a response body from the server. In such case only the status line is returned along with the header. The main argument in favour of using head method is when the client does not want a response body back. This situation could arise if the client only has to check that a particular resource exists on the server. Also since the response is smaller it helps to save bandwidth.


 



 5.     Delete


        Delete is the opposite of put. It enables the client to remove the file from the URL



 


 6.     Option


     This request method will result in a response being delivered from the server indicating all the allowable methods,the server supports.


 


 

           



 



 


 


Get post and head are the most frequently used HTTP methods.


 


  << Prev: URI and URL Next: When a Servlet is invoked >>
Jsp Webcomponent Tutorial Home
Give feedback and win a prize.

 
   Printer Friendly
   Email to a friend
   Add to my Favourites    
  Download PDF version
   Report Bad Submissions
   Submit Feedback
 
  Delicious   Digg   Technorati   Blink   Furl   Reddit   Newsvine   Google Click each image to add
this page to each site.
 
 
Welcome Guest Signup
MEMBER'S PANEL
EMAIL
PASSWORD
Forgot your password?
New User? Click Here!
 
Resend Activation Email!
 
SEARCH
 
 
LINKS
accuconference
Video Surveillance
VoIP Internettelefonie
Gift to Pakistan
 
ADVERTISEMENT
 
PARTNER LIST

More
 
 
 

Home | Login | About Us | Contact Us | Privacy Policy | Advertising