You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Pier Paolo Bortone <pi...@netengineering.it> on 2001/02/01 11:10:02 UTC

Re:

Corey,

thank you, it works fine, but I was not know that was create-session="true" exist.

Where I can find doc about all built-in taglibs and about their attributes?

Or better, do you know where I can search about it?

Very thanks?

Pier Paolo.

  ----- Original Message ----- 
  From: Corey O'Donovan 
  To: cocoon-users@xml.apache.org 
  Sent: Wednesday, January 31, 2001 10:27 PM
  Subject: Re: <util:counter scope="session"/>


  hi,

  Have you setup a session using create-session=true or
  request.getSession(true)?
  for example

  1)
  <xsp:page
   language="java" create-session="true"
   xmlns:session="http://www.apache.org/1999/XSP/Session"
   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  >

  <Your stuff/>

  </xsp:page>

  Corey

  ----- Original Message -----
  From: Pier Paolo Bortone <pi...@netengineering.it>
  To: <co...@xml.apache.org>
  Sent: Wednesday, January 31, 2001 6:09 PM
  Subject: <util:counter scope="session"/>


  > Hi,
  >
  > I've tried to adding attribute scope="session" at the taglib util:counter
  in
  > the xsl/lib-page.xml example.
  >
  > But there is an exception:
  >
  > java.lang.NullPointerException
  > at
  > org.apache.cocoon.processor.xsp.XSPUtil.getSessionCount(XSPUtil.java:450)
  > at
  >
  _E_._jakarta_tomcat_3_2_1._webapps._cocoon._samples._xsp._lib_page.populateD
  > ocument(_lib_page.java:189)
  > at org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:97)
  > at
  >
  org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:527)
  > at org.apache.cocoon.Engine.handle(Engine.java:384)
  > at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
  > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  > at
  org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
  > at org.apache.tomcat.core.Handler.service(Handler.java:286)
  > at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
  > at
  >
  org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
  > 7)
  > at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
  > at
  >
  org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
  > (Ajp12ConnectionHandler.java:166)
  > at
  > org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
  > at
  > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
  > at java.lang.Thread.run(Thread.java:484)
  >
  > I try to adding at the xsp/page.xml the method:
  >   private synchronized int sessionCount(HttpSession session) {    Integer
  > integer = (Integer) session.getValue("util.counter");    if (integer ==
  > null) {      integer = new Integer(0);    }    int cnt =
  integer.intValue()
  > + 1;    session.putValue("util.counter", new Integer(cnt));    return
  > nt;  }
  > and this row that call the method above:
  >     <p>I've been requested for session
  >     <xsp:expr>sessionCount(request.getSession(true))</xsp:expr>
  >      times.</p>
  > If I call before xsp/page.xml, after also the xsp/lib-page.xml works fine.
  >
  > Is there bug in the logic-sheet or haven't I understood like works the
  > taglibs?
  >
  > Thanks in advance.
  > Pier Paolo.
  >
  >
  >
  >
  > ---------------------------------------------------------------------
  > Please check that your question has not already been answered in the
  > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
  >
  > To unsubscribe, e-mail: <co...@xml.apache.org>
  > For additional commands, e-mail: <co...@xml.apache.org>


  ---------------------------------------------------------------------
  Please check that your question has not already been answered in the
  FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

  To unsubscribe, e-mail: <co...@xml.apache.org>
  For additional commands, e-mail: <co...@xml.apache.org>