Update of
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/functions
In directory james.mmbase.org:/tmp/cvs-serv11147/functions
Modified Files:
Functions.java
Log Message:
various details, logging, some ports from 1.8
See also:
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/functions
Index: Functions.java
===================================================================
RCS file:
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/functions/Functions.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- Functions.java 27 Feb 2008 10:49:01 -0000 1.24
+++ Functions.java 17 Mar 2008 16:18:15 -0000 1.25
@@ -37,7 +37,7 @@
</mm:cloud>
* @author Michiel Meeuwissen
* @since MMBase-1.8
- * @version $Id: Functions.java,v 1.24 2008/02/27 10:49:01 michiel Exp $
+ * @version $Id: Functions.java,v 1.25 2008/03/17 16:18:15 michiel Exp $
* @todo EXPERIMENTAL
*/
public class Functions {
@@ -140,7 +140,12 @@
th.setCloud((Cloud) pageContext.getAttribute(CloudTag.KEY,
CloudTag.SCOPE));
javax.servlet.http.HttpServletRequest req =
(javax.servlet.http.HttpServletRequest) pageContext.getRequest();
String t = th.findTreeFile(page, Casting.toString(objectList),
pageContext.getSession());
- return req.getContextPath() + (t.charAt(0) == '/' ? "" : "/") + t;
+ if (t == null || "".equals(t)) {
+ // not found, avoid Exceptions, this will generaly produce a 404
in stead. Which is
+ // clear enough.
+ t = page;
+ }
+ return req.getContextPath() + ((t.length() > 1 && t.charAt(0) == '/')
? "" : "/") + t;
}
/**
* @since MMBase-1.8.5
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs