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

  • Home
  • SEARCH
  • 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 8335279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:37:44+00:00 2026-06-09T03:37:44+00:00

Using struts2 how can I keep list values just after click in a jsp

  • 0

Using struts2 how can I keep list values just after click in a jsp button, going through the action and returning to jsp again? Doing this click several times again.
I’ve been watching that to keep a value from a variable that isn’t a list I just need to declare it in the action with it’s getter and setter, and put a hidden field or textfield in the jsp, but regarding lists don’t worked like that.

  • 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-06-09T03:37:47+00:00Added an answer on June 9, 2026 at 3:37 am

    You are correct that we need a getter and setters for the respected property in our action class to send and receive date from Action class to JSP and in reverse order.

    But since for collection, its not possible to store it in a single field, so you have few options here.

    If List is a simple List of String you can create a comma separated string and can use that to go from action to JSP and in reverse order (easy to convert that to list), i will not recommend this approach.

    Second option i am thinking to set the list in session and you can always retrieve the list in your action class at any time as per your choice.

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

Sidebar

Related Questions

I am using Struts2,(jsp) to design page , I need three button on sing
How can i redirect www.mysite.com/12345 to www.mysite.com/action?id=12345 using struts2?
I'm using struts2 and have this code that triggers after an action is performed
I've got the following jsp page and I'm using struts2-jquery-plugin-3.1.1 <script type=text/javascript> function openDialog()
Using struts2 with jsp with standard struts tag libraries. I'm trying to dynamically hide
I am trying to implement ajax in jsp(avoid form submit) using struts2. I used
I'm using the Struts2 jQuery plugin 2.1 and render an autocompleter in my JSP.
I am using struts2 in my project. Have to generate image in my action
How can I expose a Java bean to a JSP page by using struts?
I am using Struts2 with jsp pages and xwork validation. My problem is in

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.