cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scherler, Thorsten" <Thorsten.Scher...@weidmueller.de>
Subject AW: xsp-element equivalent to xsl:param?
Date Fri, 31 Jan 2003 13:08:45 GMT
Yes, I've noticed that as well but with
getParameter("date")); -> same exception.

Thanks

-----Ursprüngliche Nachricht-----
Von: Geoff Howard [mailto:cocoon@leverageweb.com]
Gesendet: Freitag, 31. Januar 2003 14:17
An: cocoon-users@xml.apache.org
Betreff: RE: xsp-element equivalent to xsl:param?


Wast that cut and pasted?  It looks like you're missing an end ) - should
be:
  getParameter("date"));

Geoff

> -----Original Message-----
> From: Scherler, Thorsten [mailto:Thorsten.Scherler@weidmueller.de]
> Sent: Friday, January 31, 2003 7:48 AM
> To: cocoon-users@xml.apache.org
> Subject: AW: xsp-element equivalent to xsl:param?
>
>
> Hello Andrew,
>
> with:
> <xsp:logic>
> try{
>     String timeOfDay = (new
> SimpleDateFormat("MM/dd/yyyy")).format(parameters.getParameter("date");
> }catch(Exception e){}
> </xsp:logic>
>
> I get:
>
> type fatal
>
> message Language Exception
>
> description org.apache.cocoon.ProcessingException: Language
> Exception:
> org.apache.cocoon.components.language.LanguageException: Error
> compiling IDC2_info_int_xsp: Line 251, column 0: illegal start of
> type Line 105, column 11: class
> org.apache.cocoon.www.logic.IDC2_info_int_xsp should be declared
> abstract; it does not define method generate() in class
> org.apache.cocoon.generation.AbstractGenerator Line 0, column 0: 2 errors
>
> sender org.apache.cocoon.servlet.CocoonServlet
>
> source Cocoon servlet
>
> stack-trace
>
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error
> compiling IDC2_info_int_xsp:
> Line 251, column 0:  illegal start of type
> Line 105, column 11:  class
> org.apache.cocoon.www.logic.IDC2_info_int_xsp should be declared
> abstract; it does not define method generate() in class
> org.apache.cocoon.generation.AbstractGenerator
> Line 0, column 0:
> 2 errors
>
> 	at
> org.apache.cocoon.components.language.generator.ProgramGeneratorIm
> pl.createResource(ProgramGeneratorImpl.java:340)
> 	at
> org.apache.cocoon.components.language.generator.ProgramGeneratorIm
> pl.load(ProgramGeneratorImpl.java:292)
> 	at
> org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPage
> sGenerator.java:198)
> 	at
> org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupP
> ipeline(AbstractEventPipeline.java:202)
> 	at
> org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(C
achingEventPipeline.java:278)
> 	at
> org.apache.cocoon.components.pipeline.CachingEventPipeline.generat
> eKey(CachingEventPipeline.java:141)
> 	at
> org.apache.cocoon.components.pipeline.CachingStreamPipeline.proces
> s(CachingStreamPipeline.java:317)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.i
> nvoke(SerializeNode.java:153)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessin
> gNode.invokeNodes(AbstractParentProcessingNode.java:85)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatch
> Node.invoke(PreparableMatchNode.java:156)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessin
> gNode.invokeNodes(AbstractParentProcessingNode.java:109)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.in
> voke(PipelineNode.java:140)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessin
> gNode.invokeNodes(AbstractParentProcessingNode.java:109)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.i
> nvoke(PipelinesNode.java:144)
> 	at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(T
> reeProcessor.java:328)
> 	at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(T
> reeProcessor.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)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
pplicationFilterChain.java:247)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
> onFilterChain.java:193)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
> erValve.java:260)
> 	at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> text.invokeNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:480)
> 	at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardConte
> xtValve.java:191)
> 	at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> text.invokeNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:480)
> 	at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
> e.java:180)
> 	at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> text.invokeNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispat
> cherValve.java:170)
> 	at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> text.invokeNext(StandardPipeline.java:641)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValv
> e.java:172)
> 	at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> text.invokeNext(StandardPipeline.java:641)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:480)
> 	at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine
> Valve.java:174)
> 	at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveCon
> text.invokeNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:480)
> 	at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
> 	at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.pr
> ocessConnection(Http11Protocol.java:386)
> 	at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
> 	at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thre
> adPool.java:530)
> 	at java.lang.Thread.run(Thread.java:479)
> org.apache.cocoon.components.language.LanguageException: Error
> compiling IDC2_info_int_xsp:
> Line 251, column 0:  illegal start of type
> Line 105, column 11:  class
> org.apache.cocoon.www.logic.IDC2_info_int_xsp should be declared
> abstract; it does not define method generate() in class
> org.apache.cocoon.generation.AbstractGenerator
> Line 0, column 0:
> 2 errors
>
>
> -----Ursprüngliche Nachricht-----
> Von: Andrew Timberlake [mailto:andrew@timberlake.co.za]
> Gesendet: Freitag, 31. Januar 2003 13:39
> An: cocoon-users@xml.apache.org
> Betreff: Re: xsp-element equivalent to xsl:param?
>
>
> On Fri, 2003-01-31 at 14:31, Scherler, Thorsten wrote:
> > Hello group,
> >
> > is there an equivalent in xsp to the xsl: <xsl:param name="date"/>?
> Yes, see below
>
> >
> > e.g. guess my request is like that: ...?date=30%2F01%2F2003.
> >
> > And
> > <esql:query>
> >          select * from info_bericht  where Info_datum =
> #<xsp-request:get-parameter name="date"/>#
> >  </esql:query>
> > is working fine.
> >
> > But <xsp-request:get-parameter name="date"/> can't be used in
> <xsp:logic/> like that:
> > 	<xsp:logic>
> >     String timeOfDay = (
> >       new SimpleDateFormat("MM/dd/yyyy")
> >     ).format(<xsp-request:get-parameter name="date"/>);
> >   </xsp:logic>
>
> <xsp:logic>
> try{
>     String timeOfDay = (new
> SimpleDateFormat("MM/dd/yyyy")).format(parameters.getParameter("date");
> }catch(Exception e){}
> </xsp:logic>
>
> You will need to wrap the code in a try/catch block or alternatively use
> the syntax: parameters.getParameter("date", "default value of choice");
>
> >
> > If I do that I get:
> > type fatal
> > message Language Exception
> > description org.apache.cocoon.ProcessingException: Language
> Exception:
> org.apache.cocoon.components.language.LanguageException: Error
> while instantiating
> org\apache\cocoon\www\logic\IDC2_info_int_xsp:
> java.lang.NullPointerException
> >
> > King regards for any help!
> >
> > > Mit freundlichem Gruss,
> > >
> > > Thorsten Scherler
> > > Marketing / Telefonmarketing
> > >
> > > Weidmüller GmbH & Co.
> > > P.O. Box 2807
> > > 33058 Paderborn
> > > Tel.:+ 49 - 5252-960-350
> > > Fax:+ 49 - 5252-960-116
> > > eMail: thorsten.scherler@weidmueller.de
> > > http://www.weidmueller.de
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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>
> --
> Andrew Timberlake <andrew@timberlake.co.za>
>
>
> ---------------------------------------------------------------------
> 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