Sorry jan, ...and thabks a lot for your help! I posted the working one! ;-)
The NOT working logic/IDC2_info_int.xsp: <xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp-request="http://apache.org/xsp/request/2.0"> <xsp:logic> try{ String timeOfDay = (new SimpleDateFormat("MM/dd/yyyy")).format(request.getParameter("date")); }catch(Exception e){} </xsp:logic> <dataset> ... -----Ursprüngliche Nachricht----- Von: Scherler, Thorsten Gesendet: Freitag, 31. Januar 2003 13:54 An: [EMAIL PROTECTED] Betreff: AW: xsp-element equivalent to xsl:param? Hello jan, with the request I get a similar error like with the parameters. But here are all the files: my sitemap.xmap: <?xml version="1.0"?> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> <!-- =========================== Components ================================ --> <map:components> <map:generators default="file"> <map:generator label="content,data" logger="sitemap.generator.file" name="file" pool-grow="4" pool-max="32" pool-min="8" src="org.apache.cocoon.generation.FileGenerator"/> <map:generator label="content,data" logger="sitemap.generator.serverpages" name="xsp" pool-grow="2" pool-max="32" pool-min="4" src="org.apache.cocoon.generation.ServerPagesGenerator"/> </map:generators> <map:transformers default="xslt"> <map:transformer logger="sitemap.transformer.xslt" name="xslt" pool-grow="2" pool-max="32" pool-min="8" src="org.apache.cocoon.transformation.TraxTransformer"> <use-request-parameters>false</use-request-parameters> <use-browser-capabilities-db>false</use-browser-capabilities-db> <use-deli>false</use-deli> </map:transformer> </map:transformers> <map:readers default="resource"> <map:reader logger="sitemap.reader.resource" name="resource" pool-max="32" src="org.apache.cocoon.reading.ResourceReader"/> </map:readers> <map:serializers default="html"> <map:serializer logger="sitemap.serializer.xml" mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/> <map:serializer logger="sitemap.serializer.html" mime-type="text/html" name="html" pool-grow="4" pool-max="32" pool-min="4" src="org.apache.cocoon.serialization.HTMLSerializer"> <buffer-size>1024</buffer-size> </map:serializer> <map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" logger="sitemap.serializer.fo2pdf" mime-type="application/pdf"> <!-- --> <user-config src="/fonts/ci/config.xml"/> </map:serializer> </map:serializers> <map:matchers default="wildcard"> <map:matcher logger="sitemap.matcher.wildcard" name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/> </map:matchers> <map:selectors/> <map:actions> <map:action name="form-validator" src="org.apache.cocoon.acting.FormValidatorAction"/> </map:actions> </map:components> <map:views/> <!-- =========================== Components ================================ --> <!-- =========================== Pipelines ================================ --> <map:pipelines> <map:pipeline> <!-- =========================== Weidmueller ================================ --> <!-- index --> <map:match pattern=""> <map:redirect-to uri="start.html"/> </map:match> <!-- start --> <map:match pattern="start.html"> <map:generate typ="xml" src="docs/menu.xml"/> <map:transform src="stylesheets/html/menu2html.xsl"> <map:parameter name="use-request-parameters" value="true"/> </map:transform> <map:serialize type="html"/> </map:match> <!-- test --> <map:match pattern="test.html"> <map:generate typ="xml" src="docs/test.xml"/> <map:transform src="stylesheets/html/test2html.xsl"> <map:parameter name="use-request-parameters" value="true"/> </map:transform> <map:serialize type="html"/> </map:match> <snip/> <!-- =========================== IDC2================================ --> <!-- WI_int200301IDC2 - Info_sofort--> <map:match pattern="IDC2/info_int.xml"> <map:generate type="xsp" src="logic/IDC2_info_int.xsp"/> <map:serialize type="xml"/> </map:match> <map:match pattern="IDC2/info_int.pdf"> <map:aggregate element="Container"> <map:part src="cocoon:/IDC2/info_int.xml"/> </map:aggregate> <map:transform src="stylesheets/pdf/IDC2/bericht_int.xsl"/> <map:serialize type="fo2pdf"/> </map:match> </map:pipelines> </map:sitemap> logic/IDC2_info_int.xsp: <xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp-request="http://apache.org/xsp/request/2.0"> <dataset> <esql:connection> <esql:pool>IDC2_int</esql:pool> <esql:execute-query> <esql:query> select * from info_bericht where country ='<xsp-request:get-parameter name="GETcountry"/>' AND Info_datum = #<xsp-request:get-parameter name="date"/># </esql:query> <esql:results> <esql:row-results> <client> <address> <bname1> <esql:get-string column="business_name"/> </bname1> <bname2> <esql:get-string column="business_name_2"/> </bname2> <street> <esql:get-string column="address"/> </street> <street2> <esql:get-string column="address_2"/> </street2> <ZIP> <esql:get-string column="zip_code"/> </ZIP> <City> <esql:get-string column="city"/> </City> <country> <esql:get-string column="country"/> </country> <telephone_number> <esql:get-string column="telephone_number"/> </telephone_number> </address> <ap> <salutation> <esql:get-string column="salutation"/> </salutation> <titel> <esql:get-string column="titel"/> </titel> <forename> <esql:get-string column="forename"/> </forename> <surname> <esql:get-string column="surname"/> </surname> <textension> <esql:get-string column="direct_dial_"/> </textension> </ap> </client> </esql:row-results> </esql:results> <esql:no-results/> <esql:error-results/> </esql:execute-query> </esql:connection> </dataset> </xsp:page> -----Ursprüngliche Nachricht----- Von: Jan Harms [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 31. Januar 2003 13:49 An: [EMAIL PROTECTED] Betreff: AW: xsp-element equivalent to xsl:param? Andrew Timberlake wrote: > 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"); > Thorsten, do you need a sitemap-parameter or a request-parameter? From your previous posts I assume that you want a request Parameter. In that case you should use request.getParamter("date") instead of parameters.getParameter("date") The variables "request" and "parameters" are predefined variables in every XSP. Have a look at http://wiki.cocoondev.org/Wiki.jsp?page=XSPEnvironment Hope this helps -Jan Harms --------------------------------------------------------------------- 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]>