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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:32:36+00:00 2026-06-08T20:32:36+00:00

I have this form in jsp page – <!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01

  • 0

I have this form in jsp page –

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="./Styles/Site.css" type="text/css" />
<title>Create new customer</title>
</head>
<body>
    <fieldset>
        <legend>Create new customer</legend>
        <form action="CreateCustomerServlet" method="GET">
            ID : <input type="text" name="customerId" />
            <br />
            First Name : <input type="text" name="customerFirstName" />
            <br />
            Last Name : <input type="text" name="customerLastName" />
            <br />
            Phone : <input type="text" name="customerPhone" />
            <br />
            Gender : <input type="radio" name="customerGender" value="Male">
            Male <input type="radio" name="customerGender" value="Female">
            Female
            <br>
            Password :<input type="password" size="25" name="customerPassword"><br/>
            re-Password :<input type="Password" size="25" name="reCustomerPassword">
            <br />
            <input type="submit" value="Create customer" />
        </form>
    </fieldset>
    <%
        // java section , here I want to control on the texts of the form
    %>


</body>
</html>

How can I do that when press on the submit button the runnig will enter to the java section and there will be actions on the texts of the form like validation and etc ?

Edit :
I will note , I want to check the texts in the java section before it will be sent to the servlet.

  • 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-06-08T20:32:38+00:00Added an answer on June 8, 2026 at 8:32 pm

    First of all you have to add some information in your code…
    In the form tag:
    – You have first to assign a ‘method’ value to define which protocol you will use.
    – You have to assign an ‘action’ value to say where the form will take the values.

    I think there’s much more steps, and you should read some tutorials, etc.

    You need some technology to handle the form submission.
    If you like to use servlets, there’s a good link

    You can user some framework to do that, but it takes more work to learn. You can use Struts, Spring, etc…

    Update:

    So you want to validate your data…
    I suggest you to use some framework, specially Spring MVC. It helps you validating your forms. Without a framework, validating data is a massive work, using javascript or other technogies that are not so dedicated to this end…
    Further, Spring MVC helps you with more other things, that you will need later…
    Here is a simple Hello World example

    Hope it helps…

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

Sidebar

Related Questions

I have this jsp page - <%@page import=java.text.Normalizer.Form%> <!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01
I have jsp page and html form with button on this. How execute java
I have a form JSP web page, this form contains multiple instances of the
I have a jsp page(let's say page1.jsp) which have an html form with action=page2.jsp.
I have this line of code in my JSP. (I'm using struts 1.3) <html:form
I have jsp page (say, source.jsp ) with form: <html> <head> <body> <form action=Servlet123
My index.jsp page, load my form with this line of code : $('#box').load('/Edit_Data.jsp?id=' +
I have one form in JSP. I have some input fields in that page,
So, I have next situation: I have a page with form -> this form
I have a JSP/HTML form with text box and radio buttons. I am saving

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.