This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Problem with File Being Written Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem with File Being Written" Watch "Problem with File Being Written" New topic
Author

Problem with File Being Written

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
The following code works great on my local host server but will not work on the production server. I call the class from a JSF.

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

And what are the symptoms of its not-workingness?
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
The file never gets writen to the location specified when ran on the production server.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19654
    
  18

What is the value of this.fileName?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
The value is:
\\gvsvr03\drawings\wgen\pre_pdf\sourcefiles\862000\862428-001B1.rtf
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

And are there any error messages in your logs? That looks to me like a Windows UNC path, and it's possible that the server it refers to isn't configured to allow your production server to write to that directory.
 
 
subject: Problem with File Being Written
 
Similar Threads
Have I found an error with the jaworski mock exam
writing to a file
Get file and getBytes()
About InputStream
writing a file from a byte array