Home Answers Viewqa JSP-Servlet Various methods of httpservletresponse interface

 
 


ratna rathor
Various methods of httpservletresponse interface
1 Answer(s)      a year and a month ago
Posted in : JSP-Servlet

What are the various methods of httpservletresponse interface?

View Answers

May 23, 2012 at 3:57 PM


HttpServletResponse interface extends ServletResponse interface.
     HttpServletResponse methods?
1.addCookie: - This method is used for adding 
                 specified cookie to the response.

public void addCookie(javax.servlet.http.Cookie cookie)

2.addDateHeader: -  This method is used for adding a 
   response header with specified  name and date value.

public void addDateHeader(java.lang.String name,long date)

3.addHeader: - This method is used for adding a 
  response header with specified name and value.

 public void addHeader(java.lang.String name,
                      java.lang.String value)

4.containsHeader: - Its return type is Boolean.
  Returns true if named response is already set
  else return false.

public boolean containsHeader(java.lang.String name)

5.encodeRedirectUrl: - This method is deprecated.

  public java.lang.String encodeRedirectUrl(java.lang.String url)

6.encodeRedirectURL:- It encodes the specified URL,
   which is used by sendRedirect() method.
   If encoding is not required, returns URL as it is.

 public java.lang.String encodeRedirectURL(java.lang.String url)


7.encodeUrl: - It is deprecated.After version 2.1
  use  encodeURL in place of encodeUrl.

 public java.lang.String 
                 encodeUrl(java.lang.String url)

8. encodeURL :- If encoding is needed ,it encodes the 
 given URL by including the session ID in it 
 otherwise returns the URL unchanged.

public java.lang.String encodeURL(java.lang.String url)

9. sendError :- It is used to send an error response
    to the client. It uses specified status code and
    clear the buffer.
public void sendError(int se)

10.sendError : -It is used to send an error response
         to the client using the giver status.

public void sendError(int sc,
                      java.lang.String msg)

11.sendRedirect: - This method is used for sending                        
    redirect response to the client.It redirect to 
    the given location URL.

public void sendRedirect(java.lang.String location)

12.setDateHeader: - This method is used for setting
       a response header with specified name and date 
       value.  

 public void setDateHeader(java.lang.String name,
                          long date)

13.setHeader:-It sets a response header with the 
    given name and value.
public void setHeader(java.lang.String name,
                      java.lang.String value)

14.setIntHeader:- It sets a response header with 
    the given name and integer value.

public void setIntHeader(java.lang.String name,
                         int value)

15.setStatus: - This method is used for setting                     
              status code for response.

public void setStatus(int sc)

16.setStatus: -This method is deprecated.

public void setStatus(int sc,
                      java.lang.String sm)









Related Pages:
Various methods of httpservletresponse interface
Various methods of httpservletresponse interface  What are the various methods of httpservletresponse interface
Using httpservletresponse interface
Using httpservletresponse interface  How do you use httpservletresponse interface?   Example: package roseindia; import... of Httpservletresponse interface. This example shows how
Interface HttpServletRequest methods
Description: The interface HttpServletRequest called from the javax.servlet.http package which extends the ServletRequest interface.The HttpServletRequest... doGet(HttpServletRequest request, HttpServletResponse response) throws
interface
interface  develop a library interface which has drawbook(),returnbook()(with fine),checkstatus() and reservebook() methods.all the methods tagged with public
interface
interface  develop a library interface which has drawbook(),returnbook()(with fine),checkstatus() and reservebook() methods.all the methods tagged with public
interface
interface   Hi I have interface in that interface 3 methods are there , after some days client said that,i want to add one more method in that interface ,so how can add 4 method so that the implemented class did not affect
interface
interface  what the use of interface?   An interface is one which has abstract methods(not defined just declared)and static or non static variables.Any class can implement(inherit)the interface and make use
What modifiers are allowed for methods in an Interface?
What modifiers are allowed for methods in an Interface?   Hi, What modifiers are allowed for methods in an Interface? thanks
Interface
implement(inherit)the interface and make use of the methods(functions... and implements its methods (which are declared in interface) int the class. interface Ex... for Interface in java? and want to know why they used interface instead of multiple
Marker Interface In Java
Marker Interface In Java In this section we will read about marker interface in Java. This section will describe you the various aspects of marker interface... instead of marker interface. Java annotation is introduced with its various
interface
interface  use of interfaces,besides adding methods out of hirearchy
Interface
Interface  In JDBC , where are the source code of methods which are the member of recordset and other interfaces of JDBC packege
Interface
Interface  1.Create an interface names ShapeInterface that has two methods and one constant and an abstract class named ShapeAbstract that has two... class a.Rectangle that uses the interface b.Circle that uses the interface
Interface
Interface  1.Create an interface names ShapeInterface that has two methods and one constant and an abstract class named ShapeAbstract that has two... class a.Rectangle that uses the interface b.Circle that uses the interface
AsyncContext Interface important methods
In this section , you will get to know about important methods of AsyncContext Interface
AsyncListener Interface important methods
In this section, you will get to know about important methods AsyncListener Interface
Java Interface
the interface are implicitly public static final), methods signature (all the methods declared inside the interface are implicitly public and abstract). We... by following a semicolon. Methods inside the interface can only be a public
RIAs Methods And Techniques
RIAs Methods And Techniques JavaScript It is the first major client side... is cross-platform and quite powerful to create an application user interface. Flash user interface can be compiled by MXML (a XML based interface description
Interface - Java Interview Questions
( variables with static and final declarations ). All the methods in an interface... they can not be directly instantiated. To define the methods of an interface...Interface  Respected sir why we use Interface in java? because we
Application of Bioinformatics in various Fields
Application of Bioinformatics in various Fields       Bioinformatics is the use..., biochemistry), and a core set of problem-solving methods (e.g., computer algorithms
sendRedirect In JSP
sendRedirect In JSP          sendRedirect() method is a method of HttpServletResponse interface. When a client sends a request for a particular page
Identify the use and behavior of the MessageDrivenContext interface methods.
interface methods. Prev Chapter 10. Message-Driven Bean Component... of the MessageDrivenContext interface methods... interface has the following methods
Httpservletresponse null pointer exception.
Httpservletresponse null pointer exception.  What is Httpservletresponse null pointer exception?   NullPointerException occurs when we try to implement an application without referencing the object and allocating
Java ServletContext Interface
Java ServletContext Interface In this tutorial, we will discuss about ServletContext Interface. ServletContext Interface : ServletContext defines set of methods that helps servlet to communicate with its servlet container
Java ServletResponse Interface
Java ServletResponse Interface In this tutorial, we will discuss about ServletResponse Interface. javax.servlet.ServletResponse Interface : It is defined... and javax.servlet.http. ServletResponse interface defines object to send response
Java ServletConfig Interface
this interface. This interface has following four methods - getInitParameter...Java ServletConfig Interface In this tutorial, we will discuss about ServletConfig Interface. ServletConfig Interface : The servlet container uses
Interface in JSP
;    In interface none of its methods are implemented. All the methods are abstract. There is no code associated with an interface. In an interface all the instance methods are public and abstract. Interfaces are always
stateless session bean with methods error - Java Beginners
stateless session bean with methods error  I have to create stateless session bean with 3 methods and then create a servlet which remotely calls all three methods in that session bean. I have 4 files created-index.jsp under web
Java ServletRequest Interface
Java ServletRequest Interface In this tutorial, we will discuss about Servlet Request Interface. ServletRequest Interface : ServletRequest interface... methods ServletRequest provides - getAttribute(java.lang.String name
Caching HttpServletResponse's content.
Caching HttpServletResponse's content.  I am trying to cache the response using Filter. I have extended HttpResponseWrapper. It has issues with flushing the streams. If you hit the service for the first time, it fetches the data
interface_querry
interface_querry  By using interface we have to implement all unimplemented methods into our class, even though we are not using all of methods, what is the alternative
Java interface
Java interface  What must a class do to implement an interface?  It must provide all of the methods in the interface and identify the interface in its implements clause
marked interface
marked interface  how jvm work with marked interface?(that means how it will know its behaviour with out any methods)   Hi, Learn it at Market Interface in Java tutorial page. Thanks
Interface in java
Interface in java  An Interface method implemented in more than one different class with same method name. To avoid overriding of methods, we use ObjectReference for that class
Abstract and Interface
of methods but does not implement them. A class that implements the interface agrees to implement all of the methods defined in the interface Difference Between Interface and Abstract Class 1)Main difference is methods of a Java interface
collection interface
collection interface  methods of collection interface and their description with example program?   Please visit the following links: http://www.roseindia.net/java/jdk6/Collection-Interfaces.shtml http
collection interface
collection interface  methods of collection interface and their description with example program?   Please visit the following links: http://www.roseindia.net/java/jdk6/Collection-Interfaces.shtml http
Markable Interface
Markable Interface  In Java can we create our own Markable Interface?? If yes then how, Please explain with example   Marker interface : In java language programming, interfaces with no methods are known as marker
Set interface
Set interface  hello,, What is the Set interface?   hii, The Set interface provides methods for accessing the elements of a finite... is the example of Set Interface in Java. import java.util.*; public class
Final Methods - Java Tutorials
The final Keyword in Java In Java, final keyword is applied in various context. The final keyword is a modifier means the final class can't be extended... methods The final method  can be declare as follows: public final String
java interface
java interface  Create a interface called student Define methods like get roll number Get name Get subject Create two classes Electronic student And history student Enter 5 students in the main class 2 of history and 3 elec
Set Interface
. It permits a single element to be null. The Set interface contains only methods... to methods of  the Set interface, it also provides two following methods...Set Interface      
Marker Interface,Java Marker Interface
  Methods An interface contains all the methods... Interface in Java       In this section we will learn about Interface and Marker Interfaces in Java
Callback Methods
Callback Methods       Callbacks methods are the way of managing life cycle of an instance. Callback methods are generally used by containers. The methods are called at specific time
Interface in java with example
We are going to discuss about Interface in Java. Interface is blueprint of a class. Interface is a collection of abstract methods. Interface has only... it by other interface. We can extend one or more other interfaces but cannot
PHP Magic Methods
Magic Methods in PHP: In PHP there are so many methods are included in recent versions, magic methods are one of them. The magic methods are listed below..._state() __clone() In the above list of the magic methods it is very
Interface vs abstract class
Interface vs abstract class  Hai, Is there any possible to defining abstract methods in Interface
Implement the Serializable Interface
Implement the Serializable Interface  hii How many methods do u implement if implement the Serializable Interface?   hiii, The Serializable interface is just a "marker" interface, with no methods of its own
Interface in java
. Interface methods are by default public and abstract, you can explicitly declare... methods must not declare static. Interface have all methods abstract so...An interface must be declared with the keyword interface. An interface is 100
methods
methods  PrintStream class has two formatting methods,what