Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 93307 invoked by uid 500); 31 Jan 2003 15:14:12 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 93262 invoked from network); 31 Jan 2003 15:14:11 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: AW: AW: AW: xsp-element equivalent to xsl:param? Date: Fri, 31 Jan 2003 16:13:42 +0100 Message-ID: <3671ACD9D9D5C648A6181F8048DC9A5D09576F@srvde016.weidmueller.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: AW: AW: xsp-element equivalent to xsl:param? Thread-Index: AcLJOl5DrwdN0Dw9S3O/Edhzc3SWcQAAEJsQ From: "Scherler, Thorsten" To: X-OriginalArrivalTime: 31 Jan 2003 15:13:42.0847 (UTC) FILETIME=[578654F0:01C2C93B] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Thanks, but now I am not getting any results because is always timeOfDay =3D "". I will look into using tags. Thanks for your patience. -----Urspr=FCngliche Nachricht----- Von: Andrew Timberlake [mailto:andrew@timberlake.co.za] Gesendet: Freitag, 31. Januar 2003 16:07 An: cocoon-users@xml.apache.org Betreff: Re: AW: AW: xsp-element equivalent to xsl:param? Try this ... String timeOfDay =3D ""; try{ timeOfDay =3D (new SimpleDateFormat("MM/dd/yyyy")).format(request.getParameter("date")); }catch(Exception e){} =20 IDC2_int select * from info_bericht where country =3D'' AND Info_datum =3D #timeOfDay# I will mention again that you should look into using tags. Andrew On Fri, 2003-01-31 at 16:46, Scherler, Thorsten wrote: > Hello Andrew, >=20 > my final xsp should look like this: > ... > > > try{ > String timeOfDay =3D (new > SimpleDateFormat("MM/dd/yyyy")).format(request.getParameter("date")); > }catch(Exception e){} > > > IDC2_int > > > select * from info_bericht where country = =3D'' AND Info_datum = =3D #timeOfDay# > > ... >=20 > like I stated before, as soon I get rid off the logic my query is = successful. >=20 > Like you told me before my method now starts after the first xml = element: >=20 > snip from IDC2_info_int_xsp.java > /** > * Generate XML data. > */ > public void generate() throws SAXException, IOException, = ProcessingException { > this.contentHandler.startDocument(); > AttributesImpl xspAttr =3D new AttributesImpl(); >=20 > ... >=20 > this.contentHandler.startElement( > "", > "dataset", > "dataset", > xspAttr > ); > xspAttr.clear(); >=20 >=20 > this.characters("\n "); > =20 > try{ > String timeOfDay =3D (new > SimpleDateFormat("MM/dd/yyyy")).format(request.getParameter("date")); > }catch(Exception e){} > =20 > this.characters("\n\t\t"); > ...=20 >=20 >=20 > -----Urspr=FCngliche Nachricht----- > Von: Andrew Timberlake [mailto:andrew@timberlake.co.za] > Gesendet: Freitag, 31. Januar 2003 15:30 > An: cocoon-users@xml.apache.org > Betreff: Re: AW: xsp-element equivalent to xsl:param? >=20 >=20 > On Fri, 2003-01-31 at 16:09, Scherler, Thorsten wrote: > > Hello Jan, > >=20 > > I couldn't find the error. > >=20 > > But I attached it. > >=20 > I was reading your previous post in which you posted your xsp source. > Instead of this: > > > select * from info_bericht where country = =3D' name=3D"GETcountry"/>' AND Info_datum =3D ## > >=20 > Try this: > > > select * from info_bericht where country =3D = name=3D"GETcountry"/> AND Info_datum =3D = > >=20 > This will then use a PreparedStatement which is safer from possible = SQL exploit. >=20 > Other than that, the XSP source didn't show where you were using the = direct access to parameters.getParameter() or request.getParameter() >=20 > Andrew >=20 > Andrew >=20 >=20 > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. >=20 > To unsubscribe, e-mail: > For additional commands, e-mail: >=20 >=20 > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. >=20 > To unsubscribe, e-mail: > For additional commands, e-mail: --=20 Andrew Timberlake --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: