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 08:30:10 UTC

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

rleland     2003/07/26 23:30:10

  Modified:    src/share/org/apache/struts/taglib/bean DefineTag.java
                        HeaderTag.java IncludeTag.java
               src/share/org/apache/struts/taglib/html LinkTag.java
                        RewriteTag.java
  Log:
  Update tags to use TagUtils. methods..
  
  Revision  Changes    Path
  1.23      +6 -7      jakarta-struts/src/share/org/apache/struts/taglib/bean/DefineTag.java
  
  Index: DefineTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/DefineTag.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- DefineTag.java	26 Jul 2003 17:22:27 -0000	1.22
  +++ DefineTag.java	27 Jul 2003 06:30:09 -0000	1.23
  @@ -69,7 +69,6 @@
   
   import org.apache.struts.taglib.TagUtils;
   import org.apache.struts.util.MessageResources;
  -import org.apache.struts.util.RequestUtils;
   
   
   /**
  @@ -258,7 +257,7 @@
           if (n != 1) {
               JspException e =
                   new JspException(messages.getMessage("define.value"));
  -            RequestUtils.saveException(pageContext, e);
  +            TagUtils.getInstance().saveException(pageContext, e);
               throw e;
           }
   
  @@ -273,7 +272,7 @@
           if (value == null) {
               JspException e =
                   new JspException(messages.getMessage("define.null"));
  -            RequestUtils.saveException(pageContext, e);
  +            TagUtils.getInstance().saveException(pageContext, e);
               throw e;
           }
   
  
  
  
  1.12      +8 -8      jakarta-struts/src/share/org/apache/struts/taglib/bean/HeaderTag.java
  
  Index: HeaderTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/HeaderTag.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- HeaderTag.java	14 Jul 2003 00:10:49 -0000	1.11
  +++ HeaderTag.java	27 Jul 2003 06:30:09 -0000	1.12
  @@ -69,7 +69,7 @@
   import javax.servlet.jsp.tagext.TagSupport;
   
   import org.apache.struts.util.MessageResources;
  -import org.apache.struts.util.RequestUtils;
  +import org.apache.struts.taglib.TagUtils;
   
   /**
    * Define a scripting variable based on the value(s) of the specified
  @@ -182,11 +182,11 @@
           if (headers.length == 0) {
               JspException e =
                   new JspException(messages.getMessage("header.get", name));
  -            RequestUtils.saveException(pageContext, e);
  +            TagUtils.getInstance().saveException(pageContext, e);
               throw e;
           }
           
  -        pageContext.setAttribute(id, (String[]) values.toArray(headers));
  +        pageContext.setAttribute(id, values.toArray(headers));
       }
   
       /**
  @@ -205,7 +205,7 @@
           if (value == null) {
               JspException e =
                   new JspException(messages.getMessage("header.get", name));
  -            RequestUtils.saveException(pageContext, e);
  +            TagUtils.getInstance().saveException(pageContext, e);
               throw e;
           }
           
  
  
  
  1.21      +5 -5      jakarta-struts/src/share/org/apache/struts/taglib/bean/IncludeTag.java
  
  Index: IncludeTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/IncludeTag.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- IncludeTag.java	26 Jul 2003 17:40:52 -0000	1.20
  +++ IncludeTag.java	27 Jul 2003 06:30:09 -0000	1.21
  @@ -228,7 +228,7 @@
                   url = new URL(urlString);
               }
           } catch (MalformedURLException e) {
  -            RequestUtils.saveException(pageContext, e);
  +            TagUtils.getInstance().saveException(pageContext, e);
               throw new JspException(messages.getMessage("include.url", e.toString()));
           }
   
  @@ -252,7 +252,7 @@
               // Connect to the requested resource
               conn.connect();
           } catch (Exception e) {
  -            RequestUtils.saveException(pageContext, e);
  +            TagUtils.getInstance().saveException(pageContext, e);
               throw new JspException(
                   messages.getMessage("include.open", url.toString(), e.toString()));
           }
  @@ -272,7 +272,7 @@
               }
               in.close();
           } catch (Exception e) {
  -            RequestUtils.saveException(pageContext, e);
  +            TagUtils.getInstance().saveException(pageContext, e);
               throw new JspException(
                   messages.getMessage("include.read", url.toString(), e.toString()));
           }
  
  
  
  1.30      +7 -7      jakarta-struts/src/share/org/apache/struts/taglib/html/LinkTag.java
  
  Index: LinkTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/LinkTag.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- LinkTag.java	26 Jul 2003 17:40:52 -0000	1.29
  +++ LinkTag.java	27 Jul 2003 06:30:10 -0000	1.30
  @@ -476,7 +476,7 @@
                  // 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;
              }
   
  @@ -493,10 +493,10 @@
   
           String url = null;
           try {
  -            url = RequestUtils.computeURL(pageContext, forward, href,
  +            url = TagUtils.getInstance().computeURL(pageContext, forward, href,
                                             page, action, params, anchor, false);
           } catch (MalformedURLException e) {
  -            RequestUtils.saveException(pageContext, e);
  +            TagUtils.getInstance().saveException(pageContext, e);
               throw new JspException
                   (messages.getMessage("rewrite.url", e.toString()));
           }
  
  
  
  1.12      +5 -5      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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- RewriteTag.java	26 Jul 2003 17:40:52 -0000	1.11
  +++ RewriteTag.java	27 Jul 2003 06:30:10 -0000	1.12
  @@ -98,7 +98,7 @@
               // Note that we're encoding the & character to & in XHTML mode only, 
               // otherwise the & is written as is to work in javascripts. 
   			url =
  -				RequestUtils.computeURL(
  +				TagUtils.getInstance().computeURL(
   					pageContext,
   					forward,
   					href,
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org