How to get a value from a Velocity generated jspa page and use it in Java?
===

I have a .jspa page generated using velocity with a form that the user would fill out, and I need to get the data from the form and use it in Java for calculations but I am not sure how to go about doing this. I can use any Java, HTML, Velocity, and Javascript but nothing else.  Below is code segments that are relevant to my question:

Velocity/HTML:

    <form name="dates">
      <table cellspacing= "3">
      	<td>Start Date: <input type="text" name="startdate" size="10" maxlength="10" value = $action.convertDateToString($action.getStartDate())></td>
      	<td>Work Days: <input type="text" name="workdays" size="6" maxlength="4" value = $action.getWorkDays()></td>
      	<td>End Date: <input type="text" name="enddate" size="10" maxlength="10" value = $action.convertDateToString($action.getEndDate())></td>
      </table>
    </form>

Java:

    //converts a Date variable to a String format to be used for display
    public String convertDateToString(Date d){
    	SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yy");
    	return formatter.format(d);
    }
    
    public int getWorkDays(){
        //needs to get the user entered value for number of works days to use when calculating the end date
        return 10;
    }
       
    public Date getEndDate(){
    	//calculates the end date based on the number of work days given and the start date
    	Calendar startCal = Calendar.getInstance();
    	startCal.setTime(getStartDate());
    	int duration = getWorkDays();
    	
    	for (int i = 1; i < duration; i++) {
    	    startCal.add(Calendar.DAY_OF_MONTH, 1);
    	    //loop through by number of work days, skipping Saturday and Sunday
    	    while (startCal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY || startCal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY)
    	      startCal.add(Calendar.DAY_OF_MONTH, 1);
    	  }
    	
    	  return startCal.getTime();
    }
    
    public Date getStartDate(){
    	setCurrProj();
    	Date startDate = version.getReleaseDate();
    	return startDate;
    }

So I have a form in which the Start Date is calculated in Java, the number of work days is entered by the user, and this value is then sent back into Java to calculate the End Date.  I am not sure how to get the data from velocity and send it back to Java.  It would be preferable if the calculations would be done as soon (i.e. automatically) as the number of work days is entered, but if a "calculate" button is necessary that also works. I am more familiar with Java and have not done much web development with Velocity or JSP before. 
