Re: cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/tilesInsertTag.java

2003-03-18 Thread Cedric Dumoulin


[EMAIL PROTECTED] wrote:

dgraham 2003/03/17 18:42:59

 Modified:src/share/org/apache/struts/taglib/tiles InsertTag.java
 Log:
 Formatting changes only (in preparation of bug fix).
 


  May I recall that the consensus is actually to not reformating classes ?

 Check http://jakarta.apache.org/struts/status.html under the Coding 
Convention Guidelines, it is written:

 "Observe the style of the original". Resist the temptation to make 
stylistic changes for their own sake."

 Reformating a classes is painful: it introduce useless noise in CVS, 
confuse original authors, and don't bring useful things. So please avoid it.
 I know that you don't like my format style. But this is not a valid 
reason to reformat it ;-)

   Cedric



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/tiles InsertTag.java

2003-03-17 Thread dgraham
dgraham 2003/03/17 18:46:02

  Modified:src/share/org/apache/struts/taglib/tiles InsertTag.java
  Log:
  Only include page if it's != null.
  
  Revision  ChangesPath
  1.14  +13 -5 
jakarta-struts/src/share/org/apache/struts/taglib/tiles/InsertTag.java
  
  Index: InsertTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/InsertTag.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- InsertTag.java18 Mar 2003 02:42:59 -  1.13
  +++ InsertTag.java18 Mar 2003 02:46:01 -  1.14
  @@ -871,11 +871,16 @@
   if (flush) {
   pageContext.getOut().flush();
   }
  -doInclude(page);
  +
  +if ((page != null) && (page.length() > 0)) {
  +doInclude(page);
  +}
  +
   } catch (IOException ex) {
   processException(
   ex,
   "Can't insert page '" + page + "' : " + ex.getMessage());
  +
   } catch (IllegalArgumentException ex) { // Can't resolve page uri
   // Do we ignore bad page uri errors ?
   if (!(page == null && isErrorIgnored)) {
  @@ -887,6 +892,7 @@
   + "'. Check if it exists.\n"
   + ex.getMessage());
   }
  +
   } catch (ServletException ex) {
   Throwable realEx = ex;
   if (ex.getRootCause() != null) {
  @@ -899,10 +905,12 @@
   + "] "
   + realEx.getMessage()
   + "'");
  +
   } catch (Exception ex) {
   processException(
   ex,
   "[Exception in:" + page + "] " + ex.getMessage());
  +
   } finally {
   // restore old context
   // done only if currentContext not null (bug with Silverstream ?; 
related by Arvindra Sehmi 20010712)
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/tiles InsertTag.java

2003-03-17 Thread dgraham
dgraham 2003/03/17 18:42:59

  Modified:src/share/org/apache/struts/taglib/tiles InsertTag.java
  Log:
  Formatting changes only (in preparation of bug fix).
  
  Revision  ChangesPath
  1.13  +168 -98   
jakarta-struts/src/share/org/apache/struts/taglib/tiles/InsertTag.java
  
  Index: InsertTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/InsertTag.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- InsertTag.java8 Mar 2003 19:23:49 -   1.12
  +++ InsertTag.java18 Mar 2003 02:42:59 -  1.13
  @@ -83,10 +83,10 @@
   import org.apache.struts.tiles.DefinitionAttribute;
   import org.apache.struts.tiles.DefinitionNameAttribute;
   import org.apache.struts.tiles.DefinitionsFactoryException;
  -import org.apache.struts.tiles.TilesUtil;
   import org.apache.struts.tiles.DirectStringAttribute;
   import org.apache.struts.tiles.FactoryNotFoundException;
   import org.apache.struts.tiles.NoSuchDefinitionException;
  +import org.apache.struts.tiles.TilesUtil;
   
   /**
* This is the tag handler for <tiles:insert>, which includes
  @@ -97,7 +97,9 @@
* @author Cedric Dumoulin
* @version $Revision$ $Date$
*/
  -public class InsertTag extends DefinitionTagSupport implements PutTagParent, 
ComponentConstants, PutListTagParent {
  +public class InsertTag
  +extends DefinitionTagSupport
  +implements PutTagParent, ComponentConstants, PutListTagParent {
   
   /** Commons Logging instance. */
   protected static Log log = LogFactory.getLog(InsertTag.class);
  @@ -346,7 +348,7 @@
   && !((HttpServletRequest) pageContext.getRequest()).isUserInRole(
   role)) { // not allowed : skip attribute
   return;
  -} // end if
  +}
   
   putAttribute(nestedTag.getName(), nestedTag.getRealValue());
   }
  @@ -364,11 +366,12 @@
   && !((HttpServletRequest) pageContext.getRequest()).isUserInRole(
   role)) { // not allowed : skip attribute
   return;
  -} // end if
  +}
   
   // Check if a name is defined
  -if (nestedTag.getName() == null)
  +if (nestedTag.getName() == null) {
   throw new JspException("Error - PutList : attribute name is not 
defined. It is mandatory as the list is added as attribute of 'insert'.");
  +}
   // now add attribute to enclosing parent (i.e. : this object).
   putAttribute(nestedTag.getName(), nestedTag.getList());
   }
  @@ -384,7 +387,7 @@
   && !((HttpServletRequest) pageContext.getRequest()).isUserInRole(
   role)) { // not allowed : skip attribute
   return;
  -} // end if
  +}
   
   putAttribute(nestedTag.getName(), nestedTag.getList());
   }
  @@ -413,7 +416,9 @@
   return null;
   }
   try {
  -return ComponentDefinition.createController(controllerName, 
controllerType);
  +return ComponentDefinition.createController(
  +controllerName,
  +controllerType);
   } catch (InstantiationException ex) {
   throw new JspException(ex.getMessage());
   }
  @@ -428,16 +433,16 @@
*  direct String
* 
* Handlers also contain sub-component context.
  - *
*/
   public int doStartTag() throws JspException {
   // Check role immediatly to avoid useless stuff.
   // In case of insertion of a "definition", definition's role still checked 
later.
   // This lead to a double check of "role" ;-(
  -if (role != null && !((HttpServletRequest) 
pageContext.getRequest()).isUserInRole(role)) {
  +if (role != null
  +&& !((HttpServletRequest) pageContext.getRequest()).isUserInRole(role)) 
{
   processEndTag = false;
   return SKIP_BODY;
  -} // end if
  +}
   
   // Now, real stuff
   try {
  @@ -503,8 +508,10 @@
   if (value instanceof AttributeDefinition) {
   // We have a type => return appropriate IncludeType
   return processTypedAttribute((AttributeDefinition) value);
  -} else if (value instanceof ComponentDefinition)
  +
  +} else if (value instanceof ComponentDefinition) {
   return processDefinition((ComponentDefinition) value);
  +}
   
   // Value must denote a valid String
   return processAsDefinitionOrURL(value.toString());
  @@ -526,8 +533,9 @@
   public TagHandler processName(String name) throws JspException {
   Object attrValue = getCurrentContext().getAttribute(name);
 

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/tiles/ext TextTag.java

2003-03-17 Thread dgraham
dgraham 2003/03/17 18:28:17

  Modified:src/share/org/apache/struts/taglib/tiles/ext TextTag.java
  Log:
  Deprecated outdated Tiles TextTag.
  
  Revision  ChangesPath
  1.3   +5 -4  
jakarta-struts/src/share/org/apache/struts/taglib/tiles/ext/TextTag.java
  
  Index: TextTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/ext/TextTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TextTag.java  8 Dec 2002 06:54:52 -   1.2
  +++ TextTag.java  18 Mar 2003 02:28:17 -  1.3
  @@ -77,6 +77,7 @@
* @author Craig R. McClanahan
* @author Cedric Dumoulin
* @version $Revision$ $Date$
  + * @deprecated Use o.a.s.taglib.html.TextTag instead.
*/
   
   public class TextTag extends BaseFieldTag {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestLinkTag5.jsp TestLinkTag6.jsp TestLinkTag7.jsp TestLinkTag8.jsp

2003-03-13 Thread jmitchell
jmitchell2003/03/13 17:20:55

  Added:   web/test/test/org/apache/struts/taglib/html TestLinkTag5.jsp
TestLinkTag6.jsp TestLinkTag7.jsp TestLinkTag8.jsp
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestLinkTag5.jsp
  
  Index: TestLinkTag5.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <[EMAIL PROTECTED] import="org.apache.struts.util.RequestUtils"%>
  <[EMAIL PROTECTED] import="java.util.HashMap"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  
  
  
  Test Link
  
  
  ">Test Link
  
  
  
  
  
  Test Link
  
  
  " accesskey="XXX">Test Link
  
  
  
  
  
  
  Test Link
  
  
  ">Test Link
  
  
  
  
  

  
Test Link
  



">Test Link


  
  
  

  
Test Link
  



">Test Link


  
  
  

  
Test Link
  



">Test Link


  
  
  

  
Test Link
  



">Test Link


  
  
  


Test Link




">Test Link

">Test Link


  
  
  


Test Link




">Test Link

">Test Link


  
  
  
  
  
  
  
  
  

  
Test Link
  



">Test Link


  
  
  

  
Test Link
  



">Test Link


  
  
  

  
Test Link
  



">Test Link


  
  
  

  
Test Link
  



">Test Link


  
  
  


Test Link




">Test Link

">Test Link


  
  
  


Test Link




">Test Link

">Test Link


  
  
  
  
  Test Link
  
  
  Test Link
  
  
  
  
  
  
  
  
  
  Test Link
  
  
  
">Test Link
  
  
  
  
 
  Test 
Link
 
 
 
">Test Link
  
  
  
  
  
  Test 
Link
  
  
  
">Test Link
  
  
  
  
  
  Test Link
  
  
  
">Test Link
  
  
  
  
  
  Test 
Link
  
  
  
">Test Link
  
  
  
  
  
  Test Link
  
  
  
">Test Link
  
  
  
  
  
  Test 
Link
  
  
  
">Test Link
  
  
  
  
  
  Test Link
  
  
  
">Test Link
  
  
  
  
  <% 
  String expected  = (String) pageContext.getAttribute("EXPECTED_RESULTS");
  String compareTo = (String) pageContext.getAttribute("TEST_RESULTS");
  
  if ((expected == null) || (expected == null)){
  Assert.fail("An invalid (or mispelled) test on this page was called.  Please 
verify that you've setup the tests (and spellings) correctly.");
  }

  Assert.assertEquals(compareTo, expected);
  %>
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestLinkTag6.jsp
  
  Index: TestLinkTag6.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %&g

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestLinkTag3.jsp TestLinkTag4.jsp

2003-03-13 Thread jmitchell
jmitchell2003/03/13 17:20:33

  Added:   web/test/test/org/apache/struts/taglib/html TestLinkTag3.jsp
TestLinkTag4.jsp
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestLinkTag3.jsp
  
  Index: TestLinkTag3.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <[EMAIL PROTECTED] import="org.apache.struts.util.RequestUtils"%>
  <[EMAIL PROTECTED] import="java.util.HashMap"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  
  
  
  
  Test Link
  
  
  ">Test Link
  
  
  
  
  
  Test Link
  
  
  " accesskey="XXX">Test Link
  
  
  
  
  
  
  Test Link
  
  
  ">Test Link
  
  
  
  
  

  
Test Link
  



">Test Link


  
  
  

  
Test Link
  



">Test Link


  
  
  

  
Test Link
  



">Test Link


  
  
  

  
Test Link
  



">Test Link


  
  
  


Test Link




">Test Link

">Test Link


  
  
  


Test Link




">Test Link

">Test Link


  
  
  
  
  
  
  
  
  

  
Test Link
  



">Test Link


  
  
  

  
Test Link
  



">Test Link


  
  
  

  
Test Link
  



">Test Link


  
  
  

  
Test Link
  



">Test Link


  
  
  


Test Link




">Test Link

">Test Link


  
  
  


Test Link




">Test Link

">Test Link


  
  
  
  
  Test Link
  
  
  Test Link
  
  
  
  
  
  
  
  
  
  Test Link
  
  
  
">Test Link
  
  
  
  
 
  Test 
Link
 
 
 
">Test Link
  
  
  
  
  
  Test 
Link
  
  
  
">Test Link
  
  
  
  
  
  Test Link
  
  
  
">Test Link
  
  
  
  
  
  Test 
Link
  
  
  
">Test Link
  
  
  
  
  
  Test Link
  
  
  
">Test Link
  
  
  
  
  
  Test 
Link
  
  
  
">Test Link
  
  
  
  
  
  Test Link
  
  
  
">Test Link
  
  
  
  
  <% 
  String expected  = (String) pageContext.getAttribute("EXPECTED_RESULTS");
  String compareTo = (String) pageContext.getAttribute("TEST_RESULTS");
  
  if ((expected == null) || (expected == null)){
  Assert.fail("An invalid (or mispelled) test on this page was called.  Please 
verify that you've setup the tests (and spellings) correctly.");
  }

  Assert.assertEquals(compareTo, expected);
  %>
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestLinkTag4.jsp
  
  Index: TestLinkTag4.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="jun

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestLinkTag1.jsp TestLinkTag2.jsp

2003-03-13 Thread jmitchell
jmitchell2003/03/13 17:20:19

  Added:   web/test/test/org/apache/struts/taglib/html TestLinkTag1.jsp
TestLinkTag2.jsp
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestLinkTag1.jsp
  
  Index: TestLinkTag1.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <[EMAIL PROTECTED] import="java.util.HashMap"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  
  
  
  Test Link
  
  
  ">Test 
Link
  
  
  
  
  
  Test Link
  
  
  " 
accesskey="XXX">Test Link
  
  
  
  
  
  
  Test Link
  
  
  ">Test Link
  
  
  
  
  

  
Test Link
  



">Test 
Link


  
  
  

  
Test Link
  



">Test 
Link


  
  
  

  
Test Link
  



">Test 
Link


  
  
  

  
Test Link
  



">Test 
Link


  
  
  


Test Link




">Test 
Link

">Test 
Link


  
  
  


Test Link




">Test 
Link

">Test 
Link


  
  
  
  
  
  
  
  
  

  
Test Link
  



">Test
 Link


  
  
  

  
Test Link
  



">Test
 Link


  
  
  

  
Test Link
  



">Test
 Link


  
  
  

  
Test Link
  



">Test
 Link


  
  
  


Test Link




">Test
 Link

">Test
 Link


  
  
  


Test Link




">Test
 Link

">Test
 Link


  
  
  
  
  Test Link
  
  
  Test Link
  
  
  
  
  
  
  
  
  
  Test Link
  
  
  
">Test Link
  
  
  
  
 
  Test Link
 
 
 
">Test Link
  
  
  
  
  
  Test 
Link
  
  
  
">Test Link
  
  
  
  
  
  Test Link
  
  
  
">Test Link
  
  
  
  
  
  Test 
Link
  
  
  
">Test Link
  
  
  
  
  
  Test Link
  
  
  
">Test Link
  
  
  
  
  
  Test 
Link
  
  
  
">Test Link
  
  
  
  
  
  Test Link
  
  
  
">Test Link
  
  
  
  
  <% 
  String expected  = (String) pageContext.getAttribute("EXPECTED_RESULTS");
  String compareTo = (String) pageContext.getAttribute("TEST_RESULTS");
  
  if ((expected == null) || (expected == null)){
  Assert.fail("An invalid (or mispelled) test on this page was called.  Please 
verify that you've setup the tests (and spellings) correctly.");
  }

  Assert.assertEquals(compareTo, expected);
  %>
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestLinkTag2.jsp
  
  Index: TestLinkTag2.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <[EMAIL PROTECTED] import="java.util.HashMap&

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/html TestLinkTag5.java TestLinkTag6.java TestLinkTag7.java TestLinkTag8.java

2003-03-13 Thread jmitchell
jmitchell2003/03/13 17:20:02

  Added:   src/test/org/apache/struts/taglib/html TestLinkTag5.java
TestLinkTag6.java TestLinkTag7.java
TestLinkTag8.java
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestLinkTag5.java
  
  Index: TestLinkTag5.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestLinkTag5.java,v 
1.1 2003/03/14 01:20:02 jmitchell Exp $
   * $Revision: 1.1 $
   * $Date: 2003/03/14 01:20:02 $
   * 
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.html;
  
  import java.util.HashMap;
  import java.util.Locale;
  import java.util.ArrayList;
  import java.util.StringTokenizer;
  
  import javax.servlet.jsp.JspException;
  import javax.servlet.jsp.PageContext;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.cactus.JspTestCase;
  import org.apache.struts.Globals;
  import org.apache.struts.taglib.SimpleBeanForTesting;
  import org.apache.struts.util.LabelValueBean;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.bean.LinkTag class.
   *
   * @author James Mitchell
   */
  public class TestLinkTag5 extends JspTestCase {
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestLinkTag5(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestLinkTag5.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestLinkTag5.class);
  }
  
  private void runMyTest(String whic

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/html TestLinkTag3.java TestLinkTag4.java

2003-03-13 Thread jmitchell
jmitchell2003/03/13 17:19:46

  Added:   src/test/org/apache/struts/taglib/html TestLinkTag3.java
TestLinkTag4.java
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestLinkTag3.java
  
  Index: TestLinkTag3.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestLinkTag3.java,v 
1.1 2003/03/14 01:19:46 jmitchell Exp $
   * $Revision: 1.1 $
   * $Date: 2003/03/14 01:19:46 $
   * 
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.html;
  
  import java.util.HashMap;
  import java.util.Locale;
  import java.util.ArrayList;
  import java.util.StringTokenizer;
  
  import javax.servlet.jsp.JspException;
  import javax.servlet.jsp.PageContext;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.cactus.JspTestCase;
  import org.apache.struts.Globals;
  import org.apache.struts.taglib.SimpleBeanForTesting;
  import org.apache.struts.util.LabelValueBean;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.bean.LinkTag class.
   *
   * @author James Mitchell
   */
  public class TestLinkTag3 extends JspTestCase {
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestLinkTag3(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestLinkTag3.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestLinkTag3.class);
  }
  
  private void runMyTest(String whichTest, String locale){
  

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/html TestLinkTag1.java TestLinkTag2.java

2003-03-13 Thread jmitchell
jmitchell2003/03/13 17:19:34

  Added:   src/test/org/apache/struts/taglib/html TestLinkTag1.java
TestLinkTag2.java
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestLinkTag1.java
  
  Index: TestLinkTag1.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestLinkTag1.java,v 
1.1 2003/03/14 01:19:34 jmitchell Exp $
   * $Revision: 1.1 $
   * $Date: 2003/03/14 01:19:34 $
   * 
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.html;
  
  import java.util.HashMap;
  import java.util.Locale;
  import java.util.ArrayList;
  import java.util.StringTokenizer;
  
  import javax.servlet.jsp.JspException;
  import javax.servlet.jsp.PageContext;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.cactus.JspTestCase;
  import org.apache.struts.Globals;
  import org.apache.struts.taglib.SimpleBeanForTesting;
  import org.apache.struts.util.LabelValueBean;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.bean.LinkTag class.
   *
   * @author James Mitchell
   */
  public class TestLinkTag1 extends JspTestCase {
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestLinkTag1(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestLinkTag1.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestLinkTag1.class);
  }
  
  private void runMyTest(String whichTest, String locale){
  

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html ImgTag.java

2003-03-11 Thread jmitchell
jmitchell2003/03/11 16:42:18

  Modified:src/share/org/apache/struts/taglib/html ImgTag.java
  Log:
  This should be consistent.
  
  The 2 helper methods will most likely be refactored
  to call RequestUtils.computeURL().
  
  Revision  ChangesPath
  1.27  +8 -8  
jakarta-struts/src/share/org/apache/struts/taglib/html/ImgTag.java
  
  Index: ImgTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImgTag.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ImgTag.java   24 Nov 2002 22:04:06 -  1.26
  +++ ImgTag.java   12 Mar 2003 00:42:18 -  1.27
  @@ -598,7 +598,7 @@
   if (src.toString().indexOf('?') < 0) {
   src.append('?');
   } else {
  -src.append('&');
  +src.append("&");
   }
   src.append(paramId);
   src.append('=');
  @@ -636,7 +636,7 @@
   Object value = map.get(key);
   if (value == null) {
   if (question) {
  -src.append('&');
  +src.append("&");
   } else {
   src.append('?');
   question = true;
  @@ -648,7 +648,7 @@
   String values[] = (String[]) value;
   for (int i = 0; i < values.length; i++) {
   if (question) {
  -src.append('&');
  +src.append("&");
   } else {
   src.append('?');
   question = true;
  @@ -660,7 +660,7 @@
   } else {
   
   if (question) {
  -src.append('&');
  +src.append("&");
   } else {
   src.append('?');
   question = true;
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestImgTag5.jsp TestImgTag5a.jsp TestImgTag6.jsp TestImgTag7.jsp TestImgTag7a.jsp TestImgTag8.jsp

2003-03-11 Thread jmitchell
jmitchell2003/03/11 16:34:24

  Added:   web/test/test/org/apache/struts/taglib/html TestImgTag5.jsp
TestImgTag5a.jsp TestImgTag6.jsp TestImgTag7.jsp
TestImgTag7a.jsp TestImgTag8.jsp
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImgTag5.jsp
  
  Index: TestImgTag5.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  <% 
  String expected = "";
  String compareTo = "";
  
  if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
  throw new javax.servlet.jsp.JspException
("No tests on this page were called.  Please verify that you've setup the 
tests correctly.");
  }else{
expected=pageContext.getAttribute("TEST_RESULTS").toString();
  }
  if (pageContext.getAttribute("TEST_RESULTS") != null){
compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  }
  
  Assert.assertEquals(compareTo, expected);
  %>
  
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImgTag5a.jsp
  
  Index: TestImgTag5a.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
  <% 
  String expected = "";
  String compareTo = "";
  
  if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
  throw new javax.servlet.jsp.JspException
("No tests on this page were called.  Please verify that you've setup the 
tests correctly.");
  }else{
expected=pageContext.getAttribute("TEST_RESULTS").toString();
  }
  if (pageContext.getAttribute("TEST_RESULTS") != null){
compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  }
  
  Assert.assertEquals(compareTo, expected);
  %>
  
  
  
  1.1  
jakarta-st

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestImgTag1.jsp TestImgTag1a.jsp TestImgTag2.jsp TestImgTag3.jsp TestImgTag3a.jsp TestImgTag4.jsp

2003-03-11 Thread jmitchell
jmitchell2003/03/11 16:33:59

  Added:   web/test/test/org/apache/struts/taglib/html TestImgTag1.jsp
TestImgTag1a.jsp TestImgTag2.jsp TestImgTag3.jsp
TestImgTag3a.jsp TestImgTag4.jsp
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImgTag1.jsp
  
  Index: TestImgTag1.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  
  
  
  
  
  
  " align="left">
  
  
  
  
  
  
  
  
  " align="right">
  
  
  
  
  
  
  
  
  " align="top">
  
  
  
  
  
  
  
  
  " align="middle">
  
  
  
  
  
  
  
  
  " align="bottom">
  
  
  
  
  
  
  
  
  " align="texttop">
  
  
  
  
  
  
  
  
  " align="absmiddle">
  
  
  
  
  
  
  
  
  " align="absbottom">
  
  
  
  
  
  
  
  
  " align="any value">
  
  
  
  
  
  
  
  
  " align="XXX">
  
  
  
  
  
  
  
  
  " alt="XXX">
  
  
  
  
  
  
  
  
  " alt="Testing 
Message">
  
  
  
  
  
  
  
  
  " alt="Testing 
Message">
  
  
  
  
  
  
  
  
  " alt="Message 
D'Essai">
  
  
  
  
  
  
  
  
  " alt="Message 
D'Essai">
  
  
  
  
  
  
  
  
  " border="XXX">
  
  
  
  
  
  
  
  
  " height="15">
  
  
  
  
  
  
  
  
  " height="155px">
  
  
  
  
  
  
  
  
  " hspace="15">
  
  
  
  
  
  
  
  
  " 
name="nameOfImage">
  
  
  
  
  
  
  
  
  " ismap="nameOfMap">
  
  
  
  
  
  
  
  
  " alt="Message 
D'Essai">
  
  
  
  
  <% 
  String expected = "";
  String compareTo = "";
  
  if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
  throw new javax.servlet.jsp.JspException
("No tests on this page were called.  Please verify that you've setup the 
tests correctly.");
  }else{
expected=pageContext.getAttribute("TEST_RESULTS").toString();
  }
  if (pageContext.getAttribute("TEST_RESULTS") != null){
compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  }
  
  Assert.assertEquals(compareTo, expected);
  %>
  
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImgTag1a.jsp
  
  Index: TestImgTag1a.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
 
  
 
 
 
">
  
  
  
  
  <% 
  String expected = "";
  String compareTo = "

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestImageTag5.jsp TestImageTag6.jsp TestImageTag7.jsp TestImageTag8.jsp

2003-03-11 Thread jmitchell
jmitchell2003/03/11 16:33:10

  Added:   web/test/test/org/apache/struts/taglib/html
TestImageTag5.jsp TestImageTag6.jsp
TestImageTag7.jsp TestImageTag8.jsp
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImageTag5.jsp
  
  Index: TestImageTag5.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  
  
  
  
  
  
  " accesskey="XXX">
  
  
  
  
  
  
  
  
  
  " align="XXX">
  
  
  
  
  
  
  
  
  
  " alt="XXX">
  
  
  
  
  
  
  
  
  
  " alt="Testing Message">
  
  
  
  
  
  
  
  
  
  " alt="Testing Message">
  
  
  
  
  
  
  
  
  " alt="Message D'Essai">
  
  
  
  
  
  
  
  
  " alt="Message D'Essai">
  
  
  
  
  
  
  
  
  
  " border="XXX">
  
  
  
  
  
  
  
  
  
  " disabled="disabled">
  
  
  
  
  
  
  
  
  
  " disabled="disabled">
  
  
  
  
  
  
  
  
  
  " disabled="disabled">
  
  
  
  
  
  
  
  
  
  ">
  
  
  
  
  
  
  
  
  
  ">
  
  
  
  
  
  
  
  
  
  ">
  
  
  
  
  
  
  
  
  
  " alt="Message D'Essai">
  
  
  
  
  
  
  
  
  
  " onblur="XXX">
  
  
  
  
  
  
  
  
  
  " onchange="XXX">
  
  
  
  
  
  
  
  
  
  " onclick="XXX">
  
  
  
  
  
  
  
  
  
  " ondblclick="XXX">
  
  
  
  
  
  
  
  
  
  " onfocus="XXX">
  
  
  
  
  
  
  
  
  
  " onkeydown="XXX">
  
  
  
  
  
  
  
  
  
  " onkeypress="XXX">
  
  
  
  
  
  
  
  
  
  " onkeyup="XXX">
  
  
  
  
  <% 
  String expected = "";
  String compareTo = "";
  
  if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
  throw new javax.servlet.jsp.JspException
("No tests on this page were called.  Please verify that you've setup the 
tests correctly.");
  }else{
expected=pageContext.getAttribute("TEST_RESULTS").toString();
  }
  if (pageContext.getAttribute("TEST_RESULTS") != null){
compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  }
  
  Assert.assertEquals(compareTo, expected);
  %>
  
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImageTag6.jsp
  
  Index: TestImageTag6.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  
  
  
  
  
  
  " onmousedown="XXX">
  
  
  
  
  
  
  
  
  
  " onmousemove="XXX">
  
  
  
  
  
  
  
  
  
  " onmouseout="XXX">
  
  
  
  
  
  
  
  
  
  " onmouseover="XXX">
  
  
  
  
  
  
  
  
  
  " onmouseup="XXX">
  
  
  
  
  
  
  
  
  

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/html TestImgTag5.java TestImgTag5a.java TestImgTag6.java TestImgTag7.java TestImgTag7a.java TestImgTag8.java

2003-03-11 Thread jmitchell
jmitchell2003/03/11 16:31:01

  Added:   src/test/org/apache/struts/taglib/html TestImgTag5.java
TestImgTag5a.java TestImgTag6.java TestImgTag7.java
TestImgTag7a.java TestImgTag8.java
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestImgTag5.java
  
  Index: TestImgTag5.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestImgTag5.java,v 1.1 
2003/03/12 00:31:01 jmitchell Exp $
   * $Revision: 1.1 $
   * $Date: 2003/03/12 00:31:01 $
   * 
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.html;
  
  import java.util.HashMap;
  import java.util.Locale;
  
  import javax.servlet.jsp.PageContext;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.cactus.JspTestCase;
  import org.apache.struts.Globals;
  import org.apache.struts.taglib.SimpleBeanForTesting;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.bean.ImgTag class.
   *
   * @author James Mitchell
   */
  public class TestImgTag5 extends JspTestCase {
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestImgTag5(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestImgTag5.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestImgTag5.class);
  }
  
  private void runMyTest(String whichTest, String locale){
pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), 
PageContext.SESSI

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/html TestImgTag1.java TestImgTag1a.java TestImgTag2.java TestImgTag3.java TestImgTag3a.java TestImgTag4.java

2003-03-11 Thread jmitchell
jmitchell2003/03/11 16:29:44

  Added:   src/test/org/apache/struts/taglib/html TestImgTag1.java
TestImgTag1a.java TestImgTag2.java TestImgTag3.java
TestImgTag3a.java TestImgTag4.java
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestImgTag1.java
  
  Index: TestImgTag1.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestImgTag1.java,v 1.1 
2003/03/12 00:29:44 jmitchell Exp $
   * $Revision: 1.1 $
   * $Date: 2003/03/12 00:29:44 $
   * 
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.html;
  
  import java.util.HashMap;
  import java.util.Locale;
  
  import javax.servlet.jsp.PageContext;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.cactus.JspTestCase;
  import org.apache.struts.Globals;
  import org.apache.struts.taglib.SimpleBeanForTesting;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.bean.ImgTag class.
   *
   * @author James Mitchell
   */
  public class TestImgTag1 extends JspTestCase {
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestImgTag1(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestImgTag1.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestImgTag1.class);
  }
  
  private void runMyTest(String whichTest, String locale){
pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), 
PageContext.SESSI

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/html TestImageTag5.java TestImageTag6.java TestImageTag7.java TestImageTag8.java

2003-03-11 Thread jmitchell
jmitchell2003/03/11 16:20:48

  Added:   src/test/org/apache/struts/taglib/html TestImageTag5.java
TestImageTag6.java TestImageTag7.java
TestImageTag8.java
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestImageTag5.java
  
  Index: TestImageTag5.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestImageTag5.java,v 
1.1 2003/03/12 00:20:48 jmitchell Exp $
   * $Revision: 1.1 $
   * $Date: 2003/03/12 00:20:48 $
   * 
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.html;
  
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.Locale;
  import java.util.StringTokenizer;
  
  import javax.servlet.jsp.PageContext;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.cactus.JspTestCase;
  import org.apache.struts.Globals;
  import org.apache.struts.taglib.SimpleBeanForTesting;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.bean.ImageTag class.
   *
   * @author James Mitchell
   */
  public class TestImageTag5 extends JspTestCase {
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestImageTag5(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestImageTag5.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestImageTag5.class);
  }
  
  private void runMyTest(String whichTest, String locale){
pageContext.setAttribute(Globals.

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestImageTag2.jsp TestImageTag4.jsp

2003-03-11 Thread jmitchell
jmitchell2003/03/11 15:46:05

  Modified:src/test/org/apache/struts/taglib/html TestImageTag2.java
TestImageTag4.java
   web/test/test/org/apache/struts/taglib/html
TestImageTag2.jsp TestImageTag4.jsp
  Log:
  Oops.  Somebody can't spell today!!
  
  Revision  ChangesPath
  1.3   +5 -5  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestImageTag2.java
  
  Index: TestImageTag2.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestImageTag2.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestImageTag2.java8 Mar 2003 19:31:55 -   1.2
  +++ TestImageTag2.java11 Mar 2003 23:46:05 -  1.3
  @@ -182,8 +182,8 @@
   runMyTest("testImagePageTitleKeyDefaultBundle_fr", "fr");
   }
   
  -public void testImagePageTitleKeyAlterateBundle_fr(){
  -runMyTest("testImagePageTitleKeyAlterateBundle_fr", "fr");
  +public void testImagePageTitleKeyAlternateBundle_fr(){
  +runMyTest("testImagePageTitleKeyAlternateBundle_fr", "fr");
   }
   
   public void testImagePageIndexedArray(){ 
  
  
  
  1.3   +5 -5  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestImageTag4.java
  
  Index: TestImageTag4.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestImageTag4.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestImageTag4.java8 Mar 2003 19:31:55 -   1.2
  +++ TestImageTag4.java11 Mar 2003 23:46:05 -  1.3
  @@ -182,8 +182,8 @@
   runMyTest("testImagePageKeyTitleKeyDefaultBundle_fr", "fr");
   }
   
  -public void testImagePageKeyTitleKeyAlterateBundle_fr(){
  -runMyTest("testImagePageKeyTitleKeyAlterateBundle_fr", "fr");
  +public void testImagePageKeyTitleKeyAlternateBundle_fr(){
  +runMyTest("testImagePageKeyTitleKeyAlternateBundle_fr", "fr");
   }
   
   public void testImagePageKeyIndexedArray(){ 
  
  
  
  1.3   +1 -1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImageTag2.jsp
  
  Index: TestImageTag2.jsp
  =======
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImageTag2.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestImageTag2.jsp 10 Mar 2003 17:29:52 -  1.2
  +++ TestImageTag2.jsp 11 Mar 2003 23:46:05 -  1.3
  @@ -150,7 +150,7 @@
   
   
   
  -
  +
   
   
   
  
  
  
  1.3   +1 -1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImageTag4.jsp
  
  Index: TestImageTag4.jsp
  =======
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestImageTag4.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestImageTag4.jsp 10 Mar 2003 17:29:52 -  1.2
  +++ TestImageTag4.jsp 11 Mar 2003 23:46:05 -  1.3
  @@ -146,7 +146,7 @@
   
   
   
  -
  +
   
   
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/bean MessageTag.java

2003-03-10 Thread jmitchell
jmitchell2003/03/10 16:00:28

  Modified:src/share/org/apache/struts/taglib/bean MessageTag.java
  Log:
  As discussed (briefly) on the dev list:
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17838
  
  This fix helps to debug specific user errors by showing quotes around the
  key that is in error (missing due to mispelling or additional whitespace)
  
  Revision  ChangesPath
  1.10  +5 -5  
jakarta-struts/src/share/org/apache/struts/taglib/bean/MessageTag.java
  
  Index: MessageTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/MessageTag.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MessageTag.java   5 Jan 2003 00:40:04 -   1.9
  +++ MessageTag.java   11 Mar 2003 00:00:28 -  1.10
  @@ -295,7 +295,7 @@
 this.localeKey, key, args);
if (message == null) {
JspException e = new JspException
  - (messages.getMessage("message.message", key));
  + (messages.getMessage("message.message", "\"" + key + "\""));
   RequestUtils.saveException(pageContext, e);
   throw e;
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestBaseTag.jsp TestButtonTag1.jsp TestButtonTag2.jsp TestCancelTag1.jsp TestCancelTag2.jsp TestCheckboxTag1.jsp TestCheckboxTag2.jsp TestCheckboxTag3.jsp TestCheckboxTag4.jsp TestErrorsTag1.jsp TestErrorsTag2.jsp TestFileTag1.jsp TestFileTag2.jsp TestHiddenTag1.jsp TestHiddenTag2.jsp TestHtmlTag.jsp TestImageTag1.jsp TestImageTag2.jsp TestImageTag3.jsp TestImageTag4.jsp

2003-03-10 Thread craigmcc
craigmcc2003/03/10 09:29:53

  Modified:web/test/test/org/apache/struts/taglib/html TestBaseTag.jsp
TestButtonTag1.jsp TestButtonTag2.jsp
TestCancelTag1.jsp TestCancelTag2.jsp
TestCheckboxTag1.jsp TestCheckboxTag2.jsp
TestCheckboxTag3.jsp TestCheckboxTag4.jsp
TestErrorsTag1.jsp TestErrorsTag2.jsp
TestFileTag1.jsp TestFileTag2.jsp
TestHiddenTag1.jsp TestHiddenTag2.jsp
TestHtmlTag.jsp TestImageTag1.jsp TestImageTag2.jsp
TestImageTag3.jsp TestImageTag4.jsp
  Log:
  Make the Cactus tests run successfully under Tomcat 4.0.6, when running the
  "test.tomcat.40" target.
  
  The problem is a bug in Tomcat 4.0.6, where the JSP page compiler incorrectly
  does an implicit "import org.apache.jasper.runtime.*" in the generated code
  for each page.  Unfortunately, that makes the class name "JspException"
  ambiguous.  I corrected this by fully qualifying the exception class we
  really want (javax.servlet.jsp.JspException), which runs on 4.0 and 4.1.
  
  I have't tried these on 3.3 yet -- that will be later.
  
  Revision  ChangesPath
  1.3   +2 -2  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestBaseTag.jsp
  
  Index: TestBaseTag.jsp
  ===
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestBaseTag.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestBaseTag.jsp   7 Mar 2003 05:27:19 -   1.2
  +++ TestBaseTag.jsp   10 Mar 2003 17:29:52 -  1.3
  @@ -52,7 +52,7 @@
   String compareTo = "";
   
   if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
  -throw new JspException("No tests on this page were called.  Please verify that 
you've setup the tests correctly.");
  +throw new javax.servlet.jsp.JspException("No tests on this page were called.  
Please verify that you've setup the tests correctly.");
   }else{
expected=pageContext.getAttribute("TEST_RESULTS").toString();
   }
  @@ -61,4 +61,4 @@
   }
   
   Assert.assertEquals(compareTo, expected);
  -%>
  \ No newline at end of file
  +%>
  
  
  
  1.3   +2 -2  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestButtonTag1.jsp
  
  Index: TestButtonTag1.jsp
  =======
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestButtonTag1.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestButtonTag1.jsp7 Mar 2003 05:27:19 -   1.2
  +++ TestButtonTag1.jsp10 Mar 2003 17:29:52 -  1.3
  @@ -235,7 +235,7 @@
   String compareTo = "";
   
   if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
  -throw new JspException("No tests on this page were called.  Please verify that 
you've setup the tests correctly.");
  +throw new javax.servlet.jsp.JspException("No tests on this page were called.  
Please verify that you've setup the tests correctly.");
   }else{
expected=pageContext.getAttribute("TEST_RESULTS").toString();
   }
  @@ -244,4 +244,4 @@
   }
   
   Assert.assertEquals(compareTo, expected);
  -%>
  \ No newline at end of file
  +%>
  
  
  
  1.4   +2 -2  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestButtonTag2.jsp
  
  Index: TestButtonTag2.jsp
  ===
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestButtonTag2.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestButtonTag2.jsp7 Mar 2003 05:27:19 -   1.3
  +++ TestButtonTag2.jsp10 Mar 2003 17:29:52 -  1.4
  @@ -201,7 +201,7 @@
   String compareTo = "";
   
   if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
  -throw new JspException("No tests on this page were called.  Please verify that 
you've setup the tests correctly.");
  +throw new javax.servlet.jsp.JspException("No tests on this page were called.  
Please verify that you've setup the tests correctly.");
   }else{
expected=pageContext.getAttribute("TEST_RESULTS").toString();
   }
  @@ -210,4 +210,4 @@
   }
   
   Assert.assertEquals(compareTo, expected);
  -%>
  \ No newline at end of file
  +%>
  
  
  
  1.3   +2 -2  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestCancelTag1.jsp
  
  Index: TestCancelTag1.jsp
  ===

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestFormTag1.jsp

2003-03-09 Thread craigmcc
craigmcc2003/03/09 17:57:31

  Modified:src/share/org/apache/struts/taglib/html FormTag.java
JavascriptValidatorTag.java
   web/test/test/org/apache/struts/taglib/html TestFormTag1.jsp
  Log:
  Clean up the JavaScript code generation to not use string concatenation,
  and make the line-end generation platform independent so that Cactus tests
  can pass on Linux.
  
  Revision  ChangesPath
  1.45  +46 -21
jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java
  
  Index: FormTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- FormTag.java  8 Mar 2003 19:23:49 -   1.44
  +++ FormTag.java  10 Mar 2003 01:57:30 -  1.45
  @@ -125,6 +125,11 @@
   protected String focusIndex = null;
   
   /**
  + * The line ending string.
  + */
  +protected static String lineEnd = System.getProperty("line.separator");
  +
  +/**
* The ActionMapping defining where we will be submitting this form
*/
   protected ActionMapping mapping = null;
  @@ -629,35 +634,56 @@
   
   // Render JavaScript to set the input focus if required
   if (this.focus != null) {
  -results.append("\r\n");
  +
  +results.append(lineEnd);
   results.append(this.getJsStartElement());
   
   // xhtml script content shouldn't use the browser hiding trick
   if (!this.isXhtml()) {
  -results.append("  \r\n");
  +results.append("  // -->");
  +results.append(lineEnd);
   }
   
  -results.append("\r\n");
  +results.append("");
  +results.append(lineEnd);
   }
   
   // Print this value to our output writer
  @@ -763,14 +789,13 @@
* Returns the starting javascript element formatted for xhtml if needed.
*/
   private String getJsStartElement() {
  -String start = "");
  +sb.append(lineEnd);
  +return sb.toString();
   }
   
   /**
  
  
  
  1.24  +9 -4  
jakarta-struts/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java
  
  Index: JavascriptValidatorTag.java
  =======
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- JavascriptValidatorTag.java   8 Mar 2003 19:23:49 -   1.23
  +++ JavascriptValidatorTag.java   10 Mar 2003 01:57:31 -  1.24
  @@ -118,6 +118,11 @@
   protected String formName = null;
   
   /**
  + * The line ending string.
  + */
  +protected static String lineEnd = System.getProperty("line.separator");
  +
  +/**
* The current page number of a multi-part form.
* Only valid when the formName attribute is set.
    */
  
  
  
  1.2   +3 -3  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestFormTag1.jsp
  
  Index: TestFormTag1.jsp
  ===========
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestFormTag1.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestFormTag1.jsp  7 Mar 2003 05:38:24 -   1.1
  +++ TestFormTag1.jsp  10 Mar 2003 01:57:31 -  1.2
  @@ -43,7 +43,7 @@
   
 if (focusControl.type != "hidden") {
focusControl.focus();
  -  } 
  +  }
 // -->
   

  @@ -64,7 +64,7 @@
   
 if (focusControl.type != "hidden") {
focusControl[2].focus();
  -  } 
  +  }
 // -->
   

  @@ -215,4 +215,4 @@
   }

   Assert.assertEquals(compareTo, expected);
  -%>
  \ No newline at end of file
  +%>
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html ErrorsTag.java

2003-03-09 Thread craigmcc
craigmcc2003/03/09 17:03:02

  Modified:src/share/org/apache/struts/taglib/html ErrorsTag.java
  Log:
  Render a platform-independent line ending instead of hard coded "\r\n".
  This should have no visual effect, but it allows the "TestErrorsTag1" test
  suite to pass on a Linux server.  Feel free to revert if this causes problems
  with the test under Windows.
  
  Revision  ChangesPath
  1.20  +13 -7 
jakarta-struts/src/share/org/apache/struts/taglib/html/ErrorsTag.java
  
  Index: ErrorsTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ErrorsTag.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ErrorsTag.java8 Dec 2002 06:54:51 -   1.19
  +++ ErrorsTag.java10 Mar 2003 01:03:02 -  1.20
  @@ -128,6 +128,12 @@
   
   
   /**
  + * The line ending string.
  + */
  +protected static String lineEnd = System.getProperty("line.separator");
  +
  +
  +/**
* The session attribute key for our locale.
*/
   protected String locale = Globals.LOCALE_KEY;
  @@ -227,7 +233,7 @@
   message = RequestUtils.message(pageContext, bundle,
  locale, "errors.header");
   results.append(message);
  -results.append("\r\n");
  +results.append(lineEnd);
   }
   headerDone = true;
   }
  @@ -241,7 +247,7 @@
  report.getValues());
   if (message != null) {
   results.append(message);
  -results.append("\r\n");
  +results.append(lineEnd);
   }
   if (suffixPresent) {
   message = RequestUtils.message(pageContext, bundle,
  @@ -253,7 +259,7 @@
   message = RequestUtils.message(pageContext, bundle,
  locale, "errors.footer");
   results.append(message);
  -results.append("\r\n");
  +results.append(lineEnd);
   }
   
   // Print the results to our output writer
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/bean TestIncludeTag.jsp

2003-03-09 Thread James Mitchell
>   Fix Include to to assume the context is '/test'

Should have been...

>   Fix Include to not assume the context is '/test'
   ^^^


--
James Mitchell
Software Developer/Struts Evangelist
http://jakarta.apache.org/struts

"People demand freedom of speech to make up for the freedom of thought
which they avoid."
- Soren Aabye Kierkegaard (1813-1855)




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, March 09, 2003 11:05 AM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: 
> jakarta-struts/web/test/test/org/apache/struts/taglib/bean 
> TestIncludeTag.jsp
> 
> 
> jmitchell    2003/03/09 08:04:53
> 
>   Modified:web/test/test/org/apache/struts/taglib/bean
> TestIncludeTag.jsp
>   Log:
>   Fix Include to to assume the context is '/test'
>   
>   Revision  ChangesPath
>   1.2   +2 -1  
> jakarta-struts/web/test/test/org/apache/struts/taglib/bean/Tes
> tIncludeTag.jsp
>   
>   Index: TestIncludeTag.jsp
>   ===
>   RCS file: 
> /home/cvs/jakarta-struts/web/test/test/org/apache/struts/tagli
> b/bean/TestIncludeTag.jsp,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- TestIncludeTag.jsp  22 Feb 2003 02:57:36 -  1.1
>   +++ TestIncludeTag.jsp  9 Mar 2003 16:04:52 -   1.2
>   @@ -1,6 +1,7 @@
><%@ page contentType="text/html;charset=UTF-8" language="java" %>
><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
>   +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>
>
>forward="testIncludeTagForward"/>
>   @@ -9,7 +10,7 @@
>
>
>   
>   -   
> http://<%=request.getServerName()%>:<%=request.getServerPort()
%>/test/test/org/apache/struts/taglib/bean/resources/IncludeTagTest.jsp
  +
http://<%=request.getServerName()%>:<%=request.getServerPort()%>


   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/bean TestIncludeTag.jsp

2003-03-09 Thread jmitchell
jmitchell2003/03/09 08:04:53

  Modified:web/test/test/org/apache/struts/taglib/bean
TestIncludeTag.jsp
  Log:
  Fix Include to to assume the context is '/test'
  
  Revision  ChangesPath
  1.2   +2 -1  
jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestIncludeTag.jsp
  
  Index: TestIncludeTag.jsp
  ===
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestIncludeTag.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestIncludeTag.jsp22 Feb 2003 02:57:36 -  1.1
  +++ TestIncludeTag.jsp9 Mar 2003 16:04:52 -   1.2
  @@ -1,6 +1,7 @@
   <%@ page contentType="text/html;charset=UTF-8" language="java" %>
   <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
   <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  +<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
   
   

  @@ -9,7 +10,7 @@
   
   
    
  - 
http://<%=request.getServerName()%>:<%=request.getServerPort()%>/test/test/org/apache/struts/taglib/bean/resources/IncludeTagTest.jsp
  + http://<%=request.getServerName()%>:<%=request.getServerPort()%>


   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestEmptyTag.java TestEqualTag.java TestGreaterEqualTag.java TestGreaterThanTag.java TestIterateTag.java TestLessEqualTag.java TestLessThanTag.java TestNotEqualTag.java TestNotPresentTag.java TestPresentTag.java

2003-03-08 Thread jmitchell
jmitchell2003/03/08 11:45:05

  Modified:src/test/org/apache/struts/taglib/logic TestEmptyTag.java
TestEqualTag.java TestGreaterEqualTag.java
TestGreaterThanTag.java TestIterateTag.java
TestLessEqualTag.java TestLessThanTag.java
TestNotEqualTag.java TestNotPresentTag.java
TestPresentTag.java
  Log:
  Add cvs tags to top of files.
  
  Revision  ChangesPath
  1.5   +5 -0  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestEmptyTag.java
  
  Index: TestEmptyTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestEmptyTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestEmptyTag.java 28 Feb 2003 02:42:11 -  1.4
  +++ TestEmptyTag.java 8 Mar 2003 19:45:04 -   1.5
  @@ -1,4 +1,9 @@
   /*
  + * $Header$
  + * $Revision$
  + * $Date$
  + * 
  + * 
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
  
  
  
  1.5   +5 -0  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestEqualTag.java
  
  Index: TestEqualTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestEqualTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestEqualTag.java 16 Nov 2002 04:58:47 -  1.4
  +++ TestEqualTag.java 8 Mar 2003 19:45:04 -   1.5
  @@ -1,4 +1,9 @@
   /*
  + * $Header$
  + * $Revision$
  + * $Date$
  + * 
  + * 
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  
  
  
  1.3   +5 -0  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestGreaterEqualTag.java
  
  Index: TestGreaterEqualTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestGreaterEqualTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestGreaterEqualTag.java  7 Mar 2003 05:31:30 -   1.2
  +++ TestGreaterEqualTag.java  8 Mar 2003 19:45:04 -   1.3
  @@ -1,4 +1,9 @@
   /*
  + * $Header$
  + * $Revision$
  + * $Date$
  + * 
  + * 
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
  
  
  
  1.5   +5 -0  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestGreaterThanTag.java
  
  Index: TestGreaterThanTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestGreaterThanTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestGreaterThanTag.java   7 Mar 2003 05:31:30 -   1.4
  +++ TestGreaterThanTag.java   8 Mar 2003 19:45:04 -   1.5
  @@ -1,4 +1,9 @@
   /*
  + * $Header$
  + * $Revision$
  + * $Date$
  + * 
  + * 
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
  
  
  
  1.4   +5 -0  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestIterateTag.java
  
  Index: TestIterateTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestIterateTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestIterateTag.java   6 Mar 2003 16:07:13 -   1.3
  +++ TestIterateTag.java   8 Mar 2003 19:45:04 -   1.4
  @@ -1,4 +1,9 @@
   /*
  + * $Header$
  + * $Revision$
  + * $Date$
  + * 
  + * 
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
  
  
  
  1.3   +5 -0  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestLessEqualTag.java
  
  Index: TestLessEqualTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestLessEqualTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestLessEqualTag.java 7 Mar 2003 05:31:30 -   1.2
  +++ TestLessEqualTag.java 8 Mar 2003 19:45:04 -   1.3
  @@ -1,4 +1,9

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/bean TestCookieTag.java TestDefineTag.java TestHeaderTag.java TestIncludeTag.java TestMessageTag.java TestMessageTag1.java TestMessageTag1_fr.java TestMessageTag2.java TestMessageTag2_fr.java TestMessageTag3.java TestMessageTag3_fr.java TestMessageTag4.java TestMessageTag4_fr.java TestMessageTag_fr.java TestPageTag.java TestParameterTag.java TestResourceTag.java TestSizeTag.java TestStrutsTag.java TestWriteTag.java

2003-03-08 Thread jmitchell
jmitchell2003/03/08 11:31:57

  Modified:src/test/org/apache/struts/taglib/html TestBaseTag.java
TestButtonTag1.java TestButtonTag2.java
TestCancelTag1.java TestCancelTag2.java
TestCheckboxTag1.java TestCheckboxTag2.java
TestCheckboxTag3.java TestCheckboxTag4.java
TestErrorsTag1.java TestErrorsTag2.java
TestFileTag1.java TestFileTag2.java
TestFormTag1.java TestFrameTag1.java
TestFrameTag2.java TestFrameTag3.java
TestFrameTag4.java TestFrameTag5.java
TestFrameTag6.java TestFrameTag7.java
TestFrameTag8.java TestHiddenTag1.java
TestHiddenTag2.java TestHtmlTag.java
TestImageTag1.java TestImageTag2.java
TestImageTag3.java TestImageTag4.java
   src/test/org/apache/struts/taglib/bean TestCookieTag.java
TestDefineTag.java TestHeaderTag.java
TestIncludeTag.java TestMessageTag.java
TestMessageTag1.java TestMessageTag1_fr.java
TestMessageTag2.java TestMessageTag2_fr.java
TestMessageTag3.java TestMessageTag3_fr.java
TestMessageTag4.java TestMessageTag4_fr.java
TestMessageTag_fr.java TestPageTag.java
TestParameterTag.java TestResourceTag.java
TestSizeTag.java TestStrutsTag.java
TestWriteTag.java
  Log:
  Add cvs tags to top of files.
  
  Revision  ChangesPath
  1.4   +5 -0  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestBaseTag.java
  
  Index: TestBaseTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestBaseTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestBaseTag.java  6 Mar 2003 02:41:11 -   1.3
  +++ TestBaseTag.java  8 Mar 2003 19:31:55 -   1.4
  @@ -1,4 +1,9 @@
   /*
  + * $Header$
  + * $Revision$
  + * $Date$
  + * 
  + * 
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
  
  
  
  1.3   +5 -0  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag1.java
  
  Index: TestButtonTag1.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag1.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestButtonTag1.java   6 Mar 2003 02:41:11 -   1.2
  +++ TestButtonTag1.java   8 Mar 2003 19:31:55 -   1.3
  @@ -1,4 +1,9 @@
   /*
  + * $Header$
  + * $Revision$
  + * $Date$
  + * 
  + * 
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
  
  
  
  1.5   +5 -0  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag2.java
  
  Index: TestButtonTag2.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag2.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestButtonTag2.java   28 Feb 2003 02:44:13 -  1.4
  +++ TestButtonTag2.java   8 Mar 2003 19:31:55 -   1.5
  @@ -1,4 +1,9 @@
   /*
  + * $Header$
  + * $Revision$
  + * $Date$
  + * 
  + * 
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
  
  
  
  1.3   +5 -0  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestCancelTag1.java
  
  Index: TestCancelTag1.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestCancelTag1.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestCancelTag1.java   6 Mar 2003 02:41:11 -   1.2
  +++ TestCancelTag1.java   8 Mar 2003 19:31:55 -   1.3
  @@ -1,4 +1,9 @@
   /*
  + * $Header$
  + * $Revision$
  + * $Date$
  + * 
  + * 
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
  
  
  
  1.3   +5 -0  
jakarta-struts/src/test/org/apache/struts/taglib

RE: cvs commit: jakarta-struts/src/test/org/apache/struts/taglib SimpleBeanForTesting.java

2003-03-08 Thread James Mitchell
Do you want me to take care of adding cvs tags to all the tests I've
added?


--
James Mitchell
Software Developer/Struts Evangelist
http://jakarta.apache.org/struts

"People demand freedom of speech to make up for the freedom of thought
which they avoid."
- Soren Aabye Kierkegaard (1813-1855)




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, March 08, 2003 2:04 PM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: 
> jakarta-struts/src/test/org/apache/struts/taglib 
> SimpleBeanForTesting.java
> 
> 
> dgraham 2003/03/08 11:03:56
> 
>   Modified:src/test/org/apache/struts/taglib 
> SimpleBeanForTesting.java
>   Log:
>   Fixed variable name in constructor.
>   
>   Revision  ChangesPath
>   1.5   +8 -2  
> jakarta-struts/src/test/org/apache/struts/taglib/SimpleBeanFor
> Testing.java
>   
>   Index: SimpleBeanForTesting.java
>   =======
>   RCS file: 
> /home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/Sim
> pleBeanForTesting.java,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- SimpleBeanForTesting.java   7 Mar 2003 05:31:30 
> - 1.4
>   +++ SimpleBeanForTesting.java   8 Mar 2003 19:03:56 
> - 1.5
>   @@ -1,7 +1,13 @@
>/*
>   + * $Header$
>   + * $Revision$
>   + * $Date$
>   + *
>   + * 
> 
>   + *
> * The Apache Software License, Version 1.1
> *
>   - * Copyright (c) 1999-2001 The Apache Software Foundation. 
>  All rights
>   + * Copyright (c) 1999-2003 The Apache Software Foundation. 
>  All rights
> * reserved.
> *
> * Redistribution and use in source and binary forms, with 
> or without
>   @@ -77,7 +83,7 @@
>   public SimpleBeanForTesting(boolean checked) {
>   this.checked = checked;
>   }
>   -   public SimpleBeanForTesting(Boolean checked) {
>   +   public SimpleBeanForTesting(Boolean checkedWrapper) {
>   this.checkedWrapper = checkedWrapper;
>   }
>   public SimpleBeanForTesting(Map map) {
>   
>   
>   
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/test/org/apache/struts/taglib SimpleBeanForTesting.java

2003-03-08 Thread dgraham
dgraham 2003/03/08 11:03:56

  Modified:src/test/org/apache/struts/taglib SimpleBeanForTesting.java
  Log:
  Fixed variable name in constructor.
  
  Revision  ChangesPath
  1.5   +8 -2  
jakarta-struts/src/test/org/apache/struts/taglib/SimpleBeanForTesting.java
  
  Index: SimpleBeanForTesting.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/SimpleBeanForTesting.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SimpleBeanForTesting.java 7 Mar 2003 05:31:30 -   1.4
  +++ SimpleBeanForTesting.java 8 Mar 2003 19:03:56 -   1.5
  @@ -1,7 +1,13 @@
   /*
  + * $Header$
  + * $Revision$
  + * $Date$
  + *
  + * 
  + *
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -77,7 +83,7 @@
public SimpleBeanForTesting(boolean checked) {
this.checked = checked;
}
  - public SimpleBeanForTesting(Boolean checked) {
  + public SimpleBeanForTesting(Boolean checkedWrapper) {
this.checkedWrapper = checkedWrapper;
}
public SimpleBeanForTesting(Map map) {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestImageTag1.jsp TestImageTag2.jsp TestImageTag3.jsp TestImageTag4.jsp

2003-03-06 Thread jmitchell
jmitchell2003/03/06 21:41:28

  Added:   src/test/org/apache/struts/taglib/html TestImageTag1.java
TestImageTag2.java TestImageTag3.java
TestImageTag4.java
   web/test/test/org/apache/struts/taglib/html
TestImageTag1.jsp TestImageTag2.jsp
TestImageTag3.jsp TestImageTag4.jsp
  Log:
  Adding more tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestImageTag1.java
  
  Index: TestImageTag1.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.html;
  
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.Locale;
  import java.util.StringTokenizer;
  
  import javax.servlet.jsp.PageContext;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.cactus.JspTestCase;
  import org.apache.struts.Globals;
  import org.apache.struts.taglib.SimpleBeanForTesting;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.bean.ImageTag class.
   *
   * @author James Mitchell
   */
  public class TestImageTag1 extends JspTestCase {
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestImageTag1(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestImageTag1.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestImageTag1.class);
  }
  
  private void runMyTest(String whichTest, String locale){
pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), 
PageContext.SESSION_SCOPE);
pageContex

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestHtmlTag.jsp

2003-03-06 Thread jmitchell
jmitchell2003/03/06 21:40:59

  Added:   src/test/org/apache/struts/taglib/html TestHtmlTag.java
   web/test/test/org/apache/struts/taglib/html TestHtmlTag.jsp
  Log:
  Adding more tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestHtmlTag.java
  
  Index: TestHtmlTag.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.html;
  
  import java.util.Locale;
  
  import javax.servlet.jsp.PageContext;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.cactus.JspTestCase;
  import org.apache.struts.Globals;
  import org.apache.struts.taglib.SimpleBeanForTesting;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.bean.HtmlTag class.
   *
   * @author James Mitchell
   */
  public class TestHtmlTag extends JspTestCase {
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestHtmlTag(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestHtmlTag.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestHtmlTag.class);
  }
  
  private void runMyTest(String whichTest, String locale){
pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), 
PageContext.SESSION_SCOPE);
pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test 
Value"), PageContext.REQUEST_SCOPE);
request.setAttribute("runTest", whichTest);
  try {

pageContext.forward("/test/org/apache/struts/taglib/html/TestHtmlTag.jsp");
}
 

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestHiddenTag1.jsp TestHiddenTag2.jsp

2003-03-06 Thread jmitchell
jmitchell2003/03/06 21:40:38

  Added:   src/test/org/apache/struts/taglib/html TestHiddenTag1.java
TestHiddenTag2.java
   web/test/test/org/apache/struts/taglib/html
TestHiddenTag1.jsp TestHiddenTag2.jsp
  Log:
  Adding more tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestHiddenTag1.java
  
  Index: TestHiddenTag1.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.html;
  
  import java.util.Locale;
  
  import javax.servlet.jsp.PageContext;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.cactus.JspTestCase;
  import org.apache.struts.Globals;
  import org.apache.struts.taglib.SimpleBeanForTesting;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.bean.HiddenTag class.
   *
   * @author James Mitchell
   */
  public class TestHiddenTag1 extends JspTestCase {
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestHiddenTag1(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestHiddenTag1.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestHiddenTag1.class);
  }
  
  private void runMyTest(String whichTest, String locale){
pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), 
PageContext.SESSION_SCOPE);
pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test 
Value"), PageContext.REQUEST_SCOPE);
request.setAttribute("runTest", whichTest);
  try {
  

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestFormTag1.jsp

2003-03-06 Thread jmitchell
jmitchell2003/03/06 21:38:24

  Added:   src/test/org/apache/struts/taglib/html TestFormTag1.java
   web/test/test/org/apache/struts/taglib/html TestFormTag1.jsp
  Log:
  Adding more tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestFormTag1.java
  
  Index: TestFormTag1.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.html;
  
  import java.util.Locale;
  
  import javax.servlet.jsp.JspException;
  import javax.servlet.jsp.PageContext;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.cactus.JspTestCase;
  import org.apache.struts.Globals;
  import org.apache.struts.taglib.SimpleBeanForTesting;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.bean.FormTag class.
   *
   * @author James Mitchell
   */
  public class TestFormTag1 extends JspTestCase {
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestFormTag1(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestFormTag1.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestFormTag1.class);
  }
  
  private void runMyTest(String whichTest, String locale){
pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), 
PageContext.SESSION_SCOPE);
pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test 
Value"), PageContext.REQUEST_SCOPE);
request.setAttribute("runTest", whichTest);
  try {

pageContext.forward("/test/org/apache/struts/tag

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/bean TestParameterTag.jsp

2003-03-06 Thread jmitchell
jmitchell2003/03/06 21:31:30

  Modified:src/test/org/apache/struts/taglib SimpleBeanForTesting.java
   src/test/org/apache/struts/taglib/bean TestParameterTag.java
   src/test/org/apache/struts/taglib/html TestErrorsTag1.java
TestErrorsTag2.java
   src/test/org/apache/struts/taglib/logic
TestGreaterEqualTag.java TestGreaterThanTag.java
TestLessEqualTag.java TestLessThanTag.java
TestPresentTag.java
   web/test/test/org/apache/struts/taglib/bean
TestParameterTag.jsp
  Log:
  copyright and other needed additions for tests
  
  Revision  ChangesPath
  1.4   +52 -16
jakarta-struts/src/test/org/apache/struts/taglib/SimpleBeanForTesting.java
  
  Index: SimpleBeanForTesting.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/SimpleBeanForTesting.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SimpleBeanForTesting.java 28 Feb 2003 01:11:32 -  1.3
  +++ SimpleBeanForTesting.java 7 Mar 2003 05:31:30 -   1.4
  @@ -60,39 +60,43 @@
   import java.util.List;
   import java.util.Map;
   
  +import org.apache.struts.action.ActionForm;
  +
   /**
* Simple bean for unit tests. 
*
* @author James Mitchell
*/
  -public class SimpleBeanForTesting {
  - public SimpleBeanForTesting(){
  +public class SimpleBeanForTesting extends ActionForm {
  + public SimpleBeanForTesting() {
super();
}
  - public SimpleBeanForTesting(List lst){
  + public SimpleBeanForTesting(List lst) {
this.lst = lst;
}
  - public SimpleBeanForTesting(boolean checked){
  + public SimpleBeanForTesting(boolean checked) {
this.checked = checked;
}
  - public SimpleBeanForTesting(Boolean checked){
  + public SimpleBeanForTesting(Boolean checked) {
this.checkedWrapper = checkedWrapper;
}
  - public SimpleBeanForTesting(Map map){
  + public SimpleBeanForTesting(Map map) {
this.map = map;
}
  - public SimpleBeanForTesting(String string){
  + public SimpleBeanForTesting(String string) {
this.string = string;
}
  - public SimpleBeanForTesting(Integer integerValue){
  + public SimpleBeanForTesting(Integer integerValue) {
this.integerValue = integerValue;
}
   
  - private String string;  
  + private String string;
private Integer integerValue;
private Double doubleValue;
private List lst;
private Map map;
  + private String x;
  + private String y;
private Object nestedObject;
private Object[] array;
private Enumeration enumeration;
  @@ -102,14 +106,14 @@
   
//Copied right from the FAQ
private String strAry[] =
  - { "String 0", "String 1", "String 2", "String 3", "String 4" };
  + { "String 0", "String 1", "String 2", "String 3", "String 4" };
   
  -public String getStringIndexed(int index) { 
  - return (strAry[index]); 
  -}
  -public void setStringIndexed(int index, String value){ 
  - strAry[index] = value; 
  -}
  + public String getStringIndexed(int index) {
  + return (strAry[index]);
  + }
  + public void setStringIndexed(int index, String value) {
  + strAry[index] = value;
  + }
   
/**
 * Returns the lst.
  @@ -301,6 +305,38 @@
 */
public void setCheckedWrapper(Boolean checkedWrapper) {
this.checkedWrapper = checkedWrapper;
  + }
  +
  + /**
  +  * Returns the x.
  +  * @return String
  +  */
  + public String getX() {
  + return x;
  + }
  +
  + /**
  +  * Returns the y.
  +  * @return String
  +  */
  + public String getY() {
  + return y;
  + }
  +
  + /**
  +  * Sets the x.
  +  * @param x The x to set
  +  */
  + public void setX(String x) {
  + this.x = x;
  + }
  +
  + /**
  +  * Sets the y.
  +  * @param y The y to set
  +  */
  + public void setY(String y) {
  + this.y = y;
}
   
   }
  
  
  
  1.4   +5 -1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/TestParameterTag.java
  
  Index: TestParameterTag.java
  =======
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/bean/TestParameterTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestParameterTag.java 6 Mar 2003 02:

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestFileTag1.jsp TestFileTag2.jsp

2003-03-06 Thread jmitchell
jmitchell2003/03/06 21:28:51

  Modified:web/test/test/org/apache/struts/taglib/html TestFileTag1.jsp
TestFileTag2.jsp
  Log:
  fix to help better determine what errors are when tests fail...but
  we all know that's not going to happen ;D
  
  Revision  ChangesPath
  1.2   +13 -8 
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestFileTag1.jsp
  
  Index: TestFileTag1.jsp
  ===
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestFileTag1.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestFileTag1.jsp  1 Mar 2003 06:00:13 -   1.1
  +++ TestFileTag1.jsp  7 Mar 2003 05:28:51 -   1.2
  @@ -13,9 +13,6 @@

   

  - enctype="multipart/form-data" 
  - accept="image/jpeg, image/gif"
  - 
   


  @@ -242,10 +239,18 @@
   
   
   
  -
   <% 
  -Assert.assertEquals(
  - pageContext.getAttribute("TEST_RESULTS").toString(), 
  - pageContext.getAttribute("EXPECTED_RESULTS").toString()
  - );
  +String expected = "";
  +String compareTo = "";
  +
  +if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
  +throw new JspException("No tests on this page were called.  Please verify that 
you've setup the tests correctly.");
  +}else{
  + expected=pageContext.getAttribute("TEST_RESULTS").toString();
  +}
  +if (pageContext.getAttribute("TEST_RESULTS") != null){
  + compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  +}
  +
  +Assert.assertEquals(compareTo, expected);
   %>
  
  
  
  1.2   +12 -5 
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestFileTag2.jsp
  
  Index: TestFileTag2.jsp
  =======
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestFileTag2.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestFileTag2.jsp  1 Mar 2003 06:00:13 -   1.1
  +++ TestFileTag2.jsp  7 Mar 2003 05:28:51 -   1.2
  @@ -195,11 +195,18 @@
   
   
   
  +<% 
  +String expected = "";
  +String compareTo = "";
   
  +if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
  +throw new JspException("No tests on this page were called.  Please verify that 
you've setup the tests correctly.");
  +}else{
  + expected=pageContext.getAttribute("TEST_RESULTS").toString();
  +}
  +if (pageContext.getAttribute("TEST_RESULTS") != null){
  + compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  +}
   
  -<% 
  -Assert.assertEquals(
  - pageContext.getAttribute("TEST_RESULTS").toString(), 
  - pageContext.getAttribute("EXPECTED_RESULTS").toString()
  - );
  +Assert.assertEquals(compareTo, expected);
   %>
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestBaseTag.jsp TestButtonTag1.jsp TestButtonTag2.jsp TestCancelTag1.jsp TestCancelTag2.jsp TestCheckboxTag1.jsp TestCheckboxTag2.jsp TestCheckboxTag3.jsp TestCheckboxTag4.jsp TestErrorsTag1.jsp TestErrorsTag2.jsp

2003-03-06 Thread jmitchell
jmitchell2003/03/06 21:27:20

  Modified:web/test/test/org/apache/struts/taglib/html TestBaseTag.jsp
TestButtonTag1.jsp TestButtonTag2.jsp
TestCancelTag1.jsp TestCancelTag2.jsp
TestCheckboxTag1.jsp TestCheckboxTag2.jsp
TestCheckboxTag3.jsp TestCheckboxTag4.jsp
TestErrorsTag1.jsp TestErrorsTag2.jsp
  Log:
  fix to help better determine what errors are when tests fail...but
  we all know that's not going to happen ;D
  
  Revision  ChangesPath
  1.2   +13 -4 
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestBaseTag.jsp
  
  Index: TestBaseTag.jsp
  ===
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestBaseTag.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestBaseTag.jsp   27 Feb 2003 02:18:44 -  1.1
  +++ TestBaseTag.jsp   7 Mar 2003 05:27:19 -   1.2
  @@ -48,8 +48,17 @@
   
   
   <% 
  -Assert.assertEquals(
  - pageContext.getAttribute("TEST_RESULTS").toString(), 
  - pageContext.getAttribute("EXPECTED_RESULTS").toString()
  - );
  +String expected = "";
  +String compareTo = "";
  +
  +if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
  +throw new JspException("No tests on this page were called.  Please verify that 
you've setup the tests correctly.");
  +}else{
  + expected=pageContext.getAttribute("TEST_RESULTS").toString();
  +}
  +if (pageContext.getAttribute("TEST_RESULTS") != null){
  + compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  +}
  +
  +Assert.assertEquals(compareTo, expected);
   %>
  
  
  
  1.2   +13 -5 
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestButtonTag1.jsp
  
  Index: TestButtonTag1.jsp
  =======
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestButtonTag1.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestButtonTag1.jsp28 Feb 2003 01:11:38 -  1.1
  +++ TestButtonTag1.jsp7 Mar 2003 05:27:19 -   1.2
  @@ -230,10 +230,18 @@
   
   
   
  -
   <% 
  -Assert.assertEquals(
  - pageContext.getAttribute("TEST_RESULTS").toString(), 
  - pageContext.getAttribute("EXPECTED_RESULTS").toString()
  - );
  +String expected = "";
  +String compareTo = "";
  +
  +if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
  +throw new JspException("No tests on this page were called.  Please verify that 
you've setup the tests correctly.");
  +}else{
  + expected=pageContext.getAttribute("TEST_RESULTS").toString();
  +}
  +if (pageContext.getAttribute("TEST_RESULTS") != null){
  + compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  +}
  +
  +Assert.assertEquals(compareTo, expected);
   %>
  
  
  
  1.3   +13 -5 
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestButtonTag2.jsp
  
  Index: TestButtonTag2.jsp
  ===
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestButtonTag2.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestButtonTag2.jsp27 Feb 2003 04:39:43 -  1.2
  +++ TestButtonTag2.jsp7 Mar 2003 05:27:19 -   1.3
  @@ -196,10 +196,18 @@
   
   
   
  -
   <% 
  -Assert.assertEquals(
  - pageContext.getAttribute("TEST_RESULTS").toString(), 
  - pageContext.getAttribute("EXPECTED_RESULTS").toString()
  - );
  +String expected = "";
  +String compareTo = "";
  +
  +if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
  +throw new JspException("No tests on this page were called.  Please verify that 
you've setup the tests correctly.");
  +}else{
  + expected=pageContext.getAttribute("TEST_RESULTS").toString();
  +}
  +if (pageContext.getAttribute("TEST_RESULTS") != null){
  + compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
  +}
  +
  +Assert.assertEquals(compareTo, expected);
   %>
  
  
  
  1.2   +13 -5 
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestCancelTag1.jsp
  
  Index: TestCancelTag1.jsp
  ===
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestCancelTag1.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/bean/resources AlternateApplicationResources.properties AlternateApplicationResources_fr.properties ApplicationResources.properties ApplicationResources_fr.properties

2003-03-06 Thread jmitchell
jmitchell2003/03/06 21:14:34

  Modified:src/test/org/apache/struts/taglib/bean/resources
AlternateApplicationResources.properties
AlternateApplicationResources_fr.properties
ApplicationResources.properties
ApplicationResources_fr.properties
  Log:
  adding new values for new tests
  
  Revision  ChangesPath
  1.3   +3 -1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/resources/AlternateApplicationResources.properties
  
  Index: AlternateApplicationResources.properties
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/bean/resources/AlternateApplicationResources.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AlternateApplicationResources.properties  28 Feb 2003 01:11:33 -  1.2
  +++ AlternateApplicationResources.properties  7 Mar 2003 05:14:33 -   1.3
  @@ -12,4 +12,6 @@
   errors.prefix=
   errors.suffix=
   alternate.testing.errors.tag=My Alternate Errors Text
  -alternate.testing.errors.tag2=My Alternate Errors Text 2
  \ No newline at end of file
  +alternate.testing.errors.tag2=My Alternate Errors Text 2
  +
  +alternate.testing.image=/images/default/alternate/myimage.gif
  
  
  
  1.3   +3 -1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/resources/AlternateApplicationResources_fr.properties
  
  Index: AlternateApplicationResources_fr.properties
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/bean/resources/AlternateApplicationResources_fr.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AlternateApplicationResources_fr.properties   28 Feb 2003 01:11:33 - 
 1.2
  +++ AlternateApplicationResources_fr.properties   7 Mar 2003 05:14:34 -  
 1.3
  @@ -12,4 +12,6 @@
   errors.prefix=
   errors.suffix=
   alternate.testing.errors.tag=My Alternate Errors Text (fr)
  -alternate.testing.errors.tag2=My Alternate Errors Text 2 (fr)
  \ No newline at end of file
  +alternate.testing.errors.tag2=My Alternate Errors Text 2 (fr)
  +
  +alternate.testing.image=/images/fr/alternate/myimage.gif
  
  
  
  1.3   +3 -1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/resources/ApplicationResources.properties
  
  Index: ApplicationResources.properties
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/bean/resources/ApplicationResources.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ApplicationResources.properties   28 Feb 2003 01:11:33 -  1.2
  +++ ApplicationResources.properties   7 Mar 2003 05:14:34 -   1.3
  @@ -12,4 +12,6 @@
   errors.prefix=
   errors.suffix=
   default.testing.errors.tag=My Errors Text
  -default.testing.errors.tag2=My Errors Text 2
  \ No newline at end of file
  +default.testing.errors.tag2=My Errors Text 2
  +
  +default.testing.image=/images/default/default/myimage.gif
  
  
  
  1.3   +3 -1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/resources/ApplicationResources_fr.properties
  
  Index: ApplicationResources_fr.properties
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/bean/resources/ApplicationResources_fr.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ApplicationResources_fr.properties28 Feb 2003 01:11:33 -  1.2
  +++ ApplicationResources_fr.properties7 Mar 2003 05:14:34 -   1.3
  @@ -12,4 +12,6 @@
   errors.prefix=
   errors.suffix=
   default.testing.errors.tag=My Errors Text (fr)
  -default.testing.errors.tag2=My Errors Text 2 (fr)
  \ No newline at end of file
  +default.testing.errors.tag2=My Errors Text 2 (fr)
  +
  +default.testing.image=/images/fr/default/myimage.gif
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logicTestIterateTag.java

2003-03-06 Thread Craig R. McClanahan


On Thu, 6 Mar 2003, David Graham wrote:

> Date: Thu, 06 Mar 2003 09:10:45 -0700
> From: David Graham <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: cvs commit:
> jakarta-struts/src/test/org/apache/struts/taglib/logic TestIterateTag.java
>
> Thanks for fixing this Martin.  It concerns me that the nightly builds were
> unaffected by this, indicating that they're built against the servlet 2.3
> jar.  Craig, is that the case?  Can we change it to build against 2.2 since
> that's our baseline?
>

The nightly builds are indeed built against Servlet 2.3 / JSP 1.2.

I can modify this over the weekend (on a business trip now, and don't have
good remote access to my home network that is running the builds).

> David

Craig


>
>
>
> >From: [EMAIL PROTECTED]
> >Reply-To: "Struts Developers List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic
> >TestIterateTag.java
> >Date: 6 Mar 2003 16:07:13 -
> >
> >martinc 2003/03/06 08:07:13
> >
> >   Modified:src/share/org/apache/struts/taglib/nested
> > NestedPropertyTag.java NestedRootTag.java
> >src/test/org/apache/struts/taglib/logic TestIterateTag.java
> >   Log:
> >   Replace EVAL_BODY_AGAIN with EVAL_BODY_TAG so that the code compiles
> >   against the JSP 1.1 API.
> >
> >   Revision  ChangesPath
> >   1.8   +5 -5
> >jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedPropertyTag.java
> >
> >   Index: NestedPropertyTag.java
> >   ===
> >   RCS file:
> >/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedPropertyTag.java,v
> >   retrieving revision 1.7
> >   retrieving revision 1.8
> >   diff -u -r1.7 -r1.8
> >   --- NestedPropertyTag.java28 Feb 2003 05:14:01 -  1.7
> >   +++ NestedPropertyTag.java6 Mar 2003 16:07:13 -   1.8
> >   @@ -118,7 +118,7 @@
> >NestedPropertyHelper.setName(request, originalName);
> >
> >// run the body part
> >   -return (EVAL_BODY_AGAIN);
> >   +return (EVAL_BODY_TAG);
> >      }
> >
> >
> >
> >
> >
> >   1.8   +5 -5
> >jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedRootTag.java
> >
> >   Index: NestedRootTag.java
> >   ===
> >   RCS file:
> >/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedRootTag.java,v
> >   retrieving revision 1.7
> >   retrieving revision 1.8
> >   diff -u -r1.7 -r1.8
> >   --- NestedRootTag.java28 Feb 2003 05:14:01 -  1.7
> >   +++ NestedRootTag.java6 Mar 2003 16:07:13 -   1.8
> >   @@ -132,7 +132,7 @@
> >}
> >
> >// do the JSP thing
> >   -return (EVAL_BODY_AGAIN);
> >   +return (EVAL_BODY_TAG);
> >  }
> >
> >  /**
> >
> >
> >
> >   1.3   +24 -24
> >jakarta-struts/src/test/org/apache/struts/taglib/logic/TestIterateTag.java
> >
> >   Index: TestIterateTag.java
> >   ===
> >   RCS file:
> >/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestIterateTag.java,v
> >   retrieving revision 1.2
> >   retrieving revision 1.3
> >   diff -u -r1.2 -r1.3
> >   --- TestIterateTag.java   28 Feb 2003 02:42:11 -  1.2
> >   +++ TestIterateTag.java   6 Mar 2003 16:07:13 -   1.3
> >   @@ -146,7 +146,7 @@
> > out.print((String)pageContext.getAttribute("theId"));
> > iteration++;
> >
> >   - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
> >   + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
> > tag.doEndTag();
> > assertEquals(iterations, iteration);
> > }
> >   @@ -193,7 +193,7 @@
> > out.print((String)pageContext.getAttribute("theId"));
> > iteration++;
> >
> >   - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
> >   + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
> > tag.doEndTag();
> > assertEquals(iterations, iteration);
> > }
> >   @@ -240,7 +240,7 @@
> > 

Re: cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logicTestIterateTag.java

2003-03-06 Thread David Graham
Thanks for fixing this Martin.  It concerns me that the nightly builds were 
unaffected by this, indicating that they're built against the servlet 2.3 
jar.  Craig, is that the case?  Can we change it to build against 2.2 since 
that's our baseline?

David



From: [EMAIL PROTECTED]
Reply-To: "Struts Developers List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic 
TestIterateTag.java
Date: 6 Mar 2003 16:07:13 -

martinc 2003/03/06 08:07:13

  Modified:src/share/org/apache/struts/taglib/nested
NestedPropertyTag.java NestedRootTag.java
   src/test/org/apache/struts/taglib/logic TestIterateTag.java
  Log:
  Replace EVAL_BODY_AGAIN with EVAL_BODY_TAG so that the code compiles
  against the JSP 1.1 API.
  Revision  ChangesPath
  1.8   +5 -5  
jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedPropertyTag.java

  Index: NestedPropertyTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedPropertyTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- NestedPropertyTag.java	28 Feb 2003 05:14:01 -	1.7
  +++ NestedPropertyTag.java	6 Mar 2003 16:07:13 -	1.8
  @@ -118,7 +118,7 @@
   NestedPropertyHelper.setName(request, originalName);

   // run the body part
  -return (EVAL_BODY_AGAIN);
  +return (EVAL_BODY_TAG);
 }




  1.8   +5 -5  
jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedRootTag.java

  Index: NestedRootTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedRootTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- NestedRootTag.java	28 Feb 2003 05:14:01 -	1.7
  +++ NestedRootTag.java	6 Mar 2003 16:07:13 -	1.8
  @@ -132,7 +132,7 @@
   }

   // do the JSP thing
  -return (EVAL_BODY_AGAIN);
  +return (EVAL_BODY_TAG);
 }
 /**



  1.3   +24 -24
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestIterateTag.java

  Index: TestIterateTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestIterateTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestIterateTag.java	28 Feb 2003 02:42:11 -	1.2
  +++ TestIterateTag.java	6 Mar 2003 16:07:13 -	1.3
  @@ -146,7 +146,7 @@
   			out.print((String)pageContext.getAttribute("theId"));
   		iteration++;

  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
assertEquals(iterations, iteration);
}
  @@ -193,7 +193,7 @@
out.print((String)pageContext.getAttribute("theId"));
iteration++;
  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
assertEquals(iterations, iteration);
}
  @@ -240,7 +240,7 @@
out.print((String)pageContext.getAttribute("theId"));
iteration++;
  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
assertEquals(iterations, iteration);
}
  @@ -308,7 +308,7 @@
out.print((String)pageContext.getAttribute("theId"));
iteration++;
  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
assertEquals(iterations, iteration);
}
  @@ -366,7 +366,7 @@
out.print((String)pageContext.getAttribute("theId"));
iteration++;
  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
assertEquals(iterations, iteration);
}
  @@ -424,7 +424,7 @@
out.print((String)pageContext.getAttribute("theId"));
iteration++;
  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
assertEquals(iterations, iteration);
}
  @@ -478,7 +478,7 @@
{
out.print((String)pageContext.get

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestIterateTag.java

2003-03-06 Thread martinc
martinc 2003/03/06 08:07:13

  Modified:src/share/org/apache/struts/taglib/nested
NestedPropertyTag.java NestedRootTag.java
   src/test/org/apache/struts/taglib/logic TestIterateTag.java
  Log:
  Replace EVAL_BODY_AGAIN with EVAL_BODY_TAG so that the code compiles
  against the JSP 1.1 API.
  
  Revision  ChangesPath
  1.8   +5 -5  
jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedPropertyTag.java
  
  Index: NestedPropertyTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedPropertyTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- NestedPropertyTag.java28 Feb 2003 05:14:01 -  1.7
  +++ NestedPropertyTag.java6 Mar 2003 16:07:13 -   1.8
  @@ -118,7 +118,7 @@
   NestedPropertyHelper.setName(request, originalName);
   
   // run the body part
  -return (EVAL_BODY_AGAIN);
  +return (EVAL_BODY_TAG);
 }
   
   
  
  
  
  1.8   +5 -5  
jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedRootTag.java
  
  Index: NestedRootTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedRootTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- NestedRootTag.java28 Feb 2003 05:14:01 -  1.7
  +++ NestedRootTag.java6 Mar 2003 16:07:13 -   1.8
  @@ -132,7 +132,7 @@
   }
   
   // do the JSP thing
  -return (EVAL_BODY_AGAIN);
  +return (EVAL_BODY_TAG);
 }
   
 /**
  
  
  
  1.3   +24 -24
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestIterateTag.java
  
  Index: TestIterateTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestIterateTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestIterateTag.java   28 Feb 2003 02:42:11 -  1.2
  +++ TestIterateTag.java   6 Mar 2003 16:07:13 -   1.3
  @@ -146,7 +146,7 @@
out.print((String)pageContext.getAttribute("theId"));
iteration++;

  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
assertEquals(iterations, iteration);
}
  @@ -193,7 +193,7 @@
out.print((String)pageContext.getAttribute("theId"));
iteration++;

  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
assertEquals(iterations, iteration);
}
  @@ -240,7 +240,7 @@
out.print((String)pageContext.getAttribute("theId"));
iteration++;

  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
assertEquals(iterations, iteration);
}
  @@ -308,7 +308,7 @@
out.print((String)pageContext.getAttribute("theId"));
iteration++;

  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
assertEquals(iterations, iteration);
}
  @@ -366,7 +366,7 @@
out.print((String)pageContext.getAttribute("theId"));
iteration++;

  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
assertEquals(iterations, iteration);
}
  @@ -424,7 +424,7 @@
out.print((String)pageContext.getAttribute("theId"));
iteration++;

  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
assertEquals(iterations, iteration);
}
  @@ -478,7 +478,7 @@
{
out.print((String)pageContext.getAttribute("theId"));

  - } while (tag.doAfterBody() == tag.EVAL_BODY_AGAIN);
  + } while (tag.doAfterBody() == tag.EVAL_BODY_TAG);
tag.doEndTag();
   
}
  @@ -522,7 +522,7 @@
{
   

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/bean TestCookieTag.java TestDefineTag.java TestHeaderTag.java TestIncludeTag.java TestMessageTag.java TestMessageTag1.java TestMessageTag1_fr.java TestMessageTag2.java TestMessageTag2_fr.java TestMessageTag3.java TestMessageTag3_fr.java TestMessageTag4.java TestMessageTag4_fr.java TestMessageTag_fr.java TestPageTag.java TestParameterTag.java TestResourceTag.java TestSizeTag.java TestStrutsTag.java TestWriteTag.java

2003-03-05 Thread jmitchell
jmitchell2003/03/05 18:42:18

  Modified:src/test/org/apache/struts/taglib/bean TestCookieTag.java
TestDefineTag.java TestHeaderTag.java
TestIncludeTag.java TestMessageTag.java
TestMessageTag1.java TestMessageTag1_fr.java
TestMessageTag2.java TestMessageTag2_fr.java
TestMessageTag3.java TestMessageTag3_fr.java
TestMessageTag4.java TestMessageTag4_fr.java
TestMessageTag_fr.java TestPageTag.java
TestParameterTag.java TestResourceTag.java
TestSizeTag.java TestStrutsTag.java
TestWriteTag.java
  Log:
  These were created recently, so I'm updating the Copyright to 2003.
  
  Revision  ChangesPath
  1.3   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/TestCookieTag.java
  
  Index: TestCookieTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/bean/TestCookieTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestCookieTag.java28 Feb 2003 02:37:03 -  1.2
  +++ TestCookieTag.java6 Mar 2003 02:42:17 -   1.3
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  
  
  
  1.3   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/TestDefineTag.java
  
  Index: TestDefineTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/bean/TestDefineTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestDefineTag.java28 Feb 2003 02:37:03 -  1.2
  +++ TestDefineTag.java6 Mar 2003 02:42:17 -   1.3
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  
  
  
  1.3   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/TestHeaderTag.java
  
  Index: TestHeaderTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/bean/TestHeaderTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestHeaderTag.java28 Feb 2003 02:37:03 -  1.2
  +++ TestHeaderTag.java6 Mar 2003 02:42:17 -   1.3
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  
  
  
  1.3   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/TestIncludeTag.java
  
  Index: TestIncludeTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/bean/TestIncludeTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestIncludeTag.java   28 Feb 2003 02:37:03 -  1.2
  +++ TestIncludeTag.java   6 Mar 2003 02:42:17 -   1.3
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  
  
  
  1.3   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/TestMessageTag.java
  
  Index: TestMessageTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/bean/TestMessageTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestMessageTag.java   28 Feb 2003 02:37:03 -  1.2
  +++ TestMessageTag.java   6 Mar 2003 02:42:17 -   1.3
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and b

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/html TestBaseTag.java TestButtonTag1.java TestCancelTag1.java TestCheckboxTag1.java TestCheckboxTag3.java TestErrorsTag1.java TestErrorsTag2.java TestFileTag1.java TestFileTag2.java

2003-03-05 Thread jmitchell
jmitchell2003/03/05 18:41:12

  Modified:src/test/org/apache/struts/taglib/html TestBaseTag.java
TestButtonTag1.java TestCancelTag1.java
TestCheckboxTag1.java TestCheckboxTag3.java
TestErrorsTag1.java TestErrorsTag2.java
TestFileTag1.java TestFileTag2.java
  Log:
  These were created recently, so I'm updating the Copyright to 2003.
  
  Revision  ChangesPath
  1.3   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestBaseTag.java
  
  Index: TestBaseTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestBaseTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestBaseTag.java  28 Feb 2003 01:11:33 -  1.2
  +++ TestBaseTag.java  6 Mar 2003 02:41:11 -   1.3
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  
  
  
  1.2   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag1.java
  
  Index: TestButtonTag1.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag1.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestButtonTag1.java   28 Feb 2003 01:11:33 -  1.1
  +++ TestButtonTag1.java   6 Mar 2003 02:41:11 -   1.2
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  
  
  
  1.2   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestCancelTag1.java
  
  Index: TestCancelTag1.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestCancelTag1.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestCancelTag1.java   28 Feb 2003 01:11:33 -  1.1
  +++ TestCancelTag1.java   6 Mar 2003 02:41:11 -   1.2
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  
  
  
  1.3   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestCheckboxTag1.java
  
  Index: TestCheckboxTag1.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestCheckboxTag1.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestCheckboxTag1.java 1 Mar 2003 00:40:51 -   1.2
  +++ TestCheckboxTag1.java 6 Mar 2003 02:41:11 -   1.3
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  
  
  
  1.2   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestCheckboxTag3.java
  
  Index: TestCheckboxTag3.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestCheckboxTag3.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestCheckboxTag3.java 28 Feb 2003 01:11:33 -  1.1
  +++ TestCheckboxTag3.java 6 Mar 2003 02:41:11 -   1.2
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  
  
  
  1.2   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestErrorsTag1.java
  
  Index: TestErrorsTag1.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestErrorsTag1.java,v
  retrieving revision 1.1
  retrieving revisio

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/logic IterateTag.java

2003-03-03 Thread martinc
martinc 2003/03/03 20:46:03

  Modified:src/share/org/apache/struts/taglib/logic IterateTag.java
  Log:
  Set 'iterator' to null in doEndTag() so that we release the iterator
  reference as early as possible. We cannot do the same for 'collection'
  since it is a tag attribute, and needs to remain unchanged to comply
  with the JSP spec.
  
  Revision  ChangesPath
  1.21  +5 -4  
jakarta-struts/src/share/org/apache/struts/taglib/logic/IterateTag.java
  
  Index: IterateTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/IterateTag.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- IterateTag.java   1 Feb 2003 05:30:28 -   1.20
  +++ IterateTag.java   4 Mar 2003 04:46:03 -   1.21
  @@ -424,6 +424,7 @@
   
   // Clean up our started state
   started = false;
  +iterator = null;
   
   // Continue processing this page
   return (EVAL_PAGE);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html MessagesTag.java

2003-03-03 Thread martinc
martinc 2003/03/03 20:43:44

  Modified:src/share/org/apache/struts/taglib/html MessagesTag.java
  Log:
  Reset the 'processed' flag at the beginning of each usage of the tag. Use
  a local copy of the 'name' attribute to avoid modifying the attribute value
  itself.
  
  PR: 17613
  Submitted by: Larry Zappaterrini
  
  Revision  ChangesPath
  1.13  +22 -16
jakarta-struts/src/share/org/apache/struts/taglib/html/MessagesTag.java
  
  Index: MessagesTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/MessagesTag.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- MessagesTag.java  28 Feb 2003 02:37:30 -  1.12
  +++ MessagesTag.java  4 Mar 2003 04:43:44 -   1.13
  @@ -228,9 +228,15 @@
* @exception JspException if a JSP exception has occurred
*/
   public int doStartTag() throws JspException {
  +// Initialize for a new request.
  +processed = false;
  +
   // Were any messages specified?
   ActionMessages messages = null;
   
  +// Make a local copy of the name attribute that we can modify.
  +String name = this.name;
  +
   if (message != null && "true".equalsIgnoreCase(message)) {
   name = Globals.MESSAGE_KEY;
   }
  @@ -305,18 +311,18 @@
   }
   
   // Decide whether to iterate or quit
  -if (iterator.hasNext()) {
  -   ActionMessage report = (ActionMessage)iterator.next();
  -   String msg = RequestUtils.message(pageContext, bundle,
  - locale, report.getKey(),
  - report.getValues());
  -
  -   pageContext.setAttribute(id, msg);
  -
  -   return (EVAL_BODY_TAG);
  -} else {
  -   return (SKIP_BODY);
  -}
  +if (iterator.hasNext()) {
  +   ActionMessage report = (ActionMessage)iterator.next();
  +   String msg = RequestUtils.message(pageContext, bundle,
  + locale, report.getKey(),
  + report.getValues());
  +
  +   pageContext.setAttribute(id, msg);
  +
  +   return (EVAL_BODY_TAG);
  +} else {
  +   return (SKIP_BODY);
  +}
   
   }
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestErrorsTag1.jsp TestErrorsTag2.jsp TestFileTag1.jsp TestFileTag2.jsp

2003-02-28 Thread jmitchell
jmitchell2003/02/28 22:00:13

  Added:   src/test/org/apache/struts/taglib/html TestErrorsTag1.java
TestErrorsTag2.java TestFileTag1.java
TestFileTag2.java
   web/test/test/org/apache/struts/taglib/html
TestErrorsTag1.jsp TestErrorsTag2.jsp
TestFileTag1.jsp TestFileTag2.jsp
  Log:
  New tests
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestErrorsTag1.java
  
  Index: TestErrorsTag1.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.html;
  
  import java.util.Locale;
  
  import javax.servlet.jsp.PageContext;
  
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.cactus.JspTestCase;
  import org.apache.struts.Globals;
  import org.apache.struts.action.ActionError;
  import org.apache.struts.action.ActionErrors;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.bean.ErrorsTag class.
   *
   * @author James Mitchell
   */
  public class TestErrorsTag1 extends JspTestCase {
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestErrorsTag1(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestErrorsTag1.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestErrorsTag1.class);
  }
  
  private void runMyTest(String whichTest, String locale){
request.setAttribute("runTest", whichTest);
pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), 
PageContext.SESSION_SCOPE);
 

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/html TestCheckboxTag6.java TestCheckboxTag8.java

2003-02-28 Thread jmitchell
jmitchell2003/02/28 16:52:03

  Removed: src/test/org/apache/struts/taglib/html TestCheckboxTag6.java
TestCheckboxTag8.java
  Log:
  I incorrectly assumed that checkbox would work with a boolean wrapper

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestCheckboxTag5.jsp TestCheckboxTag6.jsp TestCheckboxTag7.jsp TestCheckboxTag8.jsp

2003-02-28 Thread jmitchell
jmitchell2003/02/28 16:40:51

  Modified:src/test/org/apache/struts/taglib/html TestCheckboxTag1.java
  Removed: src/test/org/apache/struts/taglib/html TestCheckboxTag5.java
TestCheckboxTag7.java
   web/test/test/org/apache/struts/taglib/html
TestCheckboxTag5.jsp TestCheckboxTag6.jsp
TestCheckboxTag7.jsp TestCheckboxTag8.jsp
  Log:
  I incorrectly assumed that checkbox would work with a boolean wrapper
  
  Revision  ChangesPath
  1.2   +0 -6  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestCheckboxTag1.java
  
  Index: TestCheckboxTag1.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestCheckboxTag1.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestCheckboxTag1.java 28 Feb 2003 01:11:33 -  1.1
  +++ TestCheckboxTag1.java 1 Mar 2003 00:40:51 -   1.2
  @@ -77,12 +77,6 @@
* 
*  TestCheckboxTag(3 and 4) - These test using a boolean property 
* set to false on our form.
  - * 
  - *  TestCheckboxTag(5 and 6) - These test using a java.lang.Boolean property 
  - * set to true on our form.
  - * 
  - *  TestCheckboxTag(7 and 8) - These test using a java.lang.Boolean property 
  - * set to false on our form.
*
* @author James Mitchell
*/
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/nested/bean NestedSizeTag.java NestedWriteTag.java NestedMessageTag.java NestedDefineTag.java

2003-02-27 Thread arron
arron   2003/02/27 21:15:37

  Modified:src/share/org/apache/struts/taglib/nested/bean
NestedSizeTag.java NestedWriteTag.java
NestedMessageTag.java NestedDefineTag.java
  Log:
  Bean Nested Tag Clases
  - Most importantly, updated the Copyright to
include 2003.
  - Secondly, rejig of the nested tags to allow
them to dance with Tomcat 4.1.18
  
  Revision  ChangesPath
  1.4   +45 -33
jakarta-struts/src/share/org/apache/struts/taglib/nested/bean/NestedSizeTag.java
  
  Index: NestedSizeTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/bean/NestedSizeTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NestedSizeTag.java16 Nov 2002 04:32:38 -  1.3
  +++ NestedSizeTag.java28 Feb 2003 05:15:36 -  1.4
  @@ -6,7 +6,7 @@
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -59,6 +59,7 @@
*/
   package org.apache.struts.taglib.nested.bean;
   
  +import javax.servlet.http.HttpServletRequest;
   import javax.servlet.jsp.JspException;
   
   import org.apache.struts.taglib.bean.SizeTag;
  @@ -80,37 +81,48 @@
  * This is in the hands of the super class.
  */
 public int doStartTag() throws JspException {
  -
  -/* singleton tag implementations will need the original property to be
  -   set before running */
  -super.setProperty(originalProperty);
  -
  -/* let the NestedHelper set the properties it can */
  -isNesting = true;
  -NestedPropertyHelper.setNestedProperties(this);
  -isNesting = false;
  -
  -/* do the tag */
  +// get the original properties
  +originalName = getName();
  +originalProperty = getProperty();
  +
  +// request
  +HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
  +// set the properties
  +NestedPropertyHelper.setNestedProperties(request, this);
  +
  +// let the super do it's thing
   return super.doStartTag();
 }
  -  
  -  /** this is overridden so that properties being set by the JSP page aren't
  -   * written over by those needed by the extension. If the tag instance is
  -   * re-used by the JSP, the tag can set the property back to that set by the
  -   * JSP page.
  -   *
  -   * @param newProperty new property value
  +
  +  /**
  +   * Complete the processing of the tag. The nested tags here will restore
  +   * all the original value for the tag itself and the nesting context.
  +   * @return int to describe the next step for the JSP processor
  +   * @throws JspException for the bad things JSP's do
  */
  -  public void setProperty(String newProperty) {
  -/* let the real tag do its thang */
  -super.setProperty(newProperty);
  -/* if it's the JSP setting it, remember the value */
  -if (!isNesting) {
  -  originalProperty = newProperty;
  -}
  +  public int doEndTag() throws JspException {
  +// do the super's ending part
  +int i = super.doEndTag();
  +
  +// reset the properties
  +setName(originalName);
  +setProperty(originalProperty);
  +
  +// continue
  +return i;
 }
  -  
  -  /* hold original property */
  +
  +  /**
  +   * Release the tag's resources and reset the values.
  +   */
  +  public void release() {
  +super.release();
  +// reset the originals
  +originalName = null;
  +originalProperty = null;
  +  }
  +
  +  /* the usual private member variables */
  +  private String originalName = null;
 private String originalProperty = null;
  -  private boolean isNesting = false;
   }
  
  
  
  1.4   +45 -33
jakarta-struts/src/share/org/apache/struts/taglib/nested/bean/NestedWriteTag.java
  
  Index: NestedWriteTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/bean/NestedWriteTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NestedWriteTag.java   16 Nov 2002 04:32:38 -  1.3
  +++ NestedWriteTag.java   28 Feb 2003 05:15:36 -  1.4
  @@ -6,7 +6,7 @@
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -59,6 +59,7 @@
*/
   package org.apache.struts.taglib.nested.bean;
   
  +import javax.s

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/nested/html NestedHiddenTag.java NestedLinkTag.java NestedOptionsCollectionTag.java NestedMessagesTag.java NestedPasswordTag.java NestedErrorsTag.java NestedSelectTag.java NestedOptionsTag.java NestedMultiboxTag.java NestedRadioTag.java NestedCheckboxTag.java NestedTextTag.java NestedFileTag.java NestedFormTag.java NestedImageTag.java NestedSubmitTag.java NestedTextareaTag.java NestedImgTag.java

2003-02-27 Thread arron
arron   2003/02/27 21:15:07

  Modified:src/share/org/apache/struts/taglib/nested/html
NestedHiddenTag.java NestedLinkTag.java
NestedOptionsCollectionTag.java
NestedMessagesTag.java NestedPasswordTag.java
NestedErrorsTag.java NestedSelectTag.java
NestedOptionsTag.java NestedMultiboxTag.java
NestedRadioTag.java NestedCheckboxTag.java
NestedTextTag.java NestedFileTag.java
NestedFormTag.java NestedImageTag.java
NestedSubmitTag.java NestedTextareaTag.java
NestedImgTag.java
  Log:
  Html Nested Tag Clases
  - Most importantly, updated the Copyright to
include 2003.
  - Secondly, rejig of the nested tags to allow
them to dance with Tomcat 4.1.18
  
  Revision  ChangesPath
  1.5   +42 -30
jakarta-struts/src/share/org/apache/struts/taglib/nested/html/NestedHiddenTag.java
  
  Index: NestedHiddenTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/html/NestedHiddenTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NestedHiddenTag.java  16 Nov 2002 04:38:36 -  1.4
  +++ NestedHiddenTag.java  28 Feb 2003 05:15:06 -  1.5
  @@ -6,7 +6,7 @@
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -59,6 +59,7 @@
*/
   package org.apache.struts.taglib.nested.html;
   
  +import javax.servlet.http.HttpServletRequest;
   import javax.servlet.jsp.JspException;
   
   import org.apache.struts.taglib.html.HiddenTag;
  @@ -80,37 +81,48 @@
  * This is in the hands of the super class.
  */
 public int doStartTag() throws JspException {
  +// get the original properties
  +originalName = getName();
  +originalProperty = getProperty();
  +
  +// request
  +HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
  +// set the properties
  +NestedPropertyHelper.setNestedProperties(request, this);
   
  -/* singleton tag implementations will need the original property to be
  -   set before running */
  -super.setProperty(originalProperty);
  -
  -/* let the NestedHelper set the properties it can */
  -isNesting = true;
  -NestedPropertyHelper.setNestedProperties(this);
  -isNesting = false;
  -
  -/* do the tag */
  +// let the super do it's thing
   return super.doStartTag();
 }
   
  -  /** this is overridden so that properties being set by the JSP page aren't
  -   * written over by those needed by the extension. If the tag instance is
  -   * re-used by the JSP, the tag can set the property back to that set by the
  -   * JSP page.
  -   *
  -   * @param newProperty new property value
  +  /**
  +   * Complete the processing of the tag. The nested tags here will restore
  +   * all the original value for the tag itself and the nesting context.
  +   * @return int to describe the next step for the JSP processor
  +   * @throws JspException for the bad things JSP's do
  +   */
  +  public int doEndTag() throws JspException {
  +// do the super's ending part
  +int i = super.doEndTag();
  +
  +// reset the properties
  +setName(originalName);
  +setProperty(originalProperty);
  +
  +// continue
  +return i;
  +  }
  +
  +  /**
  +   * Release the tag's resources and reset the values.
  */
  -  public void setProperty(String newProperty) {
  -/* let the real tag do its thang */
  -super.setProperty(newProperty);
  -/* if it's the JSP setting it, remember the value */
  -if (!isNesting) {
  -  originalProperty = newProperty;
  -}
  +  public void release() {
  +super.release();
  +// reset the originals
  +originalName = null;
  +originalProperty = null;
 }
   
  -  /* hold original property */
  +  /* the usual private member variables */
  +  private String originalName = null;
 private String originalProperty = null;
  -  private boolean isNesting = false;
   }
  
  
  
  1.8   +57 -66
jakarta-struts/src/share/org/apache/struts/taglib/nested/html/NestedLinkTag.java
  
  Index: NestedLinkTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/html/NestedLinkTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- NestedLinkTag.java8 Dec 2002 06:54:51 -   1.7
  +++ NestedLink

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/nested/logic NestedNotPresentTag.java NestedEqualTag.java NestedNotEmptyTag.java NestedGreaterThanTag.java NestedIterateTei.java NestedGreaterEqualTag.java NestedIterateTag.java NestedMessagesNotPresentTag.java NestedMatchTag.java NestedLessThanTag.java NestedPresentTag.java NestedNotMatchTag.java NestedMessagesPresentTag.java NestedNotEqualTag.java NestedLessEqualTag.java NestedEmptyTag.java

2003-02-27 Thread arron
arron   2003/02/27 21:14:40

  Modified:src/share/org/apache/struts/taglib/nested/logic
NestedNotPresentTag.java NestedEqualTag.java
NestedNotEmptyTag.java NestedGreaterThanTag.java
NestedIterateTei.java NestedGreaterEqualTag.java
NestedIterateTag.java
NestedMessagesNotPresentTag.java
NestedMatchTag.java NestedLessThanTag.java
NestedPresentTag.java NestedNotMatchTag.java
NestedMessagesPresentTag.java
NestedNotEqualTag.java NestedLessEqualTag.java
NestedEmptyTag.java
  Log:
  Logic Nested Tag Clases
  - Most importantly, updated the Copyright to
include 2003.
  - Secondly, rejig of the nested tags to allow
them to dance with Tomcat 4.1.18
  
  Revision  ChangesPath
  1.4   +46 -34
jakarta-struts/src/share/org/apache/struts/taglib/nested/logic/NestedNotPresentTag.java
  
  Index: NestedNotPresentTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/logic/NestedNotPresentTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NestedNotPresentTag.java  16 Nov 2002 04:41:28 -  1.3
  +++ NestedNotPresentTag.java  28 Feb 2003 05:14:39 -  1.4
  @@ -6,7 +6,7 @@
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -59,6 +59,7 @@
*/
   package org.apache.struts.taglib.nested.logic;
   
  +import javax.servlet.http.HttpServletRequest;
   import javax.servlet.jsp.JspException;
   
   import org.apache.struts.taglib.logic.NotPresentTag;
  @@ -73,7 +74,7 @@
* @version $Revision$ $Date$
*/
   public class NestedNotPresentTag extends NotPresentTag implements NestedNameSupport 
{
  -  
  +
 /**
  * Overriding method of the heart of the matter. Gets the relative property
  * and leaves the rest up to the original tag implementation. Sweet.
  @@ -81,37 +82,48 @@
  * This is in the hands of the super class.
  */
 public int doStartTag() throws JspException {
  -
  -/* singleton tag implementations will need the original property to be
  -   set before running */
  -super.setProperty(originalProperty);
  -
  -/* let the NestedHelper set the properties it can */
  -isNesting = true;
  -NestedPropertyHelper.setNestedProperties(this);
  -isNesting = false;
  -
  -/* do the tag */
  +// get the original properties
  +originalName = getName();
  +originalProperty = getProperty();
  +
  +// request
  +HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
  +// set the properties
  +NestedPropertyHelper.setNestedProperties(request, this);
  +
  +// let the super do it's thing
   return super.doStartTag();
 }
  -  
  -  /** this is overridden so that properties being set by the JSP page aren't
  -   * written over by those needed by the extension. If the tag instance is
  -   * re-used by the JSP, the tag can set the property back to that set by the
  -   * JSP page.
  -   *
  -   * @param newProperty new property value
  +
  +  /**
  +   * Complete the processing of the tag. The nested tags here will restore
  +   * all the original value for the tag itself and the nesting context.
  +   * @return int to describe the next step for the JSP processor
  +   * @throws JspException for the bad things JSP's do
  +   */
  +  public int doEndTag() throws JspException {
  +// do the super's ending part
  +int i = super.doEndTag();
  +
  +// reset the properties
  +setName(originalName);
  +setProperty(originalProperty);
  +
  +// continue
  +return i;
  +  }
  +
  +  /**
  +   * Release the tag's resources and reset the values.
  */
  -  public void setProperty(String newProperty) {
  -/* let the real tag do its thang */
  -super.setProperty(newProperty);
  -/* if it's the JSP setting it, remember the value */
  -if (!isNesting) {
  -  originalProperty = newProperty;
  -}
  +  public void release() {
  +super.release();
  +// reset the originals
  +originalName = null;
  +originalProperty = null;
 }
  -  
  -  /* hold original property */
  +
  +  /* the usual private member variables */
  +  private String originalName = null;
 private String originalProperty = null;
  -  private boolean isNesting = false;
   }
  
  
  
  1.4   +48 -37
jakarta-struts/src/share/org/apache/struts/taglib/nested/logic/

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/nested NestedRootTag.java NestedParentSupport.java NestedPropertySupport.java NestedWriteNestingTag.java NestedPropertyTag.java NestedNameSupport.java NestedPropertyHelper.java NestedReference.java NestedTagSupport.java

2003-02-27 Thread arron
arron   2003/02/27 21:14:02

  Modified:src/share/org/apache/struts/taglib/nested NestedRootTag.java
NestedParentSupport.java NestedPropertySupport.java
NestedWriteNestingTag.java NestedPropertyTag.java
NestedNameSupport.java NestedPropertyHelper.java
NestedReference.java NestedTagSupport.java
  Log:
  Core Nested Clases
  - Most importantly, updated the Copyright to
include 2003.
  - Secondly, rejig of the nested tags to allow
them to dance with Tomcat 4.1.18
  
  Revision  ChangesPath
  1.7   +42 -39
jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedRootTag.java
  
  Index: NestedRootTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedRootTag.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- NestedRootTag.java8 Dec 2002 06:54:51 -   1.6
  +++ NestedRootTag.java28 Feb 2003 05:14:01 -  1.7
  @@ -6,7 +6,7 @@
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -84,8 +84,8 @@
* @since Struts 1.1
* @version $Revision$ $Date$
*/
  -public class NestedRootTag extends BodyTagSupport implements NestedParentSupport, 
NestedNameSupport {
  -  
  +public class NestedRootTag extends BodyTagSupport implements NestedNameSupport {
  +
 /** Getter method for the property property
  * @return String value of the property property
  */
  @@ -96,7 +96,7 @@
  * @param property new value for the property property
  */
 public void setProperty(String property) {}
  -  
  +
 /** Getter method for the name property
  * @return String value of the name property
  */
  @@ -109,15 +109,7 @@
 public void setName(String name) {
   this.name = name;
 }
  -  
  -  
  -  /** Getter method for the nestedProperty property
  -   * @return String value of the nestedProperty property
  -   */
  -  public String getNestedProperty() {
  -return this.nestedProperty;
  -  }
  -  
  +
 /**
  * Overriding method of the heart of the tag. Gets the relative property
  * and tells the JSP engine to evaluate its body content.
  @@ -125,23 +117,24 @@
  * @return int JSP continuation directive.
  */
 public int doStartTag() throws JspException {
  -
   /* set the nested reference for possible inclusions etc */
   HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
  -reference = (NestedReference)
  -  request.getAttribute(NestedPropertyHelper.NESTED_INCLUDES_KEY);
   
  -if (name == null) {
  -  this.name = reference.getBeanName();
  -  this.nestedProperty = reference.getNestedProperty();
  -} else {
  -  NestedReference newRef = new NestedReference(this.name, "");
  -  request.setAttribute(NestedPropertyHelper.NESTED_INCLUDES_KEY, newRef);
  +// get al the originals
  +originalName = name;
  +originalNesting = NestedPropertyHelper.getCurrentProperty(request);
  +originalNestingName = NestedPropertyHelper.getCurrentName(request, this);
  +
  +// set what we have to
  +if (name != null) {
  +  NestedPropertyHelper.setProperty(request, "");
  +  NestedPropertyHelper.setName(request, this.name);
   }
  -
  -return (EVAL_BODY_TAG);
  +
  +// do the JSP thing
  +return (EVAL_BODY_AGAIN);
 }
  -  
  +
 /**
  * Render the resulting content evaluation.
  *
  @@ -153,10 +146,10 @@
 ResponseUtils.writePrevious(pageContext, bodyContent.getString());
 bodyContent.clearBody();
   }
  -
  +
   return (SKIP_BODY);
 }
  -  
  +
 /**
  * Evaluate the rest of the page
  *
  @@ -165,23 +158,33 @@
 public int doEndTag() throws JspException {
   /* reset the reference */
   HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
  -NestedPropertyHelper.setIncludeReference(request, reference);
  -
  +
  +if (originalNesting == null) {
  +  NestedPropertyHelper.deleteReference(request);
  +} else {
  +  NestedPropertyHelper.setName(request, originalNestingName);
  +  NestedPropertyHelper.setProperty(request, "nestOne");
  +}
  +this.name = originalName;
  +
   return (EVAL_PAGE);
 }
  -  
  -  
  +
  +
 /**
  * JSP method to release all resources held by the tag.
  */
 public void release() {
   super.release();
   this.name = null;
  +this.originalName = null;
  +this.originalNesting = null;
  +t

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/html TestButtonTag2.java TestCheckboxTag4.java TestCheckboxTag2.java TestCheckboxTag8.java TestCancelTag2.java TestCheckboxTag6.java

2003-02-27 Thread dgraham
dgraham 2003/02/27 18:44:14

  Modified:src/test/org/apache/struts/taglib/html TestButtonTag2.java
TestCheckboxTag4.java TestCheckboxTag2.java
TestCheckboxTag8.java TestCancelTag2.java
TestCheckboxTag6.java
  Log:
  Fixed bad imports.
  
  Revision  ChangesPath
  1.4   +1 -2  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag2.java
  
  Index: TestButtonTag2.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag2.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestButtonTag2.java   28 Feb 2003 01:11:33 -  1.3
  +++ TestButtonTag2.java   28 Feb 2003 02:44:13 -  1.4
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -56,7 +56,6 @@
   
   import java.util.ArrayList;
   import java.util.HashMap;
  -import java.util.Hashtable;
   import java.util.Locale;
   import java.util.StringTokenizer;
   
  
  
  
  1.2   +1 -2  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestCheckboxTag4.java
  
  Index: TestCheckboxTag4.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestCheckboxTag4.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestCheckboxTag4.java 28 Feb 2003 01:11:33 -  1.1
  +++ TestCheckboxTag4.java 28 Feb 2003 02:44:13 -  1.2
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -56,7 +56,6 @@
   
   import java.util.ArrayList;
   import java.util.HashMap;
  -import java.util.Hashtable;
   import java.util.Locale;
   import java.util.StringTokenizer;
   
  
  
  
  1.2   +1 -2  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestCheckboxTag2.java
  
  Index: TestCheckboxTag2.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestCheckboxTag2.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestCheckboxTag2.java 28 Feb 2003 01:11:33 -  1.1
  +++ TestCheckboxTag2.java 28 Feb 2003 02:44:13 -  1.2
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -56,7 +56,6 @@
   
   import java.util.ArrayList;
   import java.util.HashMap;
  -import java.util.Hashtable;
   import java.util.Locale;
   import java.util.StringTokenizer;
   
  
  
  
  1.2   +1 -2  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestCheckboxTag8.java
  
  Index: TestCheckboxTag8.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestCheckboxTag8.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestCheckboxTag8.java 28 Feb 2003 01:11:33 -  1.1
  +++ TestCheckboxTag8.java 28 Feb 2003 02:44:13 -  1.2
  @@ -1,7 +1,7 @@
   /*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -56,7 +56,6 @@
   
   import java.util.ArrayList;
   import java.util.HashMap;
  -import java.util.Hashtable;
   import java.util.Locale;
   import java.util.StringTokenizer;
   
  
  
  
  1.2   +1 -5  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestCancelTag2.java
  
  Index: TestCancelTag2.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestCancelTag2.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestCancelTag2.java   28 Feb 2003 01:11:33 -  1.1
  +++ TestCancelTag2.java   28 Feb 2003 02:44:13 -  1.2
  @@ -1,7 +1,7 @@
   /*
* The

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html MessagesTag.java

2003-02-27 Thread dgraham
dgraham 2003/02/27 18:37:30

  Modified:src/share/org/apache/struts/taglib/html MessagesTag.java
  Log:
  Fixed bad imports.
  
  Revision  ChangesPath
  1.12  +4 -5  
jakarta-struts/src/share/org/apache/struts/taglib/html/MessagesTag.java
  
  Index: MessagesTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/MessagesTag.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- MessagesTag.java  16 Feb 2003 05:29:46 -  1.11
  +++ MessagesTag.java  28 Feb 2003 02:37:30 -  1.12
  @@ -71,7 +71,6 @@
   import org.apache.struts.Globals;
   import org.apache.struts.action.ActionMessage;
   import org.apache.struts.action.ActionMessages;
  -import org.apache.struts.action.ActionServlet;
   import org.apache.struts.util.MessageResources;
   import org.apache.struts.util.RequestUtils;
   import org.apache.struts.util.ResponseUtils;
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestButtonTag2.jsp

2003-02-26 Thread jmitchell
jmitchell2003/02/26 20:39:43

  Modified:src/test/org/apache/struts/taglib/html TestButtonTag2.java
   web/test/test/org/apache/struts/taglib/html
TestButtonTag2.jsp
  Log:
  Add tests for indexed buttons.
  
  Revision  ChangesPath
  1.2   +49 -0 
jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag2.java
  
  Index: TestButtonTag2.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag2.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestButtonTag2.java   27 Feb 2003 02:17:50 -  1.1
  +++ TestButtonTag2.java   27 Feb 2003 04:39:43 -  1.2
  @@ -54,7 +54,10 @@
*/
   package org.apache.struts.taglib.html;
   
  +import java.util.ArrayList;
  +import java.util.HashMap;
   import java.util.Locale;
  +import java.util.StringTokenizer;
   
   import javax.servlet.jsp.PageContext;
   import junit.framework.Test;
  @@ -62,6 +65,7 @@
   
   import org.apache.cactus.JspTestCase;
   import org.apache.struts.Globals;
  +import org.apache.struts.taglib.SimpleBeanForTesting;
   
   /**
* Suite of unit tests for the
  @@ -158,6 +162,51 @@
runMyTest("testButtonPropertyBodyContentMessageKey_fr", "fr");
}
   
  +public void testButtonPropertyIndexedArray(){ 
  + ArrayList lst = new ArrayList();
  + lst.add("Test Message");
  + pageContext.setAttribute("lst", lst, PageContext.REQUEST_SCOPE);
  + runMyTest("testButtonPropertyIndexedArray", "");
  + }
  +
  +public void testButtonPropertyIndexedArrayProperty(){ 
  + SimpleBeanForTesting sbft = new SimpleBeanForTesting();
  + ArrayList lst = new ArrayList();
  + lst.add("Test Message");
  + sbft.setList(lst);
  + pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
  + runMyTest("testButtonPropertyIndexedArrayProperty", "");
  + }
  +
  +public void testButtonPropertyIndexedMap(){ 
  + HashMap map = new HashMap();
  + map.put("tst1", "Test Message");
  + pageContext.setAttribute("lst", map, PageContext.REQUEST_SCOPE);
  + runMyTest("testButtonPropertyIndexedMap", "");
  + }
  +
  +public void testButtonPropertyIndexedMapProperty(){ 
  + SimpleBeanForTesting sbft = new SimpleBeanForTesting();
  + HashMap map = new HashMap();
  + map.put("tst1", "Test Message");
  + sbft.setMap(map);
  + pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
  + runMyTest("testButtonPropertyIndexedMapProperty", "");
  + }
  +
  +public void testButtonPropertyIndexedEnumeration(){ 
  + StringTokenizer st = new StringTokenizer("Test Message");
  + pageContext.setAttribute("lst", st, PageContext.REQUEST_SCOPE);
  + runMyTest("testButtonPropertyIndexedEnumeration", "");
  + }
  +
  +public void testButtonPropertyIndexedEnumerationProperty(){ 
  + SimpleBeanForTesting sbft = new SimpleBeanForTesting();
  + StringTokenizer st = new StringTokenizer("Test Message");
  + sbft.setEnumeration(st);
  + pageContext.setAttribute("lst", sbft, PageContext.REQUEST_SCOPE);
  + runMyTest("testButtonPropertyIndexedEnumerationProperty", "");
  + }
   
   
   
  
  
  
  1.2   +83 -0 
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestButtonTag2.jsp
  
  Index: TestButtonTag2.jsp
  ===
  RCS file: 
/home/cvs/jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestButtonTag2.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestButtonTag2.jsp27 Feb 2003 02:18:45 -  1.1
  +++ TestButtonTag2.jsp27 Feb 2003 04:39:43 -  1.2
  @@ -112,6 +112,89 @@
   
   
   
  +
  + 
  +   
  + 
  +   
  + 
  + 
  + 
  + 
  + 
  + 
  +
  +
  +
  + 
  +   
  + 
  +   
  + 
  + 
  + 
  + 
  + 
  + 
  +
  +
  +
  + 
  +   
  + 
  +   
  + 
  + 
  + 
  + 
  + 
  + 
  +
  +
  +
  + 
  +   
  + 
  +   
  + 
  + 
  + 
  + 
  + 
  + 
  +
  +
  +
  + 
  + 
  + 
  + 
  + 
  + 
  + 
  + 
  + 
  + 
  + 
  + 
  +
  +
  +
  + 
  + 
  + 
  + 
  + 
  + 
  + 
  + 
  + 
  + 
  + 
  + 
  +
  +
  +
   
   
   <% 
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestIterateTag.java

2003-02-26 Thread jmitchell
jmitchell2003/02/26 20:12:50

  Added:   src/test/org/apache/struts/taglib/logic TestIterateTag.java
  Log:
  Initial checkin.
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestIterateTag.java
  
  Index: TestIterateTag.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.logic;
  
  import java.io.IOException;
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.StringTokenizer;
  
  import javax.servlet.ServletException;
  import javax.servlet.jsp.JspException;
  import javax.servlet.jsp.PageContext;
  import javax.servlet.jsp.tagext.BodyContent;
  
  import junit.framework.Test;
  import junit.framework.TestSuite;
  import org.apache.cactus.JspTestCase;
  import org.apache.cactus.WebRequest;
  import org.apache.cactus.WebResponse;
  import org.apache.struts.taglib.SimpleBeanForTesting;
  import org.apache.struts.taglib.bean.MessageTag;
  import org.apache.struts.util.LabelValueBean;
  
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.logic.IterateTag class.
   *
   * @author James Mitchell
   */
  public class TestIterateTag extends JspTestCase {

private int iterations = 2;

  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestIterateTag(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestIterateTag.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestIterateTag.class);
  }
  
  
 /**
   * Testing IterateTag using name attribute in
   * the application scope.
   * 
 * Tests the equivalent of this 

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html TestBaseTag.jsp TestButtonTag.jsp TestButtonTag2.jsp

2003-02-26 Thread jmitchell
jmitchell2003/02/26 18:18:45

  Added:   web/test/test/org/apache/struts/taglib/html TestBaseTag.jsp
TestButtonTag.jsp TestButtonTag2.jsp
  Log:
  Initial checkin.  Many more will follow.
  
  Revision  ChangesPath
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestBaseTag.jsp
  
  Index: TestBaseTag.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  <%
  String server = request.getServerName();
  int port  = request.getServerPort();
  %>
  
  
  






  
  
  






  
  
  
    



http://www.my-server-name.com:<%=port%>/test/test/org/apache/struts/taglib/html/TestBaseTag.jsp">
    
  
  
  




http://www.my-server-name.com:<%=port%>/test/test/org/apache/struts/taglib/html/TestBaseTag.jsp"
 target="My-Other-Frame">

  
  
  
  <% 
  Assert.assertEquals(
pageContext.getAttribute("TEST_RESULTS").toString(), 
pageContext.getAttribute("EXPECTED_RESULTS").toString()
);
  %>
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestButtonTag.jsp
  
  Index: TestButtonTag.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <[EMAIL PROTECTED] import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  
  






  
  
  






  
  
  






  
  
  






  
  
  






  
  
  






  
  
  






  
  
  






  
  
  






  
  
  







  
  
  






  
  
  
  
  






  
  
  
  






  
  
  
  






  
  
  
  






  
  
  
  






  
  
  
  






  
  
  
  






  
  
  
  






  
  
  
  






  
  
  
  






  
  
  
  






  
  
  
  

    




  
  
  
  
  <% 
  Assert.assertEquals(
pageContext.getAttribute("TEST_RESULTS").toString(), 
pageContext.getAttribute("EXPECTED_RESULTS").toString()
);
  %>
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/html/TestButtonTag2.jsp
  
  Index: TestButtonTag2.jsp
  ===

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/html - New directory

2003-02-26 Thread jmitchell
jmitchell2003/02/26 18:18:17

  jakarta-struts/web/test/test/org/apache/struts/taglib/html - New directory

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/html TestButtonTag2.java TestButtonTag.java

2003-02-26 Thread jmitchell
jmitchell2003/02/26 18:17:50

  Modified:src/test/org/apache/struts/taglib/html TestButtonTag.java
  Added:   src/test/org/apache/struts/taglib/html TestButtonTag2.java
  Log:
  Oops.  Had to break this baby up so Tomcat 3.3 can handle the
  rather large amount of tags per page.
  
  Revision  ChangesPath
  1.2   +0 -55 
jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag.java
  
  Index: TestButtonTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestButtonTag.java27 Feb 2003 01:59:17 -  1.1
  +++ TestButtonTag.java27 Feb 2003 02:17:50 -  1.2
  @@ -109,14 +109,6 @@
fail("There is a problem that is preventing the tests to 
continue!");
}
   }
  -
  - private void formatAndTest(String compare, String output) {
  - //fix for introduced carriage return / line feeds
  - output = output.replaceAll("\r","");
  - output = output.replaceAll("\n","");
  - output = output.trim();
  - assertEquals(compare, output);
  - }
   
   /*
* Testing ButtonTag.
  @@ -202,52 +194,5 @@
   public void testButtonPropertyOnmouseup(){ 
runMyTest("testButtonPropertyOnmouseup", "");
}
  -
  -public void testButtonPropertyStyle(){ 
  - runMyTest("testButtonPropertyStyle", "");
  - }
  -
  -public void testButtonPropertyStyleClass(){ 
  - runMyTest("testButtonPropertyStyleClass", "");
  - }
  -
  -public void testButtonPropertyStyleId(){ 
  - runMyTest("testButtonPropertyStyleId", "");
  - }
  -
  -public void testButtonPropertyTabindex(){ 
  - runMyTest("testButtonPropertyTabindex", "");
  - }
  -
  -public void testButtonPropertyTitle(){ 
  - runMyTest("testButtonPropertyTitle", "");
  - }
  -
  -public void testButtonPropertyTitleKey(){ 
  - runMyTest("testButtonPropertyTitleKey", "");
  - }
  -
  -public void testButtonPropertyTitleKey_fr(){ 
  - runMyTest("testButtonPropertyTitleKey_fr", "fr");
  - }
  -
  -public void testButtonPropertyValue(){ 
  - runMyTest("testButtonPropertyValue", "");
  - }
  -
  -public void testButtonPropertyBodyContent(){ 
  - runMyTest("testButtonPropertyBodyContent", "");
  - }
  -
  -public void testButtonPropertyBodyContentMessageKey(){ 
  - runMyTest("testButtonPropertyBodyContentMessageKey", "");
  - }
  -
  -public void testButtonPropertyBodyContentMessageKey_fr(){ 
  - runMyTest("testButtonPropertyBodyContentMessageKey_fr", "fr");
  - }
  -
  -
  -
   
   }
  
  
  
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestButtonTag2.java
  
  Index: TestButtonTag2.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/html TestBaseTag.java TestButtonTag.java

2003-02-26 Thread jmitchell
jmitchell2003/02/26 17:59:17

  Added:   src/test/org/apache/struts/taglib/html TestBaseTag.java
TestButtonTag.java
  Log:
  Initial checkin.  Many more will follow.
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/html/TestBaseTag.java
  
  Index: TestBaseTag.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.html;
  
  import java.io.IOException;
  import java.util.ArrayList;
  import java.util.HashMap;
  
  import javax.servlet.ServletException;
  import javax.servlet.jsp.JspException;
  import javax.servlet.jsp.PageContext;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  import org.apache.cactus.JspTestCase;
  import org.apache.cactus.WebRequest;
  import org.apache.cactus.WebResponse;
  import org.apache.struts.util.LabelValueBean;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.bean.BaseTag class.
   *
   * @author James Mitchell
   */
  public class TestBaseTag extends JspTestCase {
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestBaseTag(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] {TestBaseTag.class.getName()});
  }
  
  /**
   * @return a test suite (TestSuite) that includes all methods
   * starting with "test"
   */
  public static Test suite() {
  // All methods starting with "test" will be executed in the test suite.
  return new TestSuite(TestBaseTag.class);
  }
  
  private void runMyTest(String whichTest){
request.setAttribute("runTest", whichTest);
  try {

pageContext.forward("/test/org/apache/struts/taglib/html/TestBaseTag.jsp");
}
catch (Exception e) {
  

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/html - New directory

2003-02-26 Thread jmitchell
jmitchell2003/02/26 17:53:50

  jakarta-struts/src/test/org/apache/struts/taglib/html - New directory

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/test/org/apache/struts/taglib SimpleBeanForTesting.java

2003-02-26 Thread jmitchell
jmitchell2003/02/26 16:04:07

  Modified:src/test/org/apache/struts/taglib SimpleBeanForTesting.java
  Log:
  Adding a few more features.
  
  Revision  ChangesPath
  1.2   +11 -0 
jakarta-struts/src/test/org/apache/struts/taglib/SimpleBeanForTesting.java
  
  Index: SimpleBeanForTesting.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/SimpleBeanForTesting.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SimpleBeanForTesting.java 22 Feb 2003 02:52:27 -  1.1
  +++ SimpleBeanForTesting.java 27 Feb 2003 00:04:07 -  1.2
  @@ -92,6 +92,17 @@
private Enumeration enumeration;
private Collection collection;
   
  + //Copied right from the FAQ
  + private String strAry[] =
  + { "String 0", "String 1", "String 2", "String 3", "String 4" };
  +
  +public String getStringIndexed(int index) { 
  + return (strAry[index]); 
  +}
  +public void setStringIndexed(int index, String value){ 
  + strAry[index] = value; 
  +}
  +
/**
 * Returns the lst.
 * @return List
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/bean TestWriteTag.jsp

2003-02-26 Thread jmitchell
jmitchell2003/02/26 16:02:05

  Modified:src/test/org/apache/struts/taglib/bean TestWriteTag.java
   web/test/test/org/apache/struts/taglib/bean TestWriteTag.jsp
  Log:
  Fix tests where users locale is "fr".
  
  Revision  ChangesPath
  1.2   +36 -38
jakarta-struts/src/test/org/apache/struts/taglib/bean/TestWriteTag.java
  
  Index: TestWriteTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/bean/TestWriteTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestWriteTag.java 22 Feb 2003 02:48:09 -  1.1
  +++ TestWriteTag.java 27 Feb 2003 00:02:04 -  1.2
  @@ -122,124 +122,122 @@
assertEquals(compare, output);
}
   
  +private void runMyTest(String whichTest, String locale){
  + pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), 
PageContext.SESSION_SCOPE);
  + request.setAttribute("runTest", whichTest);
  +try {
  + 
pageContext.forward("/test/org/apache/struts/taglib/bean/TestWriteTag.jsp");
  + }
  + catch (Exception e) {
  + e.printStackTrace();
  + fail("There is a problem that is preventing the tests to 
continue!");
  + }
  +}
  +
// Name
  -public void testWriteTagName() throws IOException, ServletException{
  - request.setAttribute("runTest", "testWriteTagName");
  +public void testWriteTagName(){

pageContext.setAttribute(REQUEST_KEY,TEST_STRING_VAL,PageContext.REQUEST_SCOPE);
  - 
pageContext.forward("/test/org/apache/struts/taglib/bean/TestWriteTag.jsp");
  + runMyTest("testWriteTagName", "");
}
public void endWriteTagName(WebResponse response){
formatAndTest(TEST_STRING_VAL, response.getText());
}

// Property
  -public void testWriteTagNameProperty() throws IOException, ServletException{
  +public void testWriteTagNameProperty() {
SimpleBeanForTesting sbft = new SimpleBeanForTesting(TEST_STRING_VAL);
  - request.setAttribute("runTest", "testWriteTagNameProperty");
pageContext.setAttribute(REQUEST_KEY, sbft,PageContext.REQUEST_SCOPE);
  - 
pageContext.forward("/test/org/apache/struts/taglib/bean/TestWriteTag.jsp");
  + runMyTest("testWriteTagNameProperty", "");
}
public void endWriteTagNameProperty(WebResponse response){
formatAndTest(TEST_STRING_VAL, response.getText());
}

// Name and Format
  -public void testWriteTagNameFormat() throws IOException, ServletException{
  - request.setAttribute("runTest", "testWriteTagNameFormat");
  +public void testWriteTagNameFormat(){
    
pageContext.setAttribute(REQUEST_KEY,TEST_INTEGER_VAL,PageContext.REQUEST_SCOPE);
  - 
pageContext.forward("/test/org/apache/struts/taglib/bean/TestWriteTag.jsp");
  + runMyTest("testWriteTagNameFormat", "");
}
public void endWriteTagNameFormat(WebResponse response){
formatAndTest("1,234" , response.getText());
}

// Name, Format, and FormatKey (default bundle)
  -public void testWriteTagNameFormatKeyDefaultBundle() throws IOException, 
ServletException{
  - request.setAttribute("runTest", 
"testWriteTagNameFormatKeyDefaultBundle");
  +public void testWriteTagNameFormatKeyDefaultBundle(){

pageContext.setAttribute(REQUEST_KEY,TEST_INTEGER_VAL,PageContext.REQUEST_SCOPE);
  - 
pageContext.forward("/test/org/apache/struts/taglib/bean/TestWriteTag.jsp");
  + runMyTest("testWriteTagNameFormatKeyDefaultBundle", "");
}
public void endWriteTagNameFormatKeyDefaultBundle(WebResponse response){
formatAndTest("$1,234" , response.getText());
}

// Name, Format, and FormatKey (alternate bundle)
  -public void testWriteTagNameFormatKeyAlternateBundle() throws IOException, 
ServletException{
  - request.setAttribute("runTest", 
"testWriteTagNameFormatKeyAlternateBundle");
  +public void testWriteTagNameFormatKeyAlternateBundle(){

pageContext.setAttribute(REQUEST_KEY,TEST_INTEGER_VAL,PageContext.REQUEST_SCOPE);
  - 
pageContext.forward("/test/org/apache/struts/taglib/bean/TestWriteTag.jsp");
  + runMyTest("testWriteTagNameFormatKeyAlternateBundle", "");
 

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html HtmlTag.java

2003-02-25 Thread dgraham
dgraham 2003/02/25 20:51:09

  Modified:src/share/org/apache/struts/taglib/html HtmlTag.java
  Log:
  The tag now uses RequestUtils.retrieveUserLocale for looking up the appropriate
  locale.  Using that method protects us from needlessly creating a session
  for PR# 17371.
  
  Revision  ChangesPath
  1.10  +10 -22
jakarta-struts/src/share/org/apache/struts/taglib/html/HtmlTag.java
  
  Index: HtmlTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/HtmlTag.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- HtmlTag.java  8 Dec 2002 06:54:51 -   1.9
  +++ HtmlTag.java  26 Feb 2003 04:51:09 -  1.10
  @@ -7,7 +7,7 @@
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -70,6 +70,7 @@
   
   import org.apache.struts.Globals;
   import org.apache.struts.util.MessageResources;
  +import org.apache.struts.util.RequestUtils;
   import org.apache.struts.util.ResponseUtils;
   
   
  @@ -238,28 +239,15 @@
*/
   protected Locale getCurrentLocale() {
   
  -// Create a new session if necessary
  -HttpSession session = pageContext.getSession();
  -if (this.locale && (session == null)) {
  -session = ((HttpServletRequest) 
this.pageContext.getRequest()).getSession();
  -}
  -
  -// Return any currently set Locale in our session
  -Locale current = (Locale) session.getAttribute(Globals.LOCALE_KEY);
  -if (current != null) {
  -return (current);
  -}
  -
  -// If client doesn't specify a locale preference in header then default for 
  -// server will be returned.
  -current = pageContext.getRequest().getLocale();
  +Locale userLocale = RequestUtils.retrieveUserLocale(pageContext, 
Globals.LOCALE_KEY);
   
   // Store a new current Locale, if requested
   if (this.locale) {
  -session.setAttribute(Globals.LOCALE_KEY, current);
  +HttpSession session = ((HttpServletRequest) 
this.pageContext.getRequest()).getSession();
  +session.setAttribute(Globals.LOCALE_KEY, userLocale);
   }
   
  -return (current);
  +return userLocale;
   }
   
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html OptionTag.java

2003-02-24 Thread dgraham
dgraham 2003/02/24 20:30:46

  Modified:src/share/org/apache/struts/taglib/html OptionTag.java
  Log:
  If body text is empty and there's no resource key to lookup, display
  nothing in the option.  PR#17254
  
  Revision  ChangesPath
  1.16  +7 -5  
jakarta-struts/src/share/org/apache/struts/taglib/html/OptionTag.java
  
  Index: OptionTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/OptionTag.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- OptionTag.java1 Feb 2003 05:30:28 -   1.15
  +++ OptionTag.java25 Feb 2003 04:30:45 -  1.16
  @@ -344,8 +344,10 @@
   
   if (this.text != null) {
   return (this.text);
  -} else {
  +} else if (this.key != null) {
   return (RequestUtils.message(pageContext, bundle, locale, key));
  +} else {
  +return "";  // no body text and no key to lookup so display nothing
   }
   
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestEmptyTag.java

2003-02-21 Thread jmitchell
jmitchell2003/02/21 19:28:15

  Modified:src/test/org/apache/struts/taglib/logic TestEmptyTag.java
  Log:
  Fix simple copy/paste error.
  
  Revision  ChangesPath
  1.3   +2 -2  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestEmptyTag.java
  
  Index: TestEmptyTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestEmptyTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestEmptyTag.java 22 Feb 2003 03:18:59 -  1.2
  +++ TestEmptyTag.java 22 Feb 2003 03:28:15 -  1.3
  @@ -122,7 +122,7 @@
   
   /**
* Testing EmptyTag using name attribute in
  - * the application scope.
  + * the some scope.
   */
   public void testEmptyTagUsingName() 
throws ServletException,  JspException {
  @@ -163,7 +163,7 @@
   
   /**
* Testing EmptyTag using name attribute in
  - * the application scope.
  + * the some scope.
   */
   public void testEmptyTagUsingProperty() 
throws ServletException,  JspException {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestGreaterThanTag.java

2003-02-21 Thread jmitchell
jmitchell2003/02/21 19:25:17

  Modified:src/test/org/apache/struts/taglib/logic
TestGreaterThanTag.java
  Log:
  Fix simple copy/paste error.
  
  Revision  ChangesPath
  1.3   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestGreaterThanTag.java
  
  Index: TestGreaterThanTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestGreaterThanTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestGreaterThanTag.java   7 Feb 2003 00:32:06 -   1.2
  +++ TestGreaterThanTag.java   22 Feb 2003 03:25:16 -  1.3
  @@ -108,7 +108,7 @@
   //- Test initApplication() method --

   /**
  - * Create cookie for testCookiePresent method test.
  + * Create cookie for testCookieGreaterThan method test.
   */
   public void beginCookieGreaterThan(WebRequest testRequest) {
  testRequest.addCookie(COOKIE_KEY, GREATER_VAL);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestEmptyTag.java

2003-02-21 Thread jmitchell
jmitchell2003/02/21 19:18:59

  Modified:src/test/org/apache/struts/taglib/logic TestEmptyTag.java
  Log:
  Update reference
  
  Revision  ChangesPath
  1.2   +1 -0  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestEmptyTag.java
  
  Index: TestEmptyTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestEmptyTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestEmptyTag.java 7 Feb 2003 00:32:06 -   1.1
  +++ TestEmptyTag.java 22 Feb 2003 03:18:59 -  1.2
  @@ -64,6 +64,7 @@
   import junit.framework.TestSuite;
   import org.apache.cactus.JspTestCase;
   import org.apache.cactus.WebRequest;
  +import org.apache.struts.taglib.SimpleBeanForTesting;
   import org.apache.struts.util.LabelValueBean;
   
   /**
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/logic TestIterateTag.jsp

2003-02-21 Thread jmitchell
jmitchell2003/02/21 18:59:12

  Added:   web/test/test/org/apache/struts/taglib/logic
TestIterateTag.jsp
  Log:
  Initial checkin.
  
  These jsp files correspond 1 for 1 with the Cactus tests under /src/test
  
  Revision  ChangesPath
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/logic/TestIterateTag.jsp
  
  Index: TestIterateTag.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <%@ page import="junit.framework.Assert"%>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  
  



  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/bean/resources IncludeTagTest.jsp TextFileForTesting.txt

2003-02-21 Thread jmitchell
jmitchell2003/02/21 18:58:14

  Added:   web/test/test/org/apache/struts/taglib/bean/resources
IncludeTagTest.jsp TextFileForTesting.txt
  Log:
  A few more items
  
  Revision  ChangesPath
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/bean/resources/IncludeTagTest.jsp
  
  Index: IncludeTagTest.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  Test Value
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/bean/resources/TextFileForTesting.txt
  
  Index: TextFileForTesting.txt
  ===
  Test Value
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/bean TestCookieTag.jsp TestDefineTag.jsp TestHeaderTag.jsp TestIncludeTag.jsp TestMessageTag.jsp TestMessageTag1.jsp TestMessageTag2.jsp TestMessageTag3.jsp TestMessageTag4.jsp TestPageTag.jsp TestParameterTag.jsp TestResourceTag.jsp TestSizeTag.jsp TestStrutsTag.jsp TestWriteTag.jsp

2003-02-21 Thread jmitchell
jmitchell2003/02/21 18:57:36

  Added:   web/test/test/org/apache/struts/taglib/bean
TestCookieTag.jsp TestDefineTag.jsp
TestHeaderTag.jsp TestIncludeTag.jsp
TestMessageTag.jsp TestMessageTag1.jsp
TestMessageTag2.jsp TestMessageTag3.jsp
TestMessageTag4.jsp TestPageTag.jsp
TestParameterTag.jsp TestResourceTag.jsp
TestSizeTag.jsp TestStrutsTag.jsp TestWriteTag.jsp
  Log:
  Initial checkin.
  
  These jsp files correspond 1 for 1 with the Cactus tests under /src/test
  
  Revision  ChangesPath
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestCookieTag.jsp
  
  Index: TestCookieTag.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  
  
  


  
  
  



  
  
  
  


  
  
  
  
  
  
  
  
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestDefineTag.jsp
  
  Index: TestDefineTag.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  
  

  
  
  

  
  
  

  
  
  

Test Value

  
  
  
  
  

  
  
  

  
  
  

  
  
  

Test Value

  
  
  
  
  

  
  
  

  
  
  

  
  
  

Test Value

  
  
  
  
  

  
  
  

  
  
  
    
  
  
  

Test Value

  
  
  
  
  
  
  
  
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestHeaderTag.jsp
  
  Index: TestHeaderTag.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  
  
  

  
  
  



  
  
  
  

  
  
  
  
  
  
  
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestIncludeTag.jsp
  
  Index: TestIncludeTag.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  
  
    
  
  
  
  


http://<%=request.getServerName()%>:<%=request.getServerPort()%>/test/test/org/apache/struts/taglib/bean/resources/IncludeTagTest.jsp


  
  
  
  

  
  
  
  
  
  
  
  
  1.1  
jakarta-struts/web/test/test/org/apache/struts/taglib/bean/TestMessageTag.jsp
  
  Index: TestMessageTag.jsp
  ===
  <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  
  <%
  /*
   * ===
   * Testing MessageTag (these comments serve as a divider of 
   * functionality being tested)
   * 
   * Section: No Arg
   * Locale:  (default)
   * ===
   */
  %>
  
  
  

  
  
  

  
  
  

  
  
  

  
  
  
  

  
  
  

  
  
  

  
  
  

  
  
  
  

default.bundle.message


  
  
  

default.bundle.message


  
  
  

default.bundle.message


  
  
  
  

default.bundle.message


  
  
  
  
  
  
  
  
  
  
  

alternate.bundle.message


  
  
  

alternate.bundle.message


  
  
  
    
    alternate.bundl

cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/bean/resources - New directory

2003-02-21 Thread jmitchell
jmitchell2003/02/21 18:56:06

  jakarta-struts/web/test/test/org/apache/struts/taglib/bean/resources - New directory

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/logic - New directory

2003-02-21 Thread jmitchell
jmitchell2003/02/21 18:55:51

  jakarta-struts/web/test/test/org/apache/struts/taglib/logic - New directory

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib/bean - New directory

2003-02-21 Thread jmitchell
jmitchell2003/02/21 18:55:37

  jakarta-struts/web/test/test/org/apache/struts/taglib/bean - New directory

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/web/test/test/org/apache/struts/taglib - New directory

2003-02-21 Thread jmitchell
jmitchell2003/02/21 18:54:53

  jakarta-struts/web/test/test/org/apache/struts/taglib - New directory

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/test/org/apache/struts/taglib SimpleBeanForTesting.java SimpleFormBeanForTesting.java

2003-02-21 Thread jmitchell
jmitchell2003/02/21 18:52:27

  Added:   src/test/org/apache/struts/taglib SimpleBeanForTesting.java
SimpleFormBeanForTesting.java
  Log:
  A few more items
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/SimpleBeanForTesting.java
  
  Index: SimpleBeanForTesting.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  
  package org.apache.struts.taglib;
  
  import java.util.Collection;
  import java.util.Enumeration;
  import java.util.List;
  import java.util.Map;
  
  /**
   * Simple bean for unit tests. 
   *
   * @author James Mitchell
   */
  public class SimpleBeanForTesting {
public SimpleBeanForTesting(){
super();
}
public SimpleBeanForTesting(List lst){
this.lst = lst;
}
public SimpleBeanForTesting(Map map){
this.map = map;
}
public SimpleBeanForTesting(String string){
this.string = string;
}
public SimpleBeanForTesting(Integer integerValue){
this.integerValue = integerValue;
}
  
private String string;  
private Integer integerValue;
private Double doubleValue;
private List lst;
private Map map;
private Object nestedObject;
private Object[] array;
private Enumeration enumeration;
private Collection collection;
  
/**
 * Returns the lst.
 * @return List
 */
public List getList() {
return lst;
}
  
/**
 * Returns the map.
 * @return Map
 */
public Map getMap() {
return map;
}
  
/**
 * Sets the lst.
 * @param lst The lst to set
 */
public void setList(List lst) {
this.lst = lst;
}
  
/**
 * Sets the map.
 * @param map The map to set
 */
public void setMap(Map map) {
this.map = map;
}
  
/**
 * Returns the string.
 * @return String
 */
public String getString

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic SimpleBeanForTesting.java

2003-02-21 Thread jmitchell
jmitchell2003/02/21 18:50:48

  Removed: src/test/org/apache/struts/taglib/logic
SimpleBeanForTesting.java
  Log:
  Moving this one level down

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/bean/resources AlternateApplicationResources.properties AlternateApplicationResources_fr.properties ApplicationResources.properties ApplicationResources_fr.properties

2003-02-21 Thread jmitchell
jmitchell2003/02/21 18:49:29

  Added:   src/test/org/apache/struts/taglib/bean/resources
AlternateApplicationResources.properties
AlternateApplicationResources_fr.properties
ApplicationResources.properties
ApplicationResources_fr.properties
  Log:
  New resources to help with tests for bean taglibs
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/resources/AlternateApplicationResources.properties
  
  Index: AlternateApplicationResources.properties
  ===
  alternate.bundle.message=Testing Message
  alternate.bundle.message.1=Testing Message {0}
  alternate.bundle.message.2=Testing Message {0} {1}
  alternate.bundle.message.3=Testing Message {0} {1} {2}
  alternate.bundle.message.4=Testing Message {0} {1} {2} {3}
  alternate.bundle.message.5=Testing Message {0} {1} {2} {3} {4}
  
  alternate.format=$###,###.##
  
  
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/resources/AlternateApplicationResources_fr.properties
  
  Index: AlternateApplicationResources_fr.properties
  ===
  alternate.bundle.message=Message D'Essai
  alternate.bundle.message.1=Message D'Essai {0}
  alternate.bundle.message.2=Message D'Essai {0} {1}
  alternate.bundle.message.3=Message D'Essai {0} {1} {2}
  alternate.bundle.message.4=Message D'Essai {0} {1} {2} {3}
  alternate.bundle.message.5=Message D'Essai {0} {1} {2} {3} {4}
  
  alternate.format=$###,###.###
  
  
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/resources/ApplicationResources.properties
  
  Index: ApplicationResources.properties
  ===
  default.bundle.message=Testing Message
  default.bundle.message.1=Testing Message {0}
  default.bundle.message.2=Testing Message {0} {1}
  default.bundle.message.3=Testing Message {0} {1} {2}
  default.bundle.message.4=Testing Message {0} {1} {2} {3}
  default.bundle.message.5=Testing Message {0} {1} {2} {3} {4}
  
  default.format=$###,###
  
  
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/bean/resources/ApplicationResources_fr.properties
  
  Index: ApplicationResources_fr.properties
  ===
  default.bundle.message=Message D'Essai
  default.bundle.message.1=Message D'Essai {0}
  default.bundle.message.2=Message D'Essai {0} {1}
  default.bundle.message.3=Message D'Essai {0} {1} {2}
  default.bundle.message.4=Message D'Essai {0} {1} {2} {3}
  default.bundle.message.5=Message D'Essai {0} {1} {2} {3} {4}
  
  default.format=$###,###.
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/bean/resources - New directory

2003-02-21 Thread jmitchell
jmitchell2003/02/21 18:48:21

  jakarta-struts/src/test/org/apache/struts/taglib/bean/resources - New directory

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/bean - New directory

2003-02-21 Thread jmitchell
jmitchell2003/02/21 18:46:23

  jakarta-struts/src/test/org/apache/struts/taglib/bean - New directory

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/logic package.html

2003-02-20 Thread rleland
rleland 2003/02/20 11:10:47

  Modified:src/share/org/apache/struts/taglib/logic package.html
  Log:
  Correct Link for equal tag to userGuide.
  
  Revision  ChangesPath
  1.14  +1 -1  
jakarta-struts/src/share/org/apache/struts/taglib/logic/package.html
  
  Index: package.html
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/package.html,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- package.html  29 Oct 2002 04:30:17 -  1.13
  +++ package.html  20 Feb 2003 19:10:47 -  1.14
  @@ -39,7 +39,7 @@
   body   of the tag if the comparison evaluates to true. 

   
  -   equal,
  +   equal,
notEqual
  
  greaterEqual
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html MessagesTag.java

2003-02-15 Thread martinc
martinc 2003/02/15 21:29:46

  Modified:src/share/org/apache/struts/taglib/html MessagesTag.java
  Log:
  If RequestUtils.message() returns null, don't call pageContext.setAttribute
  (since that is illegal), but call pageContext.removeAttribute instead.
  
  PR: 17016
  Submitted by: Nick Afshartous
  
  Revision  ChangesPath
  1.11  +13 -9 
jakarta-struts/src/share/org/apache/struts/taglib/html/MessagesTag.java
  
  Index: MessagesTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/MessagesTag.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- MessagesTag.java  15 Feb 2003 03:22:59 -  1.10
  +++ MessagesTag.java  16 Feb 2003 05:29:46 -  1.11
  @@ -261,12 +261,16 @@
   report.getKey(),
   report.getValues());
   
  -// log missing key to ease debugging
  -if (msg == null && log.isDebugEnabled()) {
  -log.debug(messageResources.getMessage("messageTag.resources", 
report.getKey()));
  -}
  +if (msg != null) {
  +pageContext.setAttribute(id, msg);
  +} else {
  +pageContext.removeAttribute(id);
   
  -pageContext.setAttribute(id, msg);
  +// log missing key to ease debugging
  +if (log.isDebugEnabled()) {
  +log.debug(messageResources.getMessage("messageTag.resources", 
report.getKey()));
  +}
  +}
   
   if (header != null && header.length() > 0) {
   String headerMessage = RequestUtils.message(pageContext, bundle, 
locale, header);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html MessagesTag.java

2003-02-14 Thread dgraham
dgraham 2003/02/14 19:22:59

  Modified:src/share/org/apache/struts/taglib/html MessagesTag.java
  Log:
  Made log variable private to prevent subclasses using it and generating
  confusing messages.
  
  Revision  ChangesPath
  1.10  +5 -6  
jakarta-struts/src/share/org/apache/struts/taglib/html/MessagesTag.java
  
  Index: MessagesTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/MessagesTag.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MessagesTag.java  14 Feb 2003 05:42:07 -  1.9
  +++ MessagesTag.java  15 Feb 2003 03:22:59 -  1.10
  @@ -98,9 +98,8 @@
   
   /**
* Commons Logging instance.
  - * @since Struts 1.1
*/
  -protected static Log log = LogFactory.getLog(MessagesTag.class);
  +private static Log log = LogFactory.getLog(MessagesTag.class);
   
   /**
* Iterator of the elements of this error collection, while we are actually
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/htmlMessagesTag.java

2003-02-14 Thread Robert Leland
David Graham wrote:

Sorry, I don't follow what you're saying.  Are you talking about the log 
variable being protected, using the wrong class in getLog(), using the 
wrong message key?

Close.

When I derive a class
class NewMessageTag extends Messagetag {

setMessage(String message) {
  super(message);
  log.debug('-message set-');
}

}

The logging output would look like:
Feb 14 2003 DEBUG org.apache.struts.taglib.html.MessageTag -message set-

This makes it look like the message is from MessageTag,
when actually NewMessageTag sent it.

In most cases you would probably want:
Feb 14 2003 DEBUG net.sf.free2create.taglib.NewMessageTag -message set-

It's true that nothing stops NewMessageTag from declaring its
own Log instance.

Example:
A guy here at my job swore he couldn't isolate the debugging,
to a class. It was pretty easy to track down he was using
a logging statement was cut and pasted from another class, which
had the classname hard coded in the LogFactory() statement.

It is a matter of taste and balancing the number of objects created vs 
avoiding inaccurate logs.

-Rob


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/htmlMessagesTag.java

2003-02-14 Thread David Graham
Sorry, I don't follow what you're saying.  Are you talking about the log 
variable being protected, using the wrong class in getLog(), using the wrong 
message key?

David



From: Robert Leland <[EMAIL PROTECTED]>
Reply-To: "Struts Developers List" <[EMAIL PROTECTED]>
To: Struts Developers List <[EMAIL PROTECTED]>
Subject: Re: cvs commit: 
jakarta-struts/src/share/org/apache/struts/taglib/html MessagesTag.java
Date: Fri, 14 Feb 2003 13:15:55 -0500

[EMAIL PROTECTED] wrote:
   /**
  + * Commons Logging instance.
  + * @since Struts 1.1
  + */
  +protected static Log log = LogFactory.getLog(MessagesTag.class);



By sharing thge logger errors will look like they are coming
from MessageTag instead of any derived class. Additionally,
there is no way to selectively show the logging only for
the derived class.

-Rob


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/htmlMessagesTag.java

2003-02-14 Thread Robert Leland
[EMAIL PROTECTED] wrote:

   /**
  + * Commons Logging instance.
  + * @since Struts 1.1
  + */
  +protected static Log log = LogFactory.getLog(MessagesTag.class);



By sharing thge logger errors will look like they are coming
from MessageTag instead of any derived class. Additionally,
there is no way to selectively show the logging only for
the derived class.

-Rob


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html MessagesTag.java

2003-02-13 Thread dgraham
dgraham 2003/02/13 21:42:07

  Modified:src/share/org/apache/struts/taglib/html MessagesTag.java
  Log:
  Added debug log for missing resource key.  PR# 17050.
  
  Revision  ChangesPath
  1.9   +51 -32
jakarta-struts/src/share/org/apache/struts/taglib/html/MessagesTag.java
  
  Index: MessagesTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/MessagesTag.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MessagesTag.java  30 Jan 2003 06:22:01 -  1.8
  +++ MessagesTag.java  14 Feb 2003 05:42:07 -  1.9
  @@ -7,7 +7,7 @@
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -66,9 +66,12 @@
   import javax.servlet.jsp.JspException;
   import javax.servlet.jsp.tagext.BodyTagSupport;
   
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   import org.apache.struts.Globals;
   import org.apache.struts.action.ActionMessage;
   import org.apache.struts.action.ActionMessages;
  +import org.apache.struts.action.ActionServlet;
   import org.apache.struts.util.MessageResources;
   import org.apache.struts.util.RequestUtils;
   import org.apache.struts.util.ResponseUtils;
  @@ -94,6 +97,12 @@
  MessageResources.getMessageResources(Constants.Package + ".LocalStrings");
   
   /**
  + * Commons Logging instance.
  + * @since Struts 1.1
  + */
  +protected static Log log = LogFactory.getLog(MessagesTag.class);
  +
  +/**
* Iterator of the elements of this error collection, while we are actually
* running.
   */
  @@ -224,8 +233,9 @@
   // Were any messages specified?
   ActionMessages messages = null;
   
  -if (message != null && "true".equalsIgnoreCase(message))
  -   name = Globals.MESSAGE_KEY;
  +if (message != null && "true".equalsIgnoreCase(message)) {
  +name = Globals.MESSAGE_KEY;
  +}
   
   try {
   messages = RequestUtils.getActionMessages(pageContext, name);
  @@ -235,36 +245,45 @@
   }
   
   // Acquire the collection we are going to iterate over
  -if (property == null)
  +if (property == null) {
   iterator = messages.get();
  -else
  +} else {
   iterator = messages.get(property);
  +}
   
  -// Store the first value and evaluate, or skip the body if none
  -if (iterator.hasNext()) {
  -   ActionMessage report = (ActionMessage)iterator.next();
  -   String msg = RequestUtils.message(pageContext, bundle,
  - locale, report.getKey(),
  - report.getValues());
  -
  -   pageContext.setAttribute(id, msg);
  -
  -   if (header != null && header.length() > 0) {
  -  String headerMessage = RequestUtils.message(pageContext, bundle,
  - locale, header);
  -  if (headerMessage != null) {
  - // Print the results to our output writer
  - ResponseUtils.write(pageContext, headerMessage);
  -  }
  -   }
  -
  -   // Set the processed variable to true so the
  -   // doEndTag() knows processing took place
  -   processed = true;
  +// Store the first value and evaluate, or skip the body if none
  +if (iterator.hasNext()) {
  +ActionMessage report = (ActionMessage) iterator.next();
  +String msg =
  +RequestUtils.message(
  +pageContext,
  +bundle,
  +locale,
  +report.getKey(),
  +report.getValues());
  +
  +// log missing key to ease debugging
  +if (msg == null && log.isDebugEnabled()) {
  +log.debug(messageResources.getMessage("messageTag.resources", 
report.getKey()));
  +}
  +
  +pageContext.setAttribute(id, msg);
  +
  +if (header != null && header.length() > 0) {
  +String headerMessage = RequestUtils.message(pageContext, bundle, 
locale, header);
  +if (headerMessage != null) {
  +// Print the results to our output writer
  +ResponseUtils.write(pageContext, headerMessage);
  +}
  +}
  +
  +// Set the processed variable to true so the
  

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic SimpleBeanForTesting.java TestEmptyTag.java TestGreaterEqualTag.java TestLessEqualTag.java TestLessThanTag.java TestGreaterThanTag.java

2003-02-06 Thread jmitchell
jmitchell2003/02/06 16:32:06

  Modified:src/test/org/apache/struts/taglib/logic
TestGreaterThanTag.java
  Added:   src/test/org/apache/struts/taglib/logic
SimpleBeanForTesting.java TestEmptyTag.java
TestGreaterEqualTag.java TestLessEqualTag.java
TestLessThanTag.java
  Log:
  Adding more test cases.  Almost finished with all the logic tags.
  
  Revision  ChangesPath
  1.2   +159 -15   
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestGreaterThanTag.java
  
  Index: TestGreaterThanTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestGreaterThanTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestGreaterThanTag.java   6 Feb 2003 04:36:30 -   1.1
  +++ TestGreaterThanTag.java   7 Feb 2003 00:32:06 -   1.2
  @@ -70,12 +70,13 @@
* @author James Mitchell
*/
   public class TestGreaterThanTag extends JspTestCase {
  + 
   protected final static String COOKIE_KEY = 
"org.apache.struts.taglib.logic.COOKIE_KEY";
  -protected final static String COOKIE_VAL = "5";
   protected final static String HEADER_KEY = 
"org.apache.struts.taglib.logic.HEADER_KEY";
  -protected final static String HEADER_VAL = "5";
   protected final static String PARAMETER_KEY = 
"org.apache.struts.taglib.logic.PARAMETER_KEY";
  -protected final static String PARAMETER_VAL = "5";
  +protected final static String GREATER_VAL = "6";
  +protected final static String LESSER_VAL = "4";
  +
   
   /**
* Defines the testcase name for JUnit.
  @@ -110,21 +111,21 @@
* Create cookie for testCookiePresent method test.
   */
   public void beginCookieGreaterThan(WebRequest testRequest) {
  -   testRequest.addCookie(COOKIE_KEY, COOKIE_VAL);
  +   testRequest.addCookie(COOKIE_KEY, GREATER_VAL);
   }
   
   /**
* Create header for testHeaderGreaterThan method test.
   */
   public void beginHeaderGreaterThan(WebRequest testRequest) {
  -   testRequest.addHeader(HEADER_KEY, HEADER_VAL);
  +   testRequest.addHeader(HEADER_KEY, GREATER_VAL);
   }
   
   /**
* Create header for testParameterGreaterThan method test.
   */
   public void beginParameterGreaterThan(WebRequest testRequest) {
  -   testRequest.addParameter(PARAMETER_KEY, PARAMETER_VAL);
  +   testRequest.addParameter(PARAMETER_KEY, GREATER_VAL);
   }
   
   /**
  @@ -132,13 +133,12 @@
   */
   public void testCookieGreaterThan() throws ServletException,  JspException {
   GreaterThanTag gt = new GreaterThanTag();
  -String testVal = "4";
   gt.setPageContext(pageContext);
   gt.setCookie(COOKIE_KEY);
  -gt.setValue(testVal);
  +gt.setValue(LESSER_VAL);
   
   assertTrue(
  - "Cookie Value (" + COOKIE_VAL + ") is greater than test value (" + 
testVal + ")", 
  + "Cookie Value (" + GREATER_VAL + ") is greater than value (" + 
LESSER_VAL + ")", 
gt.condition());
   }
   
  @@ -147,13 +147,12 @@
   */
   public void testHeaderGreaterThan() throws ServletException,  JspException {
   GreaterThanTag gt = new GreaterThanTag();
  -String testVal = "4";
   gt.setPageContext(pageContext);
   gt.setHeader(HEADER_KEY);
  -gt.setValue(testVal);
  +gt.setValue(LESSER_VAL);
   
   assertTrue(
  - "Header Value (" + HEADER_VAL + ") is greater than test value (" + 
testVal + ")", 
  + "Header Value (" + GREATER_VAL + ") is greater than value (" + 
LESSER_VAL + ")", 
gt.condition());
   }
   
  @@ -162,15 +161,160 @@
   */
   public void testParameterGreaterThan() throws ServletException,  JspException {
   GreaterThanTag gt = new GreaterThanTag();
  -String testVal = "4";
   gt.setPageContext(pageContext);
   gt.setParameter(PARAMETER_KEY);
  -gt.setValue(testVal);
  +gt.setValue(LESSER_VAL);
  +
  +assertTrue(
  + "Parameter Value (" + GREATER_VAL + ") is greater than value (" + 
LESSER_VAL + ")", 
  + gt.condition());
  +}
  +
  +
  +/**
  + * Testing GreaterThanTag using name attribute in
  + * the application scope.
  +*/
  +public void testApplicationScopeNameGreaterThan() 
  + throws ServletException,  JspException {
  +
  +GreaterThanTag gt

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestPresentTag.java

2003-02-05 Thread jmitchell
jmitchell2003/02/05 20:38:31

  Modified:src/test/org/apache/struts/taglib/logic TestPresentTag.java
  Log:
  God, if I could just get everything right the first time!!!
  
  Revision  ChangesPath
  1.13  +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java
  
  Index: TestPresentTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TestPresentTag.java   6 Feb 2003 04:22:45 -   1.12
  +++ TestPresentTag.java   6 Feb 2003 04:38:31 -   1.13
  @@ -305,7 +305,7 @@
public void testRequestScopePropertyNotPresent()
throws ServletException, JspException {
PresentTag pt = new PresentTag();
  - String testKey = "testRequestScopePropertyPresent";
  + String testKey = "testRequestScopePropertyNotPresent";

String testStringValue = null;
LabelValueBean lvb = new LabelValueBean("The Key", testStringValue);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestGreaterThanTag.java

2003-02-05 Thread jmitchell
jmitchell2003/02/05 20:36:30

  Added:   src/test/org/apache/struts/taglib/logic
TestGreaterThanTag.java
  Log:
  Adding more tests for taglibs. (this one is not complete yet, just wanted to get it 
in before hitting the sack)
  
  I hope to have every single tag and every combination of attributes
  covered by the 1.2 release.
  
  If anyone sees that I'm doing this wrong, please let me know so we can keep
  this as clean as possible.
  
  Revision  ChangesPath
  1.1  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestGreaterThanTag.java
  
  Index: TestGreaterThanTag.java
  ===
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   "This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/)."
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Struts", and "Apache Software
   *Foundation" must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.struts.taglib.logic;
  
  import javax.servlet.ServletException;
  import javax.servlet.jsp.JspException;
  import javax.servlet.jsp.PageContext;
  import junit.framework.Test;
  import junit.framework.TestSuite;
  import org.apache.cactus.JspTestCase;
  import org.apache.cactus.WebRequest;
  import org.apache.struts.util.LabelValueBean;
  
  /**
   * Suite of unit tests for the
   * org.apache.struts.taglib.logic.GreaterThanTag class.
   *
   * @author James Mitchell
   */
  public class TestGreaterThanTag extends JspTestCase {
  protected final static String COOKIE_KEY = 
"org.apache.struts.taglib.logic.COOKIE_KEY";
  protected final static String COOKIE_VAL = "5";
  protected final static String HEADER_KEY = 
"org.apache.struts.taglib.logic.HEADER_KEY";
  protected final static String HEADER_VAL = "5";
  protected final static String PARAMETER_KEY = 
"org.apache.struts.taglib.logic.PARAMETER_KEY";
  protected final static String PARAMETER_VAL = "5";
  
  /**
   * Defines the testcase name for JUnit.
   *
   * @param theName the testcase's name.
   */
  public TestGreaterThanTag(String theName) {
  super(theName);
  }
  
  /**
   * Start the tests.
   *
   * @param theArgs the arguments. Not used
   */
  public static void main(String[] theArgs) {
  junit.awtui.TestRunner.main(new String[] 
{TestGreaterThanTa

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestPresentTag.java

2003-02-05 Thread jmitchell
jmitchell2003/02/05 20:22:45

  Modified:src/test/org/apache/struts/taglib/logic TestPresentTag.java
  Log:
  A few more tests and fix existing one.
  
  Revision  ChangesPath
  1.12  +55 -6 
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java
  
  Index: TestPresentTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TestPresentTag.java   5 Feb 2003 06:26:41 -   1.11
  +++ TestPresentTag.java   6 Feb 2003 04:22:45 -   1.12
  @@ -53,7 +53,7 @@
*
*/
   package org.apache.struts.taglib.logic;
  -
  + 
   import javax.servlet.ServletException;
   import javax.servlet.jsp.JspException;
   import javax.servlet.jsp.PageContext;
  @@ -245,18 +245,20 @@
pt.setScope("application");

pt.setProperty("value");
  - assertEquals("Property Value present (not null)", true, 
pt.condition(true));
  + assertEquals("Property present (not null)", true, pt.condition(true));
}
   
/**
  -  * Verify that there is an application scope object is not in scope using the 
PresentTag.
  +  * Verify that there is a LabelValueBean in application scope 
  +  * and test to see if it has a getValue() that returns null 
  +  * using the PresentTag.
*/
public void testApplicationScopePropertyNotPresent()
throws ServletException, JspException {
PresentTag pt = new PresentTag();
  - String testKey = "testApplicationScopePropertyNotPresent";
  + String testKey = "testApplicationScopePropertyPresent";

  - String testStringValue = null; //"The Value";
  + String testStringValue = null;
LabelValueBean lvb = new LabelValueBean("The Key", testStringValue);

pageContext.setAttribute(
  @@ -268,10 +270,57 @@
pt.setScope("application");

pt.setProperty("value");
  - assertEquals("Property Value not present (null)", true, 
pt.condition(true));
  + assertEquals("Property present (not null)", false, pt.condition(true));
  + }
  +
  + /**
  +  * Verify that there is a LabelValueBean in Request scope 
  +  * and test to see if it has a getValue() using the PresentTag.
  + */
  + public void testRequestScopePropertyPresent()
  + throws ServletException, JspException {
  + PresentTag pt = new PresentTag();
  + String testKey = "testRequestScopePropertyPresent";

  + String testStringValue = "The Value";
  + LabelValueBean lvb = new LabelValueBean("The Key", testStringValue);
  + 
  + pageContext.setAttribute(
  + testKey,
  + lvb,
  + PageContext.REQUEST_SCOPE);
  + pt.setPageContext(pageContext);
  + pt.setName(testKey);
  + pt.setScope("request");
  + 
  + pt.setProperty("value");
  + assertEquals("Property present (not null)", true, pt.condition(true));
}
   
  + /**
  +  * Verify that there is a LabelValueBean in Request scope 
  +  * and test to see if it has a getValue() that returns null 
  +  * using the PresentTag.
  + */
  + public void testRequestScopePropertyNotPresent()
  + throws ServletException, JspException {
  + PresentTag pt = new PresentTag();
  + String testKey = "testRequestScopePropertyPresent";
  + 
  + String testStringValue = null;
  + LabelValueBean lvb = new LabelValueBean("The Key", testStringValue);
  + 
  + pageContext.setAttribute(
  + testKey,
  + lvb,
  + PageContext.REQUEST_SCOPE);
  + pt.setPageContext(pageContext);
  + pt.setName(testKey);
  + pt.setScope("request");
  + 
  + pt.setProperty("value");
  + assertEquals("Property present (not null)", false, pt.condition(true));
  + }
   
   /**
* Create cookie for testCookiePresent method test.
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/nested NestedPropertyHelper.java

2003-02-05 Thread arron
arron   2003/02/05 16:26:11

  Modified:src/share/org/apache/struts/taglib/nested
NestedPropertyHelper.java
  Log:
  Committed patch Bug15799, reported and patched by David Morris.
  IDEA also told me to remove a redundant class cast
  ( ...a fashionable thing to do it seems :)
  
  Revision  ChangesPath
  1.12  +19 -11
jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedPropertyHelper.java
  
  Index: NestedPropertyHelper.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedPropertyHelper.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- NestedPropertyHelper.java 16 Nov 2002 07:07:07 -  1.11
  +++ NestedPropertyHelper.java 6 Feb 2003 00:26:11 -   1.12
  @@ -65,6 +65,7 @@
   import javax.servlet.jsp.tagext.Tag;
   
   import org.apache.struts.taglib.html.FormTag;
  +import org.apache.struts.taglib.html.Constants;
   
   /** A simple helper class that does everything that needs to be done to get the
* nested tag extension to work. Knowing what tags can define the lineage of
  @@ -209,14 +210,18 @@
 public static String getNestedNameProperty(NestedTagSupport tag) {
   
   Tag namedTag = (Tag)tag;
  -
  +String defaultName = null;
   // see if we're already in the right location
   if (namedTag instanceof NestedNameSupport) {
String name = ((NestedNameSupport)namedTag).getName();
  - // return if we already have a name
  - if (name != null) {
  -   return name;
  - }
  +// return if we already have a name and not just default
  +if (name != null) {
  +if (name.equals(Constants.BEAN_KEY)) {
  +defaultName = name;
  +} else {
  +return name;
  +}
  +}
   }
   
   /* loop all parent tags until we get one which
  @@ -228,7 +233,10 @@
 !(namedTag instanceof NestedParentSupport) );
   
   if (namedTag == null) {
  -  // need to spit some chips
  +if (defaultName != null) {
  +return defaultName;
  +}
  +// now there's an issue
   }
   
   String nameTemp = null;
  @@ -251,7 +259,7 @@
   
   /* get and set the relative property */
   String property = getNestedProperty(tag);
  -((NestedPropertySupport)tag).setProperty(property);
  +tag.setProperty(property);
  
   /* if the tag implements NestedNameSupport, set the name for the tag also */
   if (tag instanceof NestedNameSupport && property != null) {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestPresentTag.java

2003-02-04 Thread James Turner
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, February 05, 2003 1:27 AM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: 
> jakarta-struts/src/test/org/apache/struts/taglib/logic 
> TestPresentTag.java
> 
> 
> jmitchell2003/02/04 22:26:41
> 
>   Modified:    src/test/org/apache/struts/taglib/logic 
> TestPresentTag.java
>   Log:
>   Oops...again.
>   

Ok, ok, I confess!  I stole the statue!  I did it, just me!  There, I
admit it!  Just please, please, don't modify that poor innocent file
again!

Major :-)

James Turner
Owner & Manager, Black Bear Software, LLC
[EMAIL PROTECTED]

Author: 
MySQL & JSP Web Applications: 
Data Driven Programming Using Tomcat and MySQL
ISBN 0672323095; Sams, 2002

Co-Author: 
Struts Kick Start
ISBN 0672324725; Sams, 2002

Forthcoming:
JavaServer Faces Kick Start 
Sams, Fall 2003


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, February 05, 2003 1:27 AM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: 
> jakarta-struts/src/test/org/apache/struts/taglib/logic 
> TestPresentTag.java
> 
> 
> jmitchell2003/02/04 22:26:41
> 
>   Modified:src/test/org/apache/struts/taglib/logic 
> TestPresentTag.java
>   Log:
>   Oops...again.
>   
>   Revision  ChangesPath
>   1.11  +3 -2  
> jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPre
> sentTag.java
>   
>   Index: TestPresentTag.java
>   =======
>   RCS file: 
> /home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/log
> ic/TestPresentTag.java,v
>   retrieving revision 1.10
>   retrieving revision 1.11
>   diff -u -r1.10 -r1.11
>   --- TestPresentTag.java 5 Feb 2003 05:55:35 -   1.10
>   +++ TestPresentTag.java 5 Feb 2003 06:26:41 -   1.11
>   @@ -55,7 +55,7 @@
>package org.apache.struts.taglib.logic;
>
>import javax.servlet.ServletException;
>   -import javax.servlet.jsp.JspException
>   +import javax.servlet.jsp.JspException;
>import javax.servlet.jsp.PageContext;
>import junit.framework.Test;
>import junit.framework.TestSuite;
>   @@ -68,6 +68,7 @@
> * org.apache.struts.taglib.logic.PresentTag class.
> *
> * @author David Winterfeldt
>   + * @author James Mitchell
> */
>public class TestPresentTag extends JspTestCase {
>protected final static String COOKIE_KEY = 
> "org.apache.struts.taglib.logic.COOKIE_KEY";
>   @@ -222,7 +223,7 @@
>   
>assertEquals("Value not present (null)", false, 
> pt.condition(true));
>}
>   -  
>   +   
>   /**
>* Verify that there is a LabelValueBean in application scope 
>* and test to see if it has a getValue() using the 
> PresentTag.
>   
>   
>   
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestPresentTag.java

2003-02-04 Thread jmitchell
jmitchell2003/02/04 22:26:41

  Modified:src/test/org/apache/struts/taglib/logic TestPresentTag.java
  Log:
  Oops...again.
  
  Revision  ChangesPath
  1.11  +3 -2  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java
  
  Index: TestPresentTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TestPresentTag.java   5 Feb 2003 05:55:35 -   1.10
  +++ TestPresentTag.java   5 Feb 2003 06:26:41 -   1.11
  @@ -55,7 +55,7 @@
   package org.apache.struts.taglib.logic;
   
   import javax.servlet.ServletException;
  -import javax.servlet.jsp.JspException
  +import javax.servlet.jsp.JspException;
   import javax.servlet.jsp.PageContext;
   import junit.framework.Test;
   import junit.framework.TestSuite;
  @@ -68,6 +68,7 @@
* org.apache.struts.taglib.logic.PresentTag class.
*
* @author David Winterfeldt
  + * @author James Mitchell
*/
   public class TestPresentTag extends JspTestCase {
   protected final static String COOKIE_KEY = 
"org.apache.struts.taglib.logic.COOKIE_KEY";
  @@ -222,7 +223,7 @@

   assertEquals("Value not present (null)", false, pt.condition(true));
   }
  -  
  +   
/**
 * Verify that there is a LabelValueBean in application scope 
 * and test to see if it has a getValue() using the PresentTag.
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestPresentTag.java

2003-02-04 Thread jmitchell
jmitchell2003/02/04 21:55:35

  Modified:src/test/org/apache/struts/taglib/logic TestPresentTag.java
  Log:
  OopsParameter...Property...hey, at least they start with the same letter.
  
  Revision  ChangesPath
  1.10  +8 -8  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java
  
  Index: TestPresentTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestPresentTag.java   5 Feb 2003 05:41:29 -   1.9
  +++ TestPresentTag.java   5 Feb 2003 05:55:35 -   1.10
  @@ -227,10 +227,10 @@
 * Verify that there is a LabelValueBean in application scope 
 * and test to see if it has a getValue() using the PresentTag.
*/
  - public void testApplicationScopeParameterPresent()
  + public void testApplicationScopePropertyPresent()
throws ServletException, JspException {
PresentTag pt = new PresentTag();
  - String testKey = "testApplicationScopeParameterPresent";
  + String testKey = "testApplicationScopePropertyPresent";

String testStringValue = "The Value";
LabelValueBean lvb = new LabelValueBean("The Key", testStringValue);
  @@ -243,17 +243,17 @@
pt.setName(testKey);
pt.setScope("application");

  - pt.setParameter("value");
  - assertEquals("Parameter Value present (not null)", true, 
pt.condition(true));
  + pt.setProperty("value");
  + assertEquals("Property Value present (not null)", true, 
pt.condition(true));
}
   
/**
 * Verify that there is an application scope object is not in scope using the 
PresentTag.
*/
  - public void testApplicationScopeParameterNotPresent()
  + public void testApplicationScopePropertyNotPresent()
throws ServletException, JspException {
PresentTag pt = new PresentTag();
  - String testKey = "testApplicationScopeParameterNotPresent";
  + String testKey = "testApplicationScopePropertyNotPresent";

String testStringValue = null; //"The Value";
LabelValueBean lvb = new LabelValueBean("The Key", testStringValue);
  @@ -266,8 +266,8 @@
pt.setName(testKey);
pt.setScope("application");

  - pt.setParameter("value");
  - assertEquals("Parameter Value not present (null)", true, 
pt.condition(true));
  + pt.setProperty("value");
  + assertEquals("Property Value not present (null)", true, 
pt.condition(true));

}
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestPresentTag.java

2003-02-04 Thread jmitchell
jmitchell2003/02/04 21:41:29

  Modified:src/test/org/apache/struts/taglib/logic TestPresentTag.java
  Log:
  Ok, I think that last save took care of it.
  Now to clean up what Eclipse did to it.
  
  Revision  ChangesPath
  1.9   +18 -17
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java
  
  Index: TestPresentTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestPresentTag.java   5 Feb 2003 05:31:42 -   1.8
  +++ TestPresentTag.java   5 Feb 2003 05:41:29 -   1.9
  @@ -55,6 +55,7 @@
   package org.apache.struts.taglib.logic;
   
   import javax.servlet.ServletException;
  +import javax.servlet.jsp.JspException
   import javax.servlet.jsp.PageContext;
   import junit.framework.Test;
   import junit.framework.TestSuite;
  @@ -105,7 +106,7 @@
   /**
* Verify that there is an application scope object in scope using the 
PresentTag.
   */
  -public void testApplicationScopeObjectPresent() throws ServletException,  
javax.servlet.jsp.JspException {
  +public void testApplicationScopeObjectPresent() throws ServletException,  
JspException {
   PresentTag pt = new PresentTag();
   String testKey = "testApplicationScopePresent";
   String testStringValue = "abc";
  @@ -121,7 +122,7 @@
   /**
* Verify that there is an application scope object is not in scope using the 
PresentTag.
   */
  -public void testApplicationScopeObjectNotPresent() throws ServletException,  
javax.servlet.jsp.JspException {
  +public void testApplicationScopeObjectNotPresent() throws ServletException,  
JspException {
   PresentTag pt = new PresentTag();
   String testKey = "testApplicationScopeNotPresent";
   
  @@ -135,7 +136,7 @@
   /**
* Verify that there is an session scope object in scope using the 
PresentTag.
   */
  -public void testSessionScopeObjectPresent() throws ServletException,  
javax.servlet.jsp.JspException {
  +public void testSessionScopeObjectPresent() throws ServletException,  
JspException {
   PresentTag pt = new PresentTag();
   String testKey = "testSessionScopePresent";
   String testStringValue = "abc";
  @@ -151,7 +152,7 @@
   /**
* Verify that there is an session scope object is not in scope using the 
PresentTag.
   */
  -public void testSessionScopeObjectNotPresent() throws ServletException,  
javax.servlet.jsp.JspException {
  +public void testSessionScopeObjectNotPresent() throws ServletException,  
JspException {
   PresentTag pt = new PresentTag();
   String testKey = "testSessionScopeNotPresent";
   
  @@ -165,7 +166,7 @@
   /**
* Verify that there is an request scope object in scope using the 
PresentTag.
   */
  -public void testRequestScopeObjectPresent() throws ServletException,  
javax.servlet.jsp.JspException {
  +public void testRequestScopeObjectPresent() throws ServletException,  
JspException {
   PresentTag pt = new PresentTag();
   String testKey = "testRequestScopePresent";
   String testStringValue = "abc";
  @@ -181,7 +182,7 @@
   /**
* Verify that there is an request scope object is not in scope using the 
PresentTag.
   */
  -public void testRequestScopeObjectNotPresent() throws ServletException,  
javax.servlet.jsp.JspException {
  +public void testRequestScopeObjectNotPresent() throws ServletException,  
JspException {
   PresentTag pt = new PresentTag();
   String testKey = "testRequestScopeNotPresent";
   
  @@ -195,7 +196,7 @@
   /**
* Verify that there is an page scope object in scope using the 
PresentTag.
   */
  -public void testPageScopeObjectPresent() throws ServletException,  
javax.servlet.jsp.JspException {
  +public void testPageScopeObjectPresent() throws ServletException,  JspException 
{
   PresentTag pt = new PresentTag();
   String testKey = "testPageScopePresent";
   String testStringValue = "abc";
  @@ -211,7 +212,7 @@
   /**
* Verify that there is an page scope object is not in scope using the 
PresentTag.
   */
  -public void testPageScopeObjectNotPresent() throws ServletException,  
javax.servlet.jsp.JspException {
  +public void testPageScopeObjectNotPresent() throws ServletException,  
JspException {
   PresentTag pt = new PresentTag();
   String testKey = "testPageScopeNotPresent";
   
  @@ -221,13 +222,13 @@

   assertEquals("Value not present (null)", false, pt.condition(true));
   }
  

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestPresentTag.java

2003-02-04 Thread jmitchell
jmitchell2003/02/04 21:31:42

  Modified:src/test/org/apache/struts/taglib/logic TestPresentTag.java
  Log:
  This file was saved last on a Mac, so I'm trying to convert to Unix ANSI.
  
  Revision  ChangesPath
  1.8   +367 -1
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java
  
  Index: TestPresentTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestPresentTag.java   5 Feb 2003 05:27:21 -   1.7
  +++ TestPresentTag.java   5 Feb 2003 05:31:42 -   1.8
  @@ -1 +1,367 @@
  -/*
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999-2001 The 
Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in 
source and binary forms, with or without
 * modification, are permitted provided that 
the following conditions
 * are met:
 *
 * 1. Redistributions of source code must 
retain the above copyright
 *notice, this list of conditions and the following 
disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in
 *the 
documentation and/or other materials provided with the
 *distribution.
 *
 * 3. 
The end-user documentation included with the redistribution, if
 *any, must 
include the following acknowlegement:
 *   "This product includes software 
developed by the
 *Apache Software Foundation (http://www.apache.org/)."
 *
Alternately, this acknowlegement may appear in the software itself,
 *if and 
wherever such third-party acknowlegements normally appear.
 *
 * 4. The names "The 
Jakarta Project", "Struts", and "Apache Software
 *Foundation" must not be used to 
endorse or promote products derived
 *from this software without prior written 
permission. For written
 *permission, please contact [EMAIL PROTECTED]
 *
 * 5. 
Products derived from this software may not be called "Apache"
 *nor may "Apache" 
appear in their names without prior written
 *permission of the Apache Group.
 *
 
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, 
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND 
FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE 
SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * 
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR 
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, 
WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
POSSIBILITY OF
 * SUCH DAMAGE.
 * 

 *
 * This 
software consists of voluntary contributions made by many
 * individuals on behalf of 
the Apache Software Foundation.  For more
 * information on the Apache Software 
Foundation, please see
 * <http://www.apache.org/>.
 *
 */
package 
org.apache.struts.taglib.logic;

import javax.servlet.ServletException;
import 
javax.servlet.jsp.PageContext;
import junit.framework.Test;
import 
junit.framework.TestSuite;
import org.apache.cactus.JspTestCase;
import 
org.apache.cactus.WebRequest;
import org.apache.struts.util.LabelValueBean;

/**
 * 
Suite of unit tests for the
 * org.apache.struts.taglib.logic.PresentTag 
class.
 *
 * @author David Winterfeldt
 */
public class TestPresentTag extends 
JspTestCase {
protected final static String COOKIE_KEY = 
"org.apache.struts.taglib.logic.COOKIE_KEY";
protected final static String 
HEADER_KEY = "org.apache.struts.taglib.logic.HEADER_KEY";
protected final static 
String PARAMETER_KEY = "org.apache.struts.taglib.logic.PARAMETER_KEY";

/**
 * 
Defines the testcase name for JUnit.
 *
 * @param theName the testcase's name.
 */
public TestPresentTag(String theName) {
super(theName);
}

/**
 * Start the tests.
 *
 * @param theArgs the arguments. Not used
 
*/
public static void main(String[] theArgs) {
junit.awtui.TestRunner.main(new String[] {TestPresentTag.class.getName()});
}

/**
 * @return a test suite (TestSuite) that includes all methods
 * starting with "test"
 */
public static Test suite() {
// 
All methods starting with "test" will be executed in the test suite.
return 
new TestSuite(TestPresentTag.class);
}

//-

Re: cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestPresentTag.java

2003-02-04 Thread James Mitchell
hr.now this is getting more interesting by the minute.  Think I'll
try to force the issue.

--
James Mitchell





- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 05, 2003 12:27 AM
Subject: cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic
TestPresentTag.java


> jmitchell2003/02/04 21:27:21
>
>   Modified:src/test/org/apache/struts/taglib/logic TestPresentTag.java
>   Log:
>   Added 2 new tests:
>   testApplicationScopeParameterPresent
>   testApplicationScopeParameterNotPresent
>
>   Revision  ChangesPath
>   1.7   +1 -1
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java
>
>   Index: TestPresentTag.java
>   ===
>   RCS file:
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresent
Tag.java,v
>   retrieving revision 1.6
>   retrieving revision 1.7
>   diff -u -r1.6 -r1.7
>   --- TestPresentTag.java 5 Feb 2003 05:20:45 - 1.6
>   +++ TestPresentTag.java 5 Feb 2003 05:27:21 - 1.7
>   @@ -1 +1 @@
>   -/* * The Apache Software License, Version 1.1 * * Copyright (c)
1999-2001 The Apache Software Foundation.  All rights * reserved. * *
Redistribution and use in source and binary forms, with or without *
modification, are permitted provided that the following conditions * are
met: * * 1. Redistributions of source code must retain the above copyright *
notice, this list of conditions and the following disclaimer. * * 2.
Redistributions in binary form must reproduce the above copyright *
notice, this list of conditions and the following disclaimer in *the
documentation and/or other materials provided with the *distribution. *
* 3. The end-user documentation included with the redistribution, if *
any, must include the following acknowlegement: *   "This product
includes software developed by the *Apache Software Foundation
(http://www.apache.org/)." *Alternately, this acknowlegement may appear
in the software itself, *if and wherever such third-party
acknowlegements normally appear. * * 4. The names "The Jakarta Project",
"Struts", and "Apache Software *Foundation" must not be used to endorse
or promote products derived *from this software without prior written
permission. For written *permission, please contact [EMAIL PROTECTED] *
* 5. Products derived from this software may not be called "Apache" *nor
may "Apache" appear in their names without prior written *permission of
the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED
OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *
 * *
This software consists of voluntary contributions made by many * individuals
on behalf of the Apache Software Foundation.  For more * information on the
Apache Software Foundation, please see * <http://www.apache.org/>. *
*/package org.apache.struts.taglib.logic;import
javax.servlet.ServletException;import javax.servlet.jsp.PageContext;import
junit.framework.Test;import junit.framework.TestSuite;import
org.apache.cactus.JspTestCase;import org.apache.cactus.WebRequest;/** *
Suite of unit tests for the *
org.apache.struts.taglib.logic.PresentTag class. * * @author
David Winterfeldt */public class TestPresentTag extends JspTestCase {
protected final static String COOKIE_KEY =
"org.apache.struts.taglib.logic.COOKIE_KEY";protected final static
String HEADER_KEY = "org.apache.struts.taglib.logic.HEADER_KEY";
protected final static String PARAMETER_KEY =
"org.apache.struts.taglib.logic.PARAMETER_KEY";/** * Defines the
testcase name for JUnit. * * @param theName the testcase's name.
*/public TestPresentTag(String theName) {super(theName);}
/** * Start the tests. * * @param theArgs the arguments. Not
used */public static void main(String[] theArgs) {
junit.awtui.TestRunner.main(new String[]
stPresentTag.class.getName()});}/** * @return a test suite
(TestSuite) that includes all methods * 

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestPresentTag.java

2003-02-04 Thread jmitchell
jmitchell2003/02/04 21:27:21

  Modified:src/test/org/apache/struts/taglib/logic TestPresentTag.java
  Log:
  Added 2 new tests:
  testApplicationScopeParameterPresent
  testApplicationScopeParameterNotPresent
  
  Revision  ChangesPath
  1.7   +1 -1  
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java
  
  Index: TestPresentTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestPresentTag.java   5 Feb 2003 05:20:45 -   1.6
  +++ TestPresentTag.java   5 Feb 2003 05:27:21 -   1.7
  @@ -1 +1 @@
  -/*
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999-2001 The 
Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in 
source and binary forms, with or without
 * modification, are permitted provided that 
the following conditions
 * are met:
 *
 * 1. Redistributions of source code must 
retain the above copyright
 *notice, this list of conditions and the following 
disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in
 *the 
documentation and/or other materials provided with the
 *distribution.
 *
 * 3. 
The end-user documentation included with the redistribution, if
 *any, must 
include the following acknowlegement:
 *   "This product includes software 
developed by the
 *Apache Software Foundation (http://www.apache.org/)."
 *
Alternately, this acknowlegement may appear in the software itself,
 *if and 
wherever such third-party acknowlegements normally appear.
 *
 * 4. The names "The 
Jakarta Project", "Struts", and "Apache Software
 *Foundation" must not be used to 
endorse or promote products derived
 *from this software without prior written 
permission. For written
 *permission, please contact [EMAIL PROTECTED]
 *
 * 5. 
Products derived from this software may not be called "Apache"
 *nor may "Apache" 
appear in their names without prior written
 *permission of the Apache Group.
 *
 
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, 
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND 
FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE 
SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * 
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR 
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, 
WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
POSSIBILITY OF
 * SUCH DAMAGE.
 * 

 *
 * This 
software consists of voluntary contributions made by many
 * individuals on behalf of 
the Apache Software Foundation.  For more
 * information on the Apache Software 
Foundation, please see
 * <http://www.apache.org/>.
 *
 */
package 
org.apache.struts.taglib.logic;

import javax.servlet.ServletException;
import 
javax.servlet.jsp.PageContext;
import junit.framework.Test;
import 
junit.framework.TestSuite;
import org.apache.cactus.JspTestCase;
import 
org.apache.cactus.WebRequest;

/**
 * Suite of unit tests for the
 * 
org.apache.struts.taglib.logic.PresentTag class.
 *
 * @author David 
Winterfeldt
 */
public class TestPresentTag extends JspTestCase {
protected final 
static String COOKIE_KEY = "org.apache.struts.taglib.logic.COOKIE_KEY";
protected 
final static String HEADER_KEY = "org.apache.struts.taglib.logic.HEADER_KEY";
protected final static String PARAMETER_KEY = 
"org.apache.struts.taglib.logic.PARAMETER_KEY";

/**
 * Defines the testcase 
name for JUnit.
 *
 * @param theName the testcase's name.
 */
public 
TestPresentTag(String theName) {
super(theName);
}

/**
 * Start 
the tests.
 *
 * @param theArgs the arguments. Not used
 */
public 
static void main(String[] theArgs) {
junit.awtui.TestRunner.main(new String[] 
{TestPresentTag.class.getName()});
}

/**
 * @return a test suite 
(TestSuite) that includes all methods
 * starting with "test"
 */
public static Test suite() {
// All methods starting with "test" 
will be executed in the test suite.
return new 
TestSuite(TestPresentTag.class);
}

//- Test initApplication() 

cvs commit: jakarta-struts/src/test/org/apache/struts/taglib/logic TestPresentTag.java

2003-02-04 Thread jmitchell
jmitchell2003/02/04 21:20:45

  Modified:src/test/org/apache/struts/taglib/logic TestPresentTag.java
  Log:
  Remove windoze-to-unix-to-mac-to-whatever-you-call-it extra carriage return line 
feed.
  
  No code changes..yet.
  
  Revision  ChangesPath
  1.6   +1 -312
jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java
  
  Index: TestPresentTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestPresentTag.java   16 Nov 2002 04:58:48 -  1.5
  +++ TestPresentTag.java   5 Feb 2003 05:20:45 -   1.6
  @@ -1,312 +1 @@
  -/*
  - * The Apache Software License, Version 1.1
  - *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  - * reserved.
  - *
  - * Redistribution and use in source and binary forms, with or without
  - * modification, are permitted provided that the following conditions
  - * are met:
  - *
  - * 1. Redistributions of source code must retain the above copyright
  - *notice, this list of conditions and the following disclaimer.
  - *
  - * 2. Redistributions in binary form must reproduce the above copyright
  - *notice, this list of conditions and the following disclaimer in
  - *the documentation and/or other materials provided with the
  - *distribution.
  - *
  - * 3. The end-user documentation included with the redistribution, if
  - *any, must include the following acknowlegement:
  - *   "This product includes software developed by the
  - *Apache Software Foundation (http://www.apache.org/)."
  - *Alternately, this acknowlegement may appear in the software itself,
  - *if and wherever such third-party acknowlegements normally appear.
  - *
  - * 4. The names "The Jakarta Project", "Struts", and "Apache Software
  - *Foundation" must not be used to endorse or promote products derived
  - *from this software without prior written permission. For written
  - *permission, please contact [EMAIL PROTECTED]
  - *
  - * 5. Products derived from this software may not be called "Apache"
  - *nor may "Apache" appear in their names without prior written
  - *permission of the Apache Group.
  - *
  - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  - * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  - * SUCH DAMAGE.
  - * 
  - *
  - * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  - *
  - */
  -package org.apache.struts.taglib.logic;
  -
  -import javax.servlet.ServletException;
import javax.servlet.jsp.PageContext;
import 
junit.framework.Test;
import junit.framework.TestSuite;

import 
org.apache.cactus.JspTestCase;
import org.apache.cactus.WebRequest;
  -
  -/**
  - * Suite of unit tests for the
  - * org.apache.struts.taglib.logic.PresentTag class.
  - *
  - * @author David Winterfeldt
  - */
  -public class TestPresentTag extends JspTestCase {
  -protected final static String COOKIE_KEY = 
"org.apache.struts.taglib.logic.COOKIE_KEY";
  -protected final static String HEADER_KEY = 
"org.apache.struts.taglib.logic.HEADER_KEY";
  -protected final static String PARAMETER_KEY = 
"org.apache.struts.taglib.logic.PARAMETER_KEY";
  -
  -/**
  - * Defines the testcase name for JUnit.
  - *
  - * @param theName the testcase's name.
  - */
  -public TestPresentTag(String theName) {
  -super(theName);
  -}
  -
  -/**
  - * Start the tests.
  - *
  - * @param theArgs the arguments. Not used
  - */
  -public static void main(String[] theArgs) {
  -junit.awtui.TestRunner.main(new String[] {TestPresentTag.class.getName()});
  -}
  -
  -/

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/tiles InsertTag.java

2003-02-01 Thread dgraham
dgraham 2003/02/01 07:42:44

  Modified:src/share/org/apache/struts/taglib/tiles InsertTag.java
  Log:
  javadoc update.
  
  Revision  ChangesPath
  1.10  +8 -9  
jakarta-struts/src/share/org/apache/struts/taglib/tiles/InsertTag.java
  
  Index: InsertTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/InsertTag.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- InsertTag.java29 Dec 2002 21:31:02 -  1.9
  +++ InsertTag.java1 Feb 2003 15:42:44 -   1.10
  @@ -7,7 +7,7 @@
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -83,16 +83,15 @@
   import org.apache.struts.tiles.DefinitionAttribute;
   import org.apache.struts.tiles.DefinitionNameAttribute;
   import org.apache.struts.tiles.DefinitionsFactoryException;
  -//import org.apache.struts.tiles.DefinitionsUtil;
   import org.apache.struts.tiles.TilesUtil;
   import org.apache.struts.tiles.DirectStringAttribute;
   import org.apache.struts.tiles.FactoryNotFoundException;
   import org.apache.struts.tiles.NoSuchDefinitionException;
   
   /**
  - * This is the tag handler for <template:insert>, which includes
  - * a template. The tag's body content consists of <template:put>
  - * tags, which are accessed by <template:get> in the template.
  + * This is the tag handler for <tiles:insert>, which includes
  + * a template. The tag's body content consists of <tiles:put>
  + * tags, which are accessed by <tiles:get> in the template.
*
* @author David Geary
* @author Cedric Dumoulin
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/tiles GetTag.java

2003-02-01 Thread dgraham
dgraham 2003/02/01 07:38:37

  Modified:src/share/org/apache/struts/taglib/tiles GetTag.java
  Log:
  javadoc update.
  
  Revision  ChangesPath
  1.3   +5 -8  
jakarta-struts/src/share/org/apache/struts/taglib/tiles/GetTag.java
  
  Index: GetTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/GetTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GetTag.java   16 Nov 2002 04:46:05 -  1.2
  +++ GetTag.java   1 Feb 2003 15:38:37 -   1.3
  @@ -7,7 +7,7 @@
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -62,11 +62,8 @@
   
   package org.apache.struts.taglib.tiles;
   
  -
  -
  -
   /**
  - * This is the tag handler for <template:get>, which gets
  + * This is the tag handler for <tiles:get>, which gets
* content from the request scope and either includes the content or prints
* it, depending upon the value of the content's direct attribute.
*
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




<    1   2   3   4   5   6   7   8   >