This may sound odd, but I would like advice on sending a request from one web server to another. For example, servlet S1 on web server A receives a requests and forwards it to servlet S2 on web server B. I know I can create a HttpURLConnection in servlet S1, but does anyone have any better suggestions? Thanks
Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"
Have you considered using the sendRedirect method of HttpServletResponse? You have to use it before any text has been sent - it tells the user's browser to do a new request to the specified URL. Bill
Get the ServletContext of the OTHER web app. Using this new ServletContext, create a RequestDispatcher to the servlet you want to access, and then forward your request...
Or something like this. /hs
<blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>Lance Armstrong: "What am I on? I'm on my bike, busting my ass six hours a day. What are you on?"<hr></blockquote>
Alas, poor Yorick, he knew this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss