webwork/src/main/webwork/view/taglib URLTag.java,1.21,1.22
[email protected] Sat, 01 Nov 2003 14:41:57 -0800
| Newsgroups | gmane.comp.java.open-symphony.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/opensymphony/webwork/src/main/webwork/view/taglib
In directory sc8-pr-cvs1:/tmp/cvs-serv11414
Modified Files:
URLTag.java
Log Message:
Fixed bug where you got null pointer exception if tag was used
without parameters.
Fixed bug where page attribute was changed from within tag.
Index: URLTag.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/view/taglib/URLTag.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- URLTag.java 1 Nov 2003 20:15:00 -0000 1.21
+++ URLTag.java 1 Nov 2003 22:41:55 -0000 1.22
@@ -37,7 +37,6 @@
protected String value;
protected String includeParamsAttr;
protected Map params;
- protected StringBuffer link = new StringBuffer();
// Public --------------------------------------------------------
/**
@@ -87,10 +86,9 @@
} else {
value = page;
}
- this.params.clear();
- this.page=null;
-
- link.delete(0, link.length());
+ // Clear the params map if it has been instantiated before
+ if (params != null)
+ params.clear();
//no explicit url set so attach params from current url, do
//this at start so body params can override any of these they wish.
@@ -137,6 +135,7 @@
public int doEndTag() throws JspException {
HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
+ StringBuffer link = new StringBuffer();
if (value != null) {
// Check if context path needs to be added
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/