• 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

iPlanet deployment

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My application will move a file to a network folder. I've successfully tested it using my local IDE. But when I deployed it to our iPlanet web server, it fails.

I've defined the network folder in a property file:
NETWORK_FOLDER \\\\123.45.678.91\\TEST_FOLDER\\

In the application, I've used the File object to move the file and extracted the NETWORK_FOLDER string:

File file = new File("E:\\test.pdf");
file.renameTo("\\123.45.678.91\TEST_FOLDER\" + "test.pdf");

I wouldn't know if it has something to do with the web server. The server and network folder is housed in a Windows environment.

Hope you guys can help.

Thanks.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Whizzard Kid",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with display names get deleted, often without warning

thanks,
Dave
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
your renameTo line doesn't appear to escape the slashes
 
Babert KirkPatrick
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David,

Sorry about the backslash. I just typed it as the end result of extracting the String from the property file (\\\\123.45.678.91...).

Regards.
 
Babert KirkPatrick
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just learned that renameTo() doesn't work on different filesystems.
So, I changed from using renameTo() to the usual I/O way (input and output streams). Now, I'm getting an exception with "Access Denied" as the message.

What did I miss?
 
If you're gonna buy things, buy this thing and I get a fat kickback:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic