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

📄 main.jsp

📁 相当板扎,采用贝叶斯公式的垃圾邮件过滤程序
💻 JSP
字号:
<%--
  *  @author   Shefali Bansal
  *  @version  1.0
  *
  *  Name of the Application        : Main.jsp
  *  Development Environment        : Oracle JDeveloper 10g
  *  Creation/Modification History  :
  *
  *     Shefali Bansal 02-Jan-2004     Created
  *
  *  Overview of Application        :
  *    This JSP is the entry point to this Sample Application. It logins the
  *    user to the Sample. The user can login as any of the two users :
  *
  *       User            - The person who comes to view the online web seminars.
  *       Administrator   - Administrator uploads the media content for the 
  *                         the online web seminars that the user can view.
  *                         He or she can also view the web seminars that are
  *                         already uploaded.
  *
  *     On pressing the 'Submit' button, the users will be taken to their
  *     respective JSP pages.
--%>

<%@ page language="java" %>
<%@ page errorPage="Exception.jsp" %>
  
<HTML>
<HEAD>
<TITLE>JSP Multimedia Tag Application: Main Page</TITLE>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<link rel="stylesheet" href="stylesheets/styles.css" type="text/css">

<script language="JavaScript">
  /**
   *  This function does the required validation. Based on the user logging-in,
   *  appropriate JSP pages are displayed.
   */
  function submitLoginForm(frmName){
    var userType = selectedUserType(frmName);
    if(userType=="Administrator"){
      frmName.action = "Login.jsp?UserType="+userType;
      frmName.submit();
    } else if(userType=="User"){
      frmName.action = "User.jsp?UserType="+userType;
      frmName.submit();
    }
  }

  /**
   *  This function retrieves the user type selected for login.
   */
  function selectedUserType(frmName){
    var length = frmName.UserType.length;
    var userType;
    for(x = 0;x<(frmName.UserType.length);x++)
    {
      if(frmName.UserType.options[x].selected)
      {
          userType = frmName.UserType.options[x].value;
          break;
      }
    }
    return userType;

  }
</script>
</HEAD>
<BODY text=#000000>
<!-- Main table -->
<TABLE border=0 cellPadding=0 cellSpacing=0 width=100%>
  <TR>
    <TD valign="top" width="100%">
      <!-- Include the static 'Header.jsp' file  -->
     <%@ include file="Header.jsp" %>
    </TD>
  </TR>
  <TR>
    <TD width="100%">
      
      <table WIDTH ="100%" cellspacing=0 cellpadding=0 height="100%"
      bgcolor="#FFFFFF">
        <tr>
          <TD height="100%">
            <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
              <!-- Heading of the page goes here -->
              <TR>
                <TD valign="top" colspan="3" noWrap>&nbsp;</TD>
              </TR>
              <TR>
                <TD valign="top" colspan="3" noWrap>&nbsp;</TD>
              </TR>
              <TR>
                <TD valign="top" colspan="3" noWrap align="center" class=
                "heading">Welcome to Online Webinar Application. Select the Login 
                  type to enter.</TD>
              </TR>
              <TBODY>
              <TR>
                <TD valign="top" width="4%" noWrap>&nbsp;</TD>
                <TD vAlign=top width="93%" align="center">
                  <form name="LoginFrm" method="post">
                    <TABLE border=0 width="100%">
                      <TBODY>

                      
                      <TR>
                        <TD align="center">
                        <span class="formFieldName">
                        Login Type </span>&nbsp;&nbsp;&nbsp;
                          <select name="UserType" size="1">
                            <option value="Administrator">Administrator</option>
                            <option value="User">User</option>
                          </select>
                                               
                          &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/startwhite.jpg" width="90" height="90"></TD>
                      </TR>
                      <TR>
                        <TD>&nbsp; </TD>
                      </TR>
                      <TR>
                        <TD>&nbsp; </TD>
                      </TR>
                      <TR>
                        <TD align="center"> <a href="javascript:submitLoginForm(document.LoginFrm)"><img
                        src="images/submitbutton.gif" border=0 width="55" height="23" /></a> 
                          &nbsp; </TD>
                      </TR>
                      </TBODY>
                    </TABLE>
                    
                  </form>
                </TD>
                <TD width="3%">&nbsp;</TD>
              </TR>
              <TR>
                <TD colspan=3>&nbsp;</TD>
              </TR>

              <TR>
                <TD colspan=3>&nbsp;</TD>
              </TR>
              </TBODY>
            </TABLE>
           
          </TD>
        </tr>
      </table>
    </td>
    
  </TR>
  <TR>
  <!-- Include static 'Footer.jsp' file -->
    <%@ include file="Footer.jsp" %>
  </TR>
</TABLE>	  
<!-- Main table ends here-->
</BODY>
</HTML>

⌨️ 快捷键说明

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