Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Servlets and the fly likes How to send response directly to client via intermediate servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to send response directly to client via intermediate servlet" Watch "How to send response directly to client via intermediate servlet" New topic
Author

How to send response directly to client via intermediate servlet

Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
Hi all,

I have the following things,
1. html page having Ajax calls to my servlet
2. servlet hits an external URL
3. servlet reads the externals URL's data completely
4. servlet writes the whole data to the client (browser that made Ajax call)

Now, I want to eliminate this servlet reading complete data from the URL and somehow say that "URL's output should directly go to the client's output"...
Basically I want to have client and destination directly connected AFTER client connects to the servlet.

The reason I have to use the servlet in between is Ajax sandbox which doesn't allow me connect to some server directly other than where it came from (just like Applet). BUT this intermediate servlet is making things slower as I have to read complete data and write the data to client.

Please let me know if I have to explain more.

Regards,
Maulin
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to send response directly to client via intermediate servlet
 
Similar Threads
send data from servlet to printer
AJAX, JSF and security
Response as PDF
Eating the Beans with a side of Servlets
encodeURL for static image path