?? main.jsp
字號(hào):
<%--
* @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> </TD>
</TR>
<TR>
<TD valign="top" colspan="3" noWrap> </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> </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>
<select name="UserType" size="1">
<option value="Administrator">Administrator</option>
<option value="User">User</option>
</select>
<img src="images/startwhite.jpg" width="90" height="90"></TD>
</TR>
<TR>
<TD> </TD>
</TR>
<TR>
<TD> </TD>
</TR>
<TR>
<TD align="center"> <a href="javascript:submitLoginForm(document.LoginFrm)"><img
src="images/submitbutton.gif" border=0 width="55" height="23" /></a>
</TD>
</TR>
</TBODY>
</TABLE>
</form>
</TD>
<TD width="3%"> </TD>
</TR>
<TR>
<TD colspan=3> </TD>
</TR>
<TR>
<TD colspan=3> </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>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -