Networking Section Index | Page 2
I am using URLConnection to simulate a browser HTTP POST. However, the website (ebay) claims I cannot accept cookies? I have tried setting the "User-Agent", "Referer" fields etc...What am I doing wrong? How do I accept cookies? A code sample would be much appreciated.
I am using URLConnection to simulate a browser HTTP POST. However, the website (ebay) claims I cannot accept cookies? I have tried setting the "User-Agent", "Referer" fields etc...What am I doin...more
On a linux machine to get the local IP address.
I'm doing this:
try {
InetAddress address = InetAddress.getLocalHost();
String IP = new String (address.getHostAddress());
}
catch (Exception e) {
e.printStackTrace();
}
on a li...more
This doubt has been there in my mind regarding socket-port relationship that whether a port is associated with only one unique socket object or multiple socket objects can be associated with a single port?
This doubt has been there in my mind regarding socket-port relationship that
whether a port is associated with only one unique socket object or multiple socket objects can be associated with a sing...more
Here is my question: I have a java serversocket application staying on a windows machine, and listening a certain port say 1111. Can I using other window's application (written in Delphi, for example) to connect this java socket and send information to, or receive response from this java application? I tried, however, I can't read anything from a client( written in Delphi).
It shouldn't make a difference what language you write your server/clients in so long as they use TCP/IP sockets. Are you sure that you are not, for example, trying to create a server socket on bo...more
In Java, is there any way of getting all the IP addresses associated with a multi-homed system?
Support has been added in JDK1.4.
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Enumeration;
public class Addrs {
...more
I have a Dialup connection with a Ethernet Lan card . When I have dialed up and connected to the Internet I need to know what IP address is assigned to me by the ISP. Please if anyone could help me out on this.
Wow, that is a tough problem. You want to get the IP the way the rest of the internet see it!
Have you tried:
InetAddress.getAllByName(InetAddress.getLocalHost().getHostName())
This would get...more
I need to build a small application to detect a ftp server's operating system and also it's server. Until now, I can only detect a web server's server but not the operating system (and not a ftp server :( ). Can anyone help me out?
You have to check for port 21 to see whether a FTP server exists on a host. You can connect to that port and then use the 'SYST' command. For more details check out RFC 959 more
I want to monitor some network-printer status via java, maybe tcp/ip ....
I want to monitor some network-printer status via java, maybe tcp/ip ....
Could you help on this?
I was wondering if anyone had any ideas on if or how you can implement bandwidth throttling with java?
I was wondering if anyone had any ideas on if or how you can implement bandwidth throttling with java? To clarify, how can I give my app the ability to give itself more or less of the available in...more
I am trying to send a multipart/related message through http post method using URLConnection.
I am trying to send a multipart/related message through http post method using URLConnection.
When i set the setRequestProperty as below
http.setRequestProperty("Content-Type","multipart/related;bo...more
I am using a servlet on a high-volume web server.
I am using a servlet on a high-volume web server. Occassionally a back-end service which I am making frequent connections to goes down or network problems make it unavailable. When that occurs my o...more
I want to emulate this form :
I want to emulate this form :
<FORM ENCTYPE="multipart/form-data" ACTION="objet.php3" METHOD="POST">
<INPUT NAME="ListFile" TYPE="File">
<INPUT NAME="FileSubmited" VALUE="SEND" ...more
I'm having some thoughts of how to write a wrapperclass to the Socket-class.
I'm having some thoughts of how to write a wrapperclass to the Socket-class. The new class should act as the Socket-class, but in some methods it should do something more than the usual Socket.
A...more
Is there any open source Java ICQ client that supports sending SMS ?
Is there any open source Java ICQ client that supports sending SMS ?
Where can I get some code examples demonstrating the use of J2SE 1.4's non-blocking I/O API for a client/server application?
John Zukowski's article New I/0 Functionality for Java 2 Standard Edition 1.4 in Sun's Java Developer Connection contains some good examples of the usage of the non-blocking I/O API for client/ser...more