cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andres, Judith" <Judith.And...@rauser-ag.com>
Subject AW: AW: XSP and ServletContext object
Date Fri, 13 Sep 2002 14:33:14 GMT
AFAIK both assumptions are correct.

Judith

> -----Urspr√ľngliche Nachricht-----
> Von:	Werner Guttmann [SMTP:Werner.Guttmann@morganstanley.com]
> Gesendet am:	Freitag, 13. September 2002 16:31
> An:	cocoon-users@xml.apache.org
> Betreff:	Re: AW: XSP and ServletContext object
> 
> Thanks. In other words,
> 
> I could get hold of any attribute available in the ServletContext object through using
> 
> org.apache.cocoon.environment.Context.getAttribute()
> 
> right ? And it it still true that there's a global variable available within an (compiled)
XSP page with the name 'context' ?
> 
> Werner
> 
> "Andres, Judith" wrote:
> 
> > Hi Werner,
> >
> > Not an object of class javax.servlet.ServletContext is available but a wrapper object
of class org.apache.cocoon.environment.Context.
> >
> > Anyway, for me using the context variable works.
> >
> > regards
> > Judith
> >
> > > -----Urspr√ľngliche Nachricht-----
> > > Von:  Werner Guttmann [SMTP:Werner.Guttmann@morganstanley.com]
> > > Gesendet am:  Freitag, 13. September 2002 15:34
> > > An:   cocoon-users@xml.apache.org
> > > Betreff:      XSP and ServletContext object
> > >
> > > Hi,
> > >
> > > the output of the XSP generator seems to indicate that in an XSP doc (or
> > > logicsheet), there are a set of "built-in" variables that
> > > you can use to access servlet objects (taken from the comments in the
> > > java file derived from an XSP doc):
> > >
> > >     /* Built-in parameters available for use */
> > >     // context    - ServletContext
> > >     // request    - org.apache.cocoon.environment.Request
> > >     // response   - org.apache.cocoon.environment.Response
> > >     // parameters - parameters defined in the sitemap
> > >
> > > Now, when trying to use the context object, I am getting the following
> > > exception:
> > >
> > > org.apache.cocoon.ProcessingException: Language Exception:
> > > org.apache.cocoon.components.language.LanguageException: Error compiling
> > >
> > > instruction_controller_xml:
> > > Line 118, column 50:  Class javax.servlet.ServletContext not found in
> > > void generate().
> > > Line 0, column 0:
> > > 1 error
> > >
> > >  at
> > > org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:340)
> > >
> > >  at
> > > org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:292)
> > >
> > >  at
> > > org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:198)
> > >
> > >  at
> > > org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:202)
> > >
> > >  at
> > > org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:278)
> > >
> > >  at
> > > org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:141)
> > >
> > >  at
> > > org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:317)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:153)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:85)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:156)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:140)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:144)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:328)>

> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:293)
> > >
> > >  at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
> > >  at
> > > org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
> > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >
> > > with the root being
> > >
> > > org.apache.cocoon.components.language.LanguageException: Error compiling
> > > instruction_controller_xml:
> > > Line 118, column 50:  Class javax.servlet.ServletContext not found in
> > > void generate().
> > > Line 0, column 0:
> > > 1 error
> > >
> > >  at
> > > org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(JavaLanguage.java:243)
> > >
> > >  at
> > > org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:207)
> > >
> > >  at
> > > org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:388)>
> > >
> > >  at
> > > org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:333)
> > >
> > >  at
> > > org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:292)
> > >
> > >  at
> > > org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator.java:198)
> > >
> > >  at
> > > org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:202)
> > >
> > >  at
> > > org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:278)
> > >
> > >  at
> > > org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:141)
> > >
> > >  at
> > > org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:317)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:153)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:85)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:156)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)
> > >
> > >  at
> > > prg.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:140)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:109)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:144)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:328)
> > >
> > >  at
> > > org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:293)
> > >
> > >  at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
> > >  at
> > > org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
> > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >
> > > It looks like the ServletContexrt object is not available as this time.
> > > Can anybody please confirm, or provide a way of accessing the
> > > ServletContext object from within an XSP ?
> > >
> > > Thanks
> > > Werner
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question  has not already been answered in the
> > > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.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/faq/index.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