Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

HTML forms & JSP


  • Please log in to reply

#1
no1unoin98

no1unoin98

    New Member

  • Member
  • Pip
  • 1 posts
Hello,

I need some help/guidance with my homework. No im not looking for someone to do it for me. Im just looking to understand how to do this project.

Part 1 - entry from the Java Server Page Form when the Submit button is pressed on the logon form.
In this case your page should output should displays the logon information that you read from the form. (the page must stay in the same JSP page)

So i have this java codes to see what button was pressed, so if LOGIN is pressed it s suppose to say "Welcome [email protected]"
and
if the Register button is pressed then we collect their information to store it in the database.


<% if (request.getParameter("Register") != null) { %>
<form action="HummingBirds.jsp" method="Post">
<div class="style1">
*First Name: <input type="text" name="FirstName" value=""><br>
*Last Name: <input type="text" name="LastName"><br>
*Username: <input type="text" name="User" value=""><br>
*Email Address: <input type="text" name="Email" value=""><br>
*Password: <input type="password" name="Pwd" value=""><br>
*Verify Password: <input type="password" name="Vpwd" value=""><br>
<font face="Arial">
<Input type=submit name=Submit value="Submit Form"></font> </div>
</form>

<%} else if (request.getParameter("Login") == null) {%>
<form action="HummingBirds.jsp" method="post" style="width: 200px">
<font size="3" face="Times" color="#000000"> Email: </font><input type="text" name="email" value="">
<font size="3" face="Times" color="#000000"> Password: </font><input type="password" name="password" size="10">
<input type="Submit" name="Login" value="Login">
<input type="submit" name="Register" value="Register">
</form>
<%}%>


So my question is, how do i pass the Email to say welcome and that it stays in the same JSP page?
  • 0

Advertisements


#2
techvech

techvech

    Member

  • Member
  • PipPip
  • 75 posts
Hi !
Can you make your question a little more clear.
Thanks
:)

PS: please use code tags for code.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP