• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difference between solaris & windows using URL to connect to.Urgent Pls help !!!!

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,


I have a java code running perfectly on windows xp Professional Version 2002, Service Pack 2.

The code is as following:
URL url = null;
try {
url = new URL("https://somesiteonhttps");
} catch(MalformedURLException e) {
e.printStackTrace();
System.exit(1);
}
Object content = null;
try {
content = url.getContent();
} catch(IOException e) {
e.printStackTrace();
System.exit(2);
}
// The content is actually a subclass of InputStream
BufferedReader reader = null;
reader = new BufferedReader(new InputStreamReader((InputStream) content));
String line;
StringBuffer htmlDoc = new StringBuffer();
try {
while ((line = reader.readLine()) != null) {
htmlDoc.append(line);
}
} catch (IOException e) {
e.printStackTrace();
System.exit(3);
}
//extra processing here to the required information
//this is just to get some value received from the reader.
//i get the whole html from the site and it is there in htmlDoc.
//There is a field in the html which i get which is used for me next request to login into the site.

Now when i run using windows i get the field and i am able to login into the third party site on https.
when i try the same code on solaris i do get all the details, but it fails to login on the third party site.

The problem is on solaris I am getting the incorrect token value.

I tried the encoding what windows uses but still it does not work on solaris.I am using weblogic 8.1 on both the platforms. Both are configured in similar way.

Am i missing something which i have to do on solaris?
Definitly its not the problem of big-endian/little-endian.
Its urgent and if ne 1 can throw some light i wud really appreciate.
Regards,
Pramod.
 
reply
    Bookmark Topic Watch Topic
  • New Topic