You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by rl...@apache.org on 2003/07/27 09:13:05 UTC
cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/logic CompareTagBase.java EmptyTag.java ForwardTag.java IterateTag.java MatchTag.java
rleland 2003/07/27 00:13:05
Modified: src/share/org/apache/struts/taglib/html BaseHandlerTag.java
ErrorsTag.java ImageTag.java ImgTag.java
MessagesTag.java OptionTag.java
OptionsCollectionTag.java RewriteTag.java
SelectTag.java
src/share/org/apache/struts/taglib/logic CompareTagBase.java
EmptyTag.java ForwardTag.java IterateTag.java
MatchTag.java
Log:
Update tags to use TagUtils. methods..
Revision Changes Path
1.32 +6 -6 jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java
Index: BaseHandlerTag.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- BaseHandlerTag.java 26 Jul 2003 19:11:57 -0000 1.31
+++ BaseHandlerTag.java 27 Jul 2003 07:13:04 -0000 1.32
@@ -567,7 +567,7 @@
if (key != null) {
JspException e =
new JspException(messages.getMessage("common.both"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
} else {
return (literal);
@@ -680,7 +680,7 @@
// this tag should only be nested in iteratetag, if it's not, throw exception
JspException e =
new JspException(messages.getMessage("indexed.noEnclosingIterate"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
1.26 +5 -6 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.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- ErrorsTag.java 26 Jul 2003 19:05:31 -0000 1.25
+++ ErrorsTag.java 27 Jul 2003 07:13:04 -0000 1.26
@@ -72,7 +72,6 @@
import org.apache.struts.action.ActionErrors;
import org.apache.struts.taglib.TagUtils;
import org.apache.struts.util.MessageResources;
-import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.ResponseUtils;
/**
@@ -187,7 +186,7 @@
try {
errors = TagUtils.getInstance().getActionErrors(pageContext, name);
} catch (JspException e) {
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
1.27 +8 -9 jakarta-struts/src/share/org/apache/struts/taglib/html/ImageTag.java
Index: ImageTag.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImageTag.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- ImageTag.java 26 Jul 2003 19:11:57 -0000 1.26
+++ ImageTag.java 27 Jul 2003 07:13:04 -0000 1.27
@@ -70,7 +70,6 @@
import org.apache.struts.Globals;
import org.apache.struts.config.ModuleConfig;
import org.apache.struts.taglib.TagUtils;
-import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.ResponseUtils;
@@ -307,7 +306,7 @@
(this.pageKey != null)) {
JspException e = new JspException
(messages.getMessage("imgTag.src"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
ModuleConfig config = (ModuleConfig)
@@ -327,7 +326,7 @@
if ((this.src != null) || (this.srcKey != null)) {
JspException e = new JspException
(messages.getMessage("imgTag.src"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
ModuleConfig config = (ModuleConfig)
@@ -359,7 +358,7 @@
if (this.srcKey != null) {
JspException e = new JspException
(messages.getMessage("imgTag.src"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
return (this.src);
@@ -369,7 +368,7 @@
if (this.srcKey == null) {
JspException e = new JspException
(messages.getMessage("imgTag.src"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
1.30 +10 -10 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.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- ImgTag.java 26 Jul 2003 19:11:57 -0000 1.29
+++ ImgTag.java 27 Jul 2003 07:13:04 -0000 1.30
@@ -522,7 +522,7 @@
if (this.page != null) {
if ((this.src != null) || (this.srcKey != null) || (this.pageKey != null)) {
JspException e = new JspException(messages.getMessage("imgTag.src"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
ModuleConfig config =
@@ -539,7 +539,7 @@
if (this.pageKey != null) {
if ((this.src != null) || (this.srcKey != null)) {
JspException e = new JspException(messages.getMessage("imgTag.src"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
ModuleConfig config =
@@ -569,7 +569,7 @@
if (this.src != null) {
if (this.srcKey != null) {
JspException e = new JspException(messages.getMessage("imgTag.src"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
return (this.src);
@@ -578,7 +578,7 @@
// Deal with an indirect source that has been specified
if (this.srcKey == null) {
JspException e = new JspException(messages.getMessage("imgTag.src"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
@@ -624,7 +624,7 @@
// Just return the URL if there is no bean to look up
if ((property != null) && (name == null)) {
JspException e = new JspException(messages.getMessage("getter.name"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
@@ -638,7 +638,7 @@
try {
map = (Map) mapObject;
} catch (ClassCastException e) {
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw new JspException(messages.getMessage("imgTag.type"));
}
1.18 +5 -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.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- MessagesTag.java 26 Jul 2003 19:11:57 -0000 1.17
+++ MessagesTag.java 27 Jul 2003 07:13:04 -0000 1.18
@@ -239,7 +239,7 @@
try {
messages = RequestUtils.getActionMessages(pageContext, name);
} catch (JspException e) {
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
1.21 +5 -6 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.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- OptionTag.java 26 Jul 2003 19:11:57 -0000 1.20
+++ OptionTag.java 27 Jul 2003 07:13:04 -0000 1.21
@@ -69,7 +69,6 @@
import org.apache.struts.Globals;
import org.apache.struts.taglib.TagUtils;
import org.apache.struts.util.MessageResources;
-import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.ResponseUtils;
/**
@@ -325,7 +324,7 @@
JspException e =
new JspException(messages.getMessage("optionTag.select"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
1.11 +12 -13 jakarta-struts/src/share/org/apache/struts/taglib/html/OptionsCollectionTag.java
Index: OptionsCollectionTag.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/OptionsCollectionTag.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- OptionsCollectionTag.java 26 Jul 2003 17:22:27 -0000 1.10
+++ OptionsCollectionTag.java 27 Jul 2003 07:13:04 -0000 1.11
@@ -74,7 +74,6 @@
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.collections.IteratorUtils;
import org.apache.struts.util.MessageResources;
-import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.ResponseUtils;
import org.apache.struts.taglib.TagUtils;
@@ -212,7 +211,7 @@
if (selectTag == null) {
JspException e = new JspException(messages.getMessage("optionsCollectionTag.select"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
@@ -222,7 +221,7 @@
if (collection == null) {
JspException e =
new JspException(messages.getMessage("optionsCollectionTag.collection"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
@@ -247,18 +246,18 @@
} catch (IllegalAccessException e) {
JspException jspe =
new JspException(messages.getMessage("getter.access", label, bean));
- RequestUtils.saveException(pageContext, jspe);
+ TagUtils.getInstance().saveException(pageContext, jspe);
throw jspe;
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
JspException jspe =
new JspException(messages.getMessage("getter.result", label, t.toString()));
- RequestUtils.saveException(pageContext, jspe);
+ TagUtils.getInstance().saveException(pageContext, jspe);
throw jspe;
} catch (NoSuchMethodException e) {
JspException jspe =
new JspException(messages.getMessage("getter.method", label, bean));
- RequestUtils.saveException(pageContext, jspe);
+ TagUtils.getInstance().saveException(pageContext, jspe);
throw jspe;
}
@@ -271,18 +270,18 @@
} catch (IllegalAccessException e) {
JspException jspe =
new JspException(messages.getMessage("getter.access", value, bean));
- RequestUtils.saveException(pageContext, jspe);
+ TagUtils.getInstance().saveException(pageContext, jspe);
throw jspe;
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
JspException jspe =
new JspException(messages.getMessage("getter.result", value, t.toString()));
- RequestUtils.saveException(pageContext, jspe);
+ TagUtils.getInstance().saveException(pageContext, jspe);
throw jspe;
} catch (NoSuchMethodException e) {
JspException jspe =
new JspException(messages.getMessage("getter.method", value, bean));
- RequestUtils.saveException(pageContext, jspe);
+ TagUtils.getInstance().saveException(pageContext, jspe);
throw jspe;
}
1.13 +5 -6 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.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- RewriteTag.java 27 Jul 2003 06:30:10 -0000 1.12
+++ RewriteTag.java 27 Jul 2003 07:13:04 -0000 1.13
@@ -64,7 +64,6 @@
import java.net.MalformedURLException;
import java.util.Map;
import javax.servlet.jsp.JspException;
-import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.ResponseUtils;
import org.apache.struts.taglib.TagUtils;
@@ -110,7 +109,7 @@
this.isXhtml());
} catch (MalformedURLException e) {
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw new JspException
(messages.getMessage("rewrite.url", e.toString()));
}
1.17 +8 -9 jakarta-struts/src/share/org/apache/struts/taglib/html/SelectTag.java
Index: SelectTag.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/SelectTag.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- SelectTag.java 26 Jul 2003 17:22:27 -0000 1.16
+++ SelectTag.java 27 Jul 2003 07:13:04 -0000 1.17
@@ -65,7 +65,6 @@
import javax.servlet.jsp.JspException;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.struts.util.MessageResources;
-import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.ResponseUtils;
import org.apache.struts.taglib.TagUtils;
@@ -302,7 +301,7 @@
JspException e =
new JspException(messages.getMessage("getter.bean", name));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
@@ -313,18 +312,18 @@
}
} catch (IllegalAccessException e) {
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw new JspException(
messages.getMessage("getter.access", property, name));
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
- RequestUtils.saveException(pageContext, t);
+ TagUtils.getInstance().saveException(pageContext, t);
throw new JspException(
messages.getMessage("getter.result", property, t.toString()));
} catch (NoSuchMethodException e) {
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw new JspException(
messages.getMessage("getter.method", property, name));
}
1.11 +8 -9 jakarta-struts/src/share/org/apache/struts/taglib/logic/CompareTagBase.java
Index: CompareTagBase.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/CompareTagBase.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- CompareTagBase.java 26 Jul 2003 17:22:28 -0000 1.10
+++ CompareTagBase.java 27 Jul 2003 07:13:04 -0000 1.11
@@ -69,7 +69,6 @@
import javax.servlet.jsp.JspException;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.struts.util.MessageResources;
-import org.apache.struts.util.RequestUtils;
import org.apache.struts.taglib.TagUtils;
@@ -221,7 +220,7 @@
if (bean == null) {
JspException e = new JspException
(messages.getMessage("logic.bean", name));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
try {
@@ -230,12 +229,12 @@
Throwable t = e.getTargetException();
if (t == null)
t = e;
- RequestUtils.saveException(pageContext, t);
+ TagUtils.getInstance().saveException(pageContext, t);
throw new JspException
(messages.getMessage("logic.property", name, property,
t.toString()));
} catch (Throwable t) {
- RequestUtils.saveException(pageContext, t);
+ TagUtils.getInstance().saveException(pageContext, t);
throw new JspException
(messages.getMessage("logic.property", name, property,
t.toString()));
@@ -249,7 +248,7 @@
} else {
JspException e = new JspException
(messages.getMessage("logic.selector"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
if (variable == null) {
1.10 +5 -7 jakarta-struts/src/share/org/apache/struts/taglib/logic/EmptyTag.java
Index: EmptyTag.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/EmptyTag.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- EmptyTag.java 26 Jul 2003 17:22:28 -0000 1.9
+++ EmptyTag.java 27 Jul 2003 07:13:04 -0000 1.10
@@ -65,8 +65,6 @@
import java.util.Map;
import javax.servlet.jsp.JspException;
-
-import org.apache.struts.util.RequestUtils;
import org.apache.struts.taglib.TagUtils;
/**
@@ -113,7 +111,7 @@
if (this.name == null) {
JspException e =
new JspException(messages.getMessage("empty.noNameAttribute"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
1.18 +7 -8 jakarta-struts/src/share/org/apache/struts/taglib/logic/ForwardTag.java
Index: ForwardTag.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/ForwardTag.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ForwardTag.java 26 Jul 2003 01:22:31 -0000 1.17
+++ ForwardTag.java 27 Jul 2003 07:13:04 -0000 1.18
@@ -70,7 +70,6 @@
import org.apache.struts.config.ModuleConfig;
import org.apache.struts.taglib.TagUtils;
import org.apache.struts.util.MessageResources;
-import org.apache.struts.util.RequestUtils;
/**
* Perform a forward or redirect to a page that is looked up in the
@@ -136,7 +135,7 @@
if (forward == null) {
JspException e =
new JspException(messages.getMessage("forward.lookup", name));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
@@ -166,7 +165,7 @@
pageContext.forward(path);
} catch (Exception e) {
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw new JspException(
messages.getMessage("forward.forward", name, e.toString()));
}
@@ -193,7 +192,7 @@
response.sendRedirect(response.encodeRedirectURL(path));
} catch (Exception e) {
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw new JspException(
messages.getMessage("forward.redirect", name, e.toString()));
}
1.23 +6 -7 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.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- IterateTag.java 26 Jul 2003 17:22:28 -0000 1.22
+++ IterateTag.java 27 Jul 2003 07:13:05 -0000 1.23
@@ -74,7 +74,6 @@
import org.apache.commons.collections.IteratorUtils;
import org.apache.struts.util.MessageResources;
-import org.apache.struts.util.RequestUtils;
import org.apache.struts.util.ResponseUtils;
import org.apache.struts.taglib.TagUtils;
@@ -280,7 +279,7 @@
if (collection == null) {
JspException e = new JspException(messages.getMessage("iterate.collection"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
@@ -309,7 +308,7 @@
iterator = IteratorUtils.asIterator((Enumeration) collection);
} else {
JspException e = new JspException(messages.getMessage("iterate.iterator"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
1.11 +7 -8 jakarta-struts/src/share/org/apache/struts/taglib/logic/MatchTag.java
Index: MatchTag.java
===================================================================
RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/MatchTag.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- MatchTag.java 26 Jul 2003 17:22:28 -0000 1.10
+++ MatchTag.java 27 Jul 2003 07:13:05 -0000 1.11
@@ -66,7 +66,6 @@
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;
-import org.apache.struts.util.RequestUtils;
import org.apache.struts.taglib.TagUtils;
@@ -187,13 +186,13 @@
} else {
JspException e = new JspException
(messages.getMessage("logic.selector"));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
if (variable == null) {
JspException e = new JspException
(messages.getMessage("logic.variable", value));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
@@ -208,7 +207,7 @@
} else {
JspException e = new JspException
(messages.getMessage("logic.location", location));
- RequestUtils.saveException(pageContext, e);
+ TagUtils.getInstance().saveException(pageContext, e);
throw e;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org