geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r290479 [12/16] - in /geronimo/trunk/sandbox/daytrader: ./ bin/ derby/ modules/ modules/core/ modules/core/src/ modules/core/src/conf/ modules/core/src/java/ modules/core/src/java/org/ modules/core/src/java/org/apache/ modules/core/src/java...
Date Tue, 20 Sep 2005 16:08:17 GMT
Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/config.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/config.jsp?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/config.jsp (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/config.jsp Tue Sep 20 09:07:08 2005
@@ -0,0 +1,313 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+	<META http-equiv="Content-Style-Type" content="text/css">
+	<TITLE>Welcome to Trade</TITLE>
+</HEAD>
+<BODY bgcolor="#ffffff" link="#000099">
+<%@ page import="org.apache.geronimo.samples.daytrader.TradeConfig" session="false" isThreadSafe="true" isErrorPage="false" %>
+
+<TABLE style="font-size: smaller">
+	<TBODY>
+		<TR>
+			<TD bgcolor="#8080c0" align="left" width="500" height="10" colspan="5"><FONT color="#ffffff"><B>Trade Configuration</B></FONT></TD>
+			<TD align="center" bgcolor="#000000" width="100" height="10"><FONT color="#ffffff"><B>Trade</B></FONT></TD>
+		</TR>
+		<TR>
+			<TD colspan="6">
+				<HR>
+			</TD>
+		</TR>
+		<TR>
+			<TD colspan="6">
+			</TD>
+		</TR>
+	</TBODY>
+</TABLE>
+
+<%
+String status;
+status = (String) request.getAttribute("status");
+if (status != null) {
+%>
+<TABLE width="100%" height="30">
+	<TBODY>
+		<TR>
+			<TD></TD>
+			<TD><FONT color="#ff0033"><% out.print(status); %>
+	</FONT></TD>
+			<TD></TD>
+		</TR>
+	</TBODY>
+</TABLE>
+<%
+}
+%>
+
+<FORM action="config" method="POST">
+	<INPUT type="hidden" name="action" value="updateConfig">
+	
+<TABLE border="1" width="614">
+	<TBODY>
+		<TR>
+			<TD colspan="2">
+			The Current Trade runtime configuration is detailed
+			below. View and optionally update run-time parameters. &nbsp;<BR>
+			<BR>
+			<B>NOTE: </B>Parameters settings will return to default
+			on&nbsp;server restart. To make configuration settings persistent
+			across application server stop/starts, edit the servlet init
+			parameters for each Trade servlet. This is described in the <A
+				href="docs/tradeFAQ.html">Trade FAQ</A>.<BR>
+			<HR>
+			</TD>
+		</TR>
+		<TR>
+			<TD align="left">
+			<B>Run-Time Mode </B>
+			<P align="left"><%String configParm = "RunTimeMode";
+String names[] = TradeConfig.runTimeModeNames;
+int index = TradeConfig.runTimeMode;
+for (int i = 0; i < names.length; i++) {
+	out.print(
+		"<INPUT type=\"radio\" name=\""
+			+ configParm
+			+ "\" value=\""
+			+ i
+			+ "\" ");
+	if (index == i)
+		out.print("checked");
+	out.print("> " + names[i] + "<BR>");
+}
+%></P>
+			</TD>
+			<TD>
+			<BR>
+			Run Time Mode determines server implementation of the TradeServices
+			to use in the Trade application Enterprise Java Beans including
+			Session, Entity and Message beans or Direct mode which uses direct
+			database and JMS access. See <A href="docs/tradeFAQ.html">Trade FAQ</A>
+			for details.<BR>
+			</TD>
+		</TR>
+
+
+		<TR>
+			<TD align="left">
+			<B>Order-Processing Mode </B>
+			<P align="left"><%configParm = "OrderProcessingMode";
+names = TradeConfig.orderProcessingModeNames;
+index = TradeConfig.orderProcessingMode;
+for (int i = 0; i < names.length; i++) {
+	out.print(
+		"<INPUT type=\"radio\" name=\""
+			+ configParm
+			+ "\" value=\""
+			+ i
+			+ "\" ");
+	if (index == i)
+		out.print("checked");
+	out.print("> " + names[i] + "<BR>");
+}
+%></P>
+			</TD>
+			<TD>
+			<BR>
+			Order Processing Mode determines the mode for completing stock
+			purchase and sell operations. Synchronous mode completes the order
+			immediately. Asynchronous_1-phase mode uses MDB/JMS to queue the
+			order to a Trade broker agent to complete the order.
+			Asychronous_2-Phase performs a 2-phase commit over the EJB Entity/DB
+			and MDB/JMS transactions. See <A href="docs/tradeFAQ.html">Trade FAQ</A>
+			for details. <B></B><BR>
+			</TD>
+		</TR>
+		<TR>
+			<TD align="left">
+			<B>Access Mode </B>
+			<P align="left"><%configParm = "AcessMode";
+names = TradeConfig.accessModeNames;
+index = TradeConfig.getAccessMode();
+for (int i = 0; i < names.length; i++) {
+	out.print(
+		"<INPUT type=\"radio\" name=\""
+			+ configParm
+			+ "\" value=\""
+			+ i
+			+ "\" ");
+	if (index == i)
+		out.print("checked");
+	out.print("> " + names[i] + "<BR>");
+}
+%></P>
+			<P><B> Web Services Endpoint <BR>
+			<INPUT name="SOAP_URL" size="30" type="text"
+				value='<%=(TradeConfig.getSoapURL() == null) ? "" : TradeConfig.getSoapURL()%>'>
+			<BR>
+			</B></P>
+			</TD>
+			<TD>
+			<BR>
+			Access Mode determines the protocol used by the Trade Web application
+			to access server side services. The Standard mode uses the default
+			Java RMI protocol. The Web Services mode uses the WebSpheres
+			implementation of Web Services including SOAP, WSDL and UDDI. <BR>
+			For the Web Services Access mode, set the Web Services Endpoint URL
+			to point to the host and port which is running the Trade Application
+			Web Services module. <BR>
+			</TD>
+		</TR>
+		<TR>
+			<TD align="left">
+			<B>Scenario Workload Mix</B>
+			<P align="left"><%configParm = "WorkloadMix";
+names = TradeConfig.workloadMixNames;
+index = TradeConfig.workloadMix;
+for (int i = 0; i < names.length; i++) {
+	out.print(
+		"<INPUT type=\"radio\" name=\""
+			+ configParm
+			+ "\" value=\""
+			+ i
+			+ "\" ");
+	if (index == i)
+		out.print("checked");
+	out.print("> " + names[i] + "<BR>");
+}
+%></P>
+			</TD>
+			<TD>
+			This setting determines the runtime
+			workload mix of Trade operations when driving the benchmark through
+			TradeScenarioServlet. See <A href="docs/tradeFAQ.html">Trade FAQ</A>
+			for details.
+			</TD>
+		</TR>
+		<TR>
+			<TD align="left">
+			<B>WebInterface</B>
+			<P align="left"><%configParm = "WebInterface";
+names = TradeConfig.webInterfaceNames;
+index = TradeConfig.webInterface;
+for (int i = 0; i < names.length; i++) {
+	out.print(
+		"<INPUT type=\"radio\" name=\""
+			+ configParm
+			+ "\" value=\""
+			+ i
+			+ "\" ");
+	if (index == i)
+		out.print("checked");
+	out.print("> " + names[i] + "<BR>");
+}
+%></P>
+			</TD>
+			<TD>
+			This setting determines the Web interface
+			technology used, JSPs or JSPs with static images and GIFs.
+			</TD>
+		</TR>
+		<TR>
+			<TD align="left">
+			<B>Caching Type</B>
+			<P align="left"><%configParm = "CachingType";
+names = TradeConfig.cachingTypeNames;
+index = TradeConfig.cachingType;
+for (int i = 0; i < names.length; i++) {
+	out.print(
+		"<INPUT type=\"radio\" name=\""
+			+ configParm
+			+ "\" value=\""
+			+ i
+			+ "\" ");
+	if (index == i)
+		out.print("checked");
+	out.print("> " + names[i] + "<BR>");
+}
+%></P>
+			</TD>
+			<TD>
+			This setting determines the caching technology used for data caching
+			, DistributedMap, Command Caching or No Caching.
+			</TD>
+		</TR>	
+		<TR>
+			<TD colspan="2" align="center">
+				<B>Miscellaneous Settings</B>
+			</TD>
+		</TR>
+		<TR>
+			<TD align="left">
+				<B>Trade Max Users </B><BR>
+			<INPUT size="25" type="text" name="MaxUsers"
+				value=<%=TradeConfig.getMAX_USERS()%>><BR>
+			<B>Trade Max Quotes</B><BR>
+			<INPUT size="25" type="text" name="MaxQuotes"
+				value=<%=TradeConfig.getMAX_QUOTES()%>>
+			</TD>
+			<TD>
+			By default the Trade database is
+			populated with 500 users (uid:0 - uid:499) and 1000 quotes (s:0 -
+			s:999). <BR>
+			</TD>
+		</TR>
+		<TR>
+			<TD align="left">
+			<B>Primitive Iteration</B><BR>
+			<INPUT size="25" type="text" name="primIterations"
+				value="<%=TradeConfig.getPrimIterations()%>">
+			</TD>
+			<TD>
+			By default the Trade primitives are
+			execute one operation per web request. Change this value to repeat
+			operations multiple times per web request.
+			</TD>
+		</TR>
+		<TR>
+			<TD align="left">
+			<INPUT type="checkbox"
+				<%=TradeConfig.getActionTrace() ? "checked" : ""%>
+				name="EnableActionTrace"> <B><FONT size="-1">Enable operation trace</FONT></B><BR>
+			<INPUT type="checkbox" <%=TradeConfig.getTrace() ? "checked" : ""%>
+				name="EnableTrace"> <B><FONT size="-1">Enable full trace</FONT></B>
+			</TD>
+			<TD>
+				Enable Trade processing trace messages<BR>
+			</TD>
+		</TR>
+		<TR>
+			<TD colspan="2" align="right">
+				<INPUT type="submit" value="Update Config">
+			</TD>
+		</TR>
+	</TBODY>
+</TABLE>
+
+<TABLE height="54" style="font-size: smaller">
+	<TBODY>
+		<TR>
+			<TD colspan="2">
+			<HR>
+			</TD>
+		</TR>
+		<TR>
+			<TD colspan="2"></TD>
+		</TR>
+		<TR>
+			<TD bgcolor="#8080c0" align="left" width="500" height="10"><B><FONT
+				color="#ffffff">Trade Configuration</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">Created&nbsp;with&nbsp;IBM WebSphere
+			Application Server and WebSphere Studio Application Developer<BR>
+
+
+			Copyright 2000, IBM Corporation</TD>
+		</TR>
+	</TBODY>
+</TABLE>
+</FORM>
+</BODY>
+</HTML>

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/configure.html
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/configure.html?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/configure.html (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/configure.html Tue Sep 20 09:07:08 2005
@@ -0,0 +1,89 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- Sample HTML file -->
+
+<HTML>
+<HEAD>
+<META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.1 for Windows">
+<META http-equiv="Content-Style-Type" content="text/css">
+<TITLE>Configuration and utilities</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF">
+<HR>
+<TABLE width="100%">
+  <TBODY>
+    <TR>
+      <TD>
+      <H3>Configuration utilities</H3>
+      </TD>
+      <TD align="right"></TD>
+    </TR>
+  </TBODY>
+</TABLE>
+<HR>
+<CENTER>
+<TABLE border="1" width="100%">
+  <TBODY>
+    <TR>
+      <TD align="center"><B><FONT face="Times New Roman" size="-1">Benchmark Configuration <BR>
+            Tools</FONT> </B></TD>
+      <TD align="center"><B><FONT face="Times New Roman" size="-1"> </FONT>Description </B></TD>
+    </TR>
+    <TR>
+      <TD><A href="config?action=resetTrade"><FONT face="Times New Roman" size="-1">Reset Trade<BR>
+      (to be done before each run)</FONT></A></TD>
+      <TD>Reset the Trade runtime to a clean starting
+      point by logging off all users, removing
+      new registrations and other general cleanup.
+      For consistent results this URL should be
+      run <B>before each </B>Trade run.</TD>
+    </TR>
+    <TR>
+      <TD><A href="config" target="_self"><FONT face="Times New Roman" size="-1">Configure Trade run-time parameters</FONT></A></TD>
+      <TD>This link provides an interface to set configuration
+      parameters that control Trade run-time characteristics
+      such as using EJBs or JDBC. This link also
+      provides utilities such as setting the UID
+      and Password for a remote or protected database
+      when using JDBC.</TD>
+    </TR>
+    <TR>
+      <TD><A href="config?action=buildDB" target="_blank"><FONT face="Times New Roman" size="-1">(Re)-populate &nbsp;Trade&nbsp;Database</FONT></A>
+      
+      </TD>
+      <TD>This link is used to initially populate or re-populate the Trade database with fictitious users (uid:0, uid:1, ...) and stocks (s:0, s:1, ...). First all existing users and stocks are deleted (if any). The database is then populated with a new set of Trade users and stocks.</TD>
+    </TR>
+    <TR>
+      <TD><A href="scenario" target="_blank"><FONT face="Times New Roman" size="-1">Test Trade Scenario</FONT></A></TD>
+      <TD>This links pops up a browser to manually
+      step through a Trade scenario by hitting
+      &quot;Reload&quot; on your browser</TD>
+    </TR>
+        <!--
+    <TR>
+      <TD><A href="/WebSphereSamples/TradeSample/trade2_stdout.txt" target="_blank">trade2_stdout.txt</A><BR>
+      <BR>
+      <A href="/WebSphereSamples/TradeSample/trade2_stderr.txt" target="_blank">
+      trade2_stderr.txt</A></TD>
+      <TD>View the Trade 2 runtime logs. These links capture stdout and stderr output
+      from the Trade 2 application and WebSphere and are useful for debugging
+      runtime errors. Be sure to hit &quot;shift-reload&quot; for the browser
+      to refresh the output.</TD>
+    </TR>
+	-->
+    <TR>
+      <TD><FONT size="-1"><A href="docs/tradeversion.html">Trade Version</A></TD>
+      <TD> Trade application version and change history
+      information</TD>
+    </TR>
+    <TR>
+      <TD></TD>
+      <TD></TD>
+    </TR>
+  </TBODY>
+</TABLE>
+</CENTER>
+<CENTER>
+</CENTER>
+<HR>
+</BODY>
+</HTML>

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/contentHome.html
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/contentHome.html?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/contentHome.html (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/contentHome.html Tue Sep 20 09:07:08 2005
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- Sample HTML file -->
+
+<HTML>
+<HEAD>
+<META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.1 for Windows">
+<META http-equiv="Content-Style-Type" content="text/css">
+<TITLE>WebSphere performance benchmark sample overview</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF">
+<HR>
+<P align="left"><FONT size="+1"><B>Overview</B></FONT></P>
+<BLOCKQUOTE><FONT face="Times New Roman" size="-1">The WebSphere<SUP>TM</SUP> performance benchmark sample provides a suite of IBM developed workloads for characterizing performance of the WebSphere Application Server. The workloads consist of an end to end web application and a full set of primitives. The applications are a collection of Java classes, Java Servlets, Java Server Pages, Web Services, and Enterprise Java Beans built to open J2EE APIs. Together these provide versatile and portable test cases designed to measure aspects of scalability and performance.</FONT></BLOCKQUOTE>
+<P align="center">
+<IMG src="images/tradeTopology.gif" width="651" height="301" border="0">
+<BR>
+<B>Trade J2EE Components </B><BR>
+<B>Model-View-Controller Architecture</B>
+
+</P>
+<BLOCKQUOTE><FONT size="-1"><B>Trade</B><BR>
+Trade is the WebSphere end-to-end benchmark and performance sample application. The new Trade benchmark has been re-designed and developed to cover WebSphere's significantly expanding programming model. This provides a real world workload driving WebSphere's implementation of J2EE 1.4 and Web Services including key WebSphere performance components and features.<BR>
+<BR>
+Trade's new design spans J2EE 1.4 including the new EJB 2.1 component architecture, Message Driven beans, transactions (1-phase, 2-phase commit) and Web Services (SOAP, WSDL). Trade also highlights key WebSphere performance components such as DynaCache, WebSphere Edge Server and Web Services.<BR>
+<BR>
+<B>Primitives</B><BR>
+</FONT><FONT face="Times New Roman" size="-1">The <A href="web_prmtv.html">Primitives</A> provide a set of workloads to individually test various components of the WebSphere Application Server. The primitives leverage the Trade application infrastructure to test specific WebSphere J2EE components such as the servlet engine, JSP support, EJB Entitiy, Session and Message Driven beans, HTTP Session support and more.</FONT></BLOCKQUOTE>
+<BLOCKQUOTE><FONT face="Times New Roman" size="-1">Additional overview information is included in the <A href="docs/tradeFAQ.html">FAQ</A></FONT></BLOCKQUOTE>
+<HR>
+
+</BODY>
+</HTML>

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/displayQuote.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/displayQuote.jsp?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/displayQuote.jsp (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/displayQuote.jsp Tue Sep 20 09:07:08 2005
@@ -0,0 +1,32 @@
+<%@ page import="java.util.Collection, java.util.Iterator, java.math.BigDecimal, org.apache.geronimo.samples.daytrader.*, org.apache.geronimo.samples.daytrader.util.*, org.apache.geronimo.samples.daytrader.soap.*" session="true" isThreadSafe="true" isErrorPage="false"%>
+<% 
+    String symbol = request.getParameter("symbol");
+    TradeServices tAction=null;
+	if(TradeConfig.getAccessMode() == TradeConfig.STANDARD)
+		tAction = new TradeAction();
+	else if(TradeConfig.getAccessMode() == TradeConfig.WEBSERVICES)
+		tAction = new TradeWebSoapProxy();   
+	try { 
+		QuoteDataBean quoteData = tAction.getQuote(symbol);
+
+ %>
+	<TR align="center" bgcolor="#fafcb6">
+		<TD><%= FinancialUtils.printQuoteLink(quoteData.getSymbol()) %></TD>
+		<TD><%= quoteData.getCompanyName()%></TD>
+		<TD><%= quoteData.getVolume()%></TD>  
+		<TD><%= quoteData.getLow() + " - " + quoteData.getHigh()%></TD>                                                                      
+		<TD nowrap><%= quoteData.getOpen()%></TD>                                    
+		<TD>$ <%= quoteData.getPrice()%></TD>
+		<TD><%= FinancialUtils.printGainHTML(new BigDecimal(quoteData.getChange())) %> <%= FinancialUtils.printGainPercentHTML( FinancialUtils.computeGainPercent(quoteData.getPrice(), quoteData.getOpen())) %></TD>
+		<TD>
+			<FORM><INPUT type="submit" name="action" value="buy"><INPUT type="hidden" name="symbol" value="<%= quoteData.getSymbol()%>"><INPUT size="4" type="text" name="quantity" value="100"></FORM>
+		</TD>
+	</TR>
+
+<%
+	}
+	catch (Exception e)
+	{
+		Log.error("displayQuote.jsp  exception", e);
+	}
+%>

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/error.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/error.jsp?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/error.jsp (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/error.jsp Tue Sep 20 09:07:08 2005
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<%@ page import="java.io.*, java.lang.reflect.*" %>
+
+
+<TABLE>
+  <TBODY>
+    <TR>
+            <TD bgcolor="#ff0000" align="left" width="500" colspan="5" height="10"><FONT color="#ffffff"><B>Trade Error</B></FONT></TD>
+            <TD align="center" bgcolor="#000000" width="100" height="10"><FONT color="#ffffff"><B>Trade</B></FONT></TD>
+        </TR>
+
+</TABLE>
+<DIV align="left"></DIV>
+<TABLE width="100%">
+  <TBODY>
+    <TR>
+            <TD width="3"></TD>
+            <TD>
+      <HR>
+      </TD>
+            <TD width="3"></TD>
+        </TR>
+    <TR>
+            <TD bgcolor="#e7e4e7" rowspan="4" width="3"></TD>
+            <TD><B><FONT color="#000000">An Error has occured during Trade processing</FONT><FONT size="-2">.</FONT></B><BR>
+            The stack trace detailing the error follows.
+            <p><b>Please consult the application server error logs (SystemOut.log/SystemErr.log/FFDC) for further details.</b></p>
+            </TD>
+            <TD bgcolor="#e7e4e7" width="3" rowspan="4"></TD>
+        </TR>
+    <TR>
+            <TD><FONT size="-1">
+
+<%
+  String message = null;
+  int status_code = -1;
+  String exception_info = null;
+  String url = null;
+
+  try {
+    Exception theException = null;
+    Integer status = null;
+
+    //these attribute names are specified by Servlet 2.2
+    message = (String) request.getAttribute("javax.servlet.error.message");
+    status = ((Integer) request.getAttribute("javax.servlet.error.status_code"));
+    theException = (Exception) request.getAttribute("javax.servlet.error.exception");
+    url = (String) request.getAttribute("javax.servlet.error.request_uri");
+
+    // convert the stack trace to a string
+    StringWriter sw = new StringWriter();
+    PrintWriter pw = new PrintWriter(sw);
+    theException.printStackTrace(pw);
+    pw.flush();
+    pw.close();
+
+    if (message == null) {
+      message = "not available";
+    }
+
+    if (status == null) {
+      status_code = -1;             
+    }
+    else {
+      status_code = status.intValue();
+    }
+    if (theException == null) {
+      exception_info = "not available";
+    }
+    else {
+      exception_info = theException.toString();
+      exception_info = exception_info + "<br>" + sw.toString();
+      sw.close();
+    }
+  } catch (Exception e) {
+     e.printStackTrace();
+  }
+
+  out.println("<br><br><b>Processing request:</b>" +  url);      
+  out.println("<br><b>StatusCode:</b> " +  status_code);
+  out.println("<br><b>Message:</b>" + message);
+  out.println("<br><b>Exception:</b>" + exception_info);
+
+%>
+</FONT><FONT size="-1">
+     </FONT></TD>
+        </TR>
+    <TR>
+            <TD align="left"></TD>
+        </TR>
+    <TR>
+            <TD>
+      <HR>
+      </TD>
+        </TR>
+  </TBODY>
+</TABLE>
+<TABLE>
+  <TBODY>
+    <TR>
+            <TD bgcolor="#ff0000" align="left" width="500" colspan="5" height="10"><FONT color="#ffffff"><B>Trade Error</B></FONT></TD>
+            <TD align="center" bgcolor="#000000" width="100" height="10"><FONT color="#ffffff"><B>Trade</B></FONT></TD>
+        </TR>
+    </TBODY>
+</TABLE>

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/geronimo-web.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/geronimo-web.xml?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/geronimo-web.xml (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/geronimo-web.xml Tue Sep 20 09:07:08 2005
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+    <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
+        xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
+        configId="TradeWeb" parentId="Trade">
+    
+    <context-priority-classloader>false</context-priority-classloader>
+
+    <naming:resource-ref>
+        <naming:ref-name>jdbc/TradeDataSource</naming:ref-name>
+        <naming:resource-link>
+          TradeDataSource
+        </naming:resource-link>
+    </naming:resource-ref>
+</web-app>
+
+

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/index.html
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/index.html?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/index.html (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/index.html Tue Sep 20 09:07:08 2005
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+<HEAD>
+<META name="GENERATOR" content="IBM WebSphere Page Designer V3.0.2 for Windows">
+<META http-equiv="Content-Style-Type" content="text/css">
+<TITLE>Trade</TITLE>
+</HEAD>
+<FRAMESET rows="106,*" frameborder="0" framespacing="0" border="0">
+<FRAME src="./topBanner.html" scrolling="NO" name="TradeFrameTop">
+    <FRAMESET cols="166,85%" frameborder="NO">
+<FRAME src="./leftMenu.html" scrolling="AUTO" name="TradeFrameLeft">
+<FRAME src="./contentHome.html" name="TradeFrameMain" scrolling="AUTO">
+</FRAMESET>
+    <NOFRAMES>
+<BODY>
+<P>Need browser which supports frames to see
+this page</P>
+</BODY>
+</NOFRAMES>
+</FRAMESET>
+</HTML>

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/leftMenu.html
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/leftMenu.html?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/leftMenu.html (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/leftMenu.html Tue Sep 20 09:07:08 2005
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.1 for Windows">
+<META http-equiv="Content-Style-Type" content="text/css">
+<TITLE>Leftmenu</TITLE>
+<BASE target="_self">
+<LINK rel="stylesheet" href="style.css" type="text/css" />
+</HEAD>
+<BODY bgcolor="#f3f3f3" link="#000080" vlink="#000080">
+<HR width="130" size="1" align="center">
+<P align="center"><FONT size="-1"><A href="contentHome.html" target="TradeFrameMain"><FONT size="2"><BR>
+<BR>
+Overview</FONT></A></FONT></P>
+<P align="center"><FONT size="-1"><A href="docs/documentation.html" target="TradeFrameMain"><FONT size="2">Technical <BR>
+Documentation</FONT></A></FONT></P>
+<P align="center"><FONT size="-1"><A href="docs/benchmarking.html" target="TradeFrameMain"><FONT size="2">Benchmarking</FONT></A></FONT></P>
+<P align="center"><FONT size="2"><A href="configure.html" target="TradeFrameMain">Configuration</A></FONT></P>
+<P align="center"><FONT size="-1"><A href="app" target="TradeFrameMain"><FONT size="2">Go Trade!</FONT></A></FONT></P>
+<P align="center"><FONT size="-1"><A href="web_prmtv.html" target="TradeFrameMain">Web Primitives</A></FONT></P>
+<HR width="130" size="1" align="center">
+<P align="center"><I><IMG src="images/tradeLogo.gif" border="0" width="56" height="24"><BR>
+<BR>
+</I><B><IMG src="images/WEBSPHERE_18P_UNIX.GIF" width="113" height="18" border="0"><BR>
+</B></P>
+<HR width="130" size="1" align="center">
+</BODY>
+</HTML>

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/marketSummary.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/marketSummary.jsp?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/marketSummary.jsp (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/marketSummary.jsp Tue Sep 20 09:07:08 2005
@@ -0,0 +1,86 @@
+<%@ page import="java.util.Collection, java.util.Iterator, java.math.BigDecimal, org.apache.geronimo.samples.daytrader.*, org.apache.geronimo.samples.daytrader.util.*, org.apache.geronimo.samples.daytrader.soap.*" session="true" isThreadSafe="true" isErrorPage="false"%>
+
+<%
+TradeServices tAction=null;
+if(TradeConfig.getAccessMode() == TradeConfig.STANDARD)
+	tAction = new TradeAction();
+else if(TradeConfig.getAccessMode() == TradeConfig.WEBSERVICES)
+	tAction = new TradeWebSoapProxy();    
+MarketSummaryDataBean marketSummaryData = tAction.getMarketSummary();
+%>
+            <TABLE border="1" bgcolor="#ffffff" width="100%" style="font-size: smaller">
+                <TBODY>
+                    <TR>
+                        <TD colspan="2" bgcolor="#000000" align="center" height="15"><FONT color="#ffffff"><B>Market Summary<BR><%= marketSummaryData.getSummaryDate() %></B></FONT></TD>
+                    </TR>
+                    <TR>
+                        <TD align="right" bgcolor="#fafcb6" height="47" width="100"> <A href="docs/glossary.html">Trade Stock Index (TSIA)</A></TD>
+                        <TD align="center" valign="middle" bgcolor="#ffffff" height="47" width="141"><%= marketSummaryData.getTSIA() %> <%= FinancialUtils.printGainPercentHTML(marketSummaryData.getGainPercent()) %></TD>
+                    </TR>
+                    <TR>
+                        <TD align="right" bgcolor="#fafcb6"><A href="docs/glossary.html">Trading Volume</A></TD>
+                        <TD align="center" valign="middle"><%= marketSummaryData.getVolume() %></TD>
+                    </TR>
+                    <TR>
+                        <TD align="right" bgcolor="#fafcb6" width="74"><A href="docs/glossary.html">Top Gainers</A></TD>
+                        <TD bgcolor="#ffffff">
+                        <TABLE width="100%" border="1" height="100%" style="font-size: smaller">
+                            <TBODY>
+                                <TR align="center">
+                                    <TD><A href="docs/glossary.html">symbol</A></TD>
+                                    <TD><A href="docs/glossary.html">price</A></TD>
+                                    <TD><A href="docs/glossary.html">change</A></TD>
+                                </TR>
+                                <%                              
+Collection topGainers = marketSummaryData.getTopGainers();
+Iterator gainers = topGainers.iterator();
+int count=0;
+while (gainers.hasNext() && (count++ < 5))
+{
+	QuoteDataBean quoteData = (QuoteDataBean) gainers.next();
+%>
+                                <TR align="center">
+                                    <TD width="24"><%= FinancialUtils.printQuoteLink(quoteData.getSymbol()) %> </TD>
+                                    <TD><%= quoteData.getPrice() %> </TD>
+                                    <TD width="52" nowrap><%= FinancialUtils.printGainHTML(quoteData.getPrice().subtract(quoteData.getOpen())) /*FinancialUtils.printGainPercentHTML(FinancialUtils.computeGainPercent(quoteData.getPrice(), quoteData.getOpen()))*/ %></TD>
+                                </TR>
+                                <%
+}
+%>
+                            </TBODY>
+                        </TABLE>
+                        </TD>
+                    </TR>
+                    <TR>
+                        <TD align="right" height="55" bgcolor="#fafcb6" width="74"> <A href="docs/glossary.html">Top Losers</A></TD>
+                        <TD height="55" bgcolor="#ffffff" width="141">
+                        <TABLE width="100%" border="1" height="100%" style="font-size: smaller">
+                            <TBODY>
+                                <TR align="center">
+                                    <TD><A href="docs/glossary.html">symbol</A></TD>
+                                    <TD><A href="docs/glossary.html">price</A></TD>
+                                    <TD><A href="docs/glossary.html">change</A></TD>
+                                </TR>
+<%
+Collection topLosers = marketSummaryData.getTopLosers();
+Iterator losers  = topLosers.iterator();
+count=0;
+while (losers.hasNext() && (count++ < 5))
+
+{
+	QuoteDataBean quoteData = (QuoteDataBean) losers.next();
+%>
+                                <TR align="center">
+                                    <TD width="24" nowrap> <%= FinancialUtils.printQuoteLink(quoteData.getSymbol()) %> </TD>
+                                    <TD> <%= quoteData.getPrice() %> </TD>
+                                    <TD width="52" nowrap> <%= FinancialUtils.printGainHTML(quoteData.getPrice().subtract(quoteData.getOpen())) /* FinancialUtils.printGainPercentHTML(FinancialUtils.computeGainPercent(quoteData.getPrice(), quoteData.getOpen())) */%></TD>
+                                </TR>
+                                <%
+}
+%>
+                            </TBODY>
+                        </TABLE>
+                        </TD>
+                    </TR>
+                </TBODY>
+            </TABLE>

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/order.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/order.jsp?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/order.jsp (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/order.jsp Tue Sep 20 09:07:08 2005
@@ -0,0 +1,175 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.1 for Windows">
+<META http-equiv="Content-Style-Type" content="text/css">
+<TITLE>Trade Order information</TITLE>
+
+</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"%>
+<jsp:useBean id="results" scope="request" type="java.lang.String" />
+
+<TABLE height="54">
+  <TBODY>
+    <TR>
+            <TD bgcolor="#8080c0" align="left" width="500" height="10" colspan="5"><FONT color="#ffffff"><B>Trade New Orders</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>
+<%
+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>
+<TABLE width="650">
+    <TBODY>
+        <TR>
+            <TD>
+            <TABLE width="100%">
+                <TBODY>
+                    <TR>
+                        <TD></TD>
+                    </TR>
+                    <% 
+ OrderDataBean orderData = (OrderDataBean)request.getAttribute("orderData");
+ if ( orderData != null )
+ {
+                    %>
+                    <TR>
+                        <TD align="left" bgcolor="#cccccc"><B>New Order</B></TD>
+                    </TR>
+                    <TR>
+                        <TD align="left"><FONT color="#cc0000"><B><BR>
+                        Order <%=orderData.getOrderID()%></B> to <B><%=orderData.getOrderType()%> <%=orderData.getQuantity()%></B> shares of <B><%=orderData.getSymbol()%></B> has been submitted for processing. </FONT><BR>
+                        <BR>
+                        <FONT color="#000000">Order <FONT color="#000000"><B><%=orderData.getOrderID()%></B></FONT> details:</FONT></TD>
+                    </TR>
+                    <TR>
+                        <TD align="center">
+                        <TABLE border="1" style="font-size: smaller">
+                            <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>
+                                </TR>
+                                <TR align="center" bgcolor="#fafcb6">
+                                    <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>
+                                </TR>
+                            </TBODY>
+                        </TABLE>
+                        </TD>
+                    </TR>
+<% 
+ }
+ %>
+                </TBODY>
+            </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 New Orders</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"> Created&nbsp;with&nbsp;IBM WebSphere Application Server and WebSphere Studio Application Developer<BR>
+
+ 
+Copyright 2000, IBM Corporation</TD>
+        </TR>
+    </TBODY>
+</TABLE>
+</BODY>
+</HTML>
\ No newline at end of file

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/orderImg.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/orderImg.jsp?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/orderImg.jsp (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/orderImg.jsp Tue Sep 20 09:07:08 2005
@@ -0,0 +1,175 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.1 for Windows">
+<META http-equiv="Content-Style-Type" content="text/css">
+<TITLE>Trade Order information</TITLE>
+
+</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"%>
+<jsp:useBean id="results" scope="request" type="java.lang.String" />
+
+<TABLE height="54">
+  <TBODY>
+    <TR>
+            <TD bgcolor="#8080c0" align="left" width="500" height="10" colspan="5"><FONT color="#ffffff"><B>Trade New Orders</B></FONT></TD>
+			<TD align="center" bgcolor="#ffffff" width="100" height="10"><IMG src="images/tradeLogo.gif" width="45" height="19" border="0"></TD>
+		</TR>
+        <TR align="center">
+            <TD><A href="app?action=home"><IMG src="images/home.gif" width="80" height="20" border="0"></A></TD>
+            <TD><A href="app?action=account"><IMG src="images/account.gif" width="80" height="20" border="0"></A></TD>
+            <TD><B><A href="app?action=portfolio"><IMG src="images/portfolio.gif" width="80" height="20" border="0"></A> </B></TD>
+            <TD><A href="app?action=quotes&symbols=s:0,s:1,s:2,s:3,s:4"><IMG src="images/quotes.gif" width="80" height="20" border="0"></A></TD>
+            <TD><A href="app?action=logout"><IMG src="images/logout.gif" width="80" height="20" border="0"></A></TD>
+            <TD><IMG src="images/graph.gif" width="32" height="32" border="0"></TD>
+        </TR>
+        <TR>
+			<TD align="left" colspan="6"><IMG src="images/line.gif" width="600" height="6" border="0"><FONT color="#ff0000" size="-2"><BR>
+			<%= new java.util.Date() %></FONT></TD>
+		</TR>
+<%
+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>
+<TABLE width="650">
+    <TBODY>
+        <TR>
+            <TD>
+            <TABLE width="100%">
+                <TBODY>
+                    <TR>
+                        <TD></TD>
+                    </TR>
+                    <% 
+ OrderDataBean orderData = (OrderDataBean)request.getAttribute("orderData");
+ if ( orderData != null )
+ {
+                    %>
+                    <TR>
+                        <TD align="left" bgcolor="#cccccc"><B>New Order</B></TD>
+                    </TR>
+                    <TR>
+                        <TD align="left"><FONT color="#cc0000"><B><BR>
+                        Order <%=orderData.getOrderID()%></B> to <B><%=orderData.getOrderType()%> <%=orderData.getQuantity()%></B> shares of <B><%=orderData.getSymbol()%></B> has been submitted for processing. </FONT><BR>
+                        <BR>
+                        <FONT color="#000000">Order <FONT color="#000000"><B><%=orderData.getOrderID()%></B></FONT> details:</FONT></TD>
+                    </TR>
+                    <TR>
+                        <TD align="center">
+                        <TABLE border="1" style="font-size: smaller">
+                            <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>
+                                </TR>
+                                <TR align="center" bgcolor="#fafcb6">
+                                    <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>
+                                </TR>
+                            </TBODY>
+                        </TABLE>
+                        </TD>
+                    </TR>
+<% 
+ }
+ %>
+                </TBODY>
+            </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 New Orders</FONT></B></TD>
+			<TD align="center" bgcolor="#ffffff" width="100" height="10"><IMG src="images/tradeLogo.gif" width="45" height="19" border="0"></TD>
+		</TR>
+        <TR>
+			<TD colspan="4" align="center"> Created&nbsp;with&nbsp;IBM WebSphere Application Server and WebSphere Studio Application Developer<BR>
+			Copyright 2000, IBM Corporation<BR>
+			<IMG src="images/WEBSPHERE_18P_UNIX.GIF" width="113" height="18" border="0"><BR>
+			<BR>
+			<IMG src="images/ticker-anim.gif" width="385" height="22" border="0" align="middle"></TD>
+		</TR>
+    </TBODY>
+</TABLE>
+</BODY>
+</HTML>
\ No newline at end of file

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/portfolio.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/portfolio.jsp?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/portfolio.jsp (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/portfolio.jsp Tue Sep 20 09:07:08 2005
@@ -0,0 +1,225 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.1 for Windows">
+<META http-equiv="Content-Style-Type" content="text/css">
+<TITLE>Trade Portfolio</TITLE>
+<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.util.HashMap, 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="holdingDataBeans" type="java.util.Collection" scope="request" />
+<jsp:useBean id="quoteDataBeans" 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 Portfolio</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>
+<%
+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>
+<TABLE width="645">
+    <TBODY>
+        <TR>
+            <TD valign="top" width="643">
+            <TABLE width="100%">
+                <TBODY>
+
+                    <TR>
+                        <TD colspan="5" bgcolor="#cccccc"><B>Portfolio </B></TD>
+                        <TD bgcolor="#cccccc" align="right"><B>Number of Holdings: </B><%= holdingDataBeans.size()
+%></TD>
+                    </TR>
+                    <TR align="center">
+                        <TD colspan="6">
+                        <CENTER></CENTER>
+                        <TABLE border="1" style="font-size: smaller">
+                            <CAPTION align="bottom"><B>Portfolio </B></CAPTION>
+                            <TBODY>
+                                <TR align="center">
+                                    <TD><A href="docs/glossary.html">holding ID</A></TD>
+                                    <TD><A href="docs/glossary.html">purchase date</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">purchase price</A></TD>
+                                    <TD><A href="docs/glossary.html">current price</A></TD>
+                                    <TD><A href="docs/glossary.html">purchase basis</A></TD>                                    
+                                    <TD><A href="docs/glossary.html">market value</A></TD>
+                                    <TD><A href="docs/glossary.html">gain/(loss)</A></TD>
+                                    <TD><B><A href="docs/glossary.html">trade</A></B></TD>
+                                </TR>
+                                <% // Create Hashmap for quick lookup of quote values
+Iterator it = quoteDataBeans.iterator();
+HashMap quoteMap = new HashMap();                                
+while ( it.hasNext() ) 
+{
+	QuoteDataBean quoteData = (QuoteDataBean) it.next();
+	quoteMap.put(quoteData.getSymbol(), quoteData);
+}
+//Step through and printout Holdings
+
+it = holdingDataBeans.iterator();
+BigDecimal totalGain = new BigDecimal(0.0);
+BigDecimal totalBasis = new BigDecimal(0.0);
+BigDecimal totalValue = new BigDecimal(0.0);
+try {
+	while (it.hasNext()) {
+		HoldingDataBean holdingData = (HoldingDataBean) it.next();
+		QuoteDataBean quoteData = (QuoteDataBean) quoteMap.get(holdingData.getQuoteID());
+		BigDecimal basis = holdingData.getPurchasePrice().multiply(new BigDecimal(holdingData.getQuantity()));
+		BigDecimal marketValue = quoteData.getPrice().multiply(new BigDecimal(holdingData.getQuantity()));
+		totalBasis = totalBasis.add(basis);	
+		totalValue = totalValue.add(marketValue);	
+		BigDecimal gain = marketValue.subtract(basis);
+		totalGain = totalGain.add(gain);
+		BigDecimal gainPercent = null;
+		if (basis.doubleValue() == 0.0)
+		{
+			gainPercent = new BigDecimal(0.0);
+			Log.error("portfolio.jsp: Holding with zero basis. holdingID="+holdingData.getHoldingID() + " symbol=" + holdingData.getQuoteID() + " purchasePrice=" + holdingData.getPurchasePrice());
+		}
+		else
+			gainPercent = marketValue.divide(basis, BigDecimal.ROUND_HALF_UP).subtract(new BigDecimal(1.0)).multiply(new BigDecimal(100.0));                        	
+	
+                         %>
+                                <TR bgcolor="#fafcb6" align="center">
+                                    <TD><%= holdingData.getHoldingID() %></TD>
+                                    <TD><%= holdingData.getPurchaseDate() %></TD>
+                                    <TD><%= FinancialUtils.printQuoteLink(holdingData.getQuoteID()) %></TD>
+                                    <TD><%= holdingData.getQuantity() %></TD>
+                                    <TD><%= holdingData.getPurchasePrice() %></TD>
+                                    <TD><%= quoteData.getPrice() %></TD>
+                                    <TD><%= basis %></TD>
+                                    <TD><%= marketValue %></TD>
+                                    <TD><%= FinancialUtils.printGainHTML(gain) %></TD>
+                                    <TD><B><%= "<A href=\"app?action=sell&holdingID=" + holdingData.getHoldingID()+"\">sell</A>"%></B></TD>
+                                </TR>
+                                <% 
+	}
+}
+catch (Exception e)
+{
+     Log.error("portfolio.jsp: error displaying user holdings", e);
+}
+				%>
+                                <TR align="center">
+                                    <TD></TD>
+                                    <TD></TD>
+                                    <TD></TD>
+                                    <TD></TD>
+                                    <TD></TD>
+                                    <TD><B>Total</B></TD>
+                                    <TD align="center">$ <%= totalBasis %></TD>
+                                    <TD align="center">$ <%= totalValue %></TD>
+                                    <TD align="center" colspan="2">$ <%= FinancialUtils.printGainHTML(totalGain) %> <%= FinancialUtils.printGainPercentHTML(FinancialUtils.computeGainPercent(totalValue, totalBasis)) %></TD>
+                                </TR>
+                            </TBODY>
+                        </TABLE>
+                        <CENTER></CENTER>
+                        </TD>
+                    </TR>
+                    <TR>
+                        <TD colspan="6"></TD>
+                    </TR>
+               </TBODY>
+            </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 Portfolio</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"> Created&nbsp;with&nbsp;IBM WebSphere Application Server and WebSphere Studio Application Developer<BR>
+
+ 
+Copyright 2000, IBM Corporation</TD>
+        </TR>
+    </TBODY>
+</TABLE>
+</BODY>
+</HTML>

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/portfolioImg.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/portfolioImg.jsp?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/portfolioImg.jsp (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/portfolioImg.jsp Tue Sep 20 09:07:08 2005
@@ -0,0 +1,225 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.1 for Windows">
+<META http-equiv="Content-Style-Type" content="text/css">
+<TITLE>Trade Portfolio</TITLE>
+<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.util.HashMap, 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="holdingDataBeans" type="java.util.Collection" scope="request" />
+<jsp:useBean id="quoteDataBeans" 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 Portfolio</B></FONT></TD>
+			<TD align="center" bgcolor="#ffffff" width="100" height="10"><IMG src="images/tradeLogo.gif" width="45" height="19" border="0"></TD>
+		</TR>
+        <TR align="center">
+            <TD><A href="app?action=home"><IMG src="images/home.gif" width="80" height="20" border="0"></A></TD>
+            <TD><A href="app?action=account"><IMG src="images/account.gif" width="80" height="20" border="0"></A></TD>
+            <TD><B><A href="app?action=portfolio"><IMG src="images/portfolio.gif" width="80" height="20" border="0"></A> </B></TD>
+            <TD><A href="app?action=quotes&symbols=s:0,s:1,s:2,s:3,s:4"><IMG src="images/quotes.gif" width="80" height="20" border="0"></A></TD>
+            <TD><A href="app?action=logout"><IMG src="images/logout.gif" width="80" height="20" border="0"></A></TD>
+            <TD><IMG src="images/graph.gif" width="32" height="32" border="0"></TD>
+        </TR>
+        <TR>
+			<TD align="left" colspan="6"><IMG src="images/line.gif" width="600" height="6" border="0"><BR>
+			<FONT color="#ff0000" size="-2"><%= new java.util.Date() %></FONT></TD>
+		</TR>
+<%
+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>
+<TABLE width="645">
+    <TBODY>
+        <TR>
+            <TD valign="top" width="643">
+            <TABLE width="100%">
+                <TBODY>
+
+                    <TR>
+                        <TD colspan="5" bgcolor="#cccccc"><B>Portfolio </B></TD>
+                        <TD bgcolor="#cccccc" align="right"><B>Number of Holdings: </B><%= holdingDataBeans.size()
+%></TD>
+                    </TR>
+                    <TR align="center">
+                        <TD colspan="6">
+                        <CENTER></CENTER>
+                        <TABLE border="1" style="font-size: smaller">
+                            <CAPTION align="bottom"><B>Portfolio </B></CAPTION>
+                            <TBODY>
+                                <TR align="center">
+                                    <TD><A href="docs/glossary.html">holding ID</A></TD>
+                                    <TD><A href="docs/glossary.html">purchase date</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">purchase price</A></TD>
+                                    <TD><A href="docs/glossary.html">current price</A></TD>
+                                    <TD><A href="docs/glossary.html">purchase basis</A></TD>                                    
+                                    <TD><A href="docs/glossary.html">market value</A></TD>
+                                    <TD><A href="docs/glossary.html">gain/(loss)</A></TD>
+                                    <TD><B><A href="docs/glossary.html">trade</A></B></TD>
+                                </TR>
+                                <% // Create Hashmap for quick lookup of quote values
+Iterator it = quoteDataBeans.iterator();
+HashMap quoteMap = new HashMap();                                
+while ( it.hasNext() ) 
+{
+	QuoteDataBean quoteData = (QuoteDataBean) it.next();
+	quoteMap.put(quoteData.getSymbol(), quoteData);
+}
+//Step through and printout Holdings
+
+it = holdingDataBeans.iterator();
+BigDecimal totalGain = new BigDecimal(0.0);
+BigDecimal totalBasis = new BigDecimal(0.0);
+BigDecimal totalValue = new BigDecimal(0.0);
+try {
+	while (it.hasNext()) {
+		HoldingDataBean holdingData = (HoldingDataBean) it.next();
+		QuoteDataBean quoteData = (QuoteDataBean) quoteMap.get(holdingData.getQuoteID());
+		BigDecimal basis = holdingData.getPurchasePrice().multiply(new BigDecimal(holdingData.getQuantity()));
+		BigDecimal marketValue = quoteData.getPrice().multiply(new BigDecimal(holdingData.getQuantity()));
+		totalBasis = totalBasis.add(basis);	
+		totalValue = totalValue.add(marketValue);	
+		BigDecimal gain = marketValue.subtract(basis);
+		totalGain = totalGain.add(gain);
+		BigDecimal gainPercent = null;
+		if (basis.doubleValue() == 0.0)
+		{
+			gainPercent = new BigDecimal(0.0);
+			Log.error("portfolio.jsp: Holding with zero basis. holdingID="+holdingData.getHoldingID() + " symbol=" + holdingData.getQuoteID() + " purchasePrice=" + holdingData.getPurchasePrice());
+		}
+		else
+			gainPercent = marketValue.divide(basis, BigDecimal.ROUND_HALF_UP).subtract(new BigDecimal(1.0)).multiply(new BigDecimal(100.0));                        	
+	
+                         %>
+                                <TR bgcolor="#fafcb6" align="center">
+                                    <TD><%= holdingData.getHoldingID() %></TD>
+                                    <TD><%= holdingData.getPurchaseDate() %></TD>
+                                    <TD><%= FinancialUtils.printQuoteLink(holdingData.getQuoteID()) %></TD>
+                                    <TD><%= holdingData.getQuantity() %></TD>
+                                    <TD><%= holdingData.getPurchasePrice() %></TD>
+                                    <TD><%= quoteData.getPrice() %></TD>
+                                    <TD><%= basis %></TD>
+                                    <TD><%= marketValue %></TD>
+                                    <TD><%= FinancialUtils.printGainHTML(gain) %></TD>
+                                    <TD><B><%= "<A href=\"app?action=sell&holdingID=" + holdingData.getHoldingID()+"\">sell</A>"%></B></TD>
+                                </TR>
+                                <% 
+	}
+}
+catch (Exception e)
+{
+     Log.error("portfolio.jsp: error displaying user holdings", e);
+}
+				%>
+                                <TR align="center">
+                                    <TD></TD>
+                                    <TD></TD>
+                                    <TD></TD>
+                                    <TD></TD>
+                                    <TD></TD>
+                                    <TD><B>Total</B></TD>
+                                    <TD align="center">$<%= totalBasis %></TD>
+                                    <TD align="center">$<%= totalValue %></TD>
+                                    <TD align="center" colspan="2">$<%= FinancialUtils.printGainHTML(totalGain) %> <%= FinancialUtils.printGainPercentHTML(FinancialUtils.computeGainPercent(totalValue, totalBasis)) %></TD>
+                                </TR>
+                            </TBODY>
+                        </TABLE>
+                        <CENTER></CENTER>
+                        </TD>
+                    </TR>
+                    <TR>
+                        <TD colspan="6"></TD>
+                    </TR>
+               </TBODY>
+            </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 Portfolio</FONT></B></TD>
+			<TD align="center" bgcolor="#ffffff" width="100" height="10"><IMG src="images/tradeLogo.gif" width="45" height="19" border="0"></TD>
+		</TR>
+        <TR>
+			<TD colspan="4" align="center"> Created&nbsp;with&nbsp;IBM WebSphere Application Server and WebSphere Studio Application Developer<BR>
+			Copyright 2000, IBM Corporation<BR>
+			<IMG src="images/WEBSPHERE_18P_UNIX.GIF" width="113" height="18" border="0"><BR>
+			<BR>
+			<IMG src="images/ticker-anim.gif" width="385" height="22" border="0" align="middle"></TD>
+		</TR>
+    </TBODY>
+</TABLE>
+</BODY>
+</HTML>

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/quote.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/quote.jsp?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/quote.jsp (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/quote.jsp Tue Sep 20 09:07:08 2005
@@ -0,0 +1,170 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.1 for Windows">
+<META http-equiv="Content-Style-Type" content="text/css">
+<TITLE>Trade: Quotes and Trading</TITLE>
+<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"%>
+
+<TABLE height="54">
+  <TBODY>
+    <TR>
+            <TD bgcolor="#8080c0" align="left" width="500" height="10" colspan="5"><FONT color="#ffffff"><B>Trade Quotes</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>
+<%
+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>
+<TABLE width="650">
+    <TBODY>
+        <TR>
+            <TD>
+            <TABLE width="100%">
+                <TBODY>
+                    <TR>
+                        <TD></TD>
+                    </TR>
+                    <TR>
+                        <TD bgcolor="#cccccc"> <B>Quotes</B></TD>
+                    </TR>
+                    <TR>
+                        <TD align="center">
+                        <TABLE border="1" style="font-size: smaller">
+                            <TBODY>
+                                <TR align="center">
+                                    <TD><A href="docs/glossary.html">symbol</A></TD>
+                                    <TD><A href="docs/glossary.html">company</A></TD>
+									<TD><A href="docs/glossary.html">volume</A></TD>  
+                                    <TD><A href="docs/glossary.html">price range</A></TD>
+                                    <TD><A href="docs/glossary.html">open price</A></TD>                                    									                                  
+                                    <TD><A href="docs/glossary.html">current price</A></TD>
+                                    <TD><A href="docs/glossary.html">gain/(loss)</A></TD>
+                                    <TD><A href="docs/glossary.html">trade</A></TD>
+                                </TR>
+                    <% 
+
+
+
+String symbols = request.getParameter("symbols");
+if (symbols == null)
+	symbols = "no_stock_symbol_provided";
+java.util.ArrayList quotes = new java.util.ArrayList();
+java.util.StringTokenizer st = new java.util.StringTokenizer(symbols, " ,");
+while (st.hasMoreElements())
+{
+ 		String symbol = st.nextToken();
+		String displayQuoteURL = "displayQuote.jsp?symbol="+symbol;
+                    %>
+        <jsp:include page="<%=displayQuoteURL%>"/>
+
+                    <% 
+ }
+					%>                                                  
+                            </TBODY>
+                        </TABLE>
+                        </TD>
+                    </TR>
+                </TBODY>
+            </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 Quotes</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"> Created&nbsp;with&nbsp;IBM WebSphere Application Server and WebSphere Studio Application Developer<BR>
+
+ 
+Copyright 2000, IBM Corporation</TD>
+        </TR>
+    </TBODY>
+</TABLE>
+</BODY>
+</HTML>
\ No newline at end of file

Added: geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/quoteImg.jsp
URL: http://svn.apache.org/viewcvs/geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/quoteImg.jsp?rev=290479&view=auto
==============================================================================
--- geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/quoteImg.jsp (added)
+++ geronimo/trunk/sandbox/daytrader/modules/web/src/webapp/quoteImg.jsp Tue Sep 20 09:07:08 2005
@@ -0,0 +1,171 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.1 for Windows">
+<META http-equiv="Content-Style-Type" content="text/css">
+<TITLE>Trade: Quotes and Trading</TITLE>
+<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"%>
+
+<TABLE height="54">
+  <TBODY>
+    <TR>
+            <TD bgcolor="#8080c0" align="left" width="500" height="10" colspan="5"><FONT color="#ffffff"><B>Trade Quotes</B></FONT></TD>
+			<TD align="center" bgcolor="#ffffff" width="100" height="10"><IMG src="images/tradeLogo.gif" width="45" height="19" border="0"></TD>
+		</TR>
+        <TR align="center">
+            <TD><A href="app?action=home"><IMG src="images/home.gif" width="80" height="20" border="0"></A></TD>
+            <TD><A href="app?action=account"><IMG src="images/account.gif" width="80" height="20" border="0"></A></TD>
+            <TD><B><A href="app?action=portfolio"><IMG src="images/portfolio.gif" width="80" height="20" border="0"></A> </B></TD>
+            <TD><A href="app?action=quotes&symbols=s:0,s:1,s:2,s:3,s:4"><IMG src="images/quotes.gif" width="80" height="20" border="0"></A></TD>
+            <TD><A href="app?action=logout"><IMG src="images/logout.gif" width="80" height="20" border="0"></A></TD>
+            <TD><IMG src="images/graph.gif" width="32" height="32" border="0"></TD>
+        </TR>
+        <TR>
+			<TD align="left" colspan="6"><IMG src="images/line.gif" width="600" height="6" border="0"><BR>
+			<FONT color="#ff0000" size="-2"><%= new java.util.Date() %></FONT></TD>
+		</TR>
+<%
+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>
+<TABLE width="650">
+    <TBODY>
+        <TR>
+            <TD>
+            <TABLE width="100%">
+                <TBODY>
+                    <TR>
+                        <TD></TD>
+                    </TR>
+                    <TR>
+                        <TD bgcolor="#cccccc"> <B>Quotes</B></TD>
+                    </TR>
+                    <TR>
+                        <TD align="center">
+                        <TABLE border="1" style="font-size: smaller">
+                            <TBODY>
+                                <TR align="center">
+                                    <TD><A href="docs/glossary.html">symbol</A></TD>
+                                    <TD><A href="docs/glossary.html">company</A></TD>
+									<TD><A href="docs/glossary.html">volume</A></TD>  
+                                    <TD><A href="docs/glossary.html">price range</A></TD>
+                                    <TD><A href="docs/glossary.html">open price</A></TD>                                    									                                  
+                                    <TD><A href="docs/glossary.html">current price</A></TD>
+                                    <TD><A href="docs/glossary.html">gain/(loss)</A></TD>
+                                    <TD><A href="docs/glossary.html">trade</A></TD>
+                                </TR>
+
+                    <% 
+String symbols = request.getParameter("symbols");
+if (symbols == null)
+	symbols = "no_stock_symbol_provided";
+java.util.ArrayList quotes = new java.util.ArrayList();
+java.util.StringTokenizer st = new java.util.StringTokenizer(symbols, " ,");
+while (st.hasMoreElements())
+{
+ 		String symbol = st.nextToken();
+
+                    %>
+        <jsp:include page="displayQuote.jsp">
+        	<jsp:param name="symbol" value="<%= symbol%>"/>
+        </jsp:include>      
+
+                    <% 
+ }
+					%>                                                                                  
+
+                            </TBODY>
+                        </TABLE>
+                        </TD>
+                    </TR>
+                </TBODY>
+            </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 Quotes</FONT></B></TD>
+			<TD align="center" bgcolor="#ffffff" width="100" height="10"><IMG src="images/tradeLogo.gif" width="45" height="19" border="0"></TD>
+		</TR>
+        <TR>
+			<TD colspan="4" align="center"> Created&nbsp;with&nbsp;IBM WebSphere Application Server and WebSphere Studio Application Developer<BR>
+			Copyright 2000, IBM Corporation<BR>
+			<IMG src="images/WEBSPHERE_18P_UNIX.GIF" width="113" height="18" border="0"><BR>
+			<BR>
+			<IMG src="images/ticker-anim.gif" width="385" height="22" border="0" align="middle"></TD>
+		</TR>
+    </TBODY>
+</TABLE>
+</BODY>
+</HTML>
\ No newline at end of file



Mime
View raw message