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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:32:57+00:00 2026-05-26T13:32:57+00:00

I am using Struts1.3, I have Jsp page which is showing the list of

  • 0

I am using Struts1.3, I have Jsp page which is showing the list of employees on that page. For this what i did is, I have a action inside that action i am calling a function which returns List and i am setting these list inside the session as session.setAttribute(Constant.EMPLIST,list). And now in my Jsp page i am using logic tag to iterate this list as below given.

<html:form method="post" action="test.do" styleId="empForm">
  <logic:iterate id="EmpForm" name="<%=Constant.EMPLIST%>">
    <table>
     <tr>
      <td>
        <html:text property="empName" name="EmpForm" styleClass="fieldbox2" styleId="textfield50"/>

      </td>
        <td>

        <html:text property="empSal" name="EmpForm" styleClass="fieldbox3" styleId="textfield50"/>

      </td>
 </table>
</logic:iterate>
 <table>
    <tr>
      <td>
        <img onclick="updateEmpDetails" src="images/update.jpg" />
      </td>
    </tr>
  </table>
</html>

And it’s showing all the employee details and working fine. But one more job is that on this page i have a update button. And what i need to do is after clicking on updateEmpDetails button. I need to send all the employee updated details inside the updateAction but I am unable to do this, I don’t know how to handle the multiple FormBean property value. I am able to fetch only one Employee details inside the updateAction. I am doing this inside my updateAction

 EmpForm empForm = (EmpForm) form;
System.out.println("EmpId:::" + empForm.getEmpId);

I don’t know how to do this if possible List Or how to handle multiple FormBean Value. please guide me how to do this,if any example please it really appreciate me.
Thanks

Update::
This is my plan java class with setter and getter property:

public class Sites {
    private String jobSite="";        
    private String engineerName="";
    private boolean isCheck;
}

This is my FormBean:

public class SiteToServiceForm extends org.apache.struts.action.ActionForm {


   private List<Sites> sites=new ArrayList<Sites>();

    public List<Sites> getSites() {
        return sites;
    }

    public void setSites(List<Sites> sites) {
        this.sites = sites;
    }


}

This is my action:

public class SiteToServicingAction extends org.apache.struts.action.Action {
 List<Sites> siteDetails=SiteSearchDataModel.getSiteDetails(serviceForm);


        ((SiteToServiceForm) form).setSites(siteDetails);
}

For display purpose working fine now i need to submit the update sites value, I am doing this inside action:

 List<Sites> siteList=serviceForm.getSites();
            if(siteList!=null && siteList.size()>0)
            {
                for(Sites site:siteList)
                {
                    if(site.isIsCheck()==true)
                    {
                        SiteSearchDataModel.updateRecord(serviceForm.getEngineerId(), site.getPropertyId());
                        System.out.println("properyID::::"+site.getPropertyId());
                    }
                }
            }

And i am not able to get the update list into my action class please help me.

  • 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-26T13:32:57+00:00Added an answer on May 26, 2026 at 1:32 pm

    1 have an Action Form
    2 map action form to Action in struts-config.xml
    3 have a field List<Employee> in your form
    4 on JSP use the following code

    <logic:iterate id="emp" indexId="i" name="FormName"
                property="employees">
    
     <html:text value="${FormName.employees[i].employeeName}" styleClass="fieldbox3"/>
     <html:text value="${FormName.employees[i].employeeSal}" styleClass="fieldbox3"/>
    
    <logic:iterate>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Struts1.3, and in this Jsp page dynamically generate check boxes depends
I am using struts2 and hibernate. I have a jsp page which is loaded
I have a struts2 page which uses a shared action using <s:action> with executeResult=true
I have a jsp page which iterates a list of users. Each user has
I am using Struts and Java. The problem is that I have a page
I have a .jsp page that the user loads directly. The request it with
I am using Struts/JSP for a webapp. I have a page A where I
I have written a jsp redirect in my jsp page like this <s:if test=#session.Doctor
I'm Using Struts2 in jsp page i have iterator values for checkbox. how to
I have a JSP page in which there is a hyperlink to add a

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.