3 Replies Latest reply on Jan 30, 2007 7:49 AM by Marco Huber

    Tomahawk File Upload

    Yogesh Novice

      Hello ....


      I am using tomahawk for uploading files in a SEAM application ... I followed the guide on

      http://www.onjava.com/pub/a/onjava/2005/07/13/jsfupload.html?page=1


      An example of my code in the uploadBean is as follows:

      
       public void importActions() throws FileNotFoundException, IOException{
       this.upload();
       String path=this.uploadFile.getName();
      
       CSVReader reader = new CSVReader(new FileReader(path));
      
       List<Action>importList = new LinkedList<Action>();
      
      
      
       String [] nextLine;
      
       while ((nextLine = reader.readNext()) != null) {
       Action instance = new Action();
      
       String instanceName = nextLine[0];
       instance.setActionId(actionDAO.getNewActionId());
       instance.setActionIndex(actionDAO.getNewActionIndex());
       instance.setActionName(instanceName);
      
       if(actionDAO.IsActionNameValid(instanceName)){
       actionDAO.merge(instance);
       }
       Events.instance().raiseEvent("refreshActions");
       }
       }
      
      


      This method correctly uploads a csv file on to the specified directory on the machine where the jboss AS is running .... Everything worked fine as long as the application was running on my local machine !!


      When i deployed the application onto one of our remote servers, the file upload process failed as the filepath variable assigned as the file path of the file which is found on pc !!


      Can anyone tell me how to retrieve the filePath of the file which has been uploaded on the remote server itself ?/

      Regards,
      Yogesh