Author: michiel
Date: 2009-11-11 17:37:32 +0100 (Wed, 11 Nov 2009)
New Revision: 39648
Modified:
mmbase/branches/MMBase-1_8/applications/taglib/src/org/mmbase/bridge/jsp/taglib/WriteTag.java
mmbase/branches/MMBase-1_8/applications/taglib/src/org/mmbase/bridge/jsp/taglib/mmbase-taglib.xml
Log:
for the purpose of testing that mm:write can be used in junit tests as
mm:import added 'reset' attribute
Modified:
mmbase/branches/MMBase-1_8/applications/taglib/src/org/mmbase/bridge/jsp/taglib/WriteTag.java
===================================================================
---
mmbase/branches/MMBase-1_8/applications/taglib/src/org/mmbase/bridge/jsp/taglib/WriteTag.java
2009-11-11 16:23:07 UTC (rev 39647)
+++
mmbase/branches/MMBase-1_8/applications/taglib/src/org/mmbase/bridge/jsp/taglib/WriteTag.java
2009-11-11 16:37:32 UTC (rev 39648)
@@ -33,13 +33,13 @@
* of a 'Writer' tag.
*
* @author Michiel Meeuwissen
- * @version $Id: WriteTag.java,v 1.49 2005-05-13 09:47:12 michiel Exp $
+ * @version $Id: WriteTag.java,v 1.49 2005-05-13 09:47:12 michiel Exp $
*/
public class WriteTag extends ContextReferrerTag implements Writer,
FunctionContainerReferrer {
public static final int DEFAULT_MAX_COOKIE_AGE = 60 * 60 * 24 * 30 * 6; //
half year
-
+
public static final String MAX_COOKIE_AGE_KEY =
"org.mmbase.taglib.max_cookie_age";
//public static final String COOKIE_PATH = "/";
@@ -76,7 +76,11 @@
}
+ public void setReset(boolean b) {
+ // Ignored. added for forward compatiblity
+ }
+
/*
// A page attribute is not needed, because we have already taglib vars,
which take the same function (and are actually stored here)
public void setPage(String s) throws JspTagException {
@@ -128,7 +132,7 @@
if (log.isDebugEnabled()) {
log.debug("start writetag id: '" +getId() + "' referid: '" +
getReferid() + "' value '" + value + "'");
}
-
+
helper.setValue(getObject());
if (getId() != null) {
@@ -164,14 +168,14 @@
// remove all cookies with given name
HttpServletRequest request = ((HttpServletRequest)
pageContext.getRequest());
HttpServletResponse response = ((HttpServletResponse)
pageContext.getResponse());
-
+
if (log.isDebugEnabled()) {
log.debug("Writing cookie " + cookie + " / " + v);
}
// count present cookies of this name
int cookiecount = 0;
Cookie[] cookies = request.getCookies();
- if (cookies != null) {
+ if (cookies != null) {
for (int i = 0; i< cookies.length; i++) {
Cookie c = cookies[i];
if (c.getName().equals(cookie.toString())) {
@@ -185,7 +189,7 @@
Cookie c = new Cookie(cookie.getString(this), cookievalue);
String path = request.getContextPath();
if (path.length() == 0) path = "/";
- c.setPath(path);
+ c.setPath(path);
c.setMaxAge(maxCookieAge);
response.addCookie(c);
Modified:
mmbase/branches/MMBase-1_8/applications/taglib/src/org/mmbase/bridge/jsp/taglib/mmbase-taglib.xml
===================================================================
---
mmbase/branches/MMBase-1_8/applications/taglib/src/org/mmbase/bridge/jsp/taglib/mmbase-taglib.xml
2009-11-11 16:23:07 UTC (rev 39647)
+++
mmbase/branches/MMBase-1_8/applications/taglib/src/org/mmbase/bridge/jsp/taglib/mmbase-taglib.xml
2009-11-11 16:37:32 UTC (rev 39648)
@@ -936,6 +936,10 @@
<see tag="formatter" attribute="format" />
<since>MMBase-1.7</since>
</attribute>
+ <attribute>
+ <name>reset</name>
+ <required>false</required>
+ </attribute>
</taginterface>
<taginterface>
<name>container</name>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs