Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

opening a url  RSS feed

 
payal sharma
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear java guru's
I was opening a url to a page like this.
url = new URL("http://www.webappcabaret.com/abc/report/successmail.jsp");
try {
in = new BufferedInputStream( url.openStream() );
} catch ( IOException e ) {
System.out.println( "Couldn't retrieve data from url!" );
}
But it is giving exception
So when I ask the provider about this they just said
"You CANNOT open a webappcabaret from within webappcabaret"
Is there any other way to do this?
Payal
 
Tim Holloway
Bartender
Posts: 18705
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put a
System.out.println("Exception was '" + e.getMessage() + "'" );
In your catch clause. You may find out something useful.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!