You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gi...@locus.apache.org on 2000/12/06 23:54:12 UTC
cvs commit: xml-cocoon/src/org/apache/cocoon/acting AbstractAction.java ComposerAction.java HelloAction.java
giacomo 00/12/06 14:54:11
Modified: src/org/apache/cocoon/acting Tag: xml-cocoon2
HelloAction.java
Added: src/org/apache/cocoon/acting Tag: xml-cocoon2
AbstractAction.java ComposerAction.java
Log:
Revision Changes Path
No revision
No revision
1.1.2.6 +18 -14 xml-cocoon/src/org/apache/cocoon/acting/Attic/HelloAction.java
Index: HelloAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/HelloAction.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- HelloAction.java 2000/11/14 15:08:27 1.1.2.5
+++ HelloAction.java 2000/12/06 22:54:10 1.1.2.6
@@ -15,54 +15,58 @@
import javax.servlet.ServletContext;
import org.apache.avalon.Component;
+import org.apache.avalon.Configuration;
+import org.apache.avalon.ConfigurationException;
import org.apache.avalon.Parameters;
-import org.apache.log.Logger;
-import org.apache.log.LogKit;
-
import org.xml.sax.SAXException;
import org.xml.sax.EntityResolver;
+import org.apache.cocoon.Constants;
/**
*
* @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
- * @version CVS $Revision: 1.1.2.5 $ $Date: 2000/11/14 15:08:27 $
+ * @version CVS $Revision: 1.1.2.6 $ $Date: 2000/12/06 22:54:10 $
*/
-public class HelloAction implements Action {
+public class HelloAction extends ComposerAction {
- private Logger log = LogKit.getLoggerFor("cocoon");
+ /**
+ * Get the <code>Configuration</code> object for this <code>Component</code>
+ */
+ public void configure( Configuration configuration) throws ConfigurationException {
+ }
/**
* A simple Action that logs if the <code>Session</code> object
* has been created
*/
public List act (EntityResolver resolver, Map objectModel, String src, Parameters par) throws Exception {
- HttpServletRequest req = (HttpServletRequest) objectModel.get("request");
+ HttpServletRequest req = (HttpServletRequest) objectModel.get(Constants.REQUEST_OBJECT);
if (req != null) {
HttpSession session = req.getSession (false);
- ServletContext context = (ServletContext)objectModel.get("context");
+ ServletContext context = (ServletContext)objectModel.get(Constants.CONTEXT_OBJECT);
if (context != null) {
if (session != null) {
if (session.isNew()) {
- log.debug("Session is new");
+ super.log.debug("Session is new");
context.log("Session is new");
} else {
- log.debug("Session is new");
+ super.log.debug("Session is new");
context.log("Session is old");
}
} else {
- log.debug("A session object was not created");
+ super.log.debug("A session object was not created");
context.log("A session object was not created");
}
} else {
if (session != null) {
if (session.isNew()) {
- log.debug("Session is new");
+ super.log.debug("Session is new");
} else {
- log.debug("Session is old");
+ super.log.debug("Session is old");
}
} else {
- log.debug("A session object was not created");
+ super.log.debug("A session object was not created");
}
}
}
No revision
No revision
1.1.2.1 +24 -0 xml-cocoon/src/org/apache/cocoon/acting/Attic/AbstractAction.java
1.1.2.1 +31 -0 xml-cocoon/src/org/apache/cocoon/acting/Attic/ComposerAction.java