cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leo leonid <...@leonid.de>
Subject Re: Passing parameters to an XSP
Date Thu, 30 Jan 2003 19:07:30 GMT

On Donnerstag, Januar 30, 2003, at 07:47  Uhr, 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

instead of this



> 			String datasource=parameters.getParameter("datasource");
> 			String xpath=parameters.getParameter("xpath");


try this, (which provides a default value if the param is not 
available).

String 
datasource=parameters.getParameter("datasource","defaultdatasource");
String xpath=parameters.getParameter("xpath","default");

/Leo


---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message