cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arno Illmann <illm...@onlinemedia.de>
Subject AW: <util:counter scope="session"/>
Date Thu, 01 Feb 2001 14:57:59 GMT
\jsdk2\doc\apidoc and what is really good too are the java sources from sun
under \jsdk2\src\javax\servlet.

I didnt find an illustrative comment to <util:counter/> in
\cocoon\processor\xsp\library\java\util.xsl or
\cocoon\src\org\apache\cocoon\processor\xsp\XSPUtil.java.  

... dooc is cooming soon ........................

Regards, Arno

-----Urspr√ľngliche Nachricht-----
Von: Pier Paolo Bortone [mailto:pierpaolo.bortone@netengineering.it]
Gesendet am: Donnerstag, 1. Februar 2001 11:10
An: cocoon-users@xml.apache.org
Betreff: Re: <util:counter scope="session"/>


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 <pierpaolo.bortone@netengineering.it>
To: <cocoon-users@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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

Mime
View raw message