wood burning stoves 2.0*
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
Author

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.

Thanks
-Anand.
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="${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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: beans in JSTL ?
 
Similar Threads
List items in struts
Validate content from JSP
setting a bean property from servlet and redirecting to jsp
struts Action for asynchronous HTTP processing
Passing a list of beans from a servlet to jsp page to display in html table