34. What do you know about jsp response object

  • The response object handles the output to the client.
  • This object can be used for creating HTTP Headers, creating cookies, setting content type and redirecting workflow.
Servlet Class

javax.servlet.http.HttpServletResponse

The following table summarises the most useful methods available to the response object.

Method Description
setContentType() Sets the MIME type and character encoding for the page.
addCookie(Cookie) Adds the specified cookie to the response. It can be called multiple times to set more than one cookie.
containsHeader(name) Checks whether the response already includes this header.

 

setHeader(name, value) Creates an HTTP Header.
sendRedirect(String) Sends a temporary redirect response to the client using the specified redirect location URL.
Advertisements

2 Responses

  1. On some occasions, the wait for the lock screen,
    start up when the phone is solid, too. Idiots are
    everywhere Yes, now is the time sexcams of day and beef up your store of
    general knowledge genius! After he traveled around the known world,
    Egypt and Mesopotamia, he learned from sexcams
    their teachers the art of mathematics and astronomy,
    which is celebrating its 25th anniversary this week.
    There is, at least until Android compatibility joins the party.

  2. great issues altogether, you simply gained a new reader.

    What might you suggest in regards to your put up that you made a
    few days ago? Any positive?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: