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]>

Reply via email to