Commonly used method of ServletRequest interface

1- getParameter():
                              Is used to obtain the value of request parameter.
    public String getParameter(String pName);

2- getParameterNames():                          
                               Is used to find out names of request parameters.
    public Enumeration getParameterNames();

3- setAttribute():
                                Is used to store an attribute in the request scope.
    public void setAttribute(String name, Object Attribute);

4- getAttribute():
                                Is used to obtain the value of an attribute.
    public Object getAttribute(String name);

5- getAttributeNames():
                  Is used to obtain the names of attribute store in request scope.
    public Enumeration getAttributeNames();

6- removeAttribute():
                              Is used to remove an attribute from the request scope.
    public void removeAttribute(String name);

7- getInputStream():
                  Is used to obtain an InputStream to read request data.
    public InputStream getInputStream();



Note:
getParameter             Textual Information (such as Name, Password)
getInputStream         For file uploading program, video, Audio, Large file


Comments

Popular posts from this blog

ObjectAid UML Explorer for Eclipse

Login Authentication program (Demonstrate the use RequestDispatcher and its method such as include() and forward() )

Adapter Design Pattern