You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Sébastien Dui <du...@dui.be> on 2002/08/14 16:33:32 UTC

Passing parameters

Hi, 

How can I retrieve the parameters from the querystring in the java code,
when calling directly a velocity page with Turbine ?

I'm using TDK 2.1

Any help would be greatly appreciated. 

Regards, 

Sébastien Dui 
dui@dui.be

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Passing parameters

Posted by Sven Homburg <Sv...@hsofttec.com>.
SD> Hi, 

SD> How can I retrieve the parameters from the querystring in the java code,
SD> when calling directly a velocity page with Turbine ?

SD> I'm using TDK 2.1

SD> Any help would be greatly appreciated. 

SD> Regards, 

SD> Sébastien Dui 
SD> dui@dui.be

SD> --
SD> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
SD> For additional commands, e-mail: <ma...@jakarta.apache.org>

try $data.getParameters().getString("keyword")

Best regards
homburg Softwaretechnik
Sven Homburg
D-21220 Seevetal

http://www.hsofttec.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Passing parameters

Posted by Eliot <tu...@juxti.co.uk>.
I think what you're after is the ParameterParser class - Take a
look at the ParameterParser docs in the Turbine api docs.

The ParameterParser can be obtained from the RunData object using
the getParameters() method. Turbine takes care of populating the
ParameterParser for you on every request, with any query string
(and path info and POST sent) parameters submitted by that
request.

This code might help:

ParameterParser pp;
if(data.getParameters() != null) {
	pp = data.getParameters();
}

Access the ParameterParser from a Velocity template like so:

#set( $params = $data.Parameters )

## OUTPUTTING A PARAMETER'S VALUE:
$params.myParameter



Just read the docs - I think its all there.
Eliot

On Wed, 14 Aug 2002 16:33:32 +0200
Sébastien Dui <du...@dui.be> wrote:

> 
> Hi, 
> 
> How can I retrieve the parameters from the querystring in the
> java code, when calling directly a velocity page with Turbine ?
> 
> I'm using TDK 2.1
> 
> Any help would be greatly appreciated. 
> 
> Regards, 
> 
> Sébastien Dui 
> dui@dui.be
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org> For
> additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>