Author: jsong
Date: Fri Aug  6 10:40:22 2004
New Revision: 36041

Added:
   incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/lib/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/lib/milton.jar
   (contents, props changed)
   incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/global/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/global/Global.app
   incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/web.xml
   incubator/beehive/trunk/controls/test/webapps/controlsWeb/resources/
   incubator/beehive/trunk/controls/test/webapps/controlsWeb/resources/milton/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/resources/milton/jsp/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/resources/milton/jsp/miltonResults.jsp
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/resources/milton/jsp/miltonResultsTemplate.jsp
Log:
Add milton support to controls/test/webapps/controlsWeb.


Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/lib/milton.jar
==============================================================================
Binary file. No diff available.

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/global/Global.app
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/src/global/Global.app
     Fri Aug  6 10:40:22 2004
@@ -0,0 +1,34 @@
+package global;
+
+import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.netui.pageflow.*;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+/** 
+ * WARNING: This file is part of the test framework.  It is copied 
+ *          into this webapp at build time. Any changes you make to 
+ *          this file will be lost the next time you rebuild.  
+ *          DO NOT ADD THIS FILE TO YOUR WEBAPP! -->
+ */
[EMAIL PROTECTED](
+    catches={
+       @Jpf.Catch(type=java.lang.Exception.class, method="handleException")
+    }
+)
+public class Global extends GlobalApp
+{
+    @Jpf.ExceptionHandler(
+        forwards={
+            @Jpf.Forward(name=Report.RESULTS, path=Report.RESULTSJSP)
+        }
+    )
+    protected Forward handleException(Exception ex, String actionName, String 
message, Object form)
+    {
+        Report report = (Report)getRequest().getAttribute(Report.KEY);
+        
+        if (null == report)
+            report = new Report(Report.ABORT, "An Unexpected Exception Was 
Found", ex);
+        
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+}

Added: incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/web.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/webapps/controlsWeb/WEB-INF/web.xml   
Fri Aug  6 10:40:22 2004
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
+    version="2.4">
+
+    <display-name>Beehive Web Application</display-name>
+
+    <filter>
+        <filter-name>PageFlowJspFilter</filter-name>
+        
<filter-class>org.apache.beehive.netui.pageflow.PageFlowJspFilter</filter-class>
+    </filter>
+
+    <filter-mapping>
+        <filter-name>PageFlowJspFilter</filter-name>
+        <url-pattern>*.jsp</url-pattern>
+        <dispatcher>FORWARD</dispatcher>
+    </filter-mapping>
+
+    <!-- Action Servlet Configuration (with debugging) -->
+    <servlet>
+        <servlet-name>action</servlet-name>
+        
<servlet-class>org.apache.beehive.netui.pageflow.PageFlowActionServlet</servlet-class>
+        <init-param>
+            <param-name>config</param-name>
+            
<param-value>/WEB-INF/.pageflow-struts-generated/jpf-struts-config.xml</param-value>
+        </init-param>
+        <init-param>
+            <param-name>config/-global</param-name>
+            
<param-value>/WEB-INF/.pageflow-struts-generated/jpf-struts-config--global.xml</param-value>
+        </init-param>
+        <init-param>
+            <param-name>debug</param-name>
+            <param-value>2</param-value>
+        </init-param>
+        <init-param>
+            <param-name>detail</param-name>
+            <param-value>2</param-value>
+        </init-param>
+        <load-on-startup>2</load-on-startup>
+    </servlet>
+
+    <!-- Struts Action Servlet Mappings -->
+    <!-- Note that because Struts takes the *last* mapping here as the 
extension to add to
+         actions posted from forms, we must have *.do come after *.jpf. -->
+    <servlet-mapping>
+        <servlet-name>action</servlet-name>
+        <url-pattern>*.jpf</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>action</servlet-name>
+        <url-pattern>*.do</url-pattern>
+    </servlet-mapping>
+
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+    </welcome-file-list>
+
+    <error-page>
+        <error-code>500</error-code>
+        <location>/error.jsp</location>
+    </error-page>
+
+    <jsp-config>
+        <!-- Define the NetUI tag library TLDs -->
+        <taglib>
+            <taglib-uri>beehive-netui-tags-html.tld</taglib-uri>
+            
<taglib-location>/WEB-INF/beehive-netui-tags-html.tld</taglib-location>
+        </taglib>
+        <taglib>
+            <taglib-uri>beehive-netui-tags-databinding.tld</taglib-uri>
+            
<taglib-location>/WEB-INF/beehive-netui-tags-databinding.tld</taglib-location>
+        </taglib>
+        <taglib>
+            <taglib-uri>beehive-netui-tags-template.tld</taglib-uri>
+            
<taglib-location>/WEB-INF/beehive-netui-tags-template.tld</taglib-location>
+        </taglib>
+    </jsp-config>
+</web-app>

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/resources/milton/jsp/miltonResults.jsp
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/resources/milton/jsp/miltonResults.jsp
    Fri Aug  6 10:40:22 2004
@@ -0,0 +1,14 @@
+<!-- WARNING: This file is part of the test framework.  It is copied 
+              into this webapp at build time. Any changes you make to 
+              this file will be lost the next time you rebuild.  
+              DO NOT ADD THIS FILE TO YOUR WEBAPP! -->
+
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+    <head>
+        <title>Milton Test Results</title>
+    </head>
+    <body>
+        <jsp:include page="miltonResultsTemplate.jsp" />
+    </body>
+</html>

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/resources/milton/jsp/miltonResultsTemplate.jsp
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/resources/milton/jsp/miltonResultsTemplate.jsp
    Fri Aug  6 10:40:22 2004
@@ -0,0 +1,23 @@
+<!-- WARNING: This file is part of the test framework.  It is copied 
+              into this webapp at build time. Any changes you make to 
+              this file will be lost the next time you rebuild.  
+              DO NOT ADD THIS FILE TO YOUR WEBAPP! -->
+
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+
+<%@ page import="import org.apache.beehive.test.tools.milton.common.Report;"%>
+<%@ page import="org.apache.beehive.netui.pageflow.PageFlowUtils"%>
+
+<% Report report = (Report)PageFlowUtils.getPageInput(Report.KEY, request); %>
+
+<table border="1" id="<% out.print(Report.RESULT_TABLE_ID); %>">
+    <tr>
+        <td id="<% out.print(Report.STATUS_ID); %>"><% 
out.print(report.getStatus()); %></td>
+    </tr>
+    <tr>
+        <td id="<% out.print(Report.MESSAGE_ID); %>"><% 
out.print(report.getMessage()); %></td>
+    </tr>
+    <tr>
+        <td id="<% out.print(Report.EXCEPTION_ID); %>"><% 
out.print(report.getExceptionStack()); %></td>
+    </tr>
+</table>

Reply via email to