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

servlet chaining , HTTP tunneling.......

Priya Sri
Ranch Hand

Joined: Mar 30, 2004
Posts: 84
hi friends,

I have been asked these questions in an interview.

1) what is meant by servlet chaining ?

2) what is meant by HTTP tunneling ?

3) what is the difference between servlet context and servlet config ?
What are the advantages of them ?

if anybody knows well, clarify me....

Thank u...
unni krishna
Ranch Hand

Joined: Jul 14, 2004
Posts: 39
servlet chaining - In servlet chaining, the output of the first servlet is send as input to the second servlet and so on. A simple eg - when a request comes in servlet A process the request first and then forwards it to servlet B. Servlet B, after further processing, sends the response to the client.

request ---> Servlet A ---> Servlet B --- > response

HTTP Tunneling - HTTP tunneling is technique of sending Objects through a HTTP request. HTTP protocol is indended to be used for sending HTML text only. But by using HTTP tunneling we can send Java Objects thru HTTP.

ServletContext is the pointer to the container.
ServletConfig contains the configuration information specific to a servlet.
We get ServletContext from servletconfig, servletconfig.getServletContext().

if u have further questions, get in chat with me at

Software Engineer (SCJP)<br />USTechnology, CA
I agree. Here's the link:
subject: servlet chaining , HTTP tunneling.......
jQuery in Action, 3rd edition