<%@ page import="java.util.*, java.io.*, com.sun.eportal.FundInfo " %>
<%!Vector fundsVector = new Vector(); %>
<%
double monthlyInvestment=0.0;
Enumeration pn = request.getParameterNames();
Vector fundInfoVector = new Vector();
while ( pn.hasMoreElements( ) )
{
String paramName = (String)pn.nextElement();
String paramValue = (String)request.getParameter( paramName );
if ( ( paramName.endsWith ( "Percent" ) ) && ( paramValue != null ) && (!paramValue.trim().equals("" ) ) )
{
FundInfo fundInfo = new FundInfo ( paramName.substring(0, paramName.indexOf("Percent") ) , paramValue );
fundInfoVector.addElement( fundInfo );
}
if ( paramName.equals("monthlyInvestment") )
{
if ( ( paramValue== null ) || ( paramValue.trim().equals("" ) ) )
{
System.out.println("ERROR : You need to select some monthly investment value" );
return;
}
monthlyInvestment= new Double( paramValue ).doubleValue();
}
System.out.println( paramName + " = " + paramValue );
}
FundInfo[] fundInfoArray = new FundInfo[ fundInfoVector.size() ];
fundInfoVector.copyInto ( (Object[]) fundInfoArray );
Hashtable quoteHash = fundLister.getAllQuotes( fundInfoArray, monthlyInvestment );
%>