91.7k views
1 vote
Part 1: Creating an HTML form (doesn't require any JSP knowledge): 25%

Create a new file named create.jsp
Create an HTTP form that posts to webservices.jsp. (action tag)
Create the needed form fields to submit a create request to the webservices.jsp
Hint: the form fields need to include: firstName, lastName, employeeNumber, email, and "create".
Upload this JSP file with a TXT extension to this assignment in Canvas.

User G Davison
by
8.5k points

1 Answer

4 votes

Final answer:

To create an HTML form for posting data to another JSP file, use the 'form' element and specify the 'action' attribute. Inside the form, create input fields using the 'input' element.

Step-by-step explanation:

To create an HTML form for posting data to another JSP file, you will need to use the 'form' element and specify the 'action' attribute with the value of 'webservices.jsp'. Inside the form, you can create input fields using the 'input' element with different types and names for each field. In this case, you would need to create fields for firstName, lastName, employeeNumber, email, and 'create'.

Here's an example of how the HTML form could look like:

<form action='webservices.jsp' method='post'>
<label for='firstName'>First Name:</label>
<input type='text' name='firstName' id='firstName'>

<input type='submit' value='Create'>
</form>

User Ozgur Oz
by
7.2k points