⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 forgotpassword.jsp

📁 Oracle的J2EE Sample
💻 JSP
字号:
<%--
 * @author  Pushkala
 * @version 1.0
 *
 * Development Environment : Oracle9i JDeveloper
 * 
 * Name of the File : ForgotPassword.jsp
 *
 * Creation/Modification History  :
 *    Pushkala     13-Jun-2002      Created
 *
 * Overview of Application        :
 *
 *   This page is part of the IBFBS application.
 *   This page displays a form where the user can enter the email address.
 *   On submitting the form, the ControllerServlet will be invoked with
 *   EVENTNAME = 'EMAILPWD', which will inturn call methods in the helper
 *   class to send email message to the entered email address with details
 *   about the user's account number and password.
 *
--%>

<%@page contentType="text/html;charset=WINDOWS-1252" language="java" %>

<html>
<head>
<title>OTN FBS : Forgot Password Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=WINDOWS-1252">
<link rel="stylesheet" href="includes/contents.css" type="text/css">

<script language="JavaScript">

  // Function to validate the values entered in the form before submitting
  function validateForm() {
    formObj = document.FORGOTPWD;
    
    // If the email address is not entered, alert the user
    if (formObj.EMAIL.value == "") {
      alert("Enter your Email Address");
      return;
    } 
  
    // Position of space in the entered value
    posSpace = formObj.EMAIL.value.indexOf(" ");
    
    // If the entered value contains space, alert the user
    if (posSpace != -1) {
      alert("Enter your valid Email Address");
      return;
    }

    // Position of @ in the entered value
    posAt = formObj.EMAIL.value.indexOf("@");
    
    // If the entered value does not contain @, alert the user
    if (posAt == -1) {
      alert("Enter your valid Email Address");
      return;
    }

    formObj.submit();
  }

</script>
</head>

<body bgcolor="#FFFFEA">
<center>
  <h3 style="Text-Decoration : None" class="newsText" >OTN eZee Trading - Forgot Password </h3>
</center>

<table width="100%" border="1" cellpadding="0" cellspacing="0" bgcolor="#FFFFEA" bordercolor="#008000">
  <tr><td valign="top"><table width="100%" cellpadding="0" cellspacing="0">
  <tr>
    <td class="leftHead" bordercolor="#FFFFEA" align="center" valign="center" bgcolor="#FFFFEA"> 
      <br>
      <%
         String eventName = request.getParameter("EVENTNAME");
         
         if (eventName.equals("FORGOTPWD")) {
      %>
           <form name="FORGOTPWD" method="POST" action="controllerservlet">
             <b>Enter your Email Address&nbsp;&nbsp;</b>
             <input type="text" name="EMAIL" size="20" value="">
             <br><br>
             <img src="images/submit.gif" alt="Submit" onMouseUp="validateForm();">
             <input type="hidden" name="EVENTNAME" value="EMAILPWD">
           </form>
      <%
         } else {
           // EVENTNAME = EMAILPWD, display the returned message 
           String retMessage = (String) session.getAttribute("EMAILPWD.RESPONSE");
           
           session.removeAttribute("EMAILPWD.RESPONSE");

           // If sendEmail was not successful
           if (retMessage.startsWith("User")) {
      %>
             <font face="Verdana, Times New Roman, Times, serif" color="#FF0000" size="2">
               <b><%=retMessage%></b>
             </font>
      <%
           } else {
             // If sendEmail was successful
      %>
             <font face="Verdana, Times New Roman, Times, serif" color="#008000" size="2">
               <b><%=retMessage%></b>
             </font>
      <%
           } 
      %>     
           <br>
           <form name="frmClose" >
             <img src="images/close.gif" onMouseUp="window.close();" value=" Close " >
           </form>
      <%
         } 
      %>
    </td>
  </tr>
  </table></td></tr>
</table>

<jsp:include page="Footer.jsp" flush="false"/>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -