Solved

Using HttpURLConnection/Apache Http Client on particular outbound port

Posted on 2009-04-13
2
890 Views
Last Modified: 2013-11-21
Hi,
    I use HttpURLConnection and Apache HttpClient in program which submits data to the web server. Whenever the http connection is established b/w client program and web server. the client uses different outbond port on client side. Is there a way for fixed outbond port. B'cos client machine is behind firewall which restricts the random outbond port used by program.
Regards,
Nirav Pradhan

0
Comment
Question by:Nirav_Pradhan
2 Comments
 
LVL 16

Expert Comment

by:The--Captain
ID: 24128754
If you don't see it in the documentation for the API, then no, you probably cannot specify the source port.  I'm guessing there might be lower-level TCP/IP APIs you could access to get this done (if this is a web applet, the security manager might be annoying (is that a problem anymore?)  I haven't written java code in over a decade), but you might end up having to re-invent the wheel (or at least become a serious code-scavenger) in order to implement HTTP protocol functionality while being able to specify a source port.

Does that help at all?

Cheers,
-Jon
0
 

Accepted Solution

by:
Nirav_Pradhan earned 0 total points
ID: 24128813
Dear Jon,

      You're telling its not possible to do so. Even if its possible, I might have to develope myself. I like to do, but the time doesnt permit so. If you get some idea suggest me. I have one solution, that is using proxy server at client machine. Is it correct? The server application runs on particular port, why cant it be possible for the client? If it is, pls suggest how its done.

Regards,
Nirav Pradhan
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
topping3 challenge 14 51
what is a "java.lang.System Property"   ? 20 39
Linux as a middle box 7 28
Java JRE greater than 1.6 5 23
This is an article about my experiences with remote access to my clients (so that I may serve them) and eventually to my home office system via Radmin Remote Control. I have been using remote access for over 10 years and have been improving my metho…
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now