I found out that (1): ... <xsp:logic> String timeOfDay = (new SimpleDateFormat("MM/dd/yyyy")).format(new Date()); </xsp:logic> ... <esql:query> select * from info_bericht where country ='<xsp-request:get-parameter name="GETcountry"/>' AND Info_datum = #<xsp:expr>timeOfDay</xsp:expr># </esql:query> ...
works fine! BUT this (2/3/4) one is not working at all: ... <xsp:logic> try{ String timeOfDay = (new SimpleDateFormat("MM/dd/yyyy")).format(new Date()); }catch(Exception e){} </xsp:logic> ... <esql:query> select * from info_bericht where country ='<xsp-request:get-parameter name="GETcountry"/>' AND Info_datum = #<xsp:expr>timeOfDay</xsp:expr># </esql:query> ... error: description org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling IDC2_info_int_xsp: Line 371, column 9: variable timeOfDay not found in class org.apache.cocoon.www.logic.IDC2_info_int_xsp Line 0, column 0: 1 error AND (3) neither working: ... <xsp:logic> String timeOfDay = (new SimpleDateFormat("MM/dd/yyyy")).format(parameters.getParameter("date")); </xsp:logic> ... error: description org.apache.cocoon.ProcessingException: Language Exception: org.apache.cocoon.components.language.LanguageException: Error compiling IDC2_info_int_xsp: Line 302, column 62: unreported exception: org.apache.avalon.framework.parameters.ParameterException; must be caught or declared to be thrown Line 0, column 0: 1 error Nor (4): ... <xsp:logic> String timeOfDay = (new SimpleDateFormat("MM/dd/yyyy")).format(request.getParameter("date")); </xsp:logic> ... error: escription org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.IllegalArgumentException: Cannot format given Object as a Date I don't have a clue! Is there another way? King regards --------------------------------------------------------------------- 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]>