• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Client Issue

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello


here i need to save a text file to the client machine. i have client IP address as \\192.168.1.103

by using the address am saving file from my hard drive to another machine..

here my code.but am not able to save the file..

may i know the problem triggers here??? please let me know ?


 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your J2EE Application cannot access Harddrive of your client .

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,

You can not access the hardware of your client just by knowing clien's IP address.

You can do one thing here.

Write the server program using sockets and run the application at client machine(Socket server application running at
some port and accepting clients).
You can connect to the clent machine by socket client program and send you file object over socket connection
and then sever program can receive the file object and save to hard disk.

If you have more clinets every client machine should run this socket server application.

I think this might help you...

Thanks,
Krishna Jonnabhatla
 
Mani kan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No No

i can save the file through the network driver, with the help of this code.but i need to change the path param in web.xml


when i deploy my WAR file in to tomcat server. i cannot save a file..normally it works..please sort out my issue??





here my jsp code..
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ravi Kiran Va wrote:Your J2EE Application cannot access Harddrive of your client .



Well, a "JEE Application" encapsulates a lot of technologies - so it is possible to interact with client machines. Servlet applications on the other hand typically can't access the client. I say typically since you'll notice Mani uses a path to a networked device. Assuming all appropriate permissions are set up, this code could save a file there.

 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


<context-param>
<description>Location to store uploaded file</description>
<param-name>file-upload</param-name>
<param-value>\\192.168.1.103\d\
<!--C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\data\-->
</param-value>
</context-param>



That path looks suspicions. For one, it requires a fixed IP address for the client (do you have one?). It also requires a share called "d" - do you have that too?
 
My pie came with a little toothpic holding up this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic