On Tue, 2009-11-10 at 12:13 +0100, Juanjo wrote: > The environment was updated to: > > Linux 2.6.18 > JDK 1.6.0_16-b01 > Tomcat 6.0.20 > > and the programs doesn't run. > The same error. > > Juanjo > >
Use context / wire logging to examine the HTTP session and find out why your application behaves differently in different environments. http://hc.apache.org/httpcomponents-client/logging.html Oleg > > > > > Hi, > > In windows using tomcat 6.0 and jdk 1.6, my program runs properly. It > connect to a website by post, sending parameters, that return a 302. Then, > It reads the Location head an makes a Get call. > > When I deploy this program in linux with tomcat 5, the location head > returns the home url, not the right one. > > This is the code: > > HttpClient client = new DefaultHttpClient(); > HttpPost req = new HttpPost(http://www.theweb.com); > List<NameValuePair> formparams = new ArrayList<NameValuePair>(); > formparams.add(new BasicNameValuePair("aaa","sss")); > ... > UrlEncodedFormEntity param = new UrlEncodedFormEntity(formparams); > req.setEntity(param) > HttpResponse res = client.execute(req) > entity =res.getEntity(); > Header loc = res.getFirstHeader("Location"); > > .... > > > Another program that do the same but no redirection and using > BasicResponseHandler runs properly in both systems. > > > Please help, > > Tanks > > Juanjo --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
