You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael Lee <ml...@hotmail.com> on 2002/12/02 22:52:05 UTC
bean:define for value in properties file
I have a value in my ApplicationResources.properties called
page.title=Customer Information
I want to have this value available in the page context. I would like to use a struts tag to do so. If not, I have to use a scriptlet (which I try to avoid).
here is what I'd like to do
<bean:define id="pageTitle" value="page.title"/>
any ideas?
thanks,
Mike
Re: bean:define for value in properties file
Posted by Kris Schneider <kr...@dotech.com>.
I don't think it can be done with Struts tags in 1.0.2, but if you're able to
use JSTL (requires JSP 1.2):
<c:set var="pageTitle">
<bean:message key="page.title"/>
</c:set>
Quoting Michael Lee <ml...@hotmail.com>:
> Is there a way in 1.0.2?
> thanks,
> Mike
>
> ----- Original Message -----
> From: "Joe Germuska" <Jo...@Germuska.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Monday, December 02, 2002 5:33 PM
> Subject: Re: bean:define for value in properties file
>
>
> > At 5:08 PM -0500 2002/12/02, Michael Lee wrote:
> > >Not view it, set it to a pageContext variable.
> > >thanks though,
> >
> > <bean:define id="pageTitle">
> > <bean:message key="page.title" />
> > </bean:define>
> >
> > Since Struts 1.1 (I think) bean:define can use its body content to
> > define a literal String bean.
> >
> > Joe
> >
> >
> >
> > >Mike
> > >
> > >----- Original Message -----
> > >From: "Andrew B Forman" <an...@wcom.com>
> > >To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > >Sent: Monday, December 02, 2002 5:03 PM
> > >Subject: RE: bean:define for value in properties file
> > >
> > >
> > >> <bean:message key="page.title" />
> > >>
> >
> >http://jakarta.apache.org/struts/api/org/apache/struts/taglib/bean/MessageT
> a
> > >> g.html
> > >>
> > >> a
> > >>
> > >> > -----Original Message-----
> > >> > From: Michael Lee [mailto:mleejr@hotmail.com]
> > >> > Sent: Monday, December 02, 2002 3:52 PM
> > >> > To: Struts Users Mailing List
> > >> > Subject: bean:define for value in properties file
> > >> >
> > >> >
> > >> > I have a value in my ApplicationResources.properties called
> > >> > page.title=Customer Information
> > >> > I want to have this value available in the page context. I would
> > >> > like to use a struts tag to do so. If not, I have to use a
> > >> > scriptlet (which I try to avoid).
> > >> > here is what I'd like to do
> > >> > <bean:define id="pageTitle" value="page.title"/>
> > >> > any ideas?
> > >> > thanks,
> > >> > Mike
> > >>
> > >>
> > >> --
> > >> 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>
> >
> >
> > --
> > --
> > * Joe Germuska { joe@germuska.com }
> > "It's pitiful, sometimes, if they've got it bad. Their eyes get
> > glazed, they go white, their hands tremble.... As I watch them I
> > often feel that a dope peddler is a gentleman compared with the man
> > who sells records."
> > --Sam Goody, 1956
> >
> > --
> > 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>
>
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: bean:define for value in properties file
Posted by Michael Lee <ml...@hotmail.com>.
Is there a way in 1.0.2?
thanks,
Mike
----- Original Message -----
From: "Joe Germuska" <Jo...@Germuska.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, December 02, 2002 5:33 PM
Subject: Re: bean:define for value in properties file
> At 5:08 PM -0500 2002/12/02, Michael Lee wrote:
> >Not view it, set it to a pageContext variable.
> >thanks though,
>
> <bean:define id="pageTitle">
> <bean:message key="page.title" />
> </bean:define>
>
> Since Struts 1.1 (I think) bean:define can use its body content to
> define a literal String bean.
>
> Joe
>
>
>
> >Mike
> >
> >----- Original Message -----
> >From: "Andrew B Forman" <an...@wcom.com>
> >To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> >Sent: Monday, December 02, 2002 5:03 PM
> >Subject: RE: bean:define for value in properties file
> >
> >
> >> <bean:message key="page.title" />
> >>
>
>http://jakarta.apache.org/struts/api/org/apache/struts/taglib/bean/MessageT
a
> >> g.html
> >>
> >> a
> >>
> >> > -----Original Message-----
> >> > From: Michael Lee [mailto:mleejr@hotmail.com]
> >> > Sent: Monday, December 02, 2002 3:52 PM
> >> > To: Struts Users Mailing List
> >> > Subject: bean:define for value in properties file
> >> >
> >> >
> >> > I have a value in my ApplicationResources.properties called
> >> > page.title=Customer Information
> >> > I want to have this value available in the page context. I would
> >> > like to use a struts tag to do so. If not, I have to use a
> >> > scriptlet (which I try to avoid).
> >> > here is what I'd like to do
> >> > <bean:define id="pageTitle" value="page.title"/>
> >> > any ideas?
> >> > thanks,
> >> > Mike
> >>
> >>
> >> --
> >> 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>
>
>
> --
> --
> * Joe Germuska { joe@germuska.com }
> "It's pitiful, sometimes, if they've got it bad. Their eyes get
> glazed, they go white, their hands tremble.... As I watch them I
> often feel that a dope peddler is a gentleman compared with the man
> who sells records."
> --Sam Goody, 1956
>
> --
> 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>
Re: bean:define for value in properties file
Posted by Joe Germuska <Jo...@Germuska.com>.
At 5:08 PM -0500 2002/12/02, Michael Lee wrote:
>Not view it, set it to a pageContext variable.
>thanks though,
<bean:define id="pageTitle">
<bean:message key="page.title" />
</bean:define>
Since Struts 1.1 (I think) bean:define can use its body content to
define a literal String bean.
Joe
>Mike
>
>----- Original Message -----
>From: "Andrew B Forman" <an...@wcom.com>
>To: "Struts Users Mailing List" <st...@jakarta.apache.org>
>Sent: Monday, December 02, 2002 5:03 PM
>Subject: RE: bean:define for value in properties file
>
>
>> <bean:message key="page.title" />
>>
>http://jakarta.apache.org/struts/api/org/apache/struts/taglib/bean/MessageTa
>> g.html
>>
>> a
>>
>> > -----Original Message-----
>> > From: Michael Lee [mailto:mleejr@hotmail.com]
>> > Sent: Monday, December 02, 2002 3:52 PM
>> > To: Struts Users Mailing List
>> > Subject: bean:define for value in properties file
>> >
>> >
>> > I have a value in my ApplicationResources.properties called
>> > page.title=Customer Information
>> > I want to have this value available in the page context. I would
>> > like to use a struts tag to do so. If not, I have to use a
>> > scriptlet (which I try to avoid).
>> > here is what I'd like to do
>> > <bean:define id="pageTitle" value="page.title"/>
>> > any ideas?
>> > thanks,
>> > Mike
>>
>>
>> --
>> 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>
--
--
* Joe Germuska { joe@germuska.com }
"It's pitiful, sometimes, if they've got it bad. Their eyes get
glazed, they go white, their hands tremble.... As I watch them I
often feel that a dope peddler is a gentleman compared with the man
who sells records."
--Sam Goody, 1956
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: bean:define for value in properties file
Posted by Michael Lee <ml...@hotmail.com>.
Not view it, set it to a pageContext variable.
thanks though,
Mike
----- Original Message -----
From: "Andrew B Forman" <an...@wcom.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, December 02, 2002 5:03 PM
Subject: RE: bean:define for value in properties file
> <bean:message key="page.title" />
>
http://jakarta.apache.org/struts/api/org/apache/struts/taglib/bean/MessageTa
> g.html
>
> a
>
> > -----Original Message-----
> > From: Michael Lee [mailto:mleejr@hotmail.com]
> > Sent: Monday, December 02, 2002 3:52 PM
> > To: Struts Users Mailing List
> > Subject: bean:define for value in properties file
> >
> >
> > I have a value in my ApplicationResources.properties called
> > page.title=Customer Information
> > I want to have this value available in the page context. I would
> > like to use a struts tag to do so. If not, I have to use a
> > scriptlet (which I try to avoid).
> > here is what I'd like to do
> > <bean:define id="pageTitle" value="page.title"/>
> > any ideas?
> > thanks,
> > Mike
>
>
> --
> 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>
RE: bean:define for value in properties file
Posted by Andrew B Forman <an...@wcom.com>.
<bean:message key="page.title" />
http://jakarta.apache.org/struts/api/org/apache/struts/taglib/bean/MessageTa
g.html
a
> -----Original Message-----
> From: Michael Lee [mailto:mleejr@hotmail.com]
> Sent: Monday, December 02, 2002 3:52 PM
> To: Struts Users Mailing List
> Subject: bean:define for value in properties file
>
>
> I have a value in my ApplicationResources.properties called
> page.title=Customer Information
> I want to have this value available in the page context. I would
> like to use a struts tag to do so. If not, I have to use a
> scriptlet (which I try to avoid).
> here is what I'd like to do
> <bean:define id="pageTitle" value="page.title"/>
> any ideas?
> thanks,
> Mike
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>