craigmcc 01/04/18 16:51:35
Modified: src/share/org/apache/struts/taglib/html BaseFieldTag.java
FormTag.java OptionsTag.java RewriteTag.java
TextareaTag.java
Log:
Eliminate the remaining cases where tags were not calling
ResponseUtils.write() to render their output.
Revision Changes Path
1.6 +7 -13
jakarta-struts/src/share/org/apache/struts/taglib/html/BaseFieldTag.java
Index: BaseFieldTag.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseFieldTag.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- BaseFieldTag.java 2001/04/03 19:23:15 1.5
+++ BaseFieldTag.java 2001/04/18 23:51:30 1.6
@@ -1,13 +1,13 @@
/*
- * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseFieldTag.java,v
1.5 2001/04/03 19:23:15 craigmcc Exp $
- * $Revision: 1.5 $
- * $Date: 2001/04/03 19:23:15 $
+ * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseFieldTag.java,v
1.6 2001/04/18 23:51:30 craigmcc Exp $
+ * $Revision: 1.6 $
+ * $Date: 2001/04/18 23:51:30 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,7 +29,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 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]
@@ -80,7 +80,7 @@
* Convenience base class for the various input tags for text fields.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.5 $ $Date: 2001/04/03 19:23:15 $
+ * @version $Revision: 1.6 $ $Date: 2001/04/18 23:51:30 $
*/
public abstract class BaseFieldTag extends BaseInputTag {
@@ -228,13 +228,7 @@
results.append(">");
// Print this field to our output writer
- JspWriter writer = pageContext.getOut();
- try {
- writer.print(results.toString());
- } catch (IOException e) {
- throw new JspException
- (messages.getMessage("common.io", e.toString()));
- }
+ ResponseUtils.write(pageContext, results.toString());
// Continue processing this page
return (EVAL_BODY_TAG);
1.9 +5 -11
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.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- FormTag.java 2001/04/03 18:06:18 1.8
+++ FormTag.java 2001/04/18 23:51:30 1.9
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java,v 1.8
2001/04/03 18:06:18 craigmcc Exp $
- * $Revision: 1.8 $
- * $Date: 2001/04/03 18:06:18 $
+ * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/FormTag.java,v 1.9
2001/04/18 23:51:30 craigmcc Exp $
+ * $Revision: 1.9 $
+ * $Date: 2001/04/18 23:51:30 $
*
* ====================================================================
*
@@ -85,7 +85,7 @@
* properties correspond to the various fields of the form.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.8 $ $Date: 2001/04/03 18:06:18 $
+ * @version $Revision: 1.9 $ $Date: 2001/04/18 23:51:30 $
*/
public class FormTag extends TagSupport {
@@ -499,13 +499,7 @@
}
// Print this field to our output writer
- JspWriter writer = pageContext.getOut();
- try {
- writer.print(results.toString());
- } catch (IOException e) {
- throw new JspException
- (messages.getMessage("common.io", e.toString()));
- }
+ ResponseUtils.write(pageContext, results.toString());
// Store this tag itself as a page attribute
pageContext.setAttribute(Constants.FORM_KEY, this);
1.5 +4 -8
jakarta-struts/src/share/org/apache/struts/taglib/html/OptionsTag.java
Index: OptionsTag.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/OptionsTag.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- OptionsTag.java 2001/03/31 22:39:31 1.4
+++ OptionsTag.java 2001/04/18 23:51:31 1.5
@@ -67,6 +67,7 @@
import org.apache.struts.util.IteratorAdapter;
import org.apache.struts.util.MessageResources;
import org.apache.struts.util.PropertyUtils;
+import org.apache.struts.util.ResponseUtils;
import java.util.Arrays;
import java.util.Collection;
import java.util.Enumeration;
@@ -250,14 +251,9 @@
}
// Render this element to our writer
- JspWriter writer = pageContext.getOut();
- try {
- writer.print(sb.toString());
- }
- catch (IOException e) {
- throw new JspException
- (messages.getMessage("common.io", e.toString()));
- }
+ ResponseUtils.write(pageContext, sb.toString());
+
+ // Evaluate the remainder of this page
return EVAL_PAGE;
}
1.3 +8 -15
jakarta-struts/src/share/org/apache/struts/taglib/html/RewriteTag.java
Index: RewriteTag.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/RewriteTag.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RewriteTag.java 2001/04/03 19:19:00 1.2
+++ RewriteTag.java 2001/04/18 23:51:32 1.3
@@ -1,13 +1,13 @@
/*
- * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/RewriteTag.java,v 1.2
2001/04/03 19:19:00 craigmcc Exp $
- * $Revision: 1.2 $
- * $Date: 2001/04/03 19:19:00 $
+ * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/RewriteTag.java,v 1.3
2001/04/18 23:51:32 craigmcc Exp $
+ * $Revision: 1.3 $
+ * $Date: 2001/04/18 23:51:32 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,7 +29,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 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]
@@ -79,13 +79,14 @@
import org.apache.struts.action.ActionForwards;
import org.apache.struts.util.BeanUtils;
import org.apache.struts.util.MessageResources;
+import org.apache.struts.util.ResponseUtils;
/**
* Generate a URL-encoded URI as a string.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.2 $ $Date: 2001/04/03 19:19:00 $
+ * @version $Revision: 1.3 $ $Date: 2001/04/18 23:51:32 $
*/
public class RewriteTag extends LinkTag {
@@ -108,15 +109,7 @@
results.append(response.encodeURL(hyperlink()));
// Print this element to our output writer
- JspWriter writer = pageContext.getOut();
- try {
- writer.print(results.toString());
- } catch (IOException e) {
- pageContext.setAttribute(Action.EXCEPTION_KEY, e,
- PageContext.REQUEST_SCOPE);
- throw new JspException
- (messages.getMessage("common.io", e.toString()));
- }
+ ResponseUtils.write(pageContext, results.toString());
// Skip the body of this tag
return (SKIP_BODY);
1.4 +7 -13
jakarta-struts/src/share/org/apache/struts/taglib/html/TextareaTag.java
Index: TextareaTag.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/TextareaTag.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TextareaTag.java 2001/04/03 19:23:15 1.3
+++ TextareaTag.java 2001/04/18 23:51:32 1.4
@@ -1,13 +1,13 @@
/*
- * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/TextareaTag.java,v
1.3 2001/04/03 19:23:15 craigmcc Exp $
- * $Revision: 1.3 $
- * $Date: 2001/04/03 19:23:15 $
+ * $Header:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/TextareaTag.java,v
1.4 2001/04/18 23:51:32 craigmcc Exp $
+ * $Revision: 1.4 $
+ * $Date: 2001/04/18 23:51:32 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,7 +29,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 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]
@@ -78,7 +78,7 @@
* Custom tag for input fields of type "textarea".
*
* @author Craig R. McClanahan
- * @version $Revision: 1.3 $ $Date: 2001/04/03 19:23:15 $
+ * @version $Revision: 1.4 $ $Date: 2001/04/18 23:51:32 $
*/
public class TextareaTag extends BaseInputTag {
@@ -167,13 +167,7 @@
results.append("</textarea>");
// Print this field to our output writer
- JspWriter writer = pageContext.getOut();
- try {
- writer.print(results.toString());
- } catch (IOException e) {
- throw new JspException
- (messages.getMessage("common.io", e.toString()));
- }
+ ResponseUtils.write(pageContext, results.toString());
// Continue processing this page
return (EVAL_BODY_TAG);