This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes set java bean property using JSTL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "set java bean property using JSTL" Watch "set java bean property using JSTL" New topic
Author

set java bean property using JSTL

praveen sharma
Ranch Hand

Joined: May 27, 2006
Posts: 44
Hi,

i need help in setting the java bean property using JSTL .which i am fail to accomplish .so anyone who can help me will be a world of good.

Bye
praveen
subodh gupta
Ranch Hand

Joined: Jul 23, 2007
Posts: 203
hi Parveen,

Where are you facing problem?

If you have tried something please paste the code and the exception.

If not i'll recommend you to try it yourself first.


http://subodh-gupta.blogspot.com
Sahid Khan
Ranch Hand

Joined: Jun 27, 2007
Posts: 41
You can do that using set core tag.
e.g., <c:set target="${bean}" property="name" value="foo"/> is equivalent to bean.setName("foo").

HTH.
praveen sharma
Ranch Hand

Joined: May 27, 2006
Posts: 44
hi,

thank alot i am able to access Java bean but i want to knew can't i create bean object using JSTL tag.i first have to create bean object using standard tag then i am able to use .

any suggestion will be help ful to me

Thanks
Praveen
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You shouldn't be creating objects using JSTL.

In a well written, scriptless JSP application, JSTL and EL are only needed to work with existing scoped variables.

If you want to see a very simple example of a JSP that uses a bean that was bound to scope by a servlet, look at the SimpleMVC example in our codebarn.
http://www.javaranch.com/codebarn/codebarn-servlets-simplemvc.jsp


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: set java bean property using JSTL
 
Similar Threads
rendered problem
JSTL Drop Down
JSTL Expression issue
Spring Javamelody
accessing bean variable dynamically