You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by do...@apache.org on 2004/09/14 22:01:50 UTC
svn commit: rev 46036 - in incubator/beehive/trunk/netui: src/tags-html/org/apache/beehive/netui/tags/html test/webapps/drt/coreWeb/bugs/cr193645 test/webapps/drt/testRecorder/config test/webapps/drt/testRecorder/tests
Author: dolander
Date: Tue Sep 14 13:01:50 2004
New Revision: 46036
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/cr193645/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/cr193645/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/cr193645/index.jsp
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/Cr193645.xml
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Body.java
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
Log:
Fix an issue where an empty body in the <netui:body> tag caused "null" to be output to the response.
Created a BVT
Modified: incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Body.java
==============================================================================
--- incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Body.java (original)
+++ incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/Body.java Tue Sep 14 13:01:50 2004
@@ -233,7 +233,8 @@
reportErrors();
}
- results.append(_text);
+ if (_text != null)
+ results.append(_text);
IScriptReporter sr = getScriptReporter();
if (sr != null) {
Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/cr193645/Controller.jpf
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/cr193645/Controller.jpf Tue Sep 14 13:01:50 2004
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * 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.
+ *
+ * $Header:$
+ */
+package bugs.cr193645;
+
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+/**
+ * This is the default controller for a blank web application.
+ */
+@Jpf.Controller
+public class Controller extends PageFlowController
+{
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward(name="index", path="index.jsp")
+ }
+ )
+ protected Forward begin()
+ {
+ return new Forward("index");
+ }
+
+}
Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/cr193645/index.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/cr193645/index.jsp Tue Sep 14 13:01:50 2004
@@ -0,0 +1,13 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui" uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+<%@ taglib prefix="netui-data" uri="http://beehive.apache.org/netui/tags-databinding-1.0"%>
+<%@ taglib prefix="netui-template" uri="http://beehive.apache.org/netui/tags-template-1.0"%>
+
+
+<netui:html>
+ <head>
+ <netui:base/>
+ </head>
+ <netui:body></netui:body>Hello World!</netui:html>
+
+
\ No newline at end of file
Modified: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml (original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml Tue Sep 14 13:01:50 2004
@@ -1661,6 +1661,18 @@
</features>
</test>
<test>
+ <name>Cr193645</name>
+ <description>Empty Body was creating a "null" inside the response.</description>
+ <webapp>coreWeb</webapp>
+ <categories>
+ <category>bvt</category>
+ <category>clarifyBugs</category>
+ </categories>
+ <features>
+ <feature>Body</feature>
+ </features>
+ </test>
+ <test>
<name>CtAnchorNullBinding</name>
<description>Binding to null in the Anchor attributes</description>
<webapp>coreWeb</webapp>
Added: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/Cr193645.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/Cr193645.xml Tue Sep 14 13:01:50 2004
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
+ <ses:sessionName>Cr193645</ses:sessionName>
+ <ses:tester>Daryl</ses:tester>
+ <ses:startDate>14 Sep 2004, 01:54:25.680 PM MDT</ses:startDate>
+ <ses:description>Verify the function of a null <body> tag.</ses:description>
+ <ses:tests>
+ <ses:test>
+ <ses:testNumber>1</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+ <ses:uri>/coreWeb/bugs/cr193645/Controller.jpf</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>386D063332410E4972D246710F7B2374</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>accept</ses:name>
+ <ses:value>image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-encoding</ses:name>
+ <ses:value>gzip, deflate</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>Keep-Alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+ <ses:value>JSESSIONID=386D063332410E4972D246710F7B2374</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 2.0.40607)</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <base href="http://localhost:8080/coreWeb/bugs/cr193645/index.jsp">
+ </head>
+ <body></body>Hello World!
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ </ses:tests>
+ <ses:endDate>14 Sep 2004, 01:54:30.197 PM MDT</ses:endDate>
+ <ses:testCount>1</ses:testCount>
+</ses:recorderSession>