From: Bhanu S. <bha...@gm...> - 2006-03-12 16:37:21
|
First, about your comments : A) Yes, I do mean forward the page requests to webserver B. B) Well, I WAS toying with the idea of parsing all links in the document returned and re-writing the urls (we may not have that many).....HOWEVER there may be a way around if I can get 1) below to work ? Now...about your questions: 1) Maybe I misunderstand Jetty proxy setup - but from the way *I* understan= d it, the proxy has a 'whiteHostsList' and 'blackHostsList' with which we can control which sites can be visited. However, what I would like to do is something like this : If we have 2 urls say http://localhost/abc.jsp and http://localhost/def.jsp - I would like abc.jsp to be served up by my Jetty webserver, but def.jsp request needs to be forwarded to def.PHP on webserve= r B. What I am not sure about is, how to specify some sort of filtering wher= e ONLY def.jsp request will be forwarded to webserver B and others will be displayed by Jetty (there may be several ways to do this). I cannot directly redirect def.jsp as that would be routed differently to B, and I may not have access (firewall settings etc.). 2) Yes, the pages in B are written knowing this is how they will be used - with relative URLs. 3) It's the user as a person who should not know about B. That's the only requirement. I am trying to avoid replicating functionality on Jetty, by directly using what's already in B. Thanks in advance....any input on this is appreciated ! Cheers, Bhanu. On 3/12/06, Chris Haynes <ch...@ha...> wrote: > > Three questions and two comments: > > 1) In what way(s) is Jetty as a proxy not the complete solution? > 2) Have the pages on B been written _knowing_ that they are to be used in > this way, e.g. all URLs relative? > 3) Is it the User as a person who should not know about B or must it be > hidden from the user's client as well? > > A) I think you must mean: "and forward those *page requests* to another > webserver B" > B) What do you mean by: "parse/overwrite the url returned" ? > B returns a document (image, style sheet etc.) not a URL. > I hope you don't intend to search the returned document for all embedded > URLs and convert them! > > Chris Haynes > > *From:* Bhanu Subramaniam <bha...@gm...>* asked:* > > > > Hello, > > I am using Jetty as the webserver for our application, and am now trying > to use Jetty to do something like this: > > 1) For MOST requests, the current Jetty webserver should serve my jsp > pages. > > 2) However, for CERTAIN pages, I want Jetty to display webpages running o= n > ANOTHER webserver B. Essentially I need to filter on the url of some pag= es, > and forward those pages to another webserver B. Then, I would need to be > able to parse/overwrite the url returned from webserver B, so that it's n= ot > evident to the user that it's coming from a different webserver - the use= r > should not know that these pages are actually on a different webserver. > > What is the best way to accomplish something like this with Jetty ? > > P.S: I took a quick look at Jetty as a proxy, and was able to use it as a > proxy. But that alone is not a complete solution in this case. > > Thanks, > Bhanu. > > |