File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes beans in JSTL ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "beans in JSTL ?" Watch "beans in JSTL ?" New topic

beans in JSTL ?

Anand Gondhiya
Ranch Hand

Joined: Feb 24, 2004
Posts: 155
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.

Vicky Mohan
Ranch Hand

Joined: Oct 14, 2004
Posts: 130
well, you can set your bean object in request and display it in your JSP

<c ut value="${}"/> -- 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.
I agree. Here's the link:
subject: beans in JSTL ?
It's not a secret anymore!