This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

URLConnection  RSS feed

 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, the following code snippet:
URL url = new URL(http://localhost:8080/SomeContext/servlet/SomeServlet);
URLConnection con = url.openConnection();
con.setUseCaches(false);
con.getInputStream();
Will the above code get connection to localhost:8080/SomeContext/servlet/SomeServlet?
 
Ravee Bhat
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There,
Except the arguement to the constructor for URL, which should be a Sting object, the code looks fine to me.
regards
ravee.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!