<html>
<head>
<title>	User Registration</title>
<body bgcolor="000000"text=ffffff>
</head>
<table width="20%"height="50%"border="2">
 <div align="center">
<table>
 <h1>User Registration<h1>
 <form>

	Username:  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;   <input type="text"style="color: #ffffff; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72a4d2;name="username"size="30"   /><br><br>
	Password:  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text"style="color: #ffffff; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72a4d2;name="password"size="30"/><br><br>
	Confirm Password:   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text"style="color: #ffffff; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72a4d2;name="confirmpassword"size="30"/><br><br>
	<hr>
</form> 
<h2>Information Details<h2/>
<form>
Lastname:&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;  <input type="text"style="color: #ffffff; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72a4d2;name="lastname"size="30"/><br><br>
Firstname:&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;   <input type="text"style="color: #ffffff; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72a4d2;name="firstname"size="30"/><br><br>
Mi:&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text"style="color: #ffffff; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72a4d2;name="mi"size="15"/><br><br>
Email-Address:&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  <input type="text"style="color: #ffffff; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72a4d2;name="emailadd"size="30"/> <br><br>
 <br>Gender:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <input type="radio"name="sex"value="male"/>Male 
<input type="radio" name="sex" value="female" /> Female<br><br>
Nationality:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 
<select >
  <option SELECTED>Filipino</option>
  <option value	=" Afghans">	Afghans	</option>
  <option value="Afrikaners">Afrikaners</option>
  <option value="Algerians"> Algerians</option>
  <option value="Americans">Americans</option>
   <option value="Australian">Australian</option>
  <option value=" Armenians"> Armenians</option>
  <option value="Finns">Finns</option>
  <option value="Germans"> Germans</option>
   <option value="Greeks"> Greeks</option>
  <option value="Filipinos">Filipinos</option>
  <option value="French"> French</option>
  <option value= 	"Japanese"> Japanese</option>
   <option value="Portuguese"> Portuguese</option>
  <option value="Scot">Scot</option>
  <option value=" Irish"> Irish</option>
  <option value="Jordinians"> Jordinians</option>
   <option value="Cubans">Cubans</option>
  <option value="Croatians">Croatians</option>
  <option value="Dutch">Dutch</option>
  <option value=" Cypriots"> Cypriots</option> 
</select>
<br><br>
BirthDate:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;  
<select >
		<option SELECTED>Month</option>
		<option value="january">January</option>
		<option value="february">February</option>
		<option value="march">March</option>
		<option value="april">April</option>
		<option value="may">May</option>
		<option value="june">June</option>
		<option value="july">July</option>
		<option value="august">August</option>
		<option value="september">September</option>
		<option value="october">October</option>
		<option value="november">November</option>
		<option value="december">December</option>
		
</select>
	 &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 
	<select>
		<option SELECTED>Day</option>
		<option value="1">1</option>
		<option value="2">2</option>
		<option value="3">3</option>
		<option value="4">4</option>
		<option value="5">5</option>
		<option value="6">6</option>
		<option value="7">7</option>
		<option value="8">8</option>
		<option value="9">9</option>
		<option value="10">10</option>
		<option value="11">11</option>
		<option value="12">12</option>
		<option value="13">13</option>
		<option value="14">14</option>
		<option value="15">15</option>
		<option value="16">16</option>
		<option value="17">17</option>
		<option value="18">18</option>
		<option value="19">19</option>
		<option value="20">20</option>
		<option value="21">21</option>
		<option value="22">22</option>
		<option value="23"> 23</option>
		<option value="24">24</option>
		<option value="25">25</option>
		<option value="26">26</option>
		<option value="27">27</option>
		<option value="28">28</option>
		<option value="29">29</option>
		<option value="30">30</option>
		<option value="31">31</option>
		
	</select>
			&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 
			<select>
			<option SELECTED>Year</option>
			<option value="1983">1983</option>
			<option value="1984">1984</option>
			<option value="1985">1985</option>
			<option value="1986">1986</option>
			<option value=" 1987">1987 </option>
			<option value=" 1988">1988</option>
			<option value=" 1999">1999</option>
			<option value=" 2000">2000</option>
			<option value=" 2001">2001</option>
			<option value=" 2002">2002</option>
			<option value=" 2003">2003</option>
			 <option value=" 2004">2004</option>
			<option value=" 2005">2005</option>
			<option value=" 2006">2006</option>
			<option value="2007">2007</option>
			<option value=" 2008"> 2008</option>
			<option value=" 2009">2009</option>
			<option value=" 2010">2010</option>
			<option value=" 2011">2011</option>
			 
			  
			</select>
			  <br><br>
			  Country:&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;  
			  
				<select>    
					<option SELECTED>Country</option>
				    <option value="afghanistan">Afghanistan</option>
					<option value="bangladesh">Bangladesh</option>
					<option value="bhutan">Bhutan</option>
					<option value="brunei">Brunei</option>
					<option value="cambodia">Cambodia</option>
					<option value="india">India</option>
					<option value="indonesia">Indonesia</option>
					<option value="philippines">Philippines</option>
					<option value="malaysia">Malaysia</option>
					<option value="maldives">Maldives</option>
					<option value="myanmar">Myanmar</option>
					<option value="nepal">Nepal</option>
					<option value="pakistan">Pakistan</option>
					 <option value="singapore">Singapore</option>
					<option value="thailand">Thailand</option>
					<option value="laos">Laos</option>
					
					 
				</select><br><br>
				 <hr>
				<center> <input type="Submit" value="Submit"></center>
</form>
</div>
</table>
</body>
</html>

Can someone teach me how to add JSP to this html code...

Recommended Answers

All 6 Replies

You failed to specify what JSP or better said what functionality you want that may require use of JSP...

I want to work the textfields of my registration form the the list of options

I want to work the textfields of my registration form the the list of options

Your reply doesn't make any sense. If you cannot take time reply properly why should any one care to answer your question?

Apparently he wants to add java scrip-lets. Like this:

<body>

<select>
<%
for (int i=0;i<12;i++) {
%>
    HTML CODE FOR MONTH OPTIONS.
<%
}
%>
</select>

</body>

Try to run the above and see what it prints.

I would advise you to study a little bit more about HTML before going to submitting forms with jsp. That is not the right way to display things on a jsp. Now people use divs and style sheet, BUT you should use, as a beginner a combination of the tags: table, tr, td.

Study this tutorial about html and learn how to use the <table> tag:
http://www.w3schools.com/ Check out the html section. Use those tags to display things in your page and put what you want to send into a form. On second thought you should study thoroughly the entire tutorial about HTML because your <select> tags weren't that good as well.
You forgot to put the name attribute at the select tag. Also it is good for all the options to have a value and don't use the SELECTED attribute the way you did

Do you have any books about JSPs ? Or any notes to look at? Every book has examples and teaches you exactly what you have asked in this thread. You might want to do a little research and studying first, before posting a question that can be found with a little studying.

Yeah,ur right but I have to download a server to test my webform...

commented: "Yeah, ur right" Next time be more precise what you want. -3

Yeah,ur right but I have to download a server to test my webform...

So? You mean you want someone to give you the code because you cannot test it yourself. Most IDEs come with a server that start automatically when you run a web application. Try downloading NetBeans IDE. Create you web application and run it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.