You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Colic, Alex" <al...@rbc.com> on 2002/08/28 18:26:11 UTC

How can listener read parameters?

	Hi,

	I have a listener defined as follows:

<Server port=3D"8005" shutdown=3D"SHUTDOWN" debug=3D"0">

<Parameter name=3D"cloudscapeURL" value=3D"d:/database/test"
override=3D"false"/>
<Listener className=3D"CloudscapeTie" debug=3D"5"/>

=46rom within the CloudscapeTie class how can I read the 'cloudscapeURL'
parameters?

Thanks for any info.

Alex


------------------------------------------------------------------------------------------------------------------------------------------
This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. 

Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courriel par erreur, veuillez m'en aviser immédiatement, par retour de courriel ou par un autre moyen. 


==============================================================================

Re: How can listener read parameters?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 28 Aug 2002, Colic, Alex wrote:

> Date: Wed, 28 Aug 2002 12:26:11 -0400
> From: "Colic, Alex" <al...@rbc.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: "'tomcat-user@jakarta.apache.org'" <to...@jakarta.apache.org>
> Subject: How can listener read  parameters?
>
>
> 	Hi,
>
> 	I have a listener defined as follows:
>
> <Server port=3D"8005" shutdown=3D"SHUTDOWN" debug=3D"0">
>
> <Parameter name=3D"cloudscapeURL" value=3D"d:/database/test"
> override=3D"false"/>
> <Listener className=3D"CloudscapeTie" debug=3D"5"/>
>
> =46rom within the CloudscapeTie class how can I read the 'cloudscapeURL'
> parameters?
>

The best strategy would be to create a setUrl() method on your Listener
class and do this instead:

  <Listener className="CloudscapeTie" url="d:/database/test"/>

When server.xml is processed, Tomcat looks at the attributes of each XML
element and searches for a matching property setter on the corresponding
class.

> Thanks for any info.
>
> Alex

Craig


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