aspose file tools*
The moose likes Servlets and the fly likes JSP:: How to set a list of values using setProperty? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP:: How to set a list of values using setProperty?" Watch "JSP:: How to set a list of values using setProperty?" New topic
Author

JSP:: How to set a list of values using setProperty?

Manohar Karamballi
Ranch Hand

Joined: Jul 17, 2001
Posts: 227
Hai All!
Here is my problem. I have JSP page that is tied to a Javabean in which one of properties are Array of Strings.
Now my problem is regarding how to set values in JSP page using setProperty tag? Is it possiblw witout using Scriptlets?
Rgds
Manohar
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12675
    
    5
To put values from a bean into the page you need <jsp:getProperty tag. Since getProperty uses only the name of the property, I don't see how you could address individual elements of the array without doing some extra programming as scriptlets or custom tags.
Bill

------------------
author of:


Java Resources at www.wbrogden.com
Manohar Karamballi
Ranch Hand

Joined: Jul 17, 2001
Posts: 227
Hai!
Thanks for ur reply. Can u explain what are custom tags in JSP with an example?
TIA
Rgds
Manohar
Sunetra Saha
Ranch Hand

Joined: Feb 25, 2001
Posts: 77
Custom tags are tags just like<jsp: SetProperty> but are tags whose implementation is written by yourself. There are lots of tutorials available for writing custom tags - even on the sun site itself.
Try this http://java.sun.com/j2ee/tutorial/doc/JSPTags2.html>
or this http://developer.java.sun.com/developer/Books/cservletsjsp/chapter14.pdf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP:: How to set a list of values using setProperty?
 
Similar Threads
Logic Iterate Problem
jsp:getProperty gives null
JSP setproperty
Trying to understand how ONGL OgnlRuntime setProperty() works
Bean Undefined Exception in JSP