org.apache.cocoon.acting
Class CookieCreatorAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.apache.cocoon.acting.CookieCreatorAction
- All Implemented Interfaces:
- Action, LogEnabled, Serviceable, ThreadSafe
- public class CookieCreatorAction
- extends ServiceableAction
- implements ThreadSafe
The CookieCreatorAction class create or remove cookies. The action needs
these parameters:
- name
- the cookie name
- value
- the cookie value
- comment
- a comment to the cookie
- domain
- the domain the cookie is sent to
- path
-
the path of the domain the cookie is sent to
- secure
- use a
secure transport protocol (default is false)
- maxage
- Age in
seconds. Use -1 to remove cookie. (default is 0; cookie lives within the
session and it is not stored)
- version
- version of
cookie(default is 0)
If you want to set a cookie you only need to
specify the cookie name. Its value is an empty string as default. The maxage
is 0 that means the cookie will live until the session is invalidated. If
you want to remove a cookie set its maxage to -1.
- Version:
- CVS $Id: CookieCreatorAction.java 171341 2005-05-22 16:35:41Z cziegeler $
- Author:
- Paolo Scaffardi
Fields inherited from interface org.apache.cocoon.acting.Action |
ROLE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CookieCreatorAction
public CookieCreatorAction()
act
public Map act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String src,
Parameters parameters)
throws Exception
- Creates a cookie.
- Specified by:
act
in interface Action
- Parameters:
resolver
- The SourceResolver
in chargeobjectModel
- The Map
with object of the
calling environment which can be used
to select values this controller may need
(ie Request, Response).src
- A source String
to the Actionparameters
- The Parameters
for this invocation
- Returns:
- Empty map on success, null on failure.
- Throws:
Exception
- Indicates something is totally wrong
Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.