File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes two URLConnection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "two URLConnection" Watch "two URLConnection" New topic
Author

two URLConnection

Zoe Peng
Ranch Hand

Joined: Nov 27, 2000
Posts: 112
Does it possible to have two URLConnection in the same jsp
or jave file?
thx.
Andrew Shafer
Ranch Hand

Joined: Jan 19, 2001
Posts: 338

I don't really understand your question.
You can obviously link to more than one URL.
Rephrase your question.


!_I_Know_Kung_Fu_!
Zoe Peng
Ranch Hand

Joined: Nov 27, 2000
Posts: 112
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();
 
 
subject: two URLConnection
 
Similar Threads
about servlet making
Please Help
from a applet how can i call a servlet??
Java, Send URL, Get URL
Hitting a JSP from a Servlet