General discussion

Locked

Writing To A Protected Directory

By elias_barreto ·
I am trying to write a file to a protected directory on a file server in java. My code looks like this:

HttpServletRequest httpRequest = (HttpServletRequest) request;
HttpServletResponse httpResponse = (HttpServletResponse) response;
PrintWriter out = httpResponse.getWriter();

File write = new File("\\\\nyfs1.imclone.com/research/Shared/Sciop/" + fname);
OutputStream fileOut = new FileOutputStream(write);
fileOut.write(buffer);

I am getting a handle invalid error. Then it says file can't be found. If I write to a public folder, the file gets written to just fine. How would I provide the credentials (username and password) so that I can write the file to the directory?

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums