File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes HttpServletResponse and HttpServletRequest Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HttpServletResponse and HttpServletRequest" Watch "HttpServletResponse and HttpServletRequest" New topic

HttpServletResponse and HttpServletRequest

sohaib rahman

Joined: Jun 01, 2010
Posts: 20
What is the use of HttpServletResponse and HttpServletRequest?
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

To respectively represent an http request and an http response. If you've never heard about that, you need to read some basics about the http protocol. There are some explanation at Wikipedia.

[My Blog]
All roads lead to JavaRanch
David Newton

Joined: Sep 29, 2008
Posts: 12617

Did looking them up not help at *all*?! Is this an interview question? If so, I'm baffled for multiple reasons: if you're interviewing for a position for which you'd be asked this, I'd be concerned if you didn't know. If you didn't know, I'd be concerned you couldn't just look it up.
Alpesh Padra
Ranch Hand

Joined: Jan 10, 2010
Posts: 41
We should not discourage anybody.

Its part of HTTP protocol for communication between server and client.
I agree. Here's the link:
subject: HttpServletResponse and HttpServletRequest
It's not a secret anymore!