struts - accessing beans from JSP

B

bowkerSF

hello. in one of my jsps, i have something like <logic:notEmpty
name="myData">...</logic:notEmpty>. however, i'm not sure where
myData is coming from because there's no <jsp:useBean> tag anywhere in
the jsp. aside from just searching all the .java files for "myData,"
how do you determine where it's coming from?

and, i'm pretty sure you can't just access any ol' variable in that
<logic:notEmpty> tag. so, how do you know which ones are valid to
access and which ones aren't?

thanks
 
J

jlc488

hello.  in one of my jsps, i have something like <logic:notEmpty
name="myData">...</logic:notEmpty>.  however, i'm not sure where
myData is coming from because there's no <jsp:useBean> tag anywhere in
the jsp.  aside from just searching all the .java files for "myData,"
how do you determine where it's coming from?

and, i'm pretty sure you can't just access any ol' variable in that
<logic:notEmpty> tag.  so, how do you know which ones are valid to
access and which ones aren't?

thanks

i think it is called custom tag library...and..they usually sets in
request attribute..
 
A

Arne Vajhøj

hello. in one of my jsps, i have something like <logic:notEmpty
name="myData">...</logic:notEmpty>. however, i'm not sure where
myData is coming from because there's no <jsp:useBean> tag anywhere in
the jsp. aside from just searching all the .java files for "myData,"
how do you determine where it's coming from?

and, i'm pretty sure you can't just access any ol' variable in that
<logic:notEmpty> tag. so, how do you know which ones are valid to
access and which ones aren't?

It searches i page, request, session and application
scope.

But request scope is the most used (set by something like
Struts action).

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top