On Thu, 2006-04-27 at 17:05 +0100, Allistair Crossley wrote: > Hi, > > I am trying to determine why connecting to a URL works when running as a > standalone class and does not from within Tomcat. I imagine it's a > permissions issue but some guidance would be appreciated. > > I am using NTLM as follows; > > HttpClient client = new HttpClient(); > client.getHostConfiguration().setProxy(proxy, port); > NTCredentials ntCreds = new NTCredentials(user, pass, server, domain); > client.getState().setProxyCredentials(null, "PROXY", ntCreds); > HttpMethod method = = new GetMethod(url); > > As I say, running in a standalone class I get a 200 response and content > back from the target URL. As soon as I copy the exact same code to a JSP > and run within Tomcat, I get a > > 407 Proxy Access Denied > > Your advice appreciated, ADC. >
Allistair, Produce and compare the wire logs of two sessions (the standalone one and the one running inside the servlet container). This should help you pinpoint the difference and determine the cause of the problem. Hope this helps Oleg > > <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> > ------------------------------------------------------- > QAS Ltd. > Registered in England: No 2582055 > Registered in Australia: No 082 851 474 > ------------------------------------------------------- > </FONT> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLACK> > Disclaimer: The information contained within this e-mail is confidential and > may be privileged. This email is intended solely for the named recipient > only; if you are not authorised you must not disclose, copy, distribute, or > retain this message or any part of it. If you have received this message in > error please contact the sender at once so that we may take the appropriate > action and avoid troubling you further. Any views expressed in this message > are those of the individual sender. QAS Limited has the right lawfully to > record, monitor and inspect messages between its employees and any third > party. Your messages shall be subject to such lawful supervision as QAS > Limited deems to be necessary in order to protect its information, its > interests and its reputation. > > Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS > Limited cannot guarantee that attachments are virus free or compatible with > your systems and does not accept any liability in respect of viruses or > computer problems experienced. > </FONT> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
