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

2004-02-18 Thread husted
husted  2004/02/18 18:43:14

  Modified:doc/userGuide struts-html.xml
   src/share/org/apache/struts/taglib/html ImgTag.java
  Log:
  Deprecate contextRelative attribute/property in img tag.
  
  Revision  ChangesPath
  1.76  +1 -0  jakarta-struts/doc/userGuide/struts-html.xml
  
  Index: struts-html.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/struts-html.xml,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- struts-html.xml   13 Feb 2004 11:07:54 -  1.75
  +++ struts-html.xml   19 Feb 2004 02:43:14 -  1.76
  @@ -2812,6 +2812,7 @@
   namecontextRelative/name
   requiredfalse/required
   rtexprvaluetrue/rtexprvalue
  +deprecatedUse module attribute instead; will be removed in a 
release afer 1.2.0./deprecated
  info
  pIf set to true, this anchors 
the image src at the
  application context rather than the 
module context when the
  
  
  
  1.39  +10 -4 
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.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- ImgTag.java   7 Feb 2004 15:55:02 -   1.38
  +++ ImgTag.java   19 Feb 2004 02:43:14 -  1.39
  @@ -121,13 +121,18 @@
 * rooted to the application context path
 * If 'false' or absent the image is rooted to the current
 * module's context path.
  +  * @deprecated Use module property instead; will be removed in a release after 
1.2.0.
 */
protected String contextRelative = null;
   
  + /** @deprecated Use module property instead; will be removed in a release 
after 1.2.0.
  +  */
public String getContextRelative() {
return (this.contextRelative);
}
   
  +/** @deprecated Use module property instead; will be removed in a release after 
1.2.0.
  + */
public void setContextRelative(String contextRelative) {
this.contextRelative = contextRelative;
}
  @@ -136,6 +141,7 @@
   /**
* Convenience method to return true if contextRelative set to true.
* @return True if contextRelative set to true
  + * @deprecated Use module property instead; will be removed in a release after 
1.2.0.
*/
   public boolean isContextRelativeSet() {
   return Boolean.valueOf(this.contextRelative).booleanValue();
  
  
  

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



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(amp;);
   }
   src.append(paramId);
   src.append('=');
  @@ -636,7 +636,7 @@
   Object value = map.get(key);
   if (value == null) {
   if (question) {
  -src.append('');
  +src.append(amp;);
   } 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(amp;);
   } else {
   src.append('?');
   question = true;
  @@ -660,7 +660,7 @@
   } else {
   
   if (question) {
  -src.append('');
  +src.append(amp;);
   } else {
   src.append('?');
   question = true;
  
  
  

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



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

2002-11-24 Thread dgraham
dgraham 2002/11/24 14:01:53

  Modified:src/share/org/apache/struts/taglib/html ImgTag.java
  Log:
  Replaced references to URLEncoder.encode() with RequestUtils.encodeURL().
  
  Revision  ChangesPath
  1.25  +10 -9 
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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- ImgTag.java   16 Nov 2002 06:05:21 -  1.24
  +++ ImgTag.java   24 Nov 2002 22:01:53 -  1.25
  @@ -61,17 +61,18 @@
   
   package org.apache.struts.taglib.html;
   
  -import java.net.URLEncoder;
   import java.util.Iterator;
   import java.util.Map;
  +
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.jsp.JspException;
  +
  +import org.apache.struts.Globals;
   import org.apache.struts.config.ModuleConfig;
   import org.apache.struts.util.MessageResources;
   import org.apache.struts.util.RequestUtils;
   import org.apache.struts.util.ResponseUtils;
  -import org.apache.struts.Globals;
   
   /**
* Generate an IMG tag to the specified image URI.
  @@ -601,7 +602,7 @@
   src.append('=');
   Object value = RequestUtils.lookup(pageContext, paramName, 
paramProperty, paramScope);
   if (value != null)
  -src.append(URLEncoder.encode(value.toString()));
  +src.append(RequestUtils.encodeURL(value.toString()));
   }
   
   // Just return the URL if there is no bean to look up
  @@ -650,7 +651,7 @@
   }
   src.append(key);
   src.append('=');
  -src.append(URLEncoder.encode(values[i]));
  +src.append(RequestUtils.encodeURL(values[i]));
   }
   } else {
   if (question)
  @@ -661,7 +662,7 @@
   }
   src.append(key);
   src.append('=');
  -src.append(URLEncoder.encode(value.toString()));
  +src.append(RequestUtils.encodeURL(value.toString()));
   }
   }
   
  
  
  

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




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

2002-11-24 Thread dgraham
dgraham 2002/11/24 14:04:07

  Modified:src/share/org/apache/struts/taglib/html ImgTag.java
  Log:
  Formatted code.
  
  Revision  ChangesPath
  1.26  +19 -14
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.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ImgTag.java   24 Nov 2002 22:01:53 -  1.25
  +++ ImgTag.java   24 Nov 2002 22:04:06 -  1.26
  @@ -586,18 +586,20 @@
*/
   protected String url(String url) throws JspException {
   
  -if (url == null)
  +if (url == null) {
   return (url);
  +}
   
   // Start with an unadorned URL as specified
   StringBuffer src = new StringBuffer(url);
   
   // Append a single-parameter name and value, if requested
   if ((paramId != null)  (paramName != null)) {
  -if (src.toString().indexOf('?')  0)
  +if (src.toString().indexOf('?')  0) {
   src.append('?');
  -else
  +} else {
   src.append('');
  +}
   src.append(paramId);
   src.append('=');
   Object value = RequestUtils.lookup(pageContext, paramName, 
paramProperty, paramScope);
  @@ -611,8 +613,10 @@
   RequestUtils.saveException(pageContext, e);
   throw e;
   }
  -if (name == null)
  +
  +if (name == null) {
   return (src.toString());
  +}
   
   // Look up the map we will be using
   Object mapObject = RequestUtils.lookup(pageContext, name, property, scope);
  @@ -631,9 +635,9 @@
   String key = (String) keys.next();
   Object value = map.get(key);
   if (value == null) {
  -if (question)
  +if (question) {
   src.append('');
  -else {
  +} else {
   src.append('?');
   question = true;
   }
  @@ -643,9 +647,9 @@
   } else if (value instanceof String[]) {
   String values[] = (String[]) value;
   for (int i = 0; i  values.length; i++) {
  -if (question)
  +if (question) {
   src.append('');
  -else {
  +} else {
   src.append('?');
   question = true;
   }
  @@ -654,9 +658,10 @@
   src.append(RequestUtils.encodeURL(values[i]));
   }
   } else {
  -if (question)
  +
  +if (question) {
   src.append('');
  -else {
  +} else {
   src.append('?');
   question = true;
   }
  
  
  

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




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

2002-11-01 Thread dgraham
dgraham 2002/11/01 16:28:12

  Modified:src/share/org/apache/struts/taglib/html ImgTag.java
  Log:
  deprecated lowsrc attribute, removed todo to add support for IE specific events,
  ran code formatter.
  
  Revision  ChangesPath
  1.21  +87 -132   
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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ImgTag.java   26 Oct 2002 15:08:16 -  1.20
  +++ ImgTag.java   2 Nov 2002 00:28:12 -   1.21
   -59,10 +59,8 
*
*/
   
  -
   package org.apache.struts.taglib.html;
   
  -
   import java.net.URLEncoder;
   import java.util.Iterator;
   import java.util.Map;
   -75,18 +73,13 
   import org.apache.struts.util.RequestUtils;
   import org.apache.struts.util.ResponseUtils;
   
  -
   /**
* Generate an IMG tag to the specified image URI.
* p
* TODO:
* ul
  - *   limake the strongalt/strong, strongsrc/strong, and
  + *   liMake the strongalt/strong, strongsrc/strong, and
*   stronglowsrc/strong settable from properties (for i18n)/li
  - *   lihandle strongonLoad/strong, strongonAbort/strong, and
  - *   strongonError/strong events (my JavaScript book is very old,
  - *   there may be more unsupported events in the past couple of IE
  - *   versions)
* /ul
*
* author Michael Westbay
   -96,10 +89,8 
   
   public class ImgTag extends BaseHandlerTag {
   
  -
   // - Properties
   
  -
   /**
* The property to specify where to align the image.
*/
   -113,7 +104,6 
   this.align = align;
   }
   
  -
   /**
* The border size around the image.
*/
   -127,7 +117,6 
   this.border = border;
   }
   
  -
   /**
* The image height.
*/
   -141,7 +130,6 
   this.height = height;
   }
   
  -
   /**
* The horizontal spacing around the image.
*/
   -155,7 +143,6 
   this.hspace = hspace;
   }
   
  -
   /**
* The image name for named images.
*/
   -169,7 +156,6 
   this.imageName = imageName;
   }
   
  -
   /**
* Server-side image map declaration.
*/
   -183,27 +169,30 
   this.ismap = ismap;
   }
   
  -
   /**
* The low resolution image source URI.
  + * deprecated This is not defined in the HTML 4.01 spec and will be removed in 
a
  + * future version of Struts.
*/
   protected String lowsrc = null;
   
  +/**
  + * deprecated This is not defined in the HTML 4.01 spec and will be removed in 
a
  + * future version of Struts.
  + */
   public String getLowsrc() {
  -return (this.lowsrc);
  +return (this.lowsrc);
   }
   
   public void setLowsrc(String lowsrc) {
  -this.lowsrc = lowsrc;
  +this.lowsrc = lowsrc;
   }
   
  -
   /**
* The message resources for this package.
*/
   protected static MessageResources messages =
  - MessageResources.getMessageResources(Constants.Package + .LocalStrings);
  -
  +MessageResources.getMessageResources(Constants.Package + .LocalStrings);
   
   /**
* The JSP bean name for query parameters.
   -211,14 +200,13 
   protected String name = null;
   
   public String getName() {
  -return (this.name);
  +return (this.name);
   }
   
   public void setName(String name) {
  -this.name = name;
  +this.name = name;
   }
   
  -
   /**
* The module-relative path, starting with a slash character, of the
* image to be displayed by this rendered tag.
   -233,7 +221,6 
   this.page = page;
   }
   
  -
   /**
* The message resources key under which we should look up the
* codepage/code attribute for this generated tag, if any.
   -248,7 +235,6 
   this.pageKey = pageKey;
   }
   
  -
   /**
* In situations where an image is dynamically generated (such as to create
* a chart graph), this specifies the single-parameter request parameter
   -264,7 +250,6 
   this.paramId = paramId;
   }
   
  -
   /**
* The single-parameter JSP bean name.
*/
   -278,7 +263,6 
   this.paramName = paramName;
   }
   
  -
   /**
* The single-parameter JSP bean property.
*/
   -292,7 +276,6 
   this.paramProperty = paramProperty;
   }
   
  -
   /**
* The single-parameter JSP bean scope.
*/
   -306,21 +289,19 
   this.paramScope = paramScope;
   }
   
  -
   /**
* The JSP bean property name for query parameters.

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

2002-01-21 Thread craigmcc

craigmcc02/01/21 17:18:07

  Modified:.build-webapp.xml build.xml
   src/share/org/apache/struts/action Action.java
ActionServlet.java
   src/share/org/apache/struts/taglib/html ImgTag.java
  Log:
  Add dependencies on commons-services.jar and commons-validator.jar, and
  copy them into the target/library directory.
  
  Clean up warnings when creating Javadocs for the core classes.
  
  Revision  ChangesPath
  1.8   +10 -0 jakarta-struts/build-webapp.xml
  
  Index: build-webapp.xml
  ===
  RCS file: /home/cvs/jakarta-struts/build-webapp.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- build-webapp.xml  16 Jan 2002 03:05:22 -  1.7
  +++ build-webapp.xml  22 Jan 2002 01:18:07 -  1.8
  @@ -69,6 +69,14 @@
 of the Jakarta Commons POOL
 package (version 1.0 or later).
   
  +commons-services.jar  (required).  The path to the JAR file
  +  of the Jakarta Commons SERVICES
  +  package (version 1.0 or later).
  +
  +commons-validator.jar (required).  The path to the JAR file
  +  of the Jakarta Commons VALIDATOR
  +  package (version 1.0 or later).
  +
   servlet.jar   MUST be set to the pathname of the
 servlet API classes you wish to
 compile against.
  @@ -169,6 +177,8 @@
 pathelement location=${commons-digester.jar}/
 pathelement location=${commons-logging.jar}/
 pathelement location=${commons-pool.jar}/
  +  pathelement location=${commons-services.jar}/
  +  pathelement location=${commons-validator.jar}/
 pathelement location=${jdbc20ext.jar}/
 pathelement location=${servlet.jar}/
 pathelement location=${struts.libs}/struts.jar/
  
  
  
  1.60  +20 -1 jakarta-struts/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-struts/build.xml,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- build.xml 16 Jan 2002 03:05:22 -  1.59
  +++ build.xml 22 Jan 2002 01:18:07 -  1.60
  @@ -48,6 +48,14 @@
 of the Jakarta Commons POOL
 package (version 1.0 or later).
   
  +commons-services.jar  (required).  The path to the JAR file
  +  of the Jakarta Commons SERVICES
  +  package (version 1.0 or later).
  +
  +commons-validator.jar (required).  The path to the JAR file
  +  of the Jakarta Commons VALIDATOR
  +  package (version 1.0 or later).
  +
   jdbc20ext.jar (required).  The path to the JAR file
 for the JDBC 2.0 Optional Package APIs.
   
  @@ -163,8 +171,11 @@
 pathelement location=${commons-digester.jar}/
 pathelement location=${commons-logging.jar}/
 pathelement location=${commons-pool.jar}/
  +  pathelement location=${commons-services.jar}/
  +  pathelement location=${commons-validator.jar}/
 pathelement location=${jdbc20ext.jar}/
 pathelement location=${servlet.jar}/
  +  pathelement location=${xerces.jar}/
   /path
   
   
  @@ -182,6 +193,8 @@
   pathelement location=${commons-digester.jar}/
   pathelement location=${commons-logging.jar}/
   pathelement location=${commons-pool.jar}/
  +pathelement location=${commons-services.jar}/
  +pathelement location=${commons-validator.jar}/
   pathelement location=${servlet.jar}/
   pathelement location=${junit.jar}/
   pathelement location=${jdbc20ext.jar}/
  @@ -236,6 +249,10 @@
   tofile=${build.home}/library/commons-logging.jar/
   copy file=${commons-pool.jar}
   tofile=${build.home}/library/commons-pool.jar/
  +copy file=${commons-services.jar}
  +tofile=${build.home}/library/commons-services.jar/
  +copy file=${commons-validator.jar}
  +tofile=${build.home}/library/commons-validator.jar/
   copy file=${jdbc20ext.jar}
   tofile=${build.home}/library/jdbc2_0-stdext.jar/
   /target
  @@ -304,7 +321,9 @@
   version=true
   windowtitle=Apache Struts API Documentation
   doctitle=lt;h1gt;Apache Struts Framework (Version 
${project.version})lt;/h1gt;
  -bottom=Copyright #169; 2000-2001 - Apache Software Foundation/
  +  

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

2001-08-07 Thread craigmcc

craigmcc01/08/07 10:37:46

  Modified:src/share/org/apache/struts/taglib/html ImgTag.java
  Log:
  Correctly URLEncode the query string parameter value, even if there is
  only a single parameter.
  
  PR: Bugzilla #2452
  Submitted by: Stefan Bodewig [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.11  +5 -5  
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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ImgTag.java   2001/04/29 00:38:04 1.10
  +++ ImgTag.java   2001/08/07 17:37:46 1.11
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImgTag.java,v 1.10 
2001/04/29 00:38:04 craigmcc Exp $
  - * $Revision: 1.10 $
  - * $Date: 2001/04/29 00:38:04 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImgTag.java,v 1.11 
2001/08/07 17:37:46 craigmcc Exp $
  + * $Revision: 1.11 $
  + * $Date: 2001/08/07 17:37:46 $
*
* 
*
  @@ -95,7 +95,7 @@
*
* @author Michael Westbay
* @author Craig McClanahan
  - * @version $Revision: 1.10 $
  + * @version $Revision: 1.11 $
*/
   
   public class ImgTag extends BaseHandlerTag {
  @@ -757,7 +757,7 @@
   Object value = RequestUtils.lookup(pageContext, paramName,
 paramProperty, paramScope);
   if (value != null)
  -src.append(value.toString());
  +src.append(URLEncoder.encode(value.toString()));
   }
   
// Just return the URL if there is no bean to look up
  
  
  



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

2001-04-19 Thread craigmcc

craigmcc01/04/19 14:14:00

  Modified:src/share/org/apache/struts/taglib/html ImgTag.java
  Log:
  Correct a bug setting the "usemap" attribute.
  
  PR: Bugzilla #1159
  Submitted by: [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.9   +5 -5  
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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ImgTag.java   2001/04/03 19:18:59 1.8
  +++ ImgTag.java   2001/04/19 21:13:58 1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImgTag.java,v 1.8 
2001/04/03 19:18:59 craigmcc Exp $
  - * $Revision: 1.8 $
  - * $Date: 2001/04/03 19:18:59 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImgTag.java,v 1.9 
2001/04/19 21:13:58 craigmcc Exp $
  + * $Revision: 1.9 $
  + * $Date: 2001/04/19 21:13:58 $
*
* 
*
  @@ -97,7 +97,7 @@
*
* @author Michael Westbay
* @author Craig McClanahan
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
*/
   
   public class ImgTag extends BaseHandlerTag {
  @@ -444,7 +444,7 @@
   return (this.usemap);
   }
   
  -public void setUsemap(String Usemap) {
  +public void setUsemap(String usemap) {
   this.usemap = usemap;
   }
   
  
  
  



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

2001-02-14 Thread craigmcc

craigmcc01/02/14 16:01:51

  Modified:src/share/org/apache/struts/taglib/html ImgTag.java
  Log:
  Replace the use of string concatenation with a StringBuffer, and leverage the
  new support methods in RequestUtils.
  
  Submitted by: Oleg V. Alexeev [EMAIL PROTECTED]
  PR: Bugzilla #600
  
  Revision  ChangesPath
  1.4   +41 -114   
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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ImgTag.java   2001/02/07 23:10:44 1.3
  +++ ImgTag.java   2001/02/15 00:01:49 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImgTag.java,v 1.3 
2001/02/07 23:10:44 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/02/07 23:10:44 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ImgTag.java,v 1.4 
2001/02/15 00:01:49 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/02/15 00:01:49 $
*
* 
*
  @@ -95,7 +95,7 @@
*
* @author Michael Westbay
* @author Craig McClanahan
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
*/
   
   public class ImgTag extends BaseHandlerTag {
  @@ -568,162 +568,89 @@
   return (url);
   
   // Start with an unadorned URL as specified
  - String src = url;
  + StringBuffer  src = new StringBuffer(url);
   
   
   // Append a single-parameter name and value, if requested
   if ((paramId != null)  (paramName != null)) {
  -if (src.indexOf('?')  0)
  -src += '?';
  +if (src.toString().indexOf('?')  0)
  +src.append('?');
   else
  -src += '';
  -src += paramId;
  -src += '=';
  -Object bean = RequestUtils.lookup(pageContext,
  -  paramName, paramScope);
  -if (bean != null) {
  -if (paramProperty == null)
  -src += bean.toString();
  -else {
  -try {
  -Object value =
  -PropertyUtils.getProperty(bean, paramProperty);
  -if (value != null)
  -src += value.toString();
  -} catch (IllegalAccessException e) {
  -pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  - PageContext.REQUEST_SCOPE);
  -throw new JspException
  -(messages.getMessage("getter.access",
  - paramProperty, paramName));
  -} catch (InvocationTargetException e) {
  -Throwable t = e.getTargetException();
  -pageContext.setAttribute(Action.EXCEPTION_KEY, t,
  - PageContext.REQUEST_SCOPE);
  -throw new JspException
  -(messages.getMessage("getter.result",
  - paramProperty, t.toString()));
  -} catch (NoSuchMethodException e) {
  -pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  - PageContext.REQUEST_SCOPE);
  -throw new JspException
  -(messages.getMessage("getter.method",
  - paramProperty, paramName));
  -}
  -}
  -}
  +src.append('');
  +src.append(paramId);
  +src.append('=');
  +Object value = RequestUtils.lookup(pageContext, paramName,
  +  paramProperty, paramScope);
  +if (value != null)
  +src.append(value.toString());
   }
   
// 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"));
  -pageContext.setAttribute(Action.EXCEPTION_KEY, e,
  - PageContext.REQUEST_SCOPE);
  +RequestUtils.saveException(pageContext, e);
   throw e;
   }
if (name == null)
  - return (src);
  + return (src.toString());
   
// Look up the map we will be using
  - Object bean = RequestUtils.lookup(pageContext, name,