summaryrefslogtreecommitdiffstats
path: root/java/das/samples/advanced-webapp/src/main/webapp
diff options
context:
space:
mode:
Diffstat (limited to 'java/das/samples/advanced-webapp/src/main/webapp')
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/META-INF/context.xml22
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/WEB-INF/tld/c.tld563
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/WEB-INF/tld/fmt.tld671
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/WEB-INF/web.xml46
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/html/DASWebSampleFrame.html27
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/html/blank.html25
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/js/ajax.js188
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/js/dasmenu.js112
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/jsp/DASMenu.jsp63
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/jsp/converter.jsp117
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/jsp/default.css35
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/jsp/indexAdhoc.jsp87
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/jsp/indexCommand.jsp85
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/jsp/main.css120
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/jsp/occ.jsp77
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/jsp/rss.jsp78
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/xsl/company.xsl44
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/xsl/companyDepartment.xsl65
-rw-r--r--java/das/samples/advanced-webapp/src/main/webapp/xsl/customer.xsl49
19 files changed, 2474 insertions, 0 deletions
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/META-INF/context.xml b/java/das/samples/advanced-webapp/src/main/webapp/META-INF/context.xml
new file mode 100644
index 0000000000..e2da613636
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/META-INF/context.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (c) 2005-2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ -->
+<Context path="/DAS Stand alone app" debug="5" reloadable="true" crossContext="true">
+
+ <Manager pathname=""/>
+ <ResourceLink name="jdbc/ajaxdastest" global="jdbc/ajaxdastest" type="javax.sql.DataSource" />
+
+</Context>
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/WEB-INF/tld/c.tld b/java/das/samples/advanced-webapp/src/main/webapp/WEB-INF/tld/c.tld
new file mode 100644
index 0000000000..22698c97dc
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/WEB-INF/tld/c.tld
@@ -0,0 +1,563 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib 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-jsptaglibrary_2_0.xsd"
+ version="2.0">
+
+ <description>JSTL 1.1 core library</description>
+ <display-name>JSTL core</display-name>
+ <tlib-version>1.1</tlib-version>
+ <short-name>c</short-name>
+ <uri>http://java.sun.com/jsp/jstl/core</uri>
+
+ <validator>
+ <description>
+ Provides core validation features for JSTL tags.
+ </description>
+ <validator-class>
+ org.apache.taglibs.standard.tlv.JstlCoreTLV
+ </validator-class>
+ </validator>
+
+ <tag>
+ <description>
+ Catches any Throwable that occurs in its body and optionally
+ exposes it.
+ </description>
+ <name>catch</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+exception thrown from a nested action. The type of the
+scoped variable is the type of the exception thrown.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Simple conditional tag that establishes a context for
+ mutually exclusive conditional operations, marked by
+ &lt;when&gt; and &lt;otherwise&gt;
+ </description>
+ <name>choose</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class>
+ <body-content>JSP</body-content>
+ </tag>
+
+ <tag>
+ <description>
+ Simple conditional tag, which evalutes its body if the
+ supplied condition is true and optionally exposes a Boolean
+ scripting variable representing the evaluation of this condition
+ </description>
+ <name>if</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.IfTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The test condition that determines whether or
+not the body content should be processed.
+ </description>
+ <name>test</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+resulting value of the test condition. The type
+of the scoped variable is Boolean.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Retrieves an absolute or relative URL and exposes its contents
+ to either the page, a String in 'var', or a Reader in 'varReader'.
+ </description>
+ <name>import</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ImportTag</tag-class>
+ <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The URL of the resource to import.
+ </description>
+ <name>url</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+resource's content. The type of the scoped
+variable is String.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+resource's content. The type of the scoped
+variable is Reader.
+ </description>
+ <name>varReader</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the context when accessing a relative
+URL resource that belongs to a foreign
+context.
+ </description>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Character encoding of the content at the input
+resource.
+ </description>
+ <name>charEncoding</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ The basic iteration tag, accepting many different
+ collection types and supporting subsetting and other
+ functionality
+ </description>
+ <name>forEach</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ForEachTag</tag-class>
+ <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Collection of items to iterate over.
+ </description>
+ <name>items</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.Object</type>
+ </attribute>
+ <attribute>
+ <description>
+If items specified:
+Iteration begins at the item located at the
+specified index. First item of the collection has
+index 0.
+If items not specified:
+Iteration begins with index set at the value
+specified.
+ </description>
+ <name>begin</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+If items specified:
+Iteration ends at the item located at the
+specified index (inclusive).
+If items not specified:
+Iteration ends when index reaches the value
+specified.
+ </description>
+ <name>end</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Iteration will only process every step items of
+the collection, starting with the first one.
+ </description>
+ <name>step</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+current item of the iteration. This scoped
+variable has nested visibility. Its type depends
+on the object of the underlying collection.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+status of the iteration. Object exported is of type
+javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested
+visibility.
+ </description>
+ <name>varStatus</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Iterates over tokens, separated by the supplied delimeters
+ </description>
+ <name>forTokens</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ForTokensTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+String of tokens to iterate over.
+ </description>
+ <name>items</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>
+The set of delimiters (the characters that
+separate the tokens in the string).
+ </description>
+ <name>delims</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>
+Iteration begins at the token located at the
+specified index. First token has index 0.
+ </description>
+ <name>begin</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Iteration ends at the token located at the
+specified index (inclusive).
+ </description>
+ <name>end</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Iteration will only process every step tokens
+of the string, starting with the first one.
+ </description>
+ <name>step</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+current item of the iteration. This scoped
+variable has nested visibility.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+status of the iteration. Object exported is of
+type
+javax.servlet.jsp.jstl.core.LoopTag
+Status. This scoped variable has nested
+visibility.
+ </description>
+ <name>varStatus</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Like &lt;%= ... &gt;, but for expressions.
+ </description>
+ <name>out</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.OutTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Expression to be evaluated.
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Default value if the resulting value is null.
+ </description>
+ <name>default</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Determines whether characters &lt;,&gt;,&amp;,'," in the
+resulting string should be converted to their
+corresponding character entity codes. Default value is
+true.
+ </description>
+ <name>escapeXml</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+
+ <tag>
+ <description>
+ Subtag of &lt;choose&gt; that follows &lt;when&gt; tags
+ and runs only if all of the prior conditions evaluated to
+ 'false'
+ </description>
+ <name>otherwise</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class>
+ <body-content>JSP</body-content>
+ </tag>
+
+ <tag>
+ <description>
+ Adds a parameter to a containing 'import' tag's URL.
+ </description>
+ <name>param</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.ParamTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Name of the query string parameter.
+ </description>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Value of the parameter.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Redirects to a new URL.
+ </description>
+ <name>redirect</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.RedirectTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The URL of the resource to redirect to.
+ </description>
+ <name>url</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the context when redirecting to a relative URL
+resource that belongs to a foreign context.
+ </description>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Removes a scoped variable (from a particular scope, if specified).
+ </description>
+ <name>remove</name>
+ <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+Name of the scoped variable to be removed.
+ </description>
+ <name>var</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Sets the result of an expression evaluation in a 'scope'
+ </description>
+ <name>set</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.SetTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Name of the exported scoped variable to hold the value
+specified in the action. The type of the scoped variable is
+whatever type the value expression evaluates to.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Expression to be evaluated.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Target object whose property will be set. Must evaluate to
+a JavaBeans object with setter property property, or to a
+java.util.Map object.
+ </description>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the property to be set in the target object.
+ </description>
+ <name>property</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Creates a URL with optional query parameters.
+ </description>
+ <name>url</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.UrlTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Name of the exported scoped variable for the
+processed url. The type of the scoped variable is
+String.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope for var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+URL to be processed.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the context when specifying a relative URL
+resource that belongs to a foreign context.
+ </description>
+ <name>context</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Subtag of &lt;choose&gt; that includes its body if its
+ condition evalutes to 'true'
+ </description>
+ <name>when</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.core.WhenTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The test condition that determines whether or not the
+body content should be processed.
+ </description>
+ <name>test</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>boolean</type>
+ </attribute>
+ </tag>
+
+</taglib>
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/WEB-INF/tld/fmt.tld b/java/das/samples/advanced-webapp/src/main/webapp/WEB-INF/tld/fmt.tld
new file mode 100644
index 0000000000..3b9a54a87d
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/WEB-INF/tld/fmt.tld
@@ -0,0 +1,671 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<taglib 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-jsptaglibrary_2_0.xsd"
+ version="2.0">
+
+ <description>JSTL 1.1 i18n-capable formatting library</description>
+ <display-name>JSTL fmt</display-name>
+ <tlib-version>1.1</tlib-version>
+ <short-name>fmt</short-name>
+ <uri>http://java.sun.com/jsp/jstl/fmt</uri>
+
+ <validator>
+ <description>
+ Provides core validation features for JSTL tags.
+ </description>
+ <validator-class>
+ org.apache.taglibs.standard.tlv.JstlFmtTLV
+ </validator-class>
+ </validator>
+
+ <tag>
+ <description>
+ Sets the request character encoding
+ </description>
+ <name>requestEncoding</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+Name of character encoding to be applied when
+decoding request parameters.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Stores the given locale in the locale configuration variable
+ </description>
+ <name>setLocale</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+A String value is interpreted as the
+printable representation of a locale, which
+must contain a two-letter (lower-case)
+language code (as defined by ISO-639),
+and may contain a two-letter (upper-case)
+country code (as defined by ISO-3166).
+Language and country codes must be
+separated by hyphen (-) or underscore
+(_).
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Vendor- or browser-specific variant.
+See the java.util.Locale javadocs for
+more information on variants.
+ </description>
+ <name>variant</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of the locale configuration variable.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Specifies the time zone for any time formatting or parsing actions
+ nested in its body
+ </description>
+ <name>timeZone</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+The time zone. A String value is interpreted as
+a time zone ID. This may be one of the time zone
+IDs supported by the Java platform (such as
+"America/Los_Angeles") or a custom time zone
+ID (such as "GMT-8"). See
+java.util.TimeZone for more information on
+supported time zone formats.
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Stores the given time zone in the time zone configuration variable
+ </description>
+ <name>setTimeZone</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+The time zone. A String value is interpreted as
+a time zone ID. This may be one of the time zone
+IDs supported by the Java platform (such as
+"America/Los_Angeles") or a custom time zone
+ID (such as "GMT-8"). See java.util.TimeZone for
+more information on supported time zone
+formats.
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable which
+stores the time zone of type
+java.util.TimeZone.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var or the time zone configuration
+variable.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Loads a resource bundle to be used by its tag body
+ </description>
+ <name>bundle</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.BundleTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Resource bundle base name. This is the bundle's
+fully-qualified resource name, which has the same
+form as a fully-qualified class name, that is, it uses
+"." as the package component separator and does not
+have any file type (such as ".class" or ".properties")
+suffix.
+ </description>
+ <name>basename</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Prefix to be prepended to the value of the message
+key of any nested &lt;fmt:message&gt; action.
+ </description>
+ <name>prefix</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Loads a resource bundle and stores it in the named scoped variable or
+ the bundle configuration variable
+ </description>
+ <name>setBundle</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+Resource bundle base name. This is the bundle's
+fully-qualified resource name, which has the same
+form as a fully-qualified class name, that is, it uses
+"." as the package component separator and does not
+have any file type (such as ".class" or ".properties")
+suffix.
+ </description>
+ <name>basename</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable which stores
+the i18n localization context of type
+javax.servlet.jsp.jstl.fmt.LocalizationC
+ontext.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var or the localization context
+configuration variable.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Maps key to localized message and performs parametric replacement
+ </description>
+ <name>message</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.MessageTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Message key to be looked up.
+ </description>
+ <name>key</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Localization context in whose resource
+bundle the message key is looked up.
+ </description>
+ <name>bundle</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable
+which stores the localized message.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Supplies an argument for parametric replacement to a containing
+ &lt;message&gt; tag
+ </description>
+ <name>param</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.ParamTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Argument used for parametric replacement.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Formats a numeric value as a number, currency, or percentage
+ </description>
+ <name>formatNumber</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Numeric value to be formatted.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Specifies whether the value is to be
+formatted as number, currency, or
+percentage.
+ </description>
+ <name>type</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Custom formatting pattern.
+ </description>
+ <name>pattern</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+ISO 4217 currency code. Applied only
+when formatting currencies (i.e. if type is
+equal to "currency"); ignored otherwise.
+ </description>
+ <name>currencyCode</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Currency symbol. Applied only when
+formatting currencies (i.e. if type is equal
+to "currency"); ignored otherwise.
+ </description>
+ <name>currencySymbol</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Specifies whether the formatted output
+will contain any grouping separators.
+ </description>
+ <name>groupingUsed</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Maximum number of digits in the integer
+portion of the formatted output.
+ </description>
+ <name>maxIntegerDigits</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Minimum number of digits in the integer
+portion of the formatted output.
+ </description>
+ <name>minIntegerDigits</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Maximum number of digits in the
+fractional portion of the formatted output.
+ </description>
+ <name>maxFractionDigits</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Minimum number of digits in the
+fractional portion of the formatted output.
+ </description>
+ <name>minFractionDigits</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable
+which stores the formatted result as a
+String.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Parses the string representation of a number, currency, or percentage
+ </description>
+ <name>parseNumber</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+String to be parsed.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Specifies whether the string in the value
+attribute should be parsed as a number,
+currency, or percentage.
+ </description>
+ <name>type</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Custom formatting pattern that determines
+how the string in the value attribute is to be
+parsed.
+ </description>
+ <name>pattern</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Locale whose default formatting pattern (for
+numbers, currencies, or percentages,
+respectively) is to be used during the parse
+operation, or to which the pattern specified
+via the pattern attribute (if present) is
+applied.
+ </description>
+ <name>parseLocale</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Specifies whether just the integer portion of
+the given value should be parsed.
+ </description>
+ <name>integerOnly</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable which
+stores the parsed result (of type
+java.lang.Number).
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Formats a date and/or time using the supplied styles and pattern
+ </description>
+ <name>formatDate</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <description>
+Date and/or time to be formatted.
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Specifies whether the time, the date, or both
+the time and date components of the given
+date are to be formatted.
+ </description>
+ <name>type</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Predefined formatting style for dates. Follows
+the semantics defined in class
+java.text.DateFormat. Applied only
+when formatting a date or both a date and
+time (i.e. if type is missing or is equal to
+"date" or "both"); ignored otherwise.
+ </description>
+ <name>dateStyle</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Predefined formatting style for times. Follows
+the semantics defined in class
+java.text.DateFormat. Applied only
+when formatting a time or both a date and
+time (i.e. if type is equal to "time" or "both");
+ignored otherwise.
+ </description>
+ <name>timeStyle</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Custom formatting style for dates and times.
+ </description>
+ <name>pattern</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Time zone in which to represent the formatted
+time.
+ </description>
+ <name>timeZone</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable which
+stores the formatted result as a String.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <tag>
+ <description>
+ Parses the string representation of a date and/or time
+ </description>
+ <name>parseDate</name>
+ <tag-class>org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <description>
+Date string to be parsed.
+ </description>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Specifies whether the date string in the
+value attribute is supposed to contain a
+time, a date, or both.
+ </description>
+ <name>type</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Predefined formatting style for days
+which determines how the date
+component of the date string is to be
+parsed. Applied only when formatting a
+date or both a date and time (i.e. if type
+is missing or is equal to "date" or "both");
+ignored otherwise.
+ </description>
+ <name>dateStyle</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Predefined formatting styles for times
+which determines how the time
+component in the date string is to be
+parsed. Applied only when formatting a
+time or both a date and time (i.e. if type
+is equal to "time" or "both"); ignored
+otherwise.
+ </description>
+ <name>timeStyle</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Custom formatting pattern which
+determines how the date string is to be
+parsed.
+ </description>
+ <name>pattern</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Time zone in which to interpret any time
+information in the date string.
+ </description>
+ <name>timeZone</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Locale whose predefined formatting styles
+for dates and times are to be used during
+the parse operation, or to which the
+pattern specified via the pattern
+attribute (if present) is applied.
+ </description>
+ <name>parseLocale</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Name of the exported scoped variable in
+which the parsing result (of type
+java.util.Date) is stored.
+ </description>
+ <name>var</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <description>
+Scope of var.
+ </description>
+ <name>scope</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ </tag>
+
+</taglib>
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/WEB-INF/web.xml b/java/das/samples/advanced-webapp/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000000..c60d36566b
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
+Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app id="WebApp">
+ <display-name>Tuscany DAS Features</display-name>
+ <welcome-file-list id="WelcomeFileList">
+ <welcome-file>html/DASWebSampleFrame.html</welcome-file>
+ </welcome-file-list>
+
+ <!-- Command Servlet -->
+ <servlet>
+ <display-name>CommandServlet</display-name>
+ <servlet-name>CommandServlet</servlet-name>
+ <servlet-class>org.apache.tuscany.samples.web.CommandServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>CommandServlet</servlet-name>
+ <url-pattern>/CommandServlet</url-pattern>
+ </servlet-mapping>
+
+ <!-- JSTL Tag Library Descriptors -->
+ <taglib>
+ <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
+ <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
+ </taglib>
+ <taglib>
+ <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
+ <taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
+ </taglib>
+</web-app>
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/html/DASWebSampleFrame.html b/java/das/samples/advanced-webapp/src/main/webapp/html/DASWebSampleFrame.html
new file mode 100644
index 0000000000..49f913eaec
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/html/DASWebSampleFrame.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
+ "http://www.w3.org/TR/html4/frameset.dtd">
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<HTML>
+<HEAD>
+<TITLE>Tuscany DAS Web Sample</TITLE>
+</HEAD>
+<FRAMESET rows="40%,70%">
+ <FRAME name="fixed" src="jsp/DASMenu.jsp">
+ <FRAME name="dynamic" src="html/blank.html">
+</FRAMESET>
+</HTML> \ No newline at end of file
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/html/blank.html b/java/das/samples/advanced-webapp/src/main/webapp/html/blank.html
new file mode 100644
index 0000000000..0bc2a49864
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/html/blank.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<HTML>
+<HEAD>
+<TITLE></TITLE>
+</HEAD>
+<BODY>
+</BODY>
+</HTML> \ No newline at end of file
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/js/ajax.js b/java/das/samples/advanced-webapp/src/main/webapp/js/ajax.js
new file mode 100644
index 0000000000..c0b0be5e54
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/js/ajax.js
@@ -0,0 +1,188 @@
+//<!--
+// Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// -->
+
+var req;
+var url;
+var xslFileName;
+var brwsr;
+var htmlunitlimit;
+
+function startup(pageName) {
+ if(pageName == 'adhoc'){
+ document.forms[0].sqlQuery.focus = true;
+ }
+
+ if(pageName == 'command') {
+ document.forms[0].DasCommand.focus = true;
+ }
+}
+
+function init() {
+ if (window.XMLHttpRequest) {
+ brwsr="NOIE";
+ req = new XMLHttpRequest();
+ } else if (window.ActiveXObject) {
+ brwsr="IE";
+ req = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+ var url = "../CommandServlet";
+ req.open("POST", url, true);
+ req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+}
+
+function formWaitMessage(){
+ var swappableSection = document.getElementById('msg');
+ if (window.XSLTProcessor)
+ {
+ swappableSection.innerHTML = '';
+ var x = document.createTextNode('Retreiving result..please wait');
+ swappableSection.appendChild(x);
+ }
+ else if(window.ActiveXObject)
+ {
+ swappableSection.innerHTML = 'Retreiving result..please wait' ;
+ }
+}
+
+function executeQuery(reqParams, xslFileNameVal) {
+ init();
+ req.onreadystatechange = resultHandler;
+ xslFileName = xslFileNameVal;
+ //alert(reqParams);
+ xsldocloaded = false;
+ loadXsl();
+ req.send(reqParams);
+ //alert('req sent');
+}
+
+ var xsldocloaded = false;
+ var xsldoc;
+
+function loadXsl(){
+ if(xslFileName != ''){
+ if (window.XSLTProcessor)
+ {
+ // support Mozilla/Gecko based browsers
+ xsldoc = document.implementation.createDocument("", "", null);
+ xsldoc.addEventListener("load", onXslLoad, false);
+ xsldoc.load(xslFileName);
+ //alert("done loadXsl Mozilla");
+ htmlunitlimit='false';
+ }
+ else if(window.ActiveXObject)
+ {
+ // support Windows / ActiveX
+ xsldoc = new ActiveXObject("Microsoft.XMLDOM");
+ xsldoc.ondataavailable = onXslLoad;
+ xsldoc.load(xslFileName);
+ //alert("done loadXsl IE");
+ htmlunitlimit='false';
+ }
+ else{
+ //alert('setiing htmlunitlimit true');
+ htmlunitlimit='true';
+ }
+ }
+}
+
+function onXslLoad()
+{
+ // flag that the xsl is loaded
+ xsldocloaded = true;
+}
+
+function resultHandler()
+{
+ // Make sure the request is loaded (readyState = 4)
+ if (req.readyState == 4)
+ {
+ // Make sure the status is "OK"
+ if (req.status == 200)
+ {
+ // Make sure the XSL document is loaded
+ if (!xsldocloaded && xslFileName != '')
+ {
+ if(htmlunitlimit=='false'){
+ alert("Unable to transform data. XSL is not yet loaded.");
+ // break out of the function
+ return;
+ }
+ else{
+ var swappableSectionUT = document.getElementById('msg');
+ if(brwsr=='NOIE'){
+ //alert('limit case, xsl present, noie');
+ swappableSectionUT.removeChild(swappableSectionUT.childNodes[0]);//remove wait message
+ var x = document.createTextNode(req.responseText);
+ swappableSectionUT.appendChild(x);
+ }
+ else{
+ swappableSectionUT.innerHTML = req.responseText;
+ }
+ //alert('returning result:'+req.responseText);
+ return;
+ }
+ }
+
+ var swappableSection = document.getElementById("msg");
+
+ if (window.XSLTProcessor)
+ {
+ if(xslFileName == ''){
+ swappableSection.removeChild(swappableSection.childNodes[0]);//remove wait message
+ var x = document.createTextNode(req.responseText);
+ swappableSection.appendChild(x);
+ }
+ else{
+ // support Mozilla/Gecko based browsers
+ var xsltProcessor = new XSLTProcessor();
+ xsltProcessor.importStylesheet(xsldoc);
+ var outputXHTML = xsltProcessor
+ .transformToFragment(req.responseXML, document);
+ swappableSection.innerHTML = "";
+ swappableSection.appendChild(outputXHTML);
+ }
+ }
+ else if(window.ActiveXObject)
+ {
+ if(xslFileName == ''){
+ swappableSection.innerHTML = req.responseText;
+ }
+ else{
+ // support Windows/ActiveX enabled browsers
+ var outputXHTML = req.responseXML.transformNode(xsldoc);
+ swappableSection.innerHTML = outputXHTML;
+ }
+ }
+ else{
+ var swappableSectionUT = document.getElementById('msg');
+ if(brwsr=='NOIE'){
+ swappableSectionUT.removeChild(swappableSectionUT.childNodes[0]);//remove wait message
+ var x = document.createTextNode(req.responseText);
+ swappableSectionUT.appendChild(x);
+ }
+ else{
+ swappableSectionUT.innerHTML = req.responseText;
+ }
+ return;
+ }
+ }
+ else
+ {
+ alert("There was a problem retrieving the XML data:\n" +
+ req.statusText);
+ }
+ }
+}
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/js/dasmenu.js b/java/das/samples/advanced-webapp/src/main/webapp/js/dasmenu.js
new file mode 100644
index 0000000000..96b5d5288e
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/js/dasmenu.js
@@ -0,0 +1,112 @@
+//<!--
+// Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// -->
+var dbstatus;
+var brwsrDB;
+var reqDB;
+
+function showSubMenu(){
+ var objThis = this;
+
+ for(var i = 0; i < objThis.childNodes.length; i++)
+ {
+ if(objThis.childNodes.item(i).nodeName == "UL")
+ {
+ objThis.childNodes.item(i).style.display = "block";
+ }
+ }
+}
+
+function hideSubMenu()
+{
+ var objThis = this;
+
+ for(var i = 0; i < objThis.childNodes.length; i++)
+ {
+ if(objThis.childNodes.item(i).nodeName == "UL")
+ {
+ objThis.childNodes.item(i).style.display = "none";
+ return;
+ }
+ }
+}
+
+function initialiseMenu()
+{
+ var objLICollection = document.body.getElementsByTagName("LI");
+ for(var i = 0; i < objLICollection.length; i++)
+ {
+ var objLI = objLICollection[i];
+ for(var j = 0; j < objLI.childNodes.length; j++)
+ {
+ if(objLI.childNodes.item(j).nodeName == "UL")
+ {
+ objLI.onmouseover=showSubMenu;
+ objLI.onmouseout=hideSubMenu;
+
+ for(var j = 0; j < objLI.childNodes.length; j++)
+ {
+ if(objLI.childNodes.item(j).nodeName == "A")
+ {
+ objLI.childNodes.item(j).className = "hassubmenu";
+ }
+ }
+ }
+ }
+ }
+}
+
+function refreshdb(){
+ if (window.XMLHttpRequest) {
+ brwsrDB='NOIE';
+ reqDB = new XMLHttpRequest();
+ } else if (window.ActiveXObject) {
+ brwsrDB='IE';
+ reqDB = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+
+ var dbRefreshMsg = document.getElementById('dbmsg');
+ if(brwsrDB=='NOIE'){
+ var x = document.createTextNode('Refreshing database..please wait');
+ dbRefreshMsg.appendChild(x);
+ }
+ else{
+ dbmsg.innerHTML = 'Refreshing database..please wait';
+ }
+
+ //TODO
+ var urlDB = "../CommandServlet";
+ reqDB.open("POST", urlDB, true);
+ reqDB.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+ reqDB.onreadystatechange = dbresultHandler;
+ reqDB.send('refreshDB=yes');
+}
+
+function dbresultHandler() {
+ if (reqDB.readyState == 4) {
+ if (reqDB.status == 200) {
+ var dbRefreshMsg = document.getElementById('dbmsg');
+ if(brwsrDB=='NOIE'){
+ dbRefreshMsg.removeChild(dbRefreshMsg.childNodes[0]);//remove wait message
+ var x = document.createTextNode('Refreshed database!');
+ dbRefreshMsg.appendChild(x);
+ }
+ else{
+ dbmsg.innerHTML = 'Refreshed database!';
+ }
+ return;
+ }
+ }
+}
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/jsp/DASMenu.jsp b/java/das/samples/advanced-webapp/src/main/webapp/jsp/DASMenu.jsp
new file mode 100644
index 0000000000..041e05c8bb
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/jsp/DASMenu.jsp
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <link rel="stylesheet" type="text/css" href="main.css" media="screen, print" />
+ <script type="text/javascript" src="../js/dasmenu.js" >
+ </script>
+
+ <title>DASMenu: Web Sample</title>
+ <meta name="description" content="DAS Features Demo" />
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="expires" content="-1" />
+ <meta http-equiv="pragma" content="no-cache" />
+ </head>
+ <body onload="initialiseMenu();
+
+ ">
+ <h1>Tuscany DAS Web Sample</h1>
+ <ul id="mainmenu">
+ <li><a href="../html/blank.html" target="dynamic">Advanced Features</a>
+ <ul>
+ <li><a href="./occ.jsp" target="dynamic">OCC</a></li>
+ <li><a href="./converter.jsp" target="dynamic">Converter</a></li>
+ <li><a href="./rss.jsp" target="dynamic">Result Set Shape</a></li>
+ </ul>
+ </li>
+ <li><a href="./indexAdhoc.jsp" target="dynamic">Adhoc Query</a></li>
+ <li><a href="./indexCommand.jsp" target="dynamic">Command</a></li>
+ </ul>
+ <p>Tuscany DAS web sample demonstrates - simple adhoc queries, DAS predefined commands execution and
+ some advanced features like Optimistic Concurrency Control (OCC), Converter, Result Set Shape etc.
+ </p>
+ <p>Check more details by navigating menu.
+ Press <b>Refresh!</b> button anytime for database refresh.
+ </p>
+
+ <FORM name='MenuForm'>
+ <INPUT TYPE="button" id="refreshButton" name="refreshButton" value="Refresh!"
+ onClick=" refreshdb();
+ "
+ >
+ </INPUT>
+ <!-- Font for Status Message -->
+ <font face="Arial,Helvetica,Verdana" size="2" color="#FF0000">
+ <b id="dbmsg"></b>
+ </font>
+ </FORM>
+ </body>
+</html> \ No newline at end of file
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/jsp/converter.jsp b/java/das/samples/advanced-webapp/src/main/webapp/jsp/converter.jsp
new file mode 100644
index 0000000000..a3610e7639
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/jsp/converter.jsp
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<%--
+ * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ --%>
+
+<%-- JSTL tags --%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+
+<html>
+
+<head>
+<link href="default.css" rel="stylesheet" type="text/css">
+<script type="text/javascript" src="../js/ajax.js" >
+</script>
+
+</head>
+
+<body onload="startup()">
+
+<%@ page import="java.util.*" %>
+
+<font face="Arial,Helvetica,Verdana" size="3">
+
+<form name="DasForm" >
+
+<input type="hidden" id="serviceName" name="serviceName" value="org.apache.tuscany.samples.das.DASQueryProcessor"/>
+<input type="hidden" id="configFile" name="configFile" value="CustomerConfigWithConverter.xml"/>
+<input type="hidden" id="type" name="type" value="converter:"/>
+<input type="hidden" id="param" name="param" value=""/>
+<input type="hidden" id="xslFileName" name="xslFileName" value=""/>
+
+<b>Arbitrary Converter: </b>
+ The column converted is a VARCAHAR.
+ ResultSetShape is used to specify that the property will be a SDODataTypes.DATE.
+ So this example uses a converter that transforms a string column into a date property
+ and conversely, a date property back to a string for the underlying column.
+ <br>
+ The converter returns 1957.09.27 if the column value is "Pavick" and 1966.12.20 if
+ the value is "Williams"
+ <br>
+ On write, the converter returns "Williams" if the property value is 1966.12.20 and "Pavick"
+ if the property value is 1957.09.27
+ <br>
+ Check using direct database connection that the database table rows's column values are
+ either "Williams" or "Pavick".
+<br>
+<hr width="90%" size="1">
+<input type="radio" name="stmt" id="stmt" checked="checked" value="stmt0">
+Select * from CUSTOMER where ID = 1;
+<br>
+<input type="radio" name="stmt" id="stmt" value="stmt1">
+Check First Customer's LastName is 1957.09.27
+<br>
+<input type="radio" name="stmt" id="stmt" value="stmt2">
+Set First Customer's LastName to 1966.12.20
+<br>
+<input type="radio" name="stmt" id="stmt" value="stmt3">
+Check First Customer's LastName is 1966.12.20
+<br>
+
+
+&nbsp; &nbsp;
+<input type="button" id="converterButton" name="converterButton" value="ExecuteTransaction"
+ onclick="
+ var varVal;
+ if(this.form.stmt[0].checked){
+ varVal = 'stmt0';
+ xslFileName.value = '../xsl/customer.xsl';
+ }
+ if(this.form.stmt[1].checked){
+ varVal = 'stmt1';
+ xslFileName.value = '';
+ }
+ if(this.form.stmt[2].checked){
+ varVal = 'stmt2';
+ xslFileName.value = '';
+ }
+ if(this.form.stmt[3].checked){
+ varVal = 'stmt3';
+ xslFileName.value = '';
+ }
+
+ param.value = 'Query=' + this.form.type.value+varVal;
+ param.value += '&serviceName='+this.form.serviceName.value;
+ param.value += '&configFile='+this.form.configFile.value;
+ executeQuery(param.value, xslFileName.value);
+ formWaitMessage();
+ ">
+</input>
+<hr>
+
+<!-- Font for Status Message -->
+<font face="Arial,Helvetica,Verdana" size="2" color="#FF0000">
+<div id="msg">&nbsp;</div>
+</font>
+<!-- Font End -->
+
+</form>
+
+</font>
+
+</body>
+</html>
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/jsp/default.css b/java/das/samples/advanced-webapp/src/main/webapp/jsp/default.css
new file mode 100644
index 0000000000..5680fab9ed
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/jsp/default.css
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+BODY {BACKGROUND-COLOR: #FFFFFF; COLOR: #333366; FONT-FAMILY: 'Times New Roman'}
+H1 {COLOR: #6666CC; FONT-FAMILY: 'Times New Roman'; TEXT-TRANSFORM: capitalize }
+H2 {COLOR: #6666CC; FONT-FAMILY: 'Times New Roman'; TEXT-TRANSFORM: capitalize }
+H3 {COLOR: #6666CC; FONT-FAMILY: 'Times New Roman'; TEXT-TRANSFORM: capitalize }
+H4 {COLOR: #6666CC; FONT-FAMILY: 'Times New Roman'; TEXT-TRANSFORM: capitalize }
+H5 {COLOR: #6666CC; FONT-FAMILY: 'Times New Roman'; TEXT-TRANSFORM: capitalize }
+H6 {COLOR: #6666CC; FONT-FAMILY: 'Times New Roman'; TEXT-TRANSFORM: capitalize }
+TH {COLOR: #000000; font-weight: bold }
+
+#TRowEven {background-color: #ccff99}
+#TRowOdd {background-color: #ffffcc}
+
+A:link {cursor:hand; color: #3300FF; text-decoration: none;}
+A:visited {cursor:hand; color: #3300FF; text-decoration: none; }
+A:active {cursor:hand; color:#FEAA02; text-decoration: none;}
+A:hover {cursor:hand; color:#FEAA02;}
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/jsp/indexAdhoc.jsp b/java/das/samples/advanced-webapp/src/main/webapp/jsp/indexAdhoc.jsp
new file mode 100644
index 0000000000..f212d744f1
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/jsp/indexAdhoc.jsp
@@ -0,0 +1,87 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<%--
+ * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ --%>
+
+<%-- JSTL tags --%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+
+<html>
+
+<head>
+<link href="default.css" rel="stylesheet" type="text/css">
+<script type="text/javascript" src="../js/ajax.js" >
+</script>
+
+</head>
+
+<body onload="startup()">
+
+<%@ page import="java.util.*" %>
+
+<font face="Arial,Helvetica,Verdana" size="3">
+
+<form name="DasForm" >
+
+<input type="hidden" id="serviceName" name="serviceName" value="org.apache.tuscany.samples.das.DASQueryProcessor"/>
+<input type="hidden" id="configFile" name="configFile" value="DasConfig.xml"/>
+<input type="hidden" id="type" name="type" value="query:"/>
+<input type="hidden" id="param" name="param" value=""/>
+<input type="hidden" id="xslFileName" name="xslFileName" value=""/>
+
+<b>Adhoc SQL Query: </b><br>
+<select id="sqlQuery" name="sqlQuery"
+ onfocus="this.form.queryButton.disabled=false;">
+<option value="NullQuery"></option>
+<option value="SELECT * FROM COMPANY">SELECT * FROM COMPANY</option>
+<option value="SELECT * FROM COMPANY LEFT OUTER JOIN DEPARTMENT ON COMPANY.ID = DEPARTMENT.COMPANYID">SELECT * FROM COMPANY LEFT OUTER JOIN DEPARTMENT ON COMPANY.ID = DEPARTMENT.COMPANYID</option>
+<option value="{INSERT INTO DEPARTMENT (NAME, COMPANYID) VALUES ('MyDept',1)}{SELECT * FROM COMPANY LEFT OUTER JOIN DEPARTMENT ON COMPANY.ID = DEPARTMENT.COMPANYID}">
+ INSERT INTO DEPARTMENT (NAME, COMPANYID) VALUES ('MyDept',1)</option>
+<option value="{DELETE FROM DEPARTMENT WHERE DEPARTMENT.COMPANYID=1 and DEPARTMENT.ID>1}{SELECT * FROM COMPANY LEFT OUTER JOIN DEPARTMENT ON COMPANY.ID = DEPARTMENT.COMPANYID}">
+ DELETE FROM DEPARTMENT WHERE COMPANYID=1 and ID>1</option>
+<option value="{UPDATE DEPARTMENT SET NAME='MyUpdDept' WHERE COMPANYID=1 AND ID=1}{SELECT * FROM COMPANY LEFT OUTER JOIN DEPARTMENT ON COMPANY.ID = DEPARTMENT.COMPANYID}">
+ UPDATE DEPARTMENT SET NAME='MyUpdDept' WHERE COMPANYID=1 AND ID=1</option>
+</select>
+&nbsp; &nbsp;
+<input type="button" id="queryButton" name="queryButton" value="ExecuteQuery"
+ onclick="
+ if(this.form.sqlQuery.value=='SELECT * FROM COMPANY'){
+ this.form.xslFileName.value = '../xsl/company.xsl';
+ }
+ else{
+ this.form.xslFileName.value = '../xsl/companyDepartment.xsl';
+ }
+ param.value = 'Query=' + this.form.type.value+this.form.sqlQuery.value;
+ param.value += '&serviceName='+this.form.serviceName.value;
+ param.value += '&configFile='+this.form.configFile.value;
+ executeQuery(param.value, xslFileName.value);
+ formWaitMessage();
+ " >
+</input>
+<hr>
+
+<!-- Font for Status Message -->
+<font face="Arial,Helvetica,Verdana" size="2" color="#FF0000">
+<div id="msg">&nbsp;</div>
+</font>
+<!-- Font End -->
+</form>
+
+</font>
+
+</body>
+</html>
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/jsp/indexCommand.jsp b/java/das/samples/advanced-webapp/src/main/webapp/jsp/indexCommand.jsp
new file mode 100644
index 0000000000..55dcb56e38
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/jsp/indexCommand.jsp
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<%--
+ * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ --%>
+
+<%-- JSTL tags --%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+
+<html>
+
+<head>
+<link href="default.css" rel="stylesheet" type="text/css">
+<script src="../js/ajax.js" language="javascript" type="text/javascript"></script>
+
+</head>
+
+<body onload="startup()">
+
+<%@ page import="java.util.*" %>
+
+<font face="Arial,Helvetica,Verdana" size="3">
+
+<form name="DasForm" >
+
+<input type="hidden" id="serviceName" name="serviceName" value="org.apache.tuscany.samples.das.DASQueryProcessor"/>
+<input type="hidden" id="configFile" name="configFile" value="DasConfig.xml"/>
+<input type="hidden" id="type" name="type" value="command:"/>
+<input type="hidden" id="param" name="param" value=""/>
+<input type="hidden" id="xslFileName" name="xslFileName" value=""/>
+
+<b>DAS Command: </b>
+
+<select id="DasCommand" name="DasCommand"
+ onfocus="this.form.commandButton.disabled=false;">
+<option value="NullCommand"></option>
+<option value="AllCompanies">all companies</option>
+<option value="AllCompaniesAndDepartments">all companies and departments</option>
+<option value="AddDepartmentToFirstCompany">Add department to first company</option>
+<option value="DeleteDepartmentFromFirstCompany">Delete department from first company</option>
+<option value="UpdateCompanyDepartmentNames">Update one department name from first company</option>
+</select>
+
+
+<input type="button" id="commandButton" name="commandButton" value="ExecuteCommand"
+ onclick="this.form.type.value='command:';
+ if(this.form.DasCommand.value=='AllCompanies'){
+ this.form.xslFileName.value = '../xsl/company.xsl';
+ }
+ else{
+ this.form.xslFileName.value = '../xsl/companyDepartment.xsl';
+ }
+
+ param.value = 'Query=' + this.form.type.value+this.form.DasCommand.value;
+ param.value += '&serviceName='+this.form.serviceName.value;
+ param.value += '&configFile='+this.form.configFile.value;
+ executeQuery(param.value, this.form.xslFileName.value);
+ formWaitMessage();
+ " >
+</input>
+<hr>
+<!-- Font for Status Message -->
+<font face="Arial,Helvetica,Verdana" size="2" color="#FF0000">
+<div id="msg">&nbsp;</div>
+</font>
+<!-- Font End -->
+</form>
+
+</font>
+
+</body>
+</html>
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/jsp/main.css b/java/das/samples/advanced-webapp/src/main/webapp/jsp/main.css
new file mode 100644
index 0000000000..264facc985
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/jsp/main.css
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+body
+{
+ margin: 0px;
+ border: 0px;
+ padding: 0px;
+ font-family: Verdana, Arial, Sans-Serif;
+ font-size: 0px;
+}
+
+img
+{
+ border: none 0px #ffffff;
+}
+
+h1
+{
+ background-color: #ffcc00;
+ border-bottom: solid 1px #333333;
+ padding: 5px;
+ margin: 0px;
+ font-size: x-large;
+}
+
+h2
+{
+ font-size: large;
+}
+
+p
+{
+ font-size: small;
+}
+
+/* Real menu */
+ul, li
+{
+ font-size: small;
+ margin-top: 0px;
+ margin-right: 0px;
+ margin-bottom: 0px;
+ display: block;
+}
+
+ul
+{
+ width: 130px;
+ border: solid 1px #333333;
+ border-top: solid 5px #333333;
+ border-right: solid 2px #333333;
+ padding: 0px;
+}
+
+li ul
+{
+ display: none;
+ position: absolute;
+ margin-left: 100px;
+ margin-top: -20px;
+}
+
+li a
+{
+ padding: 2px;
+ text-decoration: none;
+ color: #000000;
+ background-color: #ffffee;
+ width: 100%;
+ display: block;
+ border-bottom: dashed 1px #333333;
+ text-indent: 2px;
+ font-size: small;
+}
+
+li a:hover
+{
+ background-color: #ffcc00;
+ font-weight: bold;
+ border-bottom: solid 1px #333333;
+}
+
+li
+{
+ float: left;
+ width: 98%;
+}
+
+a.hassubmenu
+{
+ background-image: url(../img/lay_dmnuhassub.gif);
+ background-repeat: no-repeat;
+ background-position: 120px 7px;
+}
+
+#mainmenu
+{
+ margin: 10px;
+ margin-left: 5px;
+ float: left;
+ border-bottom: solid 2px #333333;
+ margin-bottom: 100%;
+} \ No newline at end of file
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/jsp/occ.jsp b/java/das/samples/advanced-webapp/src/main/webapp/jsp/occ.jsp
new file mode 100644
index 0000000000..ed5a7ee0c1
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/jsp/occ.jsp
@@ -0,0 +1,77 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<%--
+ * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ --%>
+
+<%-- JSTL tags --%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+
+<html>
+
+<head>
+<link href="default.css" rel="stylesheet" type="text/css">
+<script type="text/javascript" src="../js/ajax.js" >
+</script>
+
+</head>
+
+<body onload="startup()">
+
+<%@ page import="java.util.*" %>
+
+<font face="Arial,Helvetica,Verdana" size="3">
+
+<form name="DasForm" >
+
+<input type="hidden" id="serviceName" name="serviceName" value="org.apache.tuscany.samples.das.DASQueryProcessor"/>
+<input type="hidden" id="configFile" name="configFile" value="DasConfig.xml"/>
+<input type="hidden" id="type" name="type" value="occ:"/>
+<input type="hidden" id="param" name="param" value=""/>
+<input type="hidden" id="xslFileName" name="xslFileName" value=""/>
+
+<b>Automatic Optimistic Concurrency Control: </b>
+ Try to modify same column in same database table row twice in one transaction.
+<br>
+<TEXTAREA name="occTransactions" id="occTransactions" rows="3" cols="60" readonly="true">
+ Select * from BOOK where BOOK_ID = 1;
+ update BOOK set NAME = 'Puss in Hat' where BOOK_ID = 1;
+ 'UpdateNameForFirstBook'
+</TEXTAREA>
+
+&nbsp; &nbsp;
+<input type="button" id="occButton" name="occButton" value="ExecuteTransaction"
+ onclick="
+ param.value = 'Query=' + this.form.type.value;
+ param.value += '&serviceName='+this.form.serviceName.value;
+ param.value += '&configFile='+this.form.configFile.value;
+ executeQuery(param.value, xslFileName.value);
+ formWaitMessage();
+ ">
+</input>
+<hr>
+
+<!-- Font for Status Message -->
+<font face="Arial,Helvetica,Verdana" size="2" color="#FF0000">
+<div id="msg">&nbsp;</div>
+</font>
+<!-- Font End -->
+</form>
+
+</font>
+
+</body>
+</html>
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/jsp/rss.jsp b/java/das/samples/advanced-webapp/src/main/webapp/jsp/rss.jsp
new file mode 100644
index 0000000000..2d217d68b3
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/jsp/rss.jsp
@@ -0,0 +1,78 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<%--
+ * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ --%>
+
+<%-- JSTL tags --%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+
+<html>
+
+<head>
+<link href="default.css" rel="stylesheet" type="text/css">
+<script type="text/javascript" src="../js/ajax.js" >
+</script>
+
+</head>
+
+<body onload="startup()">
+
+<%@ page import="java.util.*" %>
+
+<font face="Arial,Helvetica,Verdana" size="3">
+
+<form name="DasForm" >
+
+<input type="hidden" id="serviceName" name="serviceName" value="org.apache.tuscany.samples.das.DASQueryProcessor"/>
+<input type="hidden" id="configFile" name="configFile" value="CustomerConfigWithIDConverter.xml"/>
+<input type="hidden" id="type" name="type" value="rss:"/>
+<input type="hidden" id="param" name="param" value=""/>
+<input type="hidden" id="xslFileName" name="xslFileName" value=""/>
+
+<b>Result Set Shape: </b>
+ DAS has ability to specify format(shape) of the ResultSet. This is necessary
+ when the JDBC driver in use does not provide adequate support for ResultSetMetadata.
+ Also, we expect that specifying the result set shape will increase performance.
+<br>
+<hr width="90%" size="1">
+<input type="text" name="stmt" id="stmt" value="literal" size="20">
+(Select 99, 'Roosevelt', '1600 Pennsylvania Avenue' from customer)
+
+&nbsp; &nbsp;
+<input type="button" id="rssButton" name="rssButton" value="ExecuteQuery"
+ onclick="
+ this.form.xslFileName.value='../xsl/customer.xsl';
+ param.value = 'Query=' + this.form.type.value+this.form.stmt.value;
+ param.value += '&serviceName='+this.form.serviceName.value;
+ param.value += '&configFile='+this.form.configFile.value;
+ executeQuery(param.value, xslFileName.value);
+ formWaitMessage();
+ " >
+</input>
+<hr>
+
+<!-- Font for Status Message -->
+<font face="Arial,Helvetica,Verdana" size="2" color="#FF0000">
+<div id="msg">&nbsp;</div>
+</font>
+<!-- Font End -->
+</form>
+
+</font>
+
+</body>
+</html>
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/xsl/company.xsl b/java/das/samples/advanced-webapp/src/main/webapp/xsl/company.xsl
new file mode 100644
index 0000000000..99d9dc1fad
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/xsl/company.xsl
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:das="http://org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <xsl:output method="html" version="1.0" encoding="Unicode" indent="yes"/>
+ <xsl:template match="/root/das:DataGraphRoot">
+ <html>
+ <body>
+ <h2>Query Result</h2>
+ <xsl:apply-templates select="COMPANY"/>
+ </body>
+ </html>
+ </xsl:template>
+ <xsl:template match="COMPANY">
+ <table border="1">
+ <tr bgcolor="#9acd32">
+ <th align="left">COMPANYID</th>
+ <th align="left">COMPANYNAME</th>
+ </tr>
+ <tr>
+ <td>
+ <xsl:value-of select="ID"/>
+ </td>
+ <td>
+ <xsl:value-of select="NAME"/>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/xsl/companyDepartment.xsl b/java/das/samples/advanced-webapp/src/main/webapp/xsl/companyDepartment.xsl
new file mode 100644
index 0000000000..f79d30595e
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/xsl/companyDepartment.xsl
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:das="http://org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <xsl:output method="html" version="1.0" encoding="Unicode" indent="yes"/>
+ <xsl:key name="companyidkey" match="/root/das:DataGraphRoot/DEPARTMENT" use="COMPANYID"/>
+ <xsl:template match="/root/das:DataGraphRoot">
+ <html>
+ <body>
+ <h2>Query Result</h2>
+ <xsl:apply-templates select="COMPANY"/>
+ </body>
+ </html>
+ </xsl:template>
+ <xsl:template match="COMPANY">
+ <table border="1">
+ <tr bgcolor="#9acd32">
+ <th align="left">COMPANYID</th>
+ <th align="left">COMPANYNAME</th>
+ </tr>
+
+ <tr>
+ <td>
+ <xsl:value-of select="ID"/>
+ </td>
+ <td>
+ <xsl:value-of select="NAME"/>
+ </td>
+ <table border="1">
+ <tr bgcolor="#9acd32">
+ <th align="left">DEPID</th>
+ <th align="left">DEPNAME</th>
+ </tr>
+
+ <xsl:variable name="tmp" select="ID"/>
+ <xsl:for-each select="key('companyidkey', $tmp)">
+ <tr>
+ <td>
+ <xsl:value-of select="ID"/>
+ </td>
+ <td>
+ <xsl:value-of select="NAME"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </tr>
+ </table>
+
+</xsl:template>
+</xsl:stylesheet>
diff --git a/java/das/samples/advanced-webapp/src/main/webapp/xsl/customer.xsl b/java/das/samples/advanced-webapp/src/main/webapp/xsl/customer.xsl
new file mode 100644
index 0000000000..40e260bcce
--- /dev/null
+++ b/java/das/samples/advanced-webapp/src/main/webapp/xsl/customer.xsl
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:das="http://org.apache.tuscany.das.rdb/config.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
+ <xsl:template match="/">
+ <html>
+ <body>
+ <h2>Query Result</h2>
+ <table border="1">
+ <tr bgcolor="#9acd32">
+ <th align="left">ID</th>
+ <th align="left">LASTNAME</th>
+ <th align="left">ADDRESS</th>
+ </tr>
+ <xsl:for-each select="root">
+ <xsl:for-each select="das:DataGraphRoot">
+ <tr>
+ <td>
+ <xsl:value-of select="CUSTOMER/ID"/>
+ </td>
+ <td>
+ <xsl:value-of select="CUSTOMER/LASTNAME"/>
+ </td>
+ <td>
+ <xsl:value-of select="CUSTOMER/ADDRESS"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:for-each>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>