webwork/src/main/webwork/view/taglib IncludeTag.java,1.22,1.23
[email protected] Sat, 7 Jan 2006 07:03:00 +0000 (UTC)
| 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.sourceforge.net:/tmp/cvs-serv19118/src/main/webwork/view/taglib
Modified Files:
IncludeTag.java
Log Message:
Let exceptions during include bubble up correctly, the container will log this anyway so we shouldn't
Index: IncludeTag.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/view/taglib/IncludeTag.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- IncludeTag.java 19 Jun 2005 23:21:24 -0000 1.22
+++ IncludeTag.java 7 Jan 2006 01:34:18 -0000 1.23
@@ -17,7 +17,6 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.JspTagException;
import javax.servlet.jsp.PageContext;
import java.io.IOException;
import java.io.PrintWriter;
@@ -135,8 +134,8 @@
StringTokenizer pathParts = new StringTokenizer(returnValue.replace('\\', '/'), "/");
while (pathParts.hasMoreTokens()) {
String part = pathParts.nextToken();
- if (!part.equals(".")) {
- if (part.equals(".."))
+ if (!".".equals(part)) {
+ if ("..".equals(part))
stack.pop();
else
stack.push(part);
@@ -146,7 +145,7 @@
StringBuffer flatPathBuffer = new StringBuffer();
for (int i = 0; i < stack.size(); i++)
- flatPathBuffer.append("/" + stack.elementAt(i));
+ flatPathBuffer.append('/').append(stack.elementAt(i));
returnValue = flatPathBuffer.toString();
}
@@ -265,8 +264,7 @@
}
catch (Exception e)
{
- LogFactory.getLog(getClass()).warn("Exception thrown during include of "+result, e);
- throw new JspTagException(toString(e));
+ throw new JspException("Exception thrown during include of " + result, e);
}
super.doEndTag();
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click