Question about linking the jsp input fields to the actionForm

Posted on 2006-03-27
Last Modified: 2010-04-01
Hi - I am a newbie to JSP and Struts
We have a jsp form for employees to change their contact information.
The fields are layed out so that it will have the "current information" and the "change to" information
                    Current Info            Change To
   Last Name   _____________     ________________

the current information is display only

Here's the question - when I create my actionForm do I need to have properties for both of these fields (i.e. a property for "currentLastName" and for "newLastName" or is there a way to use the same property for both of these fields?  I would want the "change to" fields to be blank unless the user inputs a value into the text box

Question by:JLLange
    LVL 11

    Accepted Solution

    it's better to have both as seperate fields.

    Not a good idea to have a single field representing two different values at times.


    Author Comment

    thank you - I was assuming that was the way to go, but wanted to make sure :o)


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now