class FormBean() {
private String xxx;
public String getXXX() {
return this.xxx;
}
public void setXXX(String xxx) {
this.xxx = xxx;
}
}
session.setAttribute(formbean,new FormBean().setXXX());
FormBean oFormeBean = (FormBean)session.getAttribute(formbean);
String xxx =
Hi Dilip,
You can define the bean in tiles def to use it across the pages.
The put tag is used to associate a value to an attribute. It allows
specifying the attribute name and its value. The attribute value will be
retrieved by its name.
The value can be specified in several ways:
as a bean
, 2005 8:07
PM
Subject: Re: bean:define and its
behaviour
Gaet,This is not a Struts thing, this is a JSP thing.
read bean:definedocumentation [1] and look at the source code
generated by servletcontainer as James suggested. Documentation states
clearly in the veryfirst sentence
Hi Michael,
Sorry to disturb again, just another question :
If i use scoped variable, than what do I must write in value attribute of
a notEqual tag?
So what do I have to write instead of
nested:notEqual property=idservice value=%=myVar%
I have tried
nested:notEqual
Nobody knows the answer to this trivial question?
Thanks
- Original Message -
From: Gaet
To: Mailing List Struts
Sent: Monday, November 21, 2005 10:08 AM
Subject: bean:define and its behaviour
Hi,
I'm sure this question is easy to answer for much of yours but I
To: Struts Users Mailing List
Sent: Monday, November 21, 2005 5:54
PM
Subject: Re: bean:define and its
behaviour
If it is trivial, why won't you look it up yourself? The key is
tounderstand that myVar objects used here
bean:define id="myVar" value=""/and here
12:46 PM
To: Struts Users Mailing List
Subject: Re: bean:define and its behaviour
Thanks for reply Michael,
I mean that it's certainly trivial for experimented users with strutsnot
like me :o)
I try to look...but I can't find the solutionwhy this variables are
different
are in
the CATALINA_BASE/work directory.
-Original Message-
From: Gaet [mailto:[EMAIL PROTECTED]
Sent: Monday, November 21, 2005 12:46 PM
To: Struts Users Mailing List
Subject: Re: bean:define and its behaviour
Thanks for reply Michael,
I mean that it's certainly trivial
On 11/21/05, Garner, Shawn [EMAIL PROTECTED] wrote:
I try to edit my JSP in Eclipse 3.1.1 WTP (Web Tools Project) however I get
errors on variables defined by ID tags for example:
snip
bean:define id=myValue1 type=String/
bean:define id=myValue2 type=String/
%=(myValue1 + - myValue2)%
yes its an arraylist
On Wed, 10 Nov 2004 15:50:36 +0800, Peng Tuck [EMAIL PROTECTED] wrote:
Hi Richard,
You use bean:define to define a bean with a id of user but yet
in logic:iterate you refer to originatingHost ?
I think it should be refering to user instead for logic:iterate.
So in logic:iterate you should refer to the bean you defined, using
bean:define right ?
Richard wrote:
yes its an arraylist
On Wed, 10 Nov 2004 15:50:36 +0800, Peng Tuck [EMAIL PROTECTED] wrote:
Hi Richard,
You use bean:define to define a bean with a id of user but yet
in logic:iterate
Hi Peng.
Please tell me what how exactly should I do it? Should I define bean
user then define bean originatingHost which is an attr of user object?
On Wed, 10 Nov 2004 17:52:54 +0800, Peng Tuck [EMAIL PROTECTED] wrote:
So in logic:iterate you should refer to the bean you defined, using
Uh, you already have defined it using bean:define. Check the original
code snippet you sent.
You're just referring to the wrong bean in logic:iterate .
To be clear you might want to have a look see at the taglib docs right here
http://struts.apache.org/userGuide/struts-bean.html#define
Richard
-Original Message-
From: Richard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 10, 2004 4:45 PM
To: Struts Users Mailing List
Subject: Re: Bean:define : Newbie Question
Hi Peng.
Please tell me what how exactly should I do it? Should I define bean
user then define bean originatingHost which
Hi Richard,
You use bean:define to define a bean with a id of user but yet
in logic:iterate you refer to originatingHost ?
I think it should be refering to user instead for logic:iterate.
Also is originatingHost a collection ?
Richard wrote:
Hello Guys,
Please help I have to display the
Gnan,
I see you are using displaytag with EL. Are you using Displaytag v1.2 EL
tld? Are you using a JSP 2.0 container? If the container, where is your
dollrsign for the line
export={exportIndex} ...
Shouldn't that portion of the line be:
export=${exportIndex} ...
Regards,
David
bean:define creates a scoped attribute AND a scripting variable, whereas
c:set just created the scoped attribute. In your example you are making
use of the scripting variable feature (as the data is already available as a
scoped attribute).
But, with JSP2, all tags magically become EL aware (I
You are correct that c:set does not create a scripting variable, so
you can't use the specified identifier in a scriptlet. The question,
though, is why are you still using a scriptlet expression? Why not
use an EL expression instead?
pg:pager maxPageItems=${pageItems}/
or, to avoid needing
[mailto:[EMAIL PROTECTED]
Verzonden: donderdag 29 juli 2004 18:25
Aan: Struts Users Mailing List
Onderwerp: Re: bean:define vs c:set
You are correct that c:set does not create a scripting variable, so
you can't use the specified identifier in a scriptlet. The question,
though, is why are you still
19 matches
Mail list logo