Thorsten,

here is a tip that might be useful: When you get a message "Error compiling foo.xsp" 
you should have a look at the generated java class.

Like JSPs, XSPs are transformed into a .java source file. Afterwards cocoon tries to 
compile this .java file into a .class file. These files can be found in Tomcats (or 
your servlet-engines) work-directory. Search for a subdirectory called 

cocoon-files/org/apache/cocoon/www/

There you can find a "foo_xsp.java" file. Open this file and search for syntax errors 
(the exception contains a line number!). Sure it´s generated code, but quite readable.

-Jan


> -----Ursprüngliche Nachricht-----
> Von: Scherler, Thorsten [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 31. Januar 2003 14:09
> An: [EMAIL PROTECTED]
> Betreff: AW: xsp-element equivalent to xsl:param?
> 
> 
> Yes, I've noticed that as well but with
> getParameter("date")); -> same exception.
> 
> Thanks
> 
> -----Ursprüngliche Nachricht-----
> Von: Geoff Howard [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 31. Januar 2003 14:17
> An: [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED]]
> > Sent: Friday, January 31, 2003 7:48 AM
> > To: [EMAIL PROTECTED]
> > 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(StandardContex
> t.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(Http11Process
> or.java:432)
> >     at
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.pr
> > ocessConnection(Http11Protocol.java:386)
> >     at
> > 
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
> nt.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:[EMAIL PROTECTED]]
> > Gesendet: Freitag, 31. Januar 2003 13:39
> > An: [EMAIL PROTECTED]
> > 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: [EMAIL PROTECTED]
> > > > 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:     
> <[EMAIL PROTECTED]>
> > > For additional commands, e-mail:   
> <[EMAIL PROTECTED]>
> > --
> > Andrew Timberlake <[EMAIL PROTECTED]>
> >
> >
> > 
> ---------------------------------------------------------------------
> > 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:     
> <[EMAIL PROTECTED]>
> > For additional commands, e-mail:   
> <[EMAIL PROTECTED]>
> >
> >
> > 
> ---------------------------------------------------------------------
> > 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:     
> <[EMAIL PROTECTED]>
> > For additional commands, e-mail:   
> <[EMAIL PROTECTED]>
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> 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:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 
> ---------------------------------------------------------------------
> 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:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 

---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to