• Post Reply Bookmark Topic Watch Topic
  • New Topic

Opening a socket connection on client machine  RSS feed

 
sunil kumre
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I'm writing a jsp(which will shortly be uploaded on our server).Now what i'm trying to do is when a client requests this jsp this jsp would hold the logic to open a socket connection to the client(which has made a request)and write or read a file to/from the client.
I want to achieve this without any client side coding/installation.
this is what i tried writing:
Socket client=new Socket(InetAddress.getByName(request.getRemoteAddr()),1500);
But everytime it gives : Connection refused
Can anyone help?Is there another way of doing it?
Thanks in advance.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fortunately that's not possible. Think of the security implications! The situation with viruses, worms, Trojans and other vermin is bad enough as it is.
- Peter
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!