|
Hi there,
This is a question to all those java gurus.
I
have a a odd situation where there are two servers, Server-A
accessible over net and Server-B behind a NAT i.e., a
system in LAN. Now when a request is made
to Server-A it has to direct the
request to Server-B which process the request. I face few problems here.
First to talk about the features in
servlets.
Two
servlets can communicate with each other using "forward" and
"include" methods of RequestDispatcher class.
But the catch
is the servlets cannot be in two different servers. A big limitations of
running applications in distributed servers.Not to use the sendRedirect()
method of the Respone object. As i was going thru few of the
the servlet forums i came accross very similar questions posted. (So can't the
java people address this problem.)
I
thought of replicating the same using the URLConnection getting the content from
one servlet and sending it to another. But again only text content of
the servlet output
is sent and not the the images which is obvious. Even if the "<img
src="... "" tags a presented with relative paths of the images that
would work fine with
servers on the same subnet or if the server from
where servlet is called is accessible over net. Thanks to Mr.
Christopher he suggested me to parse
the html document and make URLConnections
to read the images which is also not feasible as in practical situations a
page can contain more than a couple of
images and so making a URLConnection to get each of these
images is ruled out.
So
could anyone tell me if i am i missing anything or if a solution
is possible to develop or if anyone can suggest how to go about developing
a solution.
Regards,
Arvind
|
- newbie question - bdk install problem Arvind
- newbie question - bdk install problem dana tierney
