tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Egidijus Drobavicius" <egidi...@vb.lt>
Subject jsp:usebean
Date Thu, 31 May 2001 08:42:47 GMT
Hi,
I've got one question:
I'd like to keep the constant string values in the single place to avoid the
mess. So I have class Constants.
let's say Constants have atrribute ATTR_MY_HANDLER="myHandler"
I use then code like this session.getAttribute(Constants.ATTR_MY_HANDLER).
This is OK
In jsp side i'd like to store this bean to session using jsp:usebean
directive.
But as i see the parser gets confused at this point if i write smth like
this
<jsp:useBean id=Constants.ATTR_MY_HANDLER scope="session" class="MyHandler"
/>
It insists that id value is of type String and is placed between "".
Is it possible to work around in nice way this situation or do I have to
place this attribute to the session manualy? I do hate using same attribute
in several places as it definetly leads to mistakes (i.e. I will not use
<jsp:useBean id="myHandler" scope="session" class="MyHandler" />

Regards,

Egidijus Drobavicius
AB Vilniaus Bankas
http://www.vb.lt
tel. + 370 2 682706


Egidijus Drobavicius
AB Vilniaus Bankas
http://www.vb.lt
tel. + 370 2 682706


Mime
View raw message