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 application and I build by form <html:form action=companyProvAdd> ....</html:form> which
I have a Struts (1.3x) ActionForm that has several String and boolean properties/fields, but
If a struts 2 action class have a property of List<User> userList . And
In my struts.xml I have: <action name=file_save method=fileSave class=FileActionBean> <interceptor-ref name=fileUpload> <param name=maximumSize> 5242880
I have a model-driven Struts Web action: public class ModelDrivenAction<T extends Object> implements ModelDriven<T>,
I have a form bean with attributes id, desc and imageByteArray. Struts action gets
I Have following in my struts.xml file <action name=ProductVerification class=com.frontend.ProductVerification> <result name=success>/jsp/product_verification.jsp</result> <result name=input>/jsp/product_verification.jsp</result>
I have a one main jsp (file upload jsp screen) which has form elements.
I have a struts2 action class which looks something like this: //import relevant packages
I have a struts and hibernate project, From the action class, I need 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.