<%@ 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 ); %>
Requested Funds <% for ( int rf=0; rf< fundInfoArray.length; rf++ ) { FundInfo fi = fundInfoArray[rf]; String fn = fi.getFundName(); String fp = fi.getFundPercent(); String hiddenFundName = "MYFUNDNAME_" + rf ; String hiddenFundPercent = "MYFUNDPERCENT_" + rf ; %> <% } %>
Fund Name Fund Percent
<%= fn %> <%= fp %>
Monthly Investment <%= monthlyInvestment %>

Quotes Received <% Enumeration keys = quoteHash.keys(); while ( keys.hasMoreElements( ) ) { String endpoint = (String)keys.nextElement(); Double quoteD = (Double)quoteHash.get( endpoint); %> <% } %>
End Point Service Fee($)
<%= endpoint %> <%= quoteD %>