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

📄 trustlinkaction.jsp

📁 指纹开发应用的源码
💻 JSP
字号:
<%@ include file = "TrustLink\TrustLinkIni.jsp"%>
<%@ include file = "TrustLink\TrustLinkRes.jsp"%>
<%@ page contentType = "text/html; charset = gb2312" %>
<%
	final int SUCCESSED = 0;
	final int ENROLL = 1;
	final int VERIFY = 2;
	final int IDENTITY = 3;
	final int DELETE = 4;
	
	String strSubmitPage = "TrustLinkResult.jsp";
	String strHostName = request.getParameter("txtHostName");
	String strProductID = request.getParameter("txtProductID");
	String strPort = request.getParameter("txtPort");
	String strAuthenID = request.getParameter("txtAuthenID");
	String strAuthenPwd = request.getParameter("txtAuthenPwd");

	int intIndex = Integer.parseInt(request.getParameter("cboProductType"));

	String strDeviceType = SetDeviceType[intIndex];
	String strOcxClassID = Enroll[intIndex];
	String strOcxClassName = OcxName[intIndex];
	int intAction = Integer.parseInt(request.getParameter("hidTrustLinkAction"));
	if(intAction != ENROLL)
	{
		strOcxClassID = Verify[intIndex];
	}
%>

<jsp:useBean id = "myTG" scope = "session" class = "TrustLink.General.Controller.TrustLinkGeneralController" />
<jsp:setProperty name = "myTG" property = "hostName" value = "<%=strHostName%>" />
<jsp:setProperty name = "myTG" property = "productID" value = "<%=strProductID%>" />
<jsp:setProperty name = "myTG" property = "port" value = "<%=Integer.parseInt(strPort)%>" />
<jsp:setProperty name = "myTG" property = "deviceType" value = "<%=strDeviceType%>" />
<jsp:setProperty name = "myTG" property = "authenID" value = "<%=strAuthenID%>" />
<jsp:setProperty name = "myTG" property = "authenPwd" value = "<%=strAuthenPwd%>" />
<jsp:setProperty name = "myTG" property = "ocxClassName" value = "<%=strOcxClassName%>" />
<jsp:setProperty name = "myTG" property = "ocxClassID" value = "<%=strOcxClassID%>" />
<jsp:setProperty name = "myTG" property = "submitPage" value = "<%=strSubmitPage%>" />

<%
	String strFileName = request.getRealPath("/") + "TrustLink\\TrustLinkGeneralRes.xml";
	myTG.LoadTrustLinkGeneralRes(strFileName);

	String strUserName = "";
	String strMsg = "";
	String strHtml = "";
	int intResult = SUCCESSED;
	String strEnrollType = String.valueOf(request.getParameter("cbDisapproveUpdateFP"));
	boolean bEnrollType = strEnrollType.equals("on");

	switch(intAction)
	{
		case ENROLL:
			//strMsg = IDS_ENROLL_SUCCESS;
			strUserName = request.getParameter("txtRegUser");
			if(bEnrollType)
			{
				strHtml = myTG.NewEnroll(strUserName);
			}
			else
			{
				strHtml = myTG.UpdateEnroll(strUserName);
			}
			break;

		case VERIFY:
			//strMsg = IDS_VERIFY_SUCCESS;
			strUserName = request.getParameter("txtVerifyUser");
			strHtml = myTG.FPUserVerify(strUserName);
			break;
			
		case IDENTITY:
			//strMsg = IDS_IDENTIFY_SUCCESS;
			strUserName = "";
			strHtml = myTG.FPUserIdentify();
			break;
			
		case DELETE:
			strMsg = IDS_DELETE_SUCCESS;
			strUserName = request.getParameter("txtDeleteUser");
			intResult = myTG.DeleteUser(strUserName);
			break;		
	}
	
	intResult = myTG.GetResultCodeValue();
	if(intResult == SUCCESSED)
	{
		out.println(strHtml);
	}
	else
	{
		strMsg = IDS_RESULT_CODE + String.valueOf(intResult) + "<br>" + myTG.GetErrMessage();
	}
%>

<html>
	<head>
		<title>
			<%=IDE_TITLE%>
		</title>
	</head>
	<body bgcolor =#d4d0c8>
		<table width="95%" height="95%" border="1" align = "center">
			<tr>
				<td>
					<table width="100%" height="100%" border="0">
						<tr>
							<td align="left" valign="middle">
								<%=strMsg%>
							</td>
						</tr>
						<tr>
							<td align="center" valign="bottom"><input type = "button" name = "btnClose" value = "<%=IDE_BTN_EXIT%>" onclick = "javascript: window.close();"></td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</body>
</html>
	

⌨️ 快捷键说明

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