Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6115643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:06:55+00:00 2026-05-23T15:06:55+00:00

Instead of just displaying list values using <s:property/> , i need to display it

  • 0

Instead of just displaying list values using <s:property/>, i need to display it in textarea.The reason why i am doing this is <s:property/> does not have “name” attribute in order to submit the values to the action class. Is there any way to do that.I wrote down piece fo code below to make it clear so that you can understand my requirement though it is wrong.Please help me.

<s:iterator value="map"   status="stat">

<s:textarea value="<s:property/>" />    

</s:iterator>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:06:55+00:00Added an answer on May 23, 2026 at 3:06 pm

    As Jagan said, assume that map is java.util.List

    <s:iterator value="map" status="stat">
        <s:textarea value="%{top}" />
    </s:iterator>
    

    or

    <s:iterator value="map" status="stat">
        <s:textarea>
            <s:param name="value">
                <s:property/>
            </s:param>
        </s:textarea>
    </s:iterator>
    

    or

    <s:iterator value="map" status="stat">
        <s:textarea>
            <s:param name="value">
                ${top}
            </s:param>
        </s:textarea>
    </s:iterator>
    

    @Jagan : if it is map how to do this ?

    Assume map is java.util.Map

    <s:iterator value="map" status="stat">
        <s:textarea value="%{key}" />
        <!-- or -->
        <s:textarea value="%{value}" />
    </s:iterator>
    

    IteratorComponent

    if (value == null && begin == null && end == null) {
        value = "top";
    }
    

    top is not a attribute of iterator and not a keyword of OGNL. (I may be wrong)

    top : top of Stack / element of the current iteration

    e.g.

    <s:property value="top" />
    

    or

    <s:property value="[0].top" />
    

    Iterator tag examples of Struts2 Cookbook have better explanation

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not that it is seriously burdensome to type :My_custom_foobar() instead of just :my_custom_foobar() but
I'm almost positive that there is a stupid reason this is not working, but
Instead of just filling out the form in HTML it should also be possible
In C, is there a difference between writing struct foo instead of just foo
I'm just learning Perl. When is it advisable to use OO Perl instead of
...instead of using the Atom syndication format? Atom is a well-defined , general-purpose XML
I'm currently creating a control that is mainly just an ItemsControl displaying some items.
I have a UITableView where I am displaying a list of data. I would
I'd like to implement a way to display a list of stored addresses sorted
On my html document for some reason instead of printing what it's suppose to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.