read a file path from web application to different java project
===

Currently, I have a driver class in a regular java project which will convert a doc to text file, parse, zone, and insert it into a database.  In this project, I made a simple interaction with a menu which allows the user to 1) add 2) delete 3) exit and 4) get a document from the database.  I need a different way into the application which doesn't go through that menu but through a web application.

I am using this [demo][1].  This works great but it uploads the document path to a specified location.  I want to be able to take the file path (in which the demo allowed me to do so) but have it insert that path into my driver class in my java project where it will go through the process of  converting, parse, zone, etc.


  [1]: http://www.mkyong.com/webservices/jax-rs/file-upload-example-in-jersey/

Here is a snippet of the driver class:

    	public static void main(String[] args) throws FileNotFoundException, IOException, SQLException {
		System.out.println("Welcome to my program");
		System.out.println("Please choose from the following:");
		//print menu
		printMenu();
		//to stay in the loop
		int i = 0;
		while(i == 0){
			String choice = keyboard.nextLine();
			if(choice.equals("1")){
				
				System.out.println("Add File");
				System.out.println("Enter path of path to ingest.");
				
				Ingest ingestFile = new Ingest();
				FileDAO fileDAO = new FileDAO();
				Scanner key = new Scanner(System.in);
				String path = key.next();
				File file = ingestFile.readFile(path);
				fileDAO.addFile(file);
				printMenu();
			}

How will I be able to use the file path outputted from the web application to use in my driver class which is in a different project altogether?

Any suggestions will be greatly appreciated! Thank you!
