This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

two URLConnection

 
Zoe Peng
Ranch Hand
Posts: 112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it possible to have two URLConnection in the same jsp
or jave file?
thx.
 
Andrew Shafer
Ranch Hand
Posts: 338
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I don't really understand your question.
You can obviously link to more than one URL.
Rephrase your question.
 
Zoe Peng
Ranch Hand
Posts: 112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean to open 2 connections at the same jsp page.
cos I try to re-use the parameters that I post from another files and repost to different server in order to get another contents. Thanks. I made it works already.
---
URL url = new URL ("url1");
HttpURLConnection urlConn=(HttpURLConnection) url.openConnection();
URL url2 = new URL ("url2");
HttpURLConnection urlConn2=(HttpURLConnection) url2.openConnection();
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic