• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Opening a socket connection on client machine

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic