1 Reply Latest reply on Apr 2, 2004 2:50 AM by Shaun Appleton

    copying files within a servlet

    Shaun Appleton Newbie

      I have a servlet to which I pass a file name.
      I need to copy the file to another location (both server side). I'm happy that my copy code works provided the directory I'm copying to already exists (manually created). When I try and copy the file with a full directory path in front of it, it fails. If I try and create the directory within code that again fails.
      It only works with the full path if the full path already exists or it has no path. In which case it copies the file to the %JBOSS_HOME%/bin directory.

      Is the server side file system locked out for servlets (except for %JBOSS_HOME%/bin)? If so is there a way to open up?

      Thanks in advance,

      Shaun