You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Torsten Curdt <tc...@dff.st> on 2001/09/02 16:00:45 UTC

session messaging

I'd like to propose to extend the Session interface
with some kind of messaging functionality.

I'd like to keep track of the users that are currently
logged into our app. Right now I don't see any other
way of doing this but to extend the Session interface

interface Session {
  ...
  public void addFinalizeListener( FinalizeListener l);
}

interface FinalizeListener {
  public void finalizeOf( Object current );
}

and then call the added Listeners in the finalizer of the
Session implementing classes.
This would give a lot more information of the magical
session thing that comes from the differen servlet
engines.

But of course I might have again missed something ;)
...so what do you guys think ?
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: session messaging

Posted by Torsten Curdt <tc...@dff.st>.
> For some reason Javac can't parse error message from java compiler. Add some debug printouts before
> line 137 and find out why parsing is failing.
> 
> > > > 	at
> > > > org.apache.cocoon.components.language.programming.java.Javac.parseModernError(Javac.java:137)

Ok, now I got the real error message (hurray ;)

(Thanks, for applying the patch, Dims)

I found out that the servlet.jar is not in the classpath for
the Cocoon classloader. (I'm using Tomcat 4b3)
So what to do? I need the javax.http package in my XSP pages.

Having the servlet.jar in the WEB-INF/lib dir prevents
Cocoon to start up. Is this a plain Tomcat issue?

Thanks
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: session messaging

Posted by Vadim Gritsenko <vg...@hns.com>.
Torsten,

For some reason Javac can't parse error message from java compiler. Add some debug printouts before
line 137 and find out why parsing is failing.

> > > 	at
> > > org.apache.cocoon.components.language.programming.java.Javac.parseModernError(Javac.java:137)

Vadim


> -----Original Message-----
> From: Torsten Curdt [mailto:tcurdt@dff.st]
> Sent: Tuesday, September 04, 2001 9:25 AM
> To: cocoon-dev@xml.apache.org; dims@yahoo.com
> Subject: RE: session messaging
>
>
> > Torsten,
> >
> > Did you use the Tomcat4.0 Servlet.JAR in xml-cocoon2\lib when you did the build?
>
> Yes. For cocoon as well as for our classes!
> If there were a compatibility problem
> shouldn't there be a different exception, anyway?
>
> I just don't get it...
> Any other ideas?
>
> Thanks,
> --
> Torsten
>
> > --- Torsten Curdt <tc...@dff.st> wrote:
> > > An again I missed something ;) Thanx for the hints...
> > >
> > > I tried the HttpSessionBindingListener interface since this seems to be exactly
> > > what I was looking for. This interface seems to be in API 2.2 and 2.3
> > > so everything did look fine.
> > >
> > > But after my User class implemented the HttpSessionBindingListener interface
> > > I've run into really strange stacktraces:
> > >
> > > java.util.NoSuchElementException
> > > 	at java.util.StringTokenizer.nextToken(StringTokenizer.java:235)
> > > 	at java.util.StringTokenizer.nextToken(StringTokenizer.java:262)
> > > 	at
> > > org.apache.cocoon.components.language.programming.java.Javac.parseModernError(Javac.java:137)
> > > 	at
> > > org.apache.cocoon.components.language.programming.java.Javac.parseModernStream(Javac.java:119)
> > > 	at org.apache.cocoon.components.language.programming.java.Javac.parseStream(Javac.java:85)
> > > 	at
> > >
> > org.apache.cocoon.components.language.programming.java.AbstractJavaCompiler.getErrors(AbstractJavaCompiler.java:114)
> > > 	at
> > >
> > org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:190)
> > > 	at
> > >
> >
> org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage
.java:140)
> > > 	at
> > >
> > org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:276)
> > > 	at
> > >
> > org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:184)
> > > 	at org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:153)
> > > 	at
> > >
> > org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:146)
> > > 	at
> > > org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:246)
> > > 	at
> > >
> > org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:108)
> > > 	at org.apache.cocoon.components.source.SitemapSource.refresh(SitemapSource.java:259)
> > > 	at org.apache.cocoon.components.source.SitemapSource.<init>(SitemapSource.java:145)
> > > 	at
> > > org.apache.cocoon.components.source.CocoonSourceFactory.getSource(CocoonSourceFactory.java:53)
> > > 	at org.apache.cocoon.components.source.SourceHandlerImpl.getSource(SourceHandlerImpl.java:132)
> > > 	at org.apache.cocoon.environment.AbstractEnvironment.resolve(AbstractEnvironment.java:229)
> > > 	at org.apache.cocoon.sitemap.ContentAggregator.setup(ContentAggregator.java:284)
> > > 	at
> > >
> > org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:146)
> > > 	at
> > > org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:246)
> > > 	at
> > >
> > org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:108)
> > > 	at
> > >
> > org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:279)
> > > 	at
> > >
> >
> org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.wildcardMatc
> hN1FB(m_clie
> > ntdata_xma
> > > p.java:1945)
> > > 	at
> > >
> >
> org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.process(m_cl
ientdata_xma
> > p.java:594
> > > )
> > > 	at
> > >
> >
> org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.process(m_cl
ientdata_xma
> > p.java:512
> > > )
> > > 	at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)
> > >
> > > Can someone at least _image__ why this could result into an exception in the sitemap?
> > >
> > > The most strange thing is that I only get this exception when I use my User
> > > class in XSP. Using it inside an action is fine - even the event handling works
> > > fine. But as soon as I retrieve the User class from the Session inside the XSP I get
> > > this stackstrace.
> > >
> > > Sorry if this becoming a bit off topic. But I'm stumped...
> > > Thanks
> > > --
> > > Torsten
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > >
> >
> >
> > =====
> > Davanum Srinivas, JNI-FAQ Manager
> > http://www.jGuru.com/faq/JNI
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
> > http://im.yahoo.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: session messaging

Posted by Davanum Srinivas <di...@yahoo.com>.
Only other idea i have is to try to setup jikes as the compiler for compiling XSP's and see if
that helps with a better error/exception.

Thanks,
dims

--- Torsten Curdt <tc...@dff.st> wrote:
> > Torsten,
> > 
> > Did you use the Tomcat4.0 Servlet.JAR in xml-cocoon2\lib when you did the build?
> 
> Yes. For cocoon as well as for our classes!
> If there were a compatibility problem
> shouldn't there be a different exception, anyway?
> 
> I just don't get it...
> Any other ideas?
> 
> Thanks,
> --
> Torsten
> 
> > --- Torsten Curdt <tc...@dff.st> wrote:
> > > An again I missed something ;) Thanx for the hints...
> > > 
> > > I tried the HttpSessionBindingListener interface since this seems to be exactly
> > > what I was looking for. This interface seems to be in API 2.2 and 2.3
> > > so everything did look fine.
> > > 
> > > But after my User class implemented the HttpSessionBindingListener interface
> > > I've run into really strange stacktraces:
> > > 
> > > java.util.NoSuchElementException
> > > 	at java.util.StringTokenizer.nextToken(StringTokenizer.java:235)
> > > 	at java.util.StringTokenizer.nextToken(StringTokenizer.java:262)
> > > 	at
> > >
> org.apache.cocoon.components.language.programming.java.Javac.parseModernError(Javac.java:137)
> > > 	at
> > >
> org.apache.cocoon.components.language.programming.java.Javac.parseModernStream(Javac.java:119)
> > > 	at org.apache.cocoon.components.language.programming.java.Javac.parseStream(Javac.java:85)
> > > 	at
> > >
> >
>
org.apache.cocoon.components.language.programming.java.AbstractJavaCompiler.getErrors(AbstractJavaCompiler.java:114)
> > > 	at
> > >
> >
>
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:190)
> > > 	at
> > >
> >
>
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:140)
> > > 	at
> > >
> >
>
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:276)
> > > 	at
> > >
> >
>
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:184)
> > > 	at org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:153)
> > > 	at
> > >
> >
>
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:146)
> > > 	at
> > >
> org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:246)
> > > 	at
> > >
> >
>
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:108)
> > > 	at org.apache.cocoon.components.source.SitemapSource.refresh(SitemapSource.java:259)
> > > 	at org.apache.cocoon.components.source.SitemapSource.<init>(SitemapSource.java:145)
> > > 	at
> > >
> org.apache.cocoon.components.source.CocoonSourceFactory.getSource(CocoonSourceFactory.java:53)
> > > 	at
> org.apache.cocoon.components.source.SourceHandlerImpl.getSource(SourceHandlerImpl.java:132)
> > > 	at org.apache.cocoon.environment.AbstractEnvironment.resolve(AbstractEnvironment.java:229)
> > > 	at org.apache.cocoon.sitemap.ContentAggregator.setup(ContentAggregator.java:284)
> > > 	at
> > >
> >
>
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:146)
> > > 	at
> > >
> org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:246)
> > > 	at
> > >
> >
>
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:108)
> > > 	at
> > >
> >
>
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:279)
> > > 	at
> > >
> >
>
org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.wildcardMatchN1FB(m_clie
> > ntdata_xma
> > > p.java:1945)
> > > 	at
> > >
> >
>
org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.process(m_clientdata_xma
> > p.java:594
> > > )
> > > 	at
> > >
> >
>
org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.process(m_clientdata_xma
> > p.java:512
> > > )
> > > 	at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)
> > > 
> > > Can someone at least _image__ why this could result into an exception in the sitemap?
> > > 
> > > The most strange thing is that I only get this exception when I use my User
> > > class in XSP. Using it inside an action is fine - even the event handling works
> > > fine. But as soon as I retrieve the User class from the Session inside the XSP I get
> > > this stackstrace.
> > > 
> > > Sorry if this becoming a bit off topic. But I'm stumped...
> > > Thanks
> > > --
> > > Torsten
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > > 
> > 
> > 
> > =====
> > Davanum Srinivas, JNI-FAQ Manager
> > http://www.jGuru.com/faq/JNI
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
> > http://im.yahoo.com
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: session messaging

Posted by Torsten Curdt <tc...@dff.st>.
> Torsten,
> 
> Did you use the Tomcat4.0 Servlet.JAR in xml-cocoon2\lib when you did the build?

Yes. For cocoon as well as for our classes!
If there were a compatibility problem
shouldn't there be a different exception, anyway?

I just don't get it...
Any other ideas?

Thanks,
--
Torsten

> --- Torsten Curdt <tc...@dff.st> wrote:
> > An again I missed something ;) Thanx for the hints...
> > 
> > I tried the HttpSessionBindingListener interface since this seems to be exactly
> > what I was looking for. This interface seems to be in API 2.2 and 2.3
> > so everything did look fine.
> > 
> > But after my User class implemented the HttpSessionBindingListener interface
> > I've run into really strange stacktraces:
> > 
> > java.util.NoSuchElementException
> > 	at java.util.StringTokenizer.nextToken(StringTokenizer.java:235)
> > 	at java.util.StringTokenizer.nextToken(StringTokenizer.java:262)
> > 	at
> > org.apache.cocoon.components.language.programming.java.Javac.parseModernError(Javac.java:137)
> > 	at
> > org.apache.cocoon.components.language.programming.java.Javac.parseModernStream(Javac.java:119)
> > 	at org.apache.cocoon.components.language.programming.java.Javac.parseStream(Javac.java:85)
> > 	at
> >
> org.apache.cocoon.components.language.programming.java.AbstractJavaCompiler.getErrors(AbstractJavaCompiler.java:114)
> > 	at
> >
> org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:190)
> > 	at
> >
> org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:140)
> > 	at
> >
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:276)
> > 	at
> >
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:184)
> > 	at org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:153)
> > 	at
> >
> org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:146)
> > 	at
> > org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:246)
> > 	at
> >
> org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:108)
> > 	at org.apache.cocoon.components.source.SitemapSource.refresh(SitemapSource.java:259)
> > 	at org.apache.cocoon.components.source.SitemapSource.<init>(SitemapSource.java:145)
> > 	at
> > org.apache.cocoon.components.source.CocoonSourceFactory.getSource(CocoonSourceFactory.java:53)
> > 	at org.apache.cocoon.components.source.SourceHandlerImpl.getSource(SourceHandlerImpl.java:132)
> > 	at org.apache.cocoon.environment.AbstractEnvironment.resolve(AbstractEnvironment.java:229)
> > 	at org.apache.cocoon.sitemap.ContentAggregator.setup(ContentAggregator.java:284)
> > 	at
> >
> org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:146)
> > 	at
> > org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:246)
> > 	at
> >
> org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:108)
> > 	at
> >
> org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:279)
> > 	at
> >
> org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.wildcardMatchN1FB(m_clie
> ntdata_xma
> > p.java:1945)
> > 	at
> >
> org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.process(m_clientdata_xma
> p.java:594
> > )
> > 	at
> >
> org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.process(m_clientdata_xma
> p.java:512
> > )
> > 	at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)
> > 
> > Can someone at least _image__ why this could result into an exception in the sitemap?
> > 
> > The most strange thing is that I only get this exception when I use my User
> > class in XSP. Using it inside an action is fine - even the event handling works
> > fine. But as soon as I retrieve the User class from the Session inside the XSP I get
> > this stackstrace.
> > 
> > Sorry if this becoming a bit off topic. But I'm stumped...
> > Thanks
> > --
> > Torsten
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> > 
> 
> 
> =====
> Davanum Srinivas, JNI-FAQ Manager
> http://www.jGuru.com/faq/JNI
> 
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
> http://im.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: session messaging

Posted by Davanum Srinivas <di...@yahoo.com>.
Torsten,

Did you use the Tomcat4.0 Servlet.JAR in xml-cocoon2\lib when you did the build?

Thanks,
dims

--- Torsten Curdt <tc...@dff.st> wrote:
> An again I missed something ;) Thanx for the hints...
> 
> I tried the HttpSessionBindingListener interface since this seems to be exactly
> what I was looking for. This interface seems to be in API 2.2 and 2.3
> so everything did look fine.
> 
> But after my User class implemented the HttpSessionBindingListener interface
> I've run into really strange stacktraces:
> 
> java.util.NoSuchElementException
> 	at java.util.StringTokenizer.nextToken(StringTokenizer.java:235)
> 	at java.util.StringTokenizer.nextToken(StringTokenizer.java:262)
> 	at
> org.apache.cocoon.components.language.programming.java.Javac.parseModernError(Javac.java:137)
> 	at
> org.apache.cocoon.components.language.programming.java.Javac.parseModernStream(Javac.java:119)
> 	at org.apache.cocoon.components.language.programming.java.Javac.parseStream(Javac.java:85)
> 	at
>
org.apache.cocoon.components.language.programming.java.AbstractJavaCompiler.getErrors(AbstractJavaCompiler.java:114)
> 	at
>
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:190)
> 	at
>
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:140)
> 	at
>
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:276)
> 	at
>
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:184)
> 	at org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:153)
> 	at
>
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:146)
> 	at
> org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:246)
> 	at
>
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:108)
> 	at org.apache.cocoon.components.source.SitemapSource.refresh(SitemapSource.java:259)
> 	at org.apache.cocoon.components.source.SitemapSource.<init>(SitemapSource.java:145)
> 	at
> org.apache.cocoon.components.source.CocoonSourceFactory.getSource(CocoonSourceFactory.java:53)
> 	at org.apache.cocoon.components.source.SourceHandlerImpl.getSource(SourceHandlerImpl.java:132)
> 	at org.apache.cocoon.environment.AbstractEnvironment.resolve(AbstractEnvironment.java:229)
> 	at org.apache.cocoon.sitemap.ContentAggregator.setup(ContentAggregator.java:284)
> 	at
>
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:146)
> 	at
> org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:246)
> 	at
>
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:108)
> 	at
>
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:279)
> 	at
>
org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.wildcardMatchN1FB(m_clientdata_xma
> p.java:1945)
> 	at
>
org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.process(m_clientdata_xmap.java:594
> )
> 	at
>
org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.process(m_clientdata_xmap.java:512
> )
> 	at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)
> 
> Can someone at least _image__ why this could result into an exception in the sitemap?
> 
> The most strange thing is that I only get this exception when I use my User
> class in XSP. Using it inside an action is fine - even the event handling works
> fine. But as soon as I retrieve the User class from the Session inside the XSP I get
> this stackstrace.
> 
> Sorry if this becoming a bit off topic. But I'm stumped...
> Thanks
> --
> Torsten
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: session messaging

Posted by Torsten Curdt <tc...@dff.st>.
An again I missed something ;) Thanx for the hints...

I tried the HttpSessionBindingListener interface since this seems to be exactly
what I was looking for. This interface seems to be in API 2.2 and 2.3
so everything did look fine.

But after my User class implemented the HttpSessionBindingListener interface
I've run into really strange stacktraces:

java.util.NoSuchElementException
	at java.util.StringTokenizer.nextToken(StringTokenizer.java:235)
	at java.util.StringTokenizer.nextToken(StringTokenizer.java:262)
	at org.apache.cocoon.components.language.programming.java.Javac.parseModernError(Javac.java:137)
	at org.apache.cocoon.components.language.programming.java.Javac.parseModernStream(Javac.java:119)
	at org.apache.cocoon.components.language.programming.java.Javac.parseStream(Javac.java:85)
	at org.apache.cocoon.components.language.programming.java.AbstractJavaCompiler.getErrors(AbstractJavaCompiler.java:114)
	at org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:190)
	at org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:140)
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:276)
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:184)
	at org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:153)
	at org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:146)
	at org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:246)
	at org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:108)
	at org.apache.cocoon.components.source.SitemapSource.refresh(SitemapSource.java:259)
	at org.apache.cocoon.components.source.SitemapSource.<init>(SitemapSource.java:145)
	at org.apache.cocoon.components.source.CocoonSourceFactory.getSource(CocoonSourceFactory.java:53)
	at org.apache.cocoon.components.source.SourceHandlerImpl.getSource(SourceHandlerImpl.java:132)
	at org.apache.cocoon.environment.AbstractEnvironment.resolve(AbstractEnvironment.java:229)
	at org.apache.cocoon.sitemap.ContentAggregator.setup(ContentAggregator.java:284)
	at org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:146)
	at org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:246)
	at org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:108)
	at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:279)
	at
org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.wildcardMatchN1FB(m_clientdata_xma
p.java:1945)
	at
org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.process(m_clientdata_xmap.java:594
)
	at
org.apache.cocoon.www.file_.opt.jakarta.tomcat_4_0_b3.webapps.cocoon.desire4dvs.m_clientdata_xmap.process(m_clientdata_xmap.java:512
)
	at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)

Can someone at least _image__ why this could result into an exception in the sitemap?

The most strange thing is that I only get this exception when I use my User
class in XSP. Using it inside an action is fine - even the event handling works
fine. But as soon as I retrieve the User class from the Session inside the XSP I get
this stackstrace.

Sorry if this becoming a bit off topic. But I'm stumped...
Thanks
--
Torsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: session messaging

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
There's also the HttpSessionBindingListener in servlet 2.2. When an 
object implementing this interface is stored as a session attribute, its 
valueBound() method is called, and when it's removed from the session or 
when the session is destroyed, the valueUnbound() method is called.

Jörg Prante wrote:
> Torsten,
> 
> did you have a look at Servlet API 2.3 session attribute listeners at 
> javax.servlet.http.HttpSessionAttributeListener? I used this to keep track of 
> session information e.g. users. Your "finalize" approach look much like the 
> attribute removal method. Cocoon 2 should use the methods of the Servlet 2.3 
> API as well, there is no need to re-invent the wheel.
> 
> Jörg
> 
> Am Sonntag,  2. September 2001 16:00 schrieb Torsten Curdt:
> 
>>I'd like to propose to extend the Session interface
>>with some kind of messaging functionality.
>>
>>I'd like to keep track of the users that are currently
>>logged into our app. Right now I don't see any other
>>way of doing this but to extend the Session interface
>>
>>interface Session {
>>  ...
>>  public void addFinalizeListener( FinalizeListener l);
>>}
>>
>>interface FinalizeListener {
>>  public void finalizeOf( Object current );
>>}
>>
>>and then call the added Listeners in the finalizer of the
>>Session implementing classes.
>>This would give a lot more information of the magical
>>session thing that comes from the differen servlet
>>engines.
>>
>>But of course I might have again missed something ;)
>>...so what do you guys think ?
>>--
>>Torsten
>>

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: session messaging

Posted by Jörg Prante <jo...@gmx.de>.
Torsten,

did you have a look at Servlet API 2.3 session attribute listeners at 
javax.servlet.http.HttpSessionAttributeListener? I used this to keep track of 
session information e.g. users. Your "finalize" approach look much like the 
attribute removal method. Cocoon 2 should use the methods of the Servlet 2.3 
API as well, there is no need to re-invent the wheel.

Jörg

Am Sonntag,  2. September 2001 16:00 schrieb Torsten Curdt:
> I'd like to propose to extend the Session interface
> with some kind of messaging functionality.
>
> I'd like to keep track of the users that are currently
> logged into our app. Right now I don't see any other
> way of doing this but to extend the Session interface
>
> interface Session {
>   ...
>   public void addFinalizeListener( FinalizeListener l);
> }
>
> interface FinalizeListener {
>   public void finalizeOf( Object current );
> }
>
> and then call the added Listeners in the finalizer of the
> Session implementing classes.
> This would give a lot more information of the magical
> session thing that comes from the differen servlet
> engines.
>
> But of course I might have again missed something ;)
> ...so what do you guys think ?
> --
> Torsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org