Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

beans in JSTL ?

 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I have struts application on Weblogic 8,Win XP.

I have a form which has few text fields. Information can be filled out in this form and submitted. After successful submit it should show up on the page as added record.

Now I have Java beans,DAOs for information retrievel from Database.

As I go adding items I want to see them on the page , How do I do this in JSTL ? Can you do this in JSTL ? or you have to use <jsp:useBean> tag and retrieve all the information from bean ???

i.e how do you use java beans(not the ActionForms though) and it's methods in JSTL ?

I hope I am making my question easy to understand.

Thanks
-Anand.
 
Vicky Mohan
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, you can set your bean object in request and display it in your JSP

<c ut value="${object.id}"/> -- this will display the id attribute of the object that has been set in request.

If the scope of the form is session, it will be available , if you just update the form in your Struts Action. Its not a good practice though to have the form scoped to session.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic