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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:12:06+00:00 2026-05-24T11:12:06+00:00

I am using JSPs, and this is my contacts.jsp <%@taglib uri=http://www.springframework.org/tags/form prefix=form %> <html>

  • 0

I am using JSPs, and this is my contacts.jsp

<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<html>
<head>
    <title>Spring 3.0 MVC series: Contact manager</title>
</head>
<body>
<h2>Contact Manager</h2>
<form:form method="post" action="addContact.html">

    <table>
        <tr>
            <td><form:label path="firstName">First Name</form:label></td> // LABEL
            <td><form:input path="firstName" /></td>
        </tr>
        <tr>
            <td><form:label path="lastName">Last Name</form:label></td>
            <td><form:input path="lastName" /></td>
        </tr>
        <tr>
            <td><form:label path="lastName">Email</form:label></td>
            <td><form:input path="email" /></td>
        </tr>
        <tr>
            <td><form:label path="lastName">Telephone</form:label></td>
            <td><form:input path="telephone" /></td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" value="Add Contact"/>
            </td>
        </tr>
    </table>  

</form:form>
</body>
</html>

My questions is, that when i change form:label path="firstName" into form:label path="firstname", why tomcat starts throwing errors? Doesn’t the model only need the input path, since the value inside input path, is the value it will use?

EDIT:

should i even use the form:label tag , why is it used?

  • 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-24T11:12:08+00:00Added an answer on May 24, 2026 at 11:12 am

    It’s because firstName is either used literally, or is translated into the method getFirstName().

    Either way, the capitalization matters when the lookup is performed.


    For your question on whether or not you need the path in the label: If you provide the path, then the label will know which input it belongs to. In HTML, that allows you to click on the label and have the input field gain focus. I assume the output HTML for your code is something like this:

    <tr>
      <td><label for="firstName"></td>
      <td><input type="text" id="firstName"></td>
    </tr>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched on this and found something about using remotely hosted JSPs but
I've done lots of java web development using jsps and servlets, and I have
I've been having the following problem with my GoDaddy's server. I am using JSPs
I am developing a web app using servlets and jsps. I have a question
Using ASP.NET MVC there are situations (such as form submission) that may require a
How many JSPs to create to maintain one table for data entry. Add.jsp to
I'm currently maintaining a small-medium sized java web application (using only plain JSPs/Servlets) that
I want to write reusable code that takes an HTML table from a JSP
I'm building an application using jsp's, servlets, and all that fun stuff. Right now,
I'm using ant to build my web-app. I'm sure this is simple but I

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.