Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 46516 invoked by uid 500); 4 Jul 2002 18:54:57 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 46443 invoked from network); 4 Jul 2002 18:54:56 -0000 From: "Hugo Burm" To: Subject: Accessing SunShine context from Java Action Date: Thu, 4 Jul 2002 07:41:58 +0200 Message-ID: <001601c2231d$83ec7250$0a01a8c0@VAIO> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello, Thanks to Carsten Ziegeler, my SunShine autorization and context is working fine now. Now I want to access the SunShine context from my own Java handler (an Action). I looked into the SunShine sources and tried to call the most simpe call (check whether a SunShine context exists) Something like this: import org.apache.cocoon.sunshine.*; [...] SunShine sSun = new SunShine(); boolean bSun = sSun.existsContext("survey"); [...] This gives me the exception listed below. I noticed that the page that triggered the action, has no more a jsessionid=ABCDXYZ in the URL. So, may be, I lost my Java session. But I have no idea how the SunShine context is propagated between different pages. Can someone comment on how the SunShine context is stored and can be accessed? And what is needed to access it 10 pages later in my (browser) session? Hugo Burm hugob@xs4all.nl ============== Original exception : java.lang.NullPointerException at org.apache.cocoon.sunshine.SunShine.getSession(SunShine.java:358) at org.apache.cocoon.sunshine.SunShine.existsContext(SunShine.java:999) at nl.datagram.cocoon.acting.SurveyDBSelectAction.act(SurveyDBSelectAction.java :89) at org.apache.cocoon.components.treeprocessor.sitemap.ActionSetNode.call(Action SetNode.java:165) [ long dump of stack truncated ] --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: