• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

set java bean property using JSTL

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic