This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads 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: 18531
61
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!