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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:05:51+00:00 2026-05-30T02:05:51+00:00

I am creating a project in struts2 I have created a Registration.jsp page like

  • 0

I am creating a project in struts2
I have created a Registration.jsp page like below.

<s:form name="registration" action="Registration" >
<s:textfield name="user.userName" label="UserName"></s:textfield>
<s:textfield name="user.userName" label="Password"></s:textfield>
<s:textfield name="user.userName" label="Re-Enter Password"></s:textfield>
<s:textfield name="user.userName" label="Name"></s:textfield>
<s:textfield name="user.userName" label="DOB"/>
<s:textfield name="user.userName" label="email"></s:textfield>
<s:textfield name="user.userName" label="Portfolio Name"></s:textfield>
<s:submit></s:submit>
</s:form>

As seen above I am trying to give the all fields same name and it is used in setting the values..
After calling the action when I am trying to redirect the result to a jsp and trying to display the userName it will display like below

if we input a, b, c, d and e as the parameter respectively in the given fields. I am getting the output exactly(, included in output) like that – Hello a,b,c,d,e..

I am not getting why is this happening.. does anyone has an idea?

  • 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-30T02:05:52+00:00Added an answer on May 30, 2026 at 2:05 am

    This is how client to server communication works.From HTML perspective everything will be sent over to server using key-value pairs of String.

    The value being set in the Action class and interpreted as Collection/Array is a feature S2 and its conversion mechanism (OGNL and XWork conversion ).

    So when your values being sent as a key with values like user.userName=a,b,c,d,e and you have declared a collection/Array in your action class so S2 type conversion mechanism is coming in to action and converting these values to Array/Collection and setting them in the respected property in your action class.

    In the reverse case HTML will know only String and again from the server they are being sent as key and values and since you are not asking your S2 mechanism to come in to play so this is getting printed in your HTML as per your description.

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

Sidebar

Related Questions

I have been busy in my project creating a webapp (in struts) that manages
I'm creating a project from the book Sanderson Pro ASp.net mvc3. But I have
I have a WPF project (creating dll). The text boxes that added, (or the
I am devoloping a struts 2 project in which layout page is creating an
I am creating project with different shapes using box2d.. i created a square using
I have just installed django with python 2.7. After creating intitial project it says
I am creating a project in which I have three UITextField s and one
I am creating a project with struts and I have a problem using Jasper
I'm creating a project using UIPageViewController for the page turning effect. I'm using storyboard,
I'm creating a project in asp.net and I looking for Modal Window (like ajax

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.