answersLogoWhite

0

HttpServletRequest and HttpServletResponse are the two objects that signify the request received by a servlet and the response sent by it after it is done processing the request. Both the request and response can carry data objects (variables) that can be accessed by the entity receiving the request/response object.

They are both an integral part of J2EE Applications.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What are types of servlet?

Http servlet and Generic servlet


What use import javaxservlethttpHttpServletRequest in java?

The Http RequestWhen a user hits a URL with a servlet at the other end, the Servlet Container creates an HttpServletRequest object. It passes this object as an argument to the servlet's service methods (doPut(), doGet(), and doPost()). There is a lot of information in this object, including the login details of the user making this request and the name of the HTTP method with which this request was made.


What is persistent http with pipelining?

in persistent HTTP with pipelining browser caters to multiple http requests and it cannot wait for the response http message for the previous request.


How do you Retrieve data from drop down box in one servlet and pass to another servlet?

The data that is present in a web page is available in the Form object of the page which can be accessed from the HTTP Request. If the request object gets passed from one servlet to another the data also would get passed.


What is response in web applications?

Response is the HTTP stream sent from the Web server to the browser. Request is the HTTP stream sent from the browser to the Web server.


How does http operate?

HTTP is a request and response based protocol to transfer web contents. When you click the browser's 'go" button after putting the URL, then actually http sends the Get request to the specified web server's IP to have the request data for you-thus you see the web contents on your computer screen by the use of http.


What is generic servlet class?

GenericServlet defines a generic, protocol-independent servlet whereas HttpServlet Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site that uses the Http Protocol.


Difference between HTTP servlet and Generic servlet?

The difference is that a GenericServlet has no defined protocol (it is "generic"), while HttpServler uses the HTTP protocol. HttpServlet is a subclass of GenericServlet with the purpose of creating a servlet for a web site.


How do you create controller for a jsp page?

To create a controller for a JSP page, you typically use a servlet that handles incoming HTTP requests. This servlet processes the request, interacts with any necessary business logic or data models, and then forwards the request and relevant data to the JSP page using a RequestDispatcher. You can set attributes in the request scope to pass data to the JSP, and finally, return the response by calling request.getRequestDispatcher("yourPage.jsp").forward(request, response);. This separation of concerns helps maintain a clear architecture between the presentation layer and business logic.


What 2 different between persistent HTTP with pipelining and persistent HTTP without pipelining in communication network?

In persistent HTTP without pipelining, the browser first waits to receive a HTTP response from the server before issuing a new HTTP request. In persistent HTTP with pipelining, the browser issues requests as soon as it has a need to do so, without waiting for response messages from the server.


Is http a connection oriented protocol?

No, HTTP (Hypertext Transfer Protocol) is not a connection-oriented protocol; it is a connectionless protocol. HTTP operates over TCP, which is a connection-oriented protocol, but HTTP itself does not establish a persistent connection for communication. Each request-response cycle in HTTP is independent, meaning that after a response is sent, the connection can be closed, making it suitable for stateless transactions.


Why http is asynchronous?

HTTP is a text based protocol for exchanging data over a network, and the preferred protocol for the Internet (a.k.a. World Wide Web) HTTP is synchronous: a client issues a request and waits for the corresponding response before anything else is done. Asynchronous Javascript And XML (AJAX) is a way of using a HTTP request from the web browser to retrieve data using JavaScript, without leaving the current page. This use is said to be asynchronous because the JavaScript is making the HTTP request does not wait for the response, but instead continues any further necessary processing. A handler function is called to deal with the response, as and when it arrives. So the real answer to the question as it stands is: HTTP is not asynchronous.