Mark - Yup, you do. I use something like:
<xsp:logic> String myparam = ""; try { myparam = parameters.getParameter("myparam"); } catch (Exception e) { } </xsp:logic> Make sure it comes AFTER the root user tag in your XSP. Regards, Lajos Mark H wrote:
I'm trying to pass parameters to an XSP but I'm getting an exception: unreported exception: org.apache.avalon.framework.parameters.ParameterException; must be caught or declared to be thrown I saw a similar post in the archives but when I tried the recommended solution it still didn't work, any ideas? Do I have to stick in a try catch? Thx, Mark sitemap: <map:match pattern="test"> <map:generate type="serverpages" src="util/executeQuery.xsp"> <map:parameter name="datasource" value="{global:datasource}"/> <map:parameter name="xpath" value="/structure"/> </map:generate> <map:serialize type="xml"/> </map:match> executeQuery.xsp: <xsp:page xmlns:xsp="http://apache.org/xsp" xmlns:xmldb="http://exist-db.org/xmldb/1.0"> <page> <xsp:logic> String datasource=parameters.getParameter("datasource"); String xpath=parameters.getParameter("xpath"); </xsp:logic> <xmldb:init/> <xmldb:collection> <xmldb:uri>"xmldb:xindice:///db/"+datasource</xmldb:uri> <xmldb:execute> <xmldb:xpath>xpath</xmldb:xpath> <xmldb:results> <xmldb:get-xml as="xml"/> </xmldb:results> </xmldb:execute> </xmldb:collection> </page> </xsp:page> --------------------------------------------------------------------- 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]>
-- Lajos Moczar ---------------------------------------- Open Source Support, Consulting and Training ---------------------------------------- Cocoon Developer's Handbook (www.amazon.com/exec/obidos/tg/detail/-/0672322579) _ _____ / \ / /___\ / / \ /____ http://www.galatea.com -- powered by AzSSL --------------------------------------------------------------------- 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]>