geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hogst...@apache.org
Subject svn commit: r395900 [2/5] - in /geronimo/daytrader/trunk: ./ modules/derby/ modules/ear/ modules/ejb/ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/ modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/direct/ modules/ejb/s...
Date Fri, 21 Apr 2006 14:36:27 GMT
Modified: geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java
URL: http://svn.apache.org/viewcvs/geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java?rev=395900&r1=395899&r2=395900&view=diff
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java (original)
+++ geronimo/daytrader/trunk/modules/web/src/main/java/org/apache/geronimo/samples/daytrader/web/TradeServletAction.java Fri Apr 21 07:36:22 2006
@@ -31,706 +31,707 @@
 import org.apache.geronimo.samples.daytrader.*;
 
 /**
- * TradeServletAction provides servlet specific client side access to each of the Trade
- * brokerage user operations. These include login, logout, buy, sell, getQuote, etc.
- * TradeServletAction manages a web interface to Trade handling HttpRequests/HttpResponse objects 
- * and forwarding results to the appropriate JSP page for the web interface.
- * TradeServletAction invokes {@link TradeAction} methods to actually perform
- * each trading operation.
- *
+ * TradeServletAction provides servlet specific client side access to each of
+ * the Trade brokerage user operations. These include login, logout, buy, sell,
+ * getQuote, etc. TradeServletAction manages a web interface to Trade handling
+ * HttpRequests/HttpResponse objects and forwarding results to the appropriate
+ * JSP page for the web interface. TradeServletAction invokes
+ * {@link TradeAction} methods to actually perform each trading operation.
+ * 
  */
 public class TradeServletAction {
 
-	private TradeServices tAction = null;
+    private TradeServices tAction = null;
 
-	TradeServletAction()
-	{
-		if(TradeConfig.getAccessMode() == TradeConfig.STANDARD)
-			tAction = new TradeAction();
-		else if(TradeConfig.getAccessMode() == TradeConfig.WEBSERVICES)
-			tAction = new TradeWebSoapProxy();
-	}
-
-	/**
-	 * Display User Profile information such as address, email, etc. for the given Trader
-	 * Dispatch to the Trade Account JSP for display
-	 *
-	 * @param userID The User to display profile info
-	 * @param ctx the servlet context
-	 * @param req the HttpRequest object
-	 * @param resp the HttpResponse object
-	 * @param results A short description of the results/success of this web request provided on the web page
-	 * @exception javax.servlet.ServletException If a servlet specific exception is encountered
-	 * @exception javax.io.IOException If an exception occurs while writing results back to the user
-	 * 
-	 */
-	void doAccount(
-		ServletContext ctx, 
-		HttpServletRequest req, 
-		HttpServletResponse resp, 
-		String userID, 
-		String results)
-		throws javax.servlet.ServletException, java.io.IOException {
-		try
-		{
-				
-			AccountDataBean accountData = tAction.getAccountData(userID);
-			AccountProfileDataBean accountProfileData = tAction.getAccountProfileData(userID);
-			Collection orderDataBeans = tAction.getOrders(userID);
-			
-			req.setAttribute("accountData", accountData);
-			req.setAttribute("accountProfileData", accountProfileData);
-			req.setAttribute("orderDataBeans", orderDataBeans);			
-			req.setAttribute("results", results);
-			requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.ACCOUNT_PAGE));
-		}
-		catch (java.lang.IllegalArgumentException e)
-		{ //this is a user error so I will 
-			//forward them to another page rather than throw a 500
-			req.setAttribute("results", results + "could not find account for userID = " + userID);
-			requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.HOME_PAGE));
-			//log the exception with an error level of 3 which means, handled exception but would invalidate a automation run
-			Log.error(
-				"TradeServletAction.doAccount(...)", 
-				"illegal argument, information should be in exception string", 
-				e);
-		}
-		catch (Exception e)
-		{
-		//log the exception with error page
-			throw new ServletException("TradeServletAction.doAccount(...)"
-					+ " exception user ="
-					+ userID, 
-					e); 
-		}
-
-	}
-	/**
-	 * Update User Profile information such as address, email, etc. for the given Trader
-	 * Dispatch to the Trade Account JSP for display
-	 * If any in put is incorrect revert back to the account page w/ an appropriate message
-     *
-	 * @param userID The User to upddate profile info
-	 * @param password The new User password
-	 * @param cpassword Confirm password
-	 * @param fullname The new User fullname info
-	 * @param address The new User address info
-	 * @param cc The new User credit card info
-	 * @param email The new User email info
-	 * @param ctx the servlet context
-	 * @param req the HttpRequest object
-	 * @param resp the HttpResponse object
-	 * @exception javax.servlet.ServletException If a servlet specific exception is encountered
-	 * @exception javax.io.IOException If an exception occurs while writing results back to the user
-	 * 
-	 */
-	void doAccountUpdate(
-		ServletContext ctx, 
-		HttpServletRequest req, 
-		HttpServletResponse resp, 
-		String userID, 
-		String password,
-		String cpassword,
-		String fullName, 
-		String address, 
-		String creditcard, 
-		String email)
-		throws javax.servlet.ServletException, java.io.IOException {
-		String results = "";
-
-		//First verify input data
-		boolean doUpdate = true;
-		if ( password.equals(cpassword) == false )
-		{
-			results = "Update profile error: passwords do not match";
-			doUpdate = false;
-		}
-		else if (   password.length() <= 0 ||
-					fullName.length() <= 0 ||
-				     address.length() <= 0 ||
-				  creditcard.length() <= 0 ||
-				       email.length() <= 0
-				) 
-		{
-			results = "Update profile error: please fill in all profile information fields";
-			doUpdate = false;
-		}
-		AccountProfileDataBean accountProfileData = new AccountProfileDataBean(userID, password, fullName, address, email, creditcard);
-		try
-		{
-			if (doUpdate)
-			{
-				accountProfileData = tAction.updateAccountProfile(accountProfileData);
-				results = "Account profile update successful";
-			}
-			
-		}
-		catch (java.lang.IllegalArgumentException e)
-		{ //this is a user error so I will 
-			//forward them to another page rather than throw a 500
-			req.setAttribute("results", results + "invalid argument, check userID is correct, and the database is populated" + userID);
-			Log.error(
-				e, 
-				"TradeServletAction.doAccount(...)", 
-				"illegal argument, information should be in exception string", 
-				"treating this as a user error and forwarding on to a new page");
-		}
-		catch (Exception e)
-		{
-		//log the exception with error page
-			throw new ServletException("TradeServletAction.doAccountUpdate(...)"
-					+ " exception user ="
-					+ userID, 
-					e); 
-		}
-		doAccount(ctx, req, resp, userID, results);
-	}
-	
-/**
-	 * Buy a new holding of shares for the given trader
-	 * Dispatch to the Trade Portfolio JSP for display 
-	 *
-	 * @param userID The User buying shares
-	 * @param symbol The stock to purchase
-	 * @param amount The quantity of shares to purchase
-	 * @param ctx the servlet context
-	 * @param req the HttpRequest object
-	 * @param resp the HttpResponse object
-	 * @exception javax.servlet.ServletException If a servlet specific exception is encountered
-	 * @exception javax.io.IOException If an exception occurs while writing results back to the user
-	 * 
-	 */
-void doBuy(
-	ServletContext ctx, 
-	HttpServletRequest req, 
-	HttpServletResponse resp, 
-	String userID, 
-	String symbol, 
-	String quantity)
-	throws ServletException, IOException {
-
-	String results = "";
-
-	try
-	{
-		OrderDataBean	orderData = tAction.buy(userID, symbol, new Double(quantity).doubleValue(), TradeConfig.orderProcessingMode);
-
-		req.setAttribute("orderData", orderData);
-		req.setAttribute("results", results);		
-	}
-	catch (java.lang.IllegalArgumentException e)
-	{ //this is a user error so I will 
-		//forward them to another page rather than throw a 500
-		req.setAttribute("results", results + "illegal argument:");
-		requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.HOME_PAGE));
-		//log the exception with an error level of 3 which means, handled exception but would invalidate a automation run
-		Log.error(
-			e, 
-			"TradeServletAction.doBuy(...)", 
-			"illegal argument. userID = " + userID,
-			"symbol = " + symbol);
-	}
-	catch (Exception e)
-	{
-		//log the exception with error page
-			throw new ServletException("TradeServletAction.buy(...)"
-					+ " exception buying stock "
-				+ symbol
-				+ " for user "
-				+ userID, 
-   					e); 
-	}
-	requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.ORDER_PAGE));
-}
-	/**
-	 * Create the Trade Home page with personalized information such as the traders account balance
-	 * Dispatch to the Trade Home JSP for display
-	 *
-	 * @param ctx the servlet context
-	 * @param req the HttpRequest object
-	 * @param resp the HttpResponse object
-	 * @param results A short description of the results/success of this web request provided on the web page
-	 * @exception javax.servlet.ServletException If a servlet specific exception is encountered
-	 * @exception javax.io.IOException If an exception occurs while writing results back to the user
-	 * 
-	 */
-	void doHome(
-		ServletContext ctx, 
-		HttpServletRequest req, 
-		HttpServletResponse resp, 
-		String userID, 
-		String results)
-		throws javax.servlet.ServletException, java.io.IOException {
-		BigDecimal balance;
-		String result = "";
-		try
-		{
-			AccountDataBean	 accountData = tAction.getAccountData(userID);
-			Collection	holdingDataBeans = tAction.getHoldings(userID);
-				 
-			 //Edge Caching: 
-			 //Getting the MarketSummary has been moved to the JSP
-			 //MarketSummary.jsp. This makes the MarketSummary a 
-			 //standalone "fragment", and thus is a candidate for
-			 //Edge caching.
-			 //marketSummaryData = tAction.getMarketSummary();
-
-			req.setAttribute("accountData", accountData);
-			req.setAttribute("holdingDataBeans", holdingDataBeans);
-			//See Edge Caching above
-			//req.setAttribute("marketSummaryData", marketSummaryData);
-			req.setAttribute("results", results);
-		}
-		catch (java.lang.IllegalArgumentException e)
-		{ //this is a user error so I will 
-			//forward them to another page rather than throw a 500
-			req.setAttribute("results", results + "check userID = "+ userID + " and that the database is populated");
-			requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.HOME_PAGE));
-			//log the exception with an error level of 3 which means, handled exception but would invalidate a automation run
-			Log.error(
-				"TradeServletAction.doHome(...)" +
-				"illegal argument, information should be in exception string" +
-				"treating this as a user error and forwarding on to a new page", 
-				e);
-		}
-		catch (javax.ejb.FinderException e)
-		{
-			//this is a user error so I will 
-			//forward them to another page rather than throw a 500
-			req.setAttribute(
-				"results", 
-				results + "\nCould not find account for + " + userID); 
-			//requestDispatch(ctx, req, resp, TradeConfig.getPage(TradeConfig.HOME_PAGE));
-			//log the exception with an error level of 3 which means, handled exception but would invalidate a automation run
-			Log.error(
-				"TradeServletAction.doHome(...)" +
-				"Error finding account for user " + userID + 
-				"treating this as a user error and forwarding on to a new page", e); 
-		}
-		catch (Exception e)
-		{
-		//log the exception with error page
-			throw new ServletException("TradeServletAction.doHome(...)"
-					+ " exception user ="
-					+ userID, 
-					e); 
-		}
-
-		requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.HOME_PAGE));
-	}
-/**
-	 * Login a Trade User.
-	 * Dispatch to the Trade Home JSP for display
-	 * 
-	 * @param userID The User to login
-	 * @param passwd The password supplied by the trader used to authenticate
-	 * @param ctx the servlet context
-	 * @param req the HttpRequest object
-	 * @param resp the HttpResponse object
-	 * @param results A short description of the results/success of this web request provided on the web page
-	 * @exception javax.servlet.ServletException If a servlet specific exception is encountered
-	 * @exception javax.io.IOException If an exception occurs while writing results back to the user
-	 * 
-	 */
-void doLogin(
-	ServletContext ctx, 
-	HttpServletRequest req, 
-	HttpServletResponse resp, 
-	String userID, 
-	String passwd) 
-throws javax.servlet.ServletException, java.io.IOException 
-{
-	
-	String results = "";
-	try
-	{
-		//Got a valid userID and passwd, attempt login
-
-		AccountDataBean	accountData = tAction.login(userID, passwd);
-
-		if (accountData != null)
-		{
-			HttpSession session = req.getSession(true);
-			session.setAttribute("uidBean", userID);
-			session.setAttribute("sessionCreationDate", new java.util.Date());
-			results = "Ready to Trade"; 
-			doHome(ctx, req, resp, userID, results);
-			return;
-		}
-		else
-		{
-			req.setAttribute(
-				"results", 
-				results + "\nCould not find account for + " + userID); 
-				//log the exception with an error level of 3 which means, handled exception but would invalidate a automation run
-				Log.log(
-					"TradeServletAction.doLogin(...)", 
-					"Error finding account for user " + userID + "", 
-					"user entered a bad username or the database is not populated"); 
-		}
-	}
-	catch (java.lang.IllegalArgumentException e)
-	{ //this is a user error so I will 
-		//forward them to another page rather than throw a 500
-		req.setAttribute("results", results + "illegal argument:" + e.getMessage());
-		//log the exception with an error level of 3 which means, handled exception but would invalidate a automation run
-		Log.error(
-			e, 
-			"TradeServletAction.doLogin(...)", 
-			"illegal argument, information should be in exception string", 
-			"treating this as a user error and forwarding on to a new page");
-
-	}
-	catch (Exception e)
-	{
-		//log the exception with error page
-			throw new ServletException(
-			"TradeServletAction.doLogin(...)"
-				+ "Exception logging in user "
-				+ userID
-				+ "with password"
-				+ passwd
-				,e); 
-	}
-	
-	requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.WELCOME_PAGE));
-
-}
-	/**
-	 * Logout a Trade User
-	 * Dispatch to the Trade Welcome JSP for display
-	 * 
-	 * @param userID The User to logout
-	 * @param ctx the servlet context
-	 * @param req the HttpRequest object
-	 * @param resp the HttpResponse object
-	 * @param results A short description of the results/success of this web request provided on the web page
-	 * @exception javax.servlet.ServletException If a servlet specific exception is encountered
-	 * @exception javax.io.IOException If an exception occurs while writing results back to the user
-	 * 
-	 */
-	void doLogout(
-		ServletContext ctx, 
-		HttpServletRequest req, 
-		HttpServletResponse resp, 
-		String userID)
-		throws ServletException, IOException {
-		String results = "";
-
-		try
-		{
-			tAction.logout(userID);
-
-		}
-		catch (java.lang.IllegalArgumentException e)
-		{ //this is a user error so I will 
-			//forward them to another page, at the end of the page.
-			req.setAttribute("results", results + "illegal argument:" + e.getMessage());
-
-			//log the exception with an error level of 3 which means, handled exception but would invalidate a automation run
-			Log.error(
-				e, 
-				"TradeServletAction.doLogout(...)", 
-				"illegal argument, information should be in exception string", 
-				"treating this as a user error and forwarding on to a new page");
-		}
-		catch (Exception e)
-		{
-			//log the exception and foward to a error page
-			Log.error(
-				e, 
-				"TradeServletAction.doLogout(...):", 
-				"Error logging out" + userID, 
-				"fowarding to an error page");
-			//set the status_code to 500
-			throw new ServletException(
-				"TradeServletAction.doLogout(...)"
-					+ "exception logging out user "
-					+ userID,
-					e); 
-		}
-		HttpSession session = req.getSession();
-		if (session != null)
-		{
-			session.invalidate();
-		}
-		
-		Object o = req.getAttribute("TSS-RecreateSessionInLogout");
-		if (o != null && ((Boolean)o).equals(Boolean.TRUE)){
-			// Recreate Session object before writing output to the response
-			// Once the response headers are written back to the client the opportunity
-			// to create a new session in this request may be lost
-			// This is to handle only the TradeScenarioServlet case
-			session = req.getSession(true);
-		}
-		requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.WELCOME_PAGE));
-	}
-	/**
-	 * Retrieve the current portfolio of stock holdings for the given trader
-	 * Dispatch to the Trade Portfolio JSP for display 
-	 *
-	 * @param userID The User requesting to view their portfolio
-	 * @param ctx the servlet context
-	 * @param req the HttpRequest object
-	 * @param resp the HttpResponse object
-	 * @param results A short description of the results/success of this web request provided on the web page
-	 * @exception javax.servlet.ServletException If a servlet specific exception is encountered
-	 * @exception javax.io.IOException If an exception occurs while writing results back to the user
-	 * 
-	 */
-	void doPortfolio(
-		ServletContext ctx, 
-		HttpServletRequest req, 
-		HttpServletResponse resp, 
-		String userID, 
-		String results)
-		throws ServletException, IOException {
-
-		try
-		{
-			//Get the holdiings for this user
-
-			Collection quoteDataBeans = new ArrayList();
-			Collection holdingDataBeans = tAction.getHoldings(userID);
-			
-			
-			//Walk through the collection of user 
-			//  holdings and creating a list of quotes
-			if (holdingDataBeans.size() > 0 )
-			{
-			
-				Iterator it = holdingDataBeans.iterator();
-				while ( it.hasNext() )
-				{
-					HoldingDataBean holdingData = (HoldingDataBean) it.next();		
-					QuoteDataBean quoteData = tAction.getQuote(holdingData.getQuoteID());
-					quoteDataBeans.add(quoteData);
-				}
-			}
-			else	
-			{
-				results = results + ".  Your portfolio is empty.";
-			}
-			req.setAttribute("results", results);			
-			req.setAttribute("holdingDataBeans", holdingDataBeans);
-			req.setAttribute("quoteDataBeans", quoteDataBeans);			
-			requestDispatch(
-				ctx, 
-				req, 
-				resp, 
-				userID, 				
-				TradeConfig.getPage(TradeConfig.PORTFOLIO_PAGE)); 
-		}
-		catch (java.lang.IllegalArgumentException e)
-		{ //this is a user error so I will 
-			//forward them to another page rather than throw a 500
-			req.setAttribute("results", results + "illegal argument:" + e.getMessage());
-			requestDispatch(
-				ctx, 
-				req, 
-				resp, 
-				userID, 				
-				TradeConfig.getPage(TradeConfig.PORTFOLIO_PAGE)); 
-			//log the exception with an error level of 3 which means, handled exception but would invalidate a automation run
-			Log.error(
-				e, 
-				"TradeServletAction.doPortfolio(...)", 
-				"illegal argument, information should be in exception string", 
-				"user error");
-		}
-		catch (Exception e)
-		{
-		//log the exception with error page
-			throw new ServletException("TradeServletAction.doPortfolio(...)"
-					+ " exception user ="
-					+ userID, 
-					e); 
-		}
-	}
-
-	/**
-	 * Retrieve the current Quote for the given stock symbol
-	 * Dispatch to the Trade Quote JSP for display 
-	 *
-	 * @param userID The stock symbol used to get the current quote
-	 * @param ctx the servlet context
-	 * @param req the HttpRequest object
-	 * @param resp the HttpResponse object
-	 * @exception javax.servlet.ServletException If a servlet specific exception is encountered
-	 * @exception javax.io.IOException If an exception occurs while writing results back to the user
-	 * 
-	 */
-	void doQuotes(
-		ServletContext ctx, 
-		HttpServletRequest req, 
-		HttpServletResponse resp, 
-		String userID, 
-		String symbols)
-		throws ServletException, IOException {
-		String results = "";
-
-		 //Edge Caching: 
-		 //Getting Quotes has been moved to the JSP
-		 //Quote.jsp. This makes each Quote  a 
-		 //standalone "fragment", and thus is a candidate for
-		 //Edge caching.
-		 //			
-
-		requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.QUOTE_PAGE));
-	}
-	/**
-	 * Register a new trader given the provided user Profile information such as address, email, etc.
-	 * Dispatch to the Trade Home JSP for display 
-	 *
-	 * @param userID The User to create
-	 * @param passwd The User password
-	 * @param fullname The new User fullname info
-	 * @param ccn The new User credit card info
-	 * @param money The new User opening account balance
-	 * @param address The new User address info
-	 * @param email The new User email info
-	 * @return The userID of the new trader
-	 * @param ctx the servlet context
-	 * @param req the HttpRequest object
-	 * @param resp the HttpResponse object
-	 * @exception javax.servlet.ServletException If a servlet specific exception is encountered
-	 * @exception javax.io.IOException If an exception occurs while writing results back to the user
-	 * 
-	 */
-	void doRegister(
-		ServletContext ctx, 
-		HttpServletRequest req, 
-		HttpServletResponse resp, 
-		String userID, 
-		String passwd, 
-		String cpasswd, 
-		String fullname, 
-		String ccn, 
-		String openBalanceString, 
-		String email, 
-		String address)
-		throws ServletException, IOException {
-		String results = "";
-
-
-		try
-		{
-			// Validate user passwords match and are atleast 1 char in length
-			if ((passwd.equals(cpasswd)) && (passwd.length() >= 1))
-			{
-				
-				AccountDataBean	accountData = tAction.register(userID, passwd, fullname, address, email, ccn, new BigDecimal(openBalanceString));
-				if (accountData == null)
-				{
-					results = "Registration operation failed;";
-					System.out.println(results);
-					req.setAttribute("results", results);
-					requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.REGISTER_PAGE)); 
-				}
-				else
-				{
-					doLogin(ctx, req, resp, userID, passwd);
-					results = 
-						"Registration operation succeeded;  Account " + accountData.getAccountID() + " has been created."; 
-					req.setAttribute("results", results);	
-					
-				}
-			}
-			else
-			{
-				//Password validation failed
-				results = "Registration operation failed, your passwords did not match";
-				System.out.println(results);
-				req.setAttribute("results", results);
-				requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.REGISTER_PAGE)); 
-			}
-
-		}
-		catch (Exception e)
-		{
-		//log the exception with error page
-			throw new ServletException("TradeServletAction.doRegister(...)"
-					+ " exception user ="
-					+ userID, 
-					e); 
-		}
-	}
-	/**
-	 * Sell a current holding of stock shares for the given trader.
-	 * Dispatch to the Trade Portfolio JSP for display 
-	 *
-	 * @param userID The User buying shares
-	 * @param symbol The stock to sell
-	 * @param indx The unique index identifying the users holding to sell
-	 * @param ctx the servlet context
-	 * @param req the HttpRequest object
-	 * @param resp the HttpResponse object
-	 * @exception javax.servlet.ServletException If a servlet specific exception is encountered
-	 * @exception javax.io.IOException If an exception occurs while writing results back to the user
-	 * 
-	 */
-	void doSell(
-		ServletContext ctx, 
-		HttpServletRequest req, 
-		HttpServletResponse resp, 
-		String userID, 
-		Integer holdingID)
-		throws ServletException, IOException {
-		String results = "";
-		try
-		{
-			OrderDataBean	orderData = tAction.sell(userID, holdingID, TradeConfig.orderProcessingMode);
-
-			req.setAttribute("orderData", orderData);
-			req.setAttribute("results", results);		
-		}
-		catch (java.lang.IllegalArgumentException e)
-		{ //this is a user error so I will 
-			//just log the exception and then later on I will redisplay the portfolio page
-			//because this is just a user exception
-			Log.error(
-				e, 
-				"TradeServletAction.doSell(...)", 
-				"illegal argument, information should be in exception string", 
-				"user error");
-		}
-		catch (Exception e)
-		{
-		//log the exception with error page
-			throw new ServletException("TradeServletAction.doSell(...)"
-					+ " exception selling holding " 
-					+ holdingID 
-					+ " for user ="
-					+ userID, 
-					e); 
-		}
-		requestDispatch(ctx, req, resp, userID, TradeConfig.getPage(TradeConfig.ORDER_PAGE));		
-	}
-
-	void doWelcome(
-		ServletContext ctx, 
-		HttpServletRequest req, 
-		HttpServletResponse resp, 
-		String status)
-		throws ServletException, IOException {
-			
-			req.setAttribute("results", status);
-			requestDispatch(ctx, req, resp, null, TradeConfig.getPage(TradeConfig.WELCOME_PAGE));
-	}
-
-	
-	private void requestDispatch(
-		ServletContext ctx, 
-		HttpServletRequest req, 
-		HttpServletResponse resp, 
-		String userID,
-		String page)
-		throws ServletException, IOException {
-
-		ctx.getRequestDispatcher(page).include(req, resp);
-	}
-	private void sendRedirect(HttpServletResponse resp, String page)
-		throws ServletException, IOException {
-		resp.sendRedirect(resp.encodeRedirectURL(page));
-	}
+    TradeServletAction() {
+        if (TradeConfig.getAccessMode() == TradeConfig.STANDARD)
+            tAction = new TradeAction();
+        else if (TradeConfig.getAccessMode() == TradeConfig.WEBSERVICES)
+            tAction = new TradeWebSoapProxy();
+    }
+
+    /**
+     * Display User Profile information such as address, email, etc. for the
+     * given Trader Dispatch to the Trade Account JSP for display
+     * 
+     * @param userID
+     *            The User to display profile info
+     * @param ctx
+     *            the servlet context
+     * @param req
+     *            the HttpRequest object
+     * @param resp
+     *            the HttpResponse object
+     * @param results
+     *            A short description of the results/success of this web request
+     *            provided on the web page
+     * @exception javax.servlet.ServletException
+     *                If a servlet specific exception is encountered
+     * @exception javax.io.IOException
+     *                If an exception occurs while writing results back to the
+     *                user
+     * 
+     */
+    void doAccount(ServletContext ctx, HttpServletRequest req,
+            HttpServletResponse resp, String userID, String results)
+            throws javax.servlet.ServletException, java.io.IOException {
+        try {
+
+            AccountDataBean accountData = tAction.getAccountData(userID);
+            AccountProfileDataBean accountProfileData = tAction
+                    .getAccountProfileData(userID);
+            Collection orderDataBeans = tAction.getOrders(userID);
+
+            req.setAttribute("accountData", accountData);
+            req.setAttribute("accountProfileData", accountProfileData);
+            req.setAttribute("orderDataBeans", orderDataBeans);
+            req.setAttribute("results", results);
+            requestDispatch(ctx, req, resp, userID, TradeConfig
+                    .getPage(TradeConfig.ACCOUNT_PAGE));
+        } catch (java.lang.IllegalArgumentException e) { // this is a user
+                                                            // error so I will
+            // forward them to another page rather than throw a 500
+            req.setAttribute("results", results
+                    + "could not find account for userID = " + userID);
+            requestDispatch(ctx, req, resp, userID, TradeConfig
+                    .getPage(TradeConfig.HOME_PAGE));
+            // log the exception with an error level of 3 which means, handled
+            // exception but would invalidate a automation run
+            Log
+                    .error(
+                            "TradeServletAction.doAccount(...)",
+                            "illegal argument, information should be in exception string",
+                            e);
+        } catch (Exception e) {
+            // log the exception with error page
+            throw new ServletException("TradeServletAction.doAccount(...)"
+                    + " exception user =" + userID, e);
+        }
+
+    }
+
+    /**
+     * Update User Profile information such as address, email, etc. for the
+     * given Trader Dispatch to the Trade Account JSP for display If any in put
+     * is incorrect revert back to the account page w/ an appropriate message
+     * 
+     * @param userID
+     *            The User to upddate profile info
+     * @param password
+     *            The new User password
+     * @param cpassword
+     *            Confirm password
+     * @param fullname
+     *            The new User fullname info
+     * @param address
+     *            The new User address info
+     * @param cc
+     *            The new User credit card info
+     * @param email
+     *            The new User email info
+     * @param ctx
+     *            the servlet context
+     * @param req
+     *            the HttpRequest object
+     * @param resp
+     *            the HttpResponse object
+     * @exception javax.servlet.ServletException
+     *                If a servlet specific exception is encountered
+     * @exception javax.io.IOException
+     *                If an exception occurs while writing results back to the
+     *                user
+     * 
+     */
+    void doAccountUpdate(ServletContext ctx, HttpServletRequest req,
+            HttpServletResponse resp, String userID, String password,
+            String cpassword, String fullName, String address,
+            String creditcard, String email)
+            throws javax.servlet.ServletException, java.io.IOException {
+        String results = "";
+
+        // First verify input data
+        boolean doUpdate = true;
+        if (password.equals(cpassword) == false) {
+            results = "Update profile error: passwords do not match";
+            doUpdate = false;
+        } else if (password.length() <= 0 || fullName.length() <= 0
+                || address.length() <= 0 || creditcard.length() <= 0
+                || email.length() <= 0) {
+            results = "Update profile error: please fill in all profile information fields";
+            doUpdate = false;
+        }
+        AccountProfileDataBean accountProfileData = new AccountProfileDataBean(
+                userID, password, fullName, address, email, creditcard);
+        try {
+            if (doUpdate) {
+                accountProfileData = tAction
+                        .updateAccountProfile(accountProfileData);
+                results = "Account profile update successful";
+            }
+
+        } catch (java.lang.IllegalArgumentException e) { // this is a user
+                                                            // error so I will
+            // forward them to another page rather than throw a 500
+            req
+                    .setAttribute(
+                            "results",
+                            results
+                                    + "invalid argument, check userID is correct, and the database is populated"
+                                    + userID);
+            Log
+                    .error(
+                            e,
+                            "TradeServletAction.doAccount(...)",
+                            "illegal argument, information should be in exception string",
+                            "treating this as a user error and forwarding on to a new page");
+        } catch (Exception e) {
+            // log the exception with error page
+            throw new ServletException(
+                    "TradeServletAction.doAccountUpdate(...)"
+                            + " exception user =" + userID, e);
+        }
+        doAccount(ctx, req, resp, userID, results);
+    }
+
+    /**
+     * Buy a new holding of shares for the given trader Dispatch to the Trade
+     * Portfolio JSP for display
+     * 
+     * @param userID
+     *            The User buying shares
+     * @param symbol
+     *            The stock to purchase
+     * @param amount
+     *            The quantity of shares to purchase
+     * @param ctx
+     *            the servlet context
+     * @param req
+     *            the HttpRequest object
+     * @param resp
+     *            the HttpResponse object
+     * @exception javax.servlet.ServletException
+     *                If a servlet specific exception is encountered
+     * @exception javax.io.IOException
+     *                If an exception occurs while writing results back to the
+     *                user
+     * 
+     */
+    void doBuy(ServletContext ctx, HttpServletRequest req,
+            HttpServletResponse resp, String userID, String symbol,
+            String quantity) throws ServletException, IOException {
+
+        String results = "";
+
+        try {
+            OrderDataBean orderData = tAction.buy(userID, symbol, new Double(
+                    quantity).doubleValue(), TradeConfig.orderProcessingMode);
+
+            req.setAttribute("orderData", orderData);
+            req.setAttribute("results", results);
+        } catch (java.lang.IllegalArgumentException e) { // this is a user
+                                                            // error so I will
+            // forward them to another page rather than throw a 500
+            req.setAttribute("results", results + "illegal argument:");
+            requestDispatch(ctx, req, resp, userID, TradeConfig
+                    .getPage(TradeConfig.HOME_PAGE));
+            // log the exception with an error level of 3 which means, handled
+            // exception but would invalidate a automation run
+            Log.error(e, "TradeServletAction.doBuy(...)",
+                    "illegal argument. userID = " + userID, "symbol = "
+                            + symbol);
+        } catch (Exception e) {
+            // log the exception with error page
+            throw new ServletException("TradeServletAction.buy(...)"
+                    + " exception buying stock " + symbol + " for user "
+                    + userID, e);
+        }
+        requestDispatch(ctx, req, resp, userID, TradeConfig
+                .getPage(TradeConfig.ORDER_PAGE));
+    }
+
+    /**
+     * Create the Trade Home page with personalized information such as the
+     * traders account balance Dispatch to the Trade Home JSP for display
+     * 
+     * @param ctx
+     *            the servlet context
+     * @param req
+     *            the HttpRequest object
+     * @param resp
+     *            the HttpResponse object
+     * @param results
+     *            A short description of the results/success of this web request
+     *            provided on the web page
+     * @exception javax.servlet.ServletException
+     *                If a servlet specific exception is encountered
+     * @exception javax.io.IOException
+     *                If an exception occurs while writing results back to the
+     *                user
+     * 
+     */
+    void doHome(ServletContext ctx, HttpServletRequest req,
+            HttpServletResponse resp, String userID, String results)
+            throws javax.servlet.ServletException, java.io.IOException {
+        BigDecimal balance;
+        String result = "";
+        try {
+            AccountDataBean accountData = tAction.getAccountData(userID);
+            Collection holdingDataBeans = tAction.getHoldings(userID);
+
+            // Edge Caching:
+            // Getting the MarketSummary has been moved to the JSP
+            // MarketSummary.jsp. This makes the MarketSummary a
+            // standalone "fragment", and thus is a candidate for
+            // Edge caching.
+            // marketSummaryData = tAction.getMarketSummary();
+
+            req.setAttribute("accountData", accountData);
+            req.setAttribute("holdingDataBeans", holdingDataBeans);
+            // See Edge Caching above
+            // req.setAttribute("marketSummaryData", marketSummaryData);
+            req.setAttribute("results", results);
+        } catch (java.lang.IllegalArgumentException e) { // this is a user
+                                                            // error so I will
+            // forward them to another page rather than throw a 500
+            req.setAttribute("results", results + "check userID = " + userID
+                    + " and that the database is populated");
+            requestDispatch(ctx, req, resp, userID, TradeConfig
+                    .getPage(TradeConfig.HOME_PAGE));
+            // log the exception with an error level of 3 which means, handled
+            // exception but would invalidate a automation run
+            Log
+                    .error(
+                            "TradeServletAction.doHome(...)"
+                                    + "illegal argument, information should be in exception string"
+                                    + "treating this as a user error and forwarding on to a new page",
+                            e);
+        } catch (javax.ejb.FinderException e) {
+            // this is a user error so I will
+            // forward them to another page rather than throw a 500
+            req.setAttribute("results", results
+                    + "\nCould not find account for + " + userID);
+            // requestDispatch(ctx, req, resp,
+            // TradeConfig.getPage(TradeConfig.HOME_PAGE));
+            // log the exception with an error level of 3 which means, handled
+            // exception but would invalidate a automation run
+            Log
+                    .error(
+                            "TradeServletAction.doHome(...)"
+                                    + "Error finding account for user "
+                                    + userID
+                                    + "treating this as a user error and forwarding on to a new page",
+                            e);
+        } catch (Exception e) {
+            // log the exception with error page
+            throw new ServletException("TradeServletAction.doHome(...)"
+                    + " exception user =" + userID, e);
+        }
+
+        requestDispatch(ctx, req, resp, userID, TradeConfig
+                .getPage(TradeConfig.HOME_PAGE));
+    }
+
+    /**
+     * Login a Trade User. Dispatch to the Trade Home JSP for display
+     * 
+     * @param userID
+     *            The User to login
+     * @param passwd
+     *            The password supplied by the trader used to authenticate
+     * @param ctx
+     *            the servlet context
+     * @param req
+     *            the HttpRequest object
+     * @param resp
+     *            the HttpResponse object
+     * @param results
+     *            A short description of the results/success of this web request
+     *            provided on the web page
+     * @exception javax.servlet.ServletException
+     *                If a servlet specific exception is encountered
+     * @exception javax.io.IOException
+     *                If an exception occurs while writing results back to the
+     *                user
+     * 
+     */
+    void doLogin(ServletContext ctx, HttpServletRequest req,
+            HttpServletResponse resp, String userID, String passwd)
+            throws javax.servlet.ServletException, java.io.IOException {
+
+        String results = "";
+        try {
+            // Got a valid userID and passwd, attempt login
+
+            AccountDataBean accountData = tAction.login(userID, passwd);
+
+            if (accountData != null) {
+                HttpSession session = req.getSession(true);
+                session.setAttribute("uidBean", userID);
+                session.setAttribute("sessionCreationDate",
+                        new java.util.Date());
+                results = "Ready to Trade";
+                doHome(ctx, req, resp, userID, results);
+                return;
+            } else {
+                req.setAttribute("results", results
+                        + "\nCould not find account for + " + userID);
+                // log the exception with an error level of 3 which means,
+                // handled exception but would invalidate a automation run
+                Log.log(
+                                "TradeServletAction.doLogin(...)",
+                                "Error finding account for user " + userID + "",
+                                "user entered a bad username or the database is not populated");
+            }
+        } catch (java.lang.IllegalArgumentException e) { // this is a user
+                                                            // error so I will
+            // forward them to another page rather than throw a 500
+            req.setAttribute("results", results + "illegal argument:"
+                    + e.getMessage());
+            // log the exception with an error level of 3 which means, handled
+            // exception but would invalidate a automation run
+            Log
+                    .error(
+                            e,
+                            "TradeServletAction.doLogin(...)",
+                            "illegal argument, information should be in exception string",
+                            "treating this as a user error and forwarding on to a new page");
+
+        } catch (Exception e) {
+            // log the exception with error page
+            throw new ServletException("TradeServletAction.doLogin(...)"
+                    + "Exception logging in user " + userID + "with password"
+                    + passwd, e);
+        }
+
+        requestDispatch(ctx, req, resp, userID, TradeConfig
+                .getPage(TradeConfig.WELCOME_PAGE));
+
+    }
+
+    /**
+     * Logout a Trade User Dispatch to the Trade Welcome JSP for display
+     * 
+     * @param userID
+     *            The User to logout
+     * @param ctx
+     *            the servlet context
+     * @param req
+     *            the HttpRequest object
+     * @param resp
+     *            the HttpResponse object
+     * @param results
+     *            A short description of the results/success of this web request
+     *            provided on the web page
+     * @exception javax.servlet.ServletException
+     *                If a servlet specific exception is encountered
+     * @exception javax.io.IOException
+     *                If an exception occurs while writing results back to the
+     *                user
+     * 
+     */
+    void doLogout(ServletContext ctx, HttpServletRequest req,
+            HttpServletResponse resp, String userID) throws ServletException,
+            IOException {
+        String results = "";
+
+        try {
+            tAction.logout(userID);
+
+        } catch (java.lang.IllegalArgumentException e) { // this is a user
+                                                            // error so I will
+            // forward them to another page, at the end of the page.
+            req.setAttribute("results", results + "illegal argument:"
+                    + e.getMessage());
+
+            // log the exception with an error level of 3 which means, handled
+            // exception but would invalidate a automation run
+            Log
+                    .error(
+                            e,
+                            "TradeServletAction.doLogout(...)",
+                            "illegal argument, information should be in exception string",
+                            "treating this as a user error and forwarding on to a new page");
+        } catch (Exception e) {
+            // log the exception and foward to a error page
+            Log.error(e, "TradeServletAction.doLogout(...):",
+                    "Error logging out" + userID, "fowarding to an error page");
+            // set the status_code to 500
+            throw new ServletException("TradeServletAction.doLogout(...)"
+                    + "exception logging out user " + userID, e);
+        }
+        HttpSession session = req.getSession();
+        if (session != null) {
+            session.invalidate();
+        }
+
+        Object o = req.getAttribute("TSS-RecreateSessionInLogout");
+        if (o != null && ((Boolean) o).equals(Boolean.TRUE)) {
+            // Recreate Session object before writing output to the response
+            // Once the response headers are written back to the client the
+            // opportunity
+            // to create a new session in this request may be lost
+            // This is to handle only the TradeScenarioServlet case
+            session = req.getSession(true);
+        }
+        requestDispatch(ctx, req, resp, userID, TradeConfig
+                .getPage(TradeConfig.WELCOME_PAGE));
+    }
+
+    /**
+     * Retrieve the current portfolio of stock holdings for the given trader
+     * Dispatch to the Trade Portfolio JSP for display
+     * 
+     * @param userID
+     *            The User requesting to view their portfolio
+     * @param ctx
+     *            the servlet context
+     * @param req
+     *            the HttpRequest object
+     * @param resp
+     *            the HttpResponse object
+     * @param results
+     *            A short description of the results/success of this web request
+     *            provided on the web page
+     * @exception javax.servlet.ServletException
+     *                If a servlet specific exception is encountered
+     * @exception javax.io.IOException
+     *                If an exception occurs while writing results back to the
+     *                user
+     * 
+     */
+    void doPortfolio(ServletContext ctx, HttpServletRequest req,
+            HttpServletResponse resp, String userID, String results)
+            throws ServletException, IOException {
+
+        try {
+            // Get the holdiings for this user
+
+            Collection quoteDataBeans = new ArrayList();
+            Collection holdingDataBeans = tAction.getHoldings(userID);
+
+            // Walk through the collection of user
+            // holdings and creating a list of quotes
+            if (holdingDataBeans.size() > 0) {
+
+                Iterator it = holdingDataBeans.iterator();
+                while (it.hasNext()) {
+                    HoldingDataBean holdingData = (HoldingDataBean) it.next();
+                    QuoteDataBean quoteData = tAction.getQuote(holdingData
+                            .getQuoteID());
+                    quoteDataBeans.add(quoteData);
+                }
+            } else {
+                results = results + ".  Your portfolio is empty.";
+            }
+            req.setAttribute("results", results);
+            req.setAttribute("holdingDataBeans", holdingDataBeans);
+            req.setAttribute("quoteDataBeans", quoteDataBeans);
+            requestDispatch(ctx, req, resp, userID, TradeConfig
+                    .getPage(TradeConfig.PORTFOLIO_PAGE));
+        } catch (java.lang.IllegalArgumentException e) { // this is a user
+                                                            // error so I will
+            // forward them to another page rather than throw a 500
+            req.setAttribute("results", results + "illegal argument:"
+                    + e.getMessage());
+            requestDispatch(ctx, req, resp, userID, TradeConfig
+                    .getPage(TradeConfig.PORTFOLIO_PAGE));
+            // log the exception with an error level of 3 which means, handled
+            // exception but would invalidate a automation run
+            Log
+                    .error(
+                            e,
+                            "TradeServletAction.doPortfolio(...)",
+                            "illegal argument, information should be in exception string",
+                            "user error");
+        } catch (Exception e) {
+            // log the exception with error page
+            throw new ServletException("TradeServletAction.doPortfolio(...)"
+                    + " exception user =" + userID, e);
+        }
+    }
+
+    /**
+     * Retrieve the current Quote for the given stock symbol Dispatch to the
+     * Trade Quote JSP for display
+     * 
+     * @param userID
+     *            The stock symbol used to get the current quote
+     * @param ctx
+     *            the servlet context
+     * @param req
+     *            the HttpRequest object
+     * @param resp
+     *            the HttpResponse object
+     * @exception javax.servlet.ServletException
+     *                If a servlet specific exception is encountered
+     * @exception javax.io.IOException
+     *                If an exception occurs while writing results back to the
+     *                user
+     * 
+     */
+    void doQuotes(ServletContext ctx, HttpServletRequest req,
+            HttpServletResponse resp, String userID, String symbols)
+            throws ServletException, IOException {
+        String results = "";
+
+        // Edge Caching:
+        // Getting Quotes has been moved to the JSP
+        // Quote.jsp. This makes each Quote a
+        // standalone "fragment", and thus is a candidate for
+        // Edge caching.
+        //			
+
+        requestDispatch(ctx, req, resp, userID, TradeConfig
+                .getPage(TradeConfig.QUOTE_PAGE));
+    }
+
+    /**
+     * Register a new trader given the provided user Profile information such as
+     * address, email, etc. Dispatch to the Trade Home JSP for display
+     * 
+     * @param userID
+     *            The User to create
+     * @param passwd
+     *            The User password
+     * @param fullname
+     *            The new User fullname info
+     * @param ccn
+     *            The new User credit card info
+     * @param money
+     *            The new User opening account balance
+     * @param address
+     *            The new User address info
+     * @param email
+     *            The new User email info
+     * @return The userID of the new trader
+     * @param ctx
+     *            the servlet context
+     * @param req
+     *            the HttpRequest object
+     * @param resp
+     *            the HttpResponse object
+     * @exception javax.servlet.ServletException
+     *                If a servlet specific exception is encountered
+     * @exception javax.io.IOException
+     *                If an exception occurs while writing results back to the
+     *                user
+     * 
+     */
+    void doRegister(ServletContext ctx, HttpServletRequest req,
+            HttpServletResponse resp, String userID, String passwd,
+            String cpasswd, String fullname, String ccn,
+            String openBalanceString, String email, String address)
+            throws ServletException, IOException {
+        String results = "";
+
+        try {
+            // Validate user passwords match and are atleast 1 char in length
+            if ((passwd.equals(cpasswd)) && (passwd.length() >= 1)) {
+
+                AccountDataBean accountData = tAction.register(userID, passwd,
+                        fullname, address, email, ccn, new BigDecimal(
+                                openBalanceString));
+                if (accountData == null) {
+                    results = "Registration operation failed;";
+                    System.out.println(results);
+                    req.setAttribute("results", results);
+                    requestDispatch(ctx, req, resp, userID, TradeConfig
+                            .getPage(TradeConfig.REGISTER_PAGE));
+                } else {
+                    doLogin(ctx, req, resp, userID, passwd);
+                    results = "Registration operation succeeded;  Account "
+                            + accountData.getAccountID() + " has been created.";
+                    req.setAttribute("results", results);
+
+                }
+            } else {
+                // Password validation failed
+                results = "Registration operation failed, your passwords did not match";
+                System.out.println(results);
+                req.setAttribute("results", results);
+                requestDispatch(ctx, req, resp, userID, TradeConfig
+                        .getPage(TradeConfig.REGISTER_PAGE));
+            }
+
+        } catch (Exception e) {
+            // log the exception with error page
+            throw new ServletException("TradeServletAction.doRegister(...)"
+                    + " exception user =" + userID, e);
+        }
+    }
+
+    /**
+     * Sell a current holding of stock shares for the given trader. Dispatch to
+     * the Trade Portfolio JSP for display
+     * 
+     * @param userID
+     *            The User buying shares
+     * @param symbol
+     *            The stock to sell
+     * @param indx
+     *            The unique index identifying the users holding to sell
+     * @param ctx
+     *            the servlet context
+     * @param req
+     *            the HttpRequest object
+     * @param resp
+     *            the HttpResponse object
+     * @exception javax.servlet.ServletException
+     *                If a servlet specific exception is encountered
+     * @exception javax.io.IOException
+     *                If an exception occurs while writing results back to the
+     *                user
+     * 
+     */
+    void doSell(ServletContext ctx, HttpServletRequest req,
+            HttpServletResponse resp, String userID, Integer holdingID)
+            throws ServletException, IOException {
+        String results = "";
+        try {
+            OrderDataBean orderData = tAction.sell(userID, holdingID,
+                    TradeConfig.orderProcessingMode);
+
+            req.setAttribute("orderData", orderData);
+            req.setAttribute("results", results);
+        } catch (java.lang.IllegalArgumentException e) { // this is a user
+                                                            // error so I will
+            // just log the exception and then later on I will redisplay the
+            // portfolio page
+            // because this is just a user exception
+            Log
+                    .error(
+                            e,
+                            "TradeServletAction.doSell(...)",
+                            "illegal argument, information should be in exception string",
+                            "user error");
+        } catch (Exception e) {
+            // log the exception with error page
+            throw new ServletException("TradeServletAction.doSell(...)"
+                    + " exception selling holding " + holdingID + " for user ="
+                    + userID, e);
+        }
+        requestDispatch(ctx, req, resp, userID, TradeConfig
+                .getPage(TradeConfig.ORDER_PAGE));
+    }
+
+    void doWelcome(ServletContext ctx, HttpServletRequest req,
+            HttpServletResponse resp, String status) throws ServletException,
+            IOException {
+
+        req.setAttribute("results", status);
+        requestDispatch(ctx, req, resp, null, TradeConfig
+                .getPage(TradeConfig.WELCOME_PAGE));
+    }
+
+    private void requestDispatch(ServletContext ctx, HttpServletRequest req,
+            HttpServletResponse resp, String userID, String page)
+            throws ServletException, IOException {
+
+        ctx.getRequestDispatcher(page).include(req, resp);
+    }
+
+    private void sendRedirect(HttpServletResponse resp, String page)
+            throws ServletException, IOException {
+        resp.sendRedirect(resp.encodeRedirectURL(page));
+    }
 }

Added: geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/jboss-web.xml
URL: http://svn.apache.org/viewcvs/geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/jboss-web.xml?rev=395900&view=auto
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/jboss-web.xml (added)
+++ geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/jboss-web.xml Fri Apr 21 07:36:22 2006
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+
+      <resource-ref>
+         <res-ref-name>jdbc/TradeDataSource</res-ref-name>
+        <jndi-name>jdbc/TradeDataSource</jndi-name>
+      </resource-ref>
+      
+      <resource-ref>
+         <res-ref-name>jms/QueueConnectionFactory</res-ref-name>
+         <jndi-name>ConnectionFactory</jndi-name>
+      </resource-ref>
+
+      <resource-ref>
+         <res-ref-name>jms/TopicConnectionFactory</res-ref-name>
+         <jndi-name>ConnectionFactory</jndi-name>
+      </resource-ref>
+
+      <ejb-ref>
+         <ejb-ref-name>ejb/Trade</ejb-ref-name>
+         <jndi-name>Trade</jndi-name>
+      </ejb-ref>
+      
+      <ejb-ref>
+         <ejb-ref-name>ejb/Quote</ejb-ref-name>
+         <jndi-name>Quote</jndi-name> 
+      </ejb-ref>
+
+        
+      <message-destination-ref>
+         <message-destination-ref-name>jms/TradeBrokerQueue</message-destination-ref-name>
+         <jndi-name>TradeBrokerQueue</jndi-name>
+      </message-destination-ref>
+
+      <message-destination-ref>
+         <message-destination-ref-name>jms/TradeStreamerTopic</message-destination-ref-name>
+         <jndi-name>TradeStreamerTopic</jndi-name>
+      </message-destination-ref>
+</jboss-web>

Modified: geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/web.xml?rev=395900&r1=395899&r2=395900&view=diff
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/web.xml (original)
+++ geronimo/daytrader/trunk/modules/web/src/main/webapp/WEB-INF/web.xml Fri Apr 21 07:36:22 2006
@@ -97,13 +97,13 @@
             <description>Sets the population of Trade users when driving
                 with TradeScenarioServlet.</description>
             <param-name>maxUsers</param-name>
-            <param-value>5</param-value>
+            <param-value>50</param-value>
          </init-param>
          <init-param>
             <description>Sets the population of Stock quotes used when
                 driving with TradeScenarioServlet.</description>
             <param-name>maxQuotes</param-name>
-            <param-value>10</param-value>
+            <param-value>100</param-value>
          </init-param>        
          <init-param>
             <description>Sets the number of iterations on web/ejb

Modified: geronimo/daytrader/trunk/modules/web/src/main/webapp/account.jsp
URL: http://svn.apache.org/viewcvs/geronimo/daytrader/trunk/modules/web/src/main/webapp/account.jsp?rev=395900&r1=395899&r2=395900&view=diff
==============================================================================
--- geronimo/daytrader/trunk/modules/web/src/main/webapp/account.jsp (original)
+++ geronimo/daytrader/trunk/modules/web/src/main/webapp/account.jsp Fri Apr 21 07:36:22 2006
@@ -6,261 +6,299 @@
 <LINK rel="stylesheet" href="style.css" type="text/css" />
 </HEAD>
 <BODY bgcolor="#ffffff" link="#000099" vlink="#000099">
-<%@ page import="java.util.Collection, java.util.Iterator, java.math.BigDecimal, org.apache.geronimo.samples.daytrader.*, org.apache.geronimo.samples.daytrader.util.*" session="true" isThreadSafe="true" isErrorPage="false"%>
+<%@ page
+	import="java.util.Collection,java.util.Iterator,java.math.BigDecimal,org.apache.geronimo.samples.daytrader.*,org.apache.geronimo.samples.daytrader.util.*"
+	session="true" isThreadSafe="true" isErrorPage="false"%>
 <jsp:useBean id="results" scope="request" type="java.lang.String" />
-<jsp:useBean id="accountData" type="org.apache.geronimo.samples.daytrader.AccountDataBean" scope="request" />
-<jsp:useBean id="accountProfileData" type="org.apache.geronimo.samples.daytrader.AccountProfileDataBean" scope="request"/>
-<jsp:useBean id="orderDataBeans" type="java.util.Collection" scope="request"/>
+<jsp:useBean id="accountData"
+	type="org.apache.geronimo.samples.daytrader.AccountDataBean"
+	scope="request" />
+<jsp:useBean id="accountProfileData"
+	type="org.apache.geronimo.samples.daytrader.AccountProfileDataBean"
+	scope="request" />
+<jsp:useBean id="orderDataBeans" type="java.util.Collection"
+	scope="request" />
 <TABLE height="54">
-  <TBODY>
-    <TR>
-            <TD bgcolor="#8080c0" align="left" width="500" height="10" colspan="5"><FONT color="#ffffff"><B>Trade Account</B></FONT></TD>
-            <TD align="center" bgcolor="#000000" width="100" height="10"><FONT color="#ffffff"><B>Trade</B></FONT></TD>
-        </TR>
-        <TR align="center">
-            <TD><B><A href="app?action=home">Home</A></B><B> </B></TD>
-            <TD><B><A href="app?action=account">Account</A></B><B> </B></TD>
-            <TD><B><A href="app?action=portfolio">Portfolio</A></B><B> </B></TD>
-            <TD><B><A href="app?action=quotes&symbols=s:0,s:1,s:2,s:3,s:4">Quotes/Trade</A></B></TD>
-            <TD><B><A href="app?action=logout">Logoff</A></B></TD>
-            <TD></TD>
-        </TR>
-        <TR>
-            <TD align="right" colspan="6">
-            <HR>
-            <FONT color="#ff0000" size="-2"><%= new java.util.Date() %></FONT></TD>
-        </TR>
-<%
-boolean showAllOrders = request.getParameter("showAllOrders")==null?false:true;
-Collection closedOrders = (Collection)request.getAttribute("closedOrders");
-if ( (closedOrders != null) && (closedOrders.size()>0) )
-{
-%>         
-        <TR>
-            <TD colspan="6" bgcolor="#ff0000"><BLINK><B><FONT color="#ffffff">Alert: The following Order(s) have completed.</FONT></B></BLINK></TD>
-        </TR>
-        <TR align="center">
-            <TD colspan="6">
-            <TABLE border="1" style="font-size: smaller">
-                            <TBODY>
-<%
-	Iterator it = closedOrders.iterator();
-	while (it.hasNext() )
-	{
-		OrderDataBean closedOrderData = (OrderDataBean)it.next();
-%>                            
-                                <TR align="center">
-                                    <TD><A href="docs/glossary.html">order ID</A></TD>
-                                    <TD><A href="docs/glossary.html">order status</A></TD>
-                                    <TD><A href="docs/glossary.html">creation date</A></TD>
-									<TD><A href="docs/glossary.html">completion date</A></TD>
-									<TD><A href="docs/glossary.html">txn fee</A></TD>
-									<TD><A href="docs/glossary.html">type</A></TD>
-									<TD><A href="docs/glossary.html">symbol</A></TD>
-									<TD><A href="docs/glossary.html">quantity</A></TD>
-                                </TR>
-                                <TR align="center">
-                        <TD><%= closedOrderData.getOrderID()%></TD>
-                        <TD><%= closedOrderData.getOrderStatus()%></TD>
-                                    <TD><%= closedOrderData.getOpenDate()%></TD>
-                                    <TD><%= closedOrderData.getCompletionDate()%></TD>
-                                    <TD><%= closedOrderData.getOrderFee()%></TD>
-                                    <TD><%= closedOrderData.getOrderType()%></TD>
-                                    <TD><%= FinancialUtils.printQuoteLink(closedOrderData.getSymbol())%></TD>
-                                    <TD><%= closedOrderData.getQuantity()%></TD>
-                                </TR>
-        <%
-	}
+	<TBODY>
+		<TR>
+			<TD bgcolor="#c93333" align="left" width="640" height="10" colspan=5><B><FONT
+				color="#ffffff">DayTrader Account</FONT></B></TD>
+			<TD align="center" bgcolor="#000000" width="100" height="10"><FONT
+				color="#ffffff"><B>DayTrader</B></FONT></TD>
+		</TR>
+		<TR align="left">
+			<TD><B><A href="app?action=home">Home</A></B><B> </B></TD>
+			<TD><B><A href="app?action=account">Account</A></B><B> </B></TD>
+			<TD><B><A href="app?action=portfolio">Portfolio</A></B><B> </B></TD>
+			<TD><B><A href="app?action=quotes&amp;symbols=s:0,s:1,s:2,s:3,s:4">Quotes/Trade</A></B></TD>
+			<TD><B><A href="app?action=logout">Logoff</A></B></TD>
+			<TD></TD>
+		</TR>
+		<TR>
+			<TD align="right" colspan="6">
+			<HR>
+			<FONT color="#ff0000" size="-2"><%=new java.util.Date()%></FONT></TD>
+		</TR>
+		<%
+boolean showAllOrders = request.getParameter("showAllOrders") == null ? false
+                    : true;
+            Collection closedOrders = (Collection) request
+                    .getAttribute("closedOrders");
+            if ((closedOrders != null) && (closedOrders.size() > 0)) {
+
+                %>
+		<TR>
+			<TD colspan="6" bgcolor="#ff0000"><BLINK><B><FONT color="#ffffff">Alert:
+			The following Order(s) have completed.</FONT></B></BLINK></TD>
+		</TR>
+		<TR align="center">
+			<TD colspan="6">
+			<TABLE border="1" style="font-size: smaller">
+				<TBODY>
+					<%
+Iterator it = closedOrders.iterator();
+                while (it.hasNext()) {
+                    OrderDataBean closedOrderData = (OrderDataBean) it.next();
+%>
+					<TR align="center">
+						<TD><A href="docs/glossary.html">order ID</A></TD>
+						<TD><A href="docs/glossary.html">order status</A></TD>
+						<TD><A href="docs/glossary.html">creation date</A></TD>
+						<TD><A href="docs/glossary.html">completion date</A></TD>
+						<TD><A href="docs/glossary.html">txn fee</A></TD>
+						<TD><A href="docs/glossary.html">type</A></TD>
+						<TD><A href="docs/glossary.html">symbol</A></TD>
+						<TD><A href="docs/glossary.html">quantity</A></TD>
+					</TR>
+					<TR align="center">
+						<TD><%=closedOrderData.getOrderID()%></TD>
+						<TD><%=closedOrderData.getOrderStatus()%></TD>
+						<TD><%=closedOrderData.getOpenDate()%></TD>
+						<TD><%=closedOrderData.getCompletionDate()%></TD>
+						<TD><%=closedOrderData.getOrderFee()%></TD>
+						<TD><%=closedOrderData.getOrderType()%></TD>
+						<TD><%=FinancialUtils.printQuoteLink(closedOrderData
+                                    .getSymbol())%></TD>
+						<TD><%=closedOrderData.getQuantity()%></TD>
+					</TR>
+					<%
+}
 %>
-                                
-                            </TBODY>
-                        </TABLE>
-            </TD>
-        </TR>
-        <%
+
+				</TBODY>
+			</TABLE>
+			</TD>
+		</TR>
+		<%
 }
 %>
-    </TBODY>
+	</TBODY>
 </TABLE>
 <TABLE width="620">
-    <TBODY>
-        <TR>
-            <TD valign="top" width="643">
-            <TABLE width="100%">
-                <TBODY>
-                    <TR>
-                        <TD colspan="8"><FONT color="#ff0000"><%= results %></FONT></TD>
-                    </TR>
-                    <TR>
-                        <TD colspan="8" align="left" bgcolor="#cccccc"><B>Account Information</B></TD>
-                    </TR>
-                    <TR>
-                        <TD align="right" valign="bottom"><A href="docs/glossary.html">account created:</A></TD>
-                        <TD align="left" valign="bottom" colspan="2"><%= accountData.getCreationDate()
-%></TD>
-                        <TD align="right" valign="bottom"><A href="docs/glossary.html">last login: </A></TD>
-                        <TD align="left" valign="bottom" colspan="3"><%= accountData.getLastLogin()
-%></TD>
-                        <TD align="left" valign="bottom"></TD>
-                    </TR>
-                    <TR>
-                        <TD align="right" valign="bottom"><A href="docs/glossary.html">account ID</A></TD>
-                        <TD valign="bottom"><%= accountData.getAccountID()
-%></TD>
-                        <TD valign="bottom"></TD>
-                        <TD align="right" valign="bottom"><A href="docs/glossary.html">total logins: </A></TD>
-                        <TD valign="bottom"><%= accountData.getLoginCount()
-%></TD>
-                        <TD valign="bottom"></TD>
-                        <TD align="right" valign="bottom"><A href="docs/glossary.html">cash balance: </A></TD>
-                        <TD valign="bottom"><%= accountData.getBalance()
-%></TD>
-                    </TR>
-                    <TR>
-                        <TD align="right" valign="bottom"><A href="docs/glossary.html">user ID:</A></TD>
-                        <TD valign="bottom"><%= accountData.getProfileID()
-%></TD>
-                        <TD valign="bottom"></TD>
-                        <TD align="right" valign="bottom"><A href="docs/glossary.html">total logouts: </A></TD>
-                        <TD valign="bottom"><%= accountData.getLogoutCount()
-%></TD>
-                        <TD valign="bottom"></TD>
-                        <TD valign="bottom" align="right"><A href="docs/glossary.html">opening balance: </A></TD>
-                        <TD valign="bottom"><%= accountData.getOpenBalance()
-%></TD>
-                    </TR>
-                    <TR>
-                        <TD colspan="8"></TD>
-                    </TR>
-                </TBODY>
-            </TABLE>
-            <TABLE width="100%">
-                <TBODY>
+	<TBODY>
+		<TR>
+			<TD valign="top" width="643">
+			<TABLE width="100%">
+				<TBODY>
+					<TR>
+						<TD colspan="8"><FONT color="#ff0000"><%=results%></FONT></TD>
+					</TR>
+					<TR>
+						<TD colspan="8" align="left" bgcolor="#cccccc"><B>Account
+						Information</B></TD>
+					</TR>
+					<TR>
+						<TD align="right" valign="bottom"><A href="docs/glossary.html">account
+						created:</A></TD>
+						<TD align="left" valign="bottom" colspan="2"><%=accountData.getCreationDate()%></TD>
+						<TD align="right" valign="bottom"><A href="docs/glossary.html">last
+						login: </A></TD>
+						<TD align="left" valign="bottom" colspan="3"><%=accountData.getLastLogin()%></TD>
+						<TD align="left" valign="bottom"></TD>
+					</TR>
+					<TR>
+						<TD align="right" valign="bottom"><A href="docs/glossary.html">account
+						ID</A></TD>
+						<TD valign="bottom"><%=accountData.getAccountID()%></TD>
+						<TD valign="bottom"></TD>
+						<TD align="right" valign="bottom"><A href="docs/glossary.html">total
+						logins: </A></TD>
+						<TD valign="bottom"><%=accountData.getLoginCount()%></TD>
+						<TD valign="bottom"></TD>
+						<TD align="right" valign="bottom"><A href="docs/glossary.html">cash
+						balance: </A></TD>
+						<TD valign="bottom"><%=accountData.getBalance()%></TD>
+					</TR>
+					<TR>
+						<TD align="right" valign="bottom"><A href="docs/glossary.html">user
+						ID:</A></TD>
+						<TD valign="bottom"><%=accountData.getProfileID()%></TD>
+						<TD valign="bottom"></TD>
+						<TD align="right" valign="bottom"><A href="docs/glossary.html">total
+						logouts: </A></TD>
+						<TD valign="bottom"><%=accountData.getLogoutCount()%></TD>
+						<TD valign="bottom"></TD>
+						<TD valign="bottom" align="right"><A href="docs/glossary.html">opening
+						balance: </A></TD>
+						<TD valign="bottom"><%=accountData.getOpenBalance()%></TD>
+					</TR>
+					<TR>
+						<TD colspan="8"></TD>
+					</TR>
+				</TBODY>
+			</TABLE>
+			<TABLE width="100%">
+				<TBODY>
+
+					<TR>
+						<TD colspan="5" bgcolor="#cccccc"><B>Total Orders: </B><%=orderDataBeans.size()%></TD>
+						<TD bgcolor="#cccccc" align="right"><B><A
+							href="app?action=account&amp;showAllOrders=true">show all orders</A></B></TD>
+					</TR>
+					<TR align="center">
+						<TD colspan="6">
+						<TABLE border="1" style="font-size: smaller">
+							<CAPTION align="bottom"><B>Recent Orders</B></CAPTION>
+							<TBODY>
+								<TR align="center">
+									<TD><A href="docs/glossary.html">order ID</A></TD>
+									<TD><A href="docs/glossary.html">order Status</A></TD>
+									<TD><A href="docs/glossary.html">creation date</A></TD>
+									<TD><A href="docs/glossary.html">completion date</A></TD>
+									<TD><A href="docs/glossary.html">txn fee</A></TD>
+									<TD><A href="docs/glossary.html">type</A></TD>
+									<TD><A href="docs/glossary.html">symbol</A></TD>
+									<TD><A href="docs/glossary.html">quantity</A></TD>
+									<TD><A href="docs/glossary.html">price</A></TD>
+									<TD><A href="docs/glossary.html">total</A></TD>
+								</TR>
+								<%Iterator it = orderDataBeans.iterator();
+            int count = 0;
+            while (it.hasNext()) {
+                if ((showAllOrders == false) && (count++ >= 5))
+                    break;
+                OrderDataBean orderData = (OrderDataBean) it.next();
+
+                %>
+								<TR bgcolor="#fafcb6" align="center">
+									<TD><%=orderData.getOrderID()%></TD>
+									<TD><%=orderData.getOrderStatus()%></TD>
+									<TD><%=orderData.getOpenDate()%></TD>
+									<TD><%=orderData.getCompletionDate()%></TD>
+									<TD><%=orderData.getOrderFee()%></TD>
+									<TD><%=orderData.getOrderType()%></TD>
+									<TD><%=FinancialUtils.printQuoteLink(orderData.getSymbol())%></TD>
+									<TD><%=orderData.getQuantity()%></TD>
+									<TD><%=orderData.getPrice()%></TD>
+									<TD><%=orderData.getPrice().multiply(
+                                new BigDecimal(orderData.getQuantity()))%></TD>
+								</TR>
+								<%}
 
-                    <TR>
-                        <TD colspan="5" bgcolor="#cccccc"><B>Total Orders: </B><%= orderDataBeans.size()
-%></TD>
-                        <TD bgcolor="#cccccc" align="right"><B><A href="app?action=account&showAllOrders=true">show all orders</A></B></TD>
-                    </TR>
-                    <TR align="center">
-                        <TD colspan="6">
-                        <TABLE border="1" style="font-size: smaller">
-                            <CAPTION align="bottom"><B>Recent Orders</B></CAPTION>
-                            <TBODY>
-                                <TR align="center">
-                                    <TD><A href="docs/glossary.html">order ID</A></TD>
-                                    <TD><A href="docs/glossary.html">order Status</A></TD>
-                                    <TD><A href="docs/glossary.html">creation date</A></TD>
-                                    <TD><A href="docs/glossary.html">completion date</A></TD>
-                                    <TD><A href="docs/glossary.html">txn fee</A></TD>
-                                    <TD><A href="docs/glossary.html">type</A></TD>
-                                    <TD><A href="docs/glossary.html">symbol</A></TD>
-                                    <TD><A href="docs/glossary.html">quantity</A></TD>
-                                    <TD><A href="docs/glossary.html">price</A></TD>
-                                    <TD><A href="docs/glossary.html">total</A></TD>
-                                </TR>
-                                <% 
-Iterator it = orderDataBeans.iterator();
-int count=0;
-while (it.hasNext()) {
-    if ( (showAllOrders == false) && (count++ >= 5) )
-    	break;
-	OrderDataBean orderData = (OrderDataBean) it.next();                        	
-                         %>
-                                <TR bgcolor="#fafcb6" align="center">
-                                    <TD><%= orderData.getOrderID() %></TD>
-                                    <TD><%= orderData.getOrderStatus() %></TD>
-                                    <TD><%= orderData.getOpenDate() %></TD>
-                                    <TD><%= orderData.getCompletionDate() %></TD>
-                                    <TD><%= orderData.getOrderFee() %></TD>
-                                    <TD><%= orderData.getOrderType() %></TD>
-                                    <TD><%= FinancialUtils.printQuoteLink(orderData.getSymbol()) %></TD>
-                                    <TD><%= orderData.getQuantity() %></TD>
-                                    <TD><%= orderData.getPrice() %></TD>
-                                    <TD><%= orderData.getPrice().multiply(new BigDecimal(orderData.getQuantity())) %></TD>
-                                </TR>
-                                <% }
-				%></TBODY>
-                        </TABLE>
-                        </TD>
-                    </TR>
-                    <TR>
-                        <TD colspan="6"></TD>
-                    </TR>
-               </TBODY>
-            </TABLE>                    
-            <TABLE width="100%">
-                <FORM>            
-                <TBODY>                 
-                    <TR>
-                        <TD colspan="6" bgcolor="#cccccc"><B>Account Profile</B></TD>
-                    </TR>
-                    <TR>
-                        <TD align="right" valign="top" width="113">
-                        <A href="docs/glossary.html">user ID:</A></TD>
-                        <TD align="left" valign="top" colspan="2" width="228"><INPUT size="30" type="text" maxlength="30" readonly name="userID" value="<%= accountProfileData.getUserID() %>"></TD>
-                        <TD align="right" valign="top" width="73" colspan="2">
-                        <A href="docs/glossary.html">full name: </A></TD>
-                        <TD align="left" valign="top"><INPUT size="30" type="text" maxlength="30" name="fullname" value="<%= accountProfileData.getFullName() %>"></TD>
-                    </TR>
-                    <TR>
-                        <TD align="right" width="113"> <A href="docs/glossary.html">password: </A></TD>
-                        <TD colspan="2" width="228"><INPUT size="30" type="password" maxlength="30" name="password" value="<%= accountProfileData.getPassword() %>"> </TD>
-                        <TD align="right" width="73" colspan="2"><A href="docs/glossary.html">address: </A></TD>
-                        <TD><INPUT size="30" type="text" maxlength="30" name="address" value="<%= accountProfileData.getAddress() %>"></TD>
-                    </TR>
-                    <TR>
-                        <TD align="right" width="113"> <A href="docs/glossary.html">confirm password: </A><BR>
-                        </TD>
-                        <TD colspan="2" align="left" width="228"><INPUT size="30" type="password" maxlength="30" name="cpassword" value="<%= accountProfileData.getPassword() %>"></TD>
-                        <TD align="right" width="73" colspan="2"><A href="docs/glossary.html">credit card: </A></TD>
-                        <TD align="left"><INPUT size="30" type="text" maxlength="30" name="creditcard" value="<%= accountProfileData.getCreditCard() %>" readonly></TD>
-                    </TR>
-                    <TR>
-                        <TD align="right" width="113"><A href="docs/glossary.html">email address: </A></TD>
-                        <TD colspan="2" align="left" width="228"><INPUT size="30" type="text" maxlength="30" name="email" value="<%= accountProfileData.getEmail() %>"></TD>
-                        <TD align="right" width="73" colspan="2"></TD>
-                        <TD align="center"><INPUT type="submit" name="action" value="update_profile"></TD>
-                    </TR>
-                    <TR>
-                        <TD width="113"></TD>
-                        <TD colspan="5"></TD>
-                    </TR>
-                </TBODY>
-			    </FORM>
-            </TABLE>
-            </TD>
-        </TR>
-    </TBODY>
+            %>
+							</TBODY>
+						</TABLE>
+						</TD>
+					</TR>
+					<TR>
+						<TD colspan="6"></TD>
+					</TR>
+				</TBODY>
+			</TABLE>
+			<TABLE width="100%">
+				<FORM action=""></FORM>
+				<TBODY>
+					<TR>
+						<TD colspan="6" bgcolor="#cccccc"><B>Account Profile</B></TD>
+					</TR>
+					<TR>
+						<TD align="right" valign="top" width="113"><A
+							href="docs/glossary.html">user ID:</A></TD>
+						<TD align="left" valign="top" colspan="2" width="228"><INPUT
+							size="30" type="text" maxlength="30" readonly name="userID"
+							value="<%= accountProfileData.getUserID() %>"></TD>
+						<TD align="right" valign="top" width="73" colspan="2"><A
+							href="docs/glossary.html">full name: </A></TD>
+						<TD align="left" valign="top"><INPUT size="30" type="text"
+							maxlength="30" name="fullname"
+							value="<%= accountProfileData.getFullName() %>"></TD>
+					</TR>
+					<TR>
+						<TD align="right" width="113"><A href="docs/glossary.html">password:
+						</A></TD>
+						<TD colspan="2" width="228"><INPUT size="30" type="password"
+							maxlength="30" name="password"
+							value="<%= accountProfileData.getPassword() %>"></TD>
+						<TD align="right" width="73" colspan="2"><A
+							href="docs/glossary.html">address: </A></TD>
+						<TD><INPUT size="30" type="text" maxlength="30" name="address"
+							value="<%= accountProfileData.getAddress() %>"></TD>
+					</TR>
+					<TR>
+						<TD align="right" width="113"><A href="docs/glossary.html">confirm
+						password: </A><BR>
+						</TD>
+						<TD colspan="2" align="left" width="228"><INPUT size="30"
+							type="password" maxlength="30" name="cpassword"
+							value="<%= accountProfileData.getPassword() %>"></TD>
+						<TD align="right" width="73" colspan="2"><A
+							href="docs/glossary.html">credit card: </A></TD>
+						<TD align="left"><INPUT size="30" type="text" maxlength="30"
+							name="creditcard"
+							value="<%= accountProfileData.getCreditCard() %>" readonly></TD>
+					</TR>
+					<TR>
+						<TD align="right" width="113"><A href="docs/glossary.html">email
+						address: </A></TD>
+						<TD colspan="2" align="left" width="228"><INPUT size="30"
+							type="text" maxlength="30" name="email"
+							value="<%= accountProfileData.getEmail() %>"></TD>
+						<TD align="right" width="73" colspan="2"></TD>
+						<TD align="center"><INPUT type="submit" name="action"
+							value="update_profile"></TD>
+					</TR>
+					<TR>
+						<TD width="113"></TD>
+						<TD colspan="5"></TD>
+					</TR>
+				</TBODY>
+				<FORM action=""></FORM>
+			</TABLE>
+			</TD>
+		</TR>
+	</TBODY>
 </TABLE>
 <TABLE height="54" style="font-size: smaller">
-  <TBODY>
-        <TR>
-            <TD colspan="2">
-            <HR>
-            </TD>
-        </TR>
-        <TR>
-            <TD colspan="2">
-            <TABLE width="100%" style="font-size: smaller">
-                <TBODY>
-                    <TR>
-                        <TD>Note: Click any <A href="docs/glossary.html">symbol</A> for a quote or to trade.</TD>
-                        <TD align="right"><FORM><INPUT type="submit" name="action" value="quotes"> <INPUT size="20" type="text" name="symbols" value="s:0, s:1, s:2, s:3, s:4"></FORM></TD>
-                    </TR>
-                </TBODY>
-            </TABLE>
-            </TD>
-        </TR>
-        <TR>
-            <TD bgcolor="#8080c0" align="left" width="500" height="10"><B><FONT color="#ffffff">Trade Account</FONT></B></TD>
-            <TD align="center" bgcolor="#000000" width="100" height="10"><FONT color="#ffffff"><B>Trade</B></FONT></TD>
-        </TR>
-        <TR>
-            <TD colspan="2" align="center">Apache Geronimo Performance Benchmark Sample DayTrader<BR>
-Copyright 2005, Apache Software Foundation</TD>
-        </TR>
-    </TBODY>
+	<TBODY>
+		<TR>
+			<TD colspan="2">
+			<HR>
+			</TD>
+		</TR>
+		<TR>
+			<TD colspan="2">
+			<TABLE width="100%" style="font-size: smaller">
+				<TBODY>
+					<TR>
+						<TD>Note: Click any <A href="docs/glossary.html">symbol</A> for a
+						quote or to trade.</TD>
+						<TD align="right">
+						<FORM action=""><INPUT type="submit" name="action" value="quotes">
+						<INPUT size="20" type="text" name="symbols"
+							value="s:0, s:1, s:2, s:3, s:4"></FORM>
+						</TD>
+					</TR>
+				</TBODY>
+			</TABLE>
+			</TD>
+		</TR>
+		<TR>
+			<TD bgcolor="#c93333" align="left" width="640" height="10"><B><FONT
+				color="#ffffff">DayTrader Account</FONT></B></TD>
+			<TD align="center" bgcolor="#000000" width="100" height="10"><FONT
+				color="#ffffff"><B>DayTrader</B></FONT></TD>
+		</TR>
+	</TBODY>
 </TABLE>
 </BODY>
 </HTML>



Mime
View raw message