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 140929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:41:41+00:00 2026-05-11T07:41:41+00:00

So in struts I have an action form which has 5 properties. Each property

  • 0

So in struts I have an action form which has 5 properties. Each property is a String Array.

in my form class i getter/setter methods for the properties like the ones below:

public String getPropertyX(int index) {   return x[index]; }  public void setPropertyX(int index, String value) {   x[index] = value;  } 

When my form is first processed I populate the form object and when it displays the respective JSP i can tinker with it so it outputs the correct values using the struts tags and get the propper values for each array. However, I want those to be inputs so when i submit the form the object/arrays will be populated for me. However on submitting the form I get a ‘Error 500: No getter method for property.’ When I add the following to my form object I no longer get that error:

public String getPropertyX() {    return x; } 

I no longer get that error, but now then it comes to a population error on the backend when i process the form. I could do it another way but I’d much rather use the struts framework (i’m learning here).

  • 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. 2026-05-11T07:41:42+00:00Added an answer on May 11, 2026 at 7:41 am

    Figured it out on my own. Decided to go a whole different way. Created two ActionForms (not really sure if the second one needed to be an ActionForm but it works). One contains the actual elements in the form I want to populate on each row of the form. The other contains an Array of the other. I iterate through the array on the jsp and using indexed=’true’ on the inputs I achieve what i want.

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

Sidebar

Related Questions

I have a Struts (1.3x) ActionForm that has several String and boolean properties/fields, but
I have this code for login validation using a Struts2 action class which calls
I have a Struts + Velocity structure like for example, a Person class, whose
This is for a web application using struts. I have an array of objects
If I have the following struts.xml config: <action name=input> <result>/jsp/input.jsp</result> </action> <action name=result> <result>/jsp/result.jsp</result>
I have been working with Struts for some time, but for a project I
I am developing a web application using Struts 2.1.2 and Hibernate 3.2.6.GA. I have
I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a
I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a
Here is the problem: My page displays a set of items. Each item has

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.