__showvote.java
上传用户:xjrzjk
上传日期:2022-07-31
资源大小:1585k
文件大小:7k
- /* compiled from JSP: /showvote.jsp
- *
- * This code was automatically generated at 21:23:35 on 2004-4-16
- * by weblogic.servlet.jsp.Jsp2Java -- do not edit.
- */
- package jsp_servlet;
- import java.io.*;
- import java.util.*;
- import javax.servlet.*;
- import javax.servlet.http.*;
- import javax.servlet.jsp.*;
- import javax.servlet.jsp.tagext.*;
- // User imports
- import java.sql.*; //[ /showvote.jsp; Line: 2]
import javax.sql.*; //[ /showvote.jsp; Line: 3]
- // built-in init parameters:
- // boolean _verbose -- wants debugging
- // Well-known variables:
- // JspWriter out -- to write to the browser
- // HttpServletRequest request -- the request object.
- // HttpServletResponse response -- the response object.
- // PageContext pageContext -- the page context for this JSP
- // HttpSession session -- the session object for the client (if any)
- // ServletContext application -- The servlet (application) context
- // ServletConfig config -- The ServletConfig for this JSP
- // Object page -- the instance of this page's implementation class (i.e., 'this')
- /**
- * This code was automatically generated at 21:23:35 on 2004-4-16
- * by weblogic.servlet.jsp.Jsp2Java -- do not edit.
- *
- * Copyright (c) 2004 by BEA Systems, Inc. All Rights Reserved.
- */
- public final class __showvote
- extends
- weblogic.servlet.jsp.JspBase
- implements weblogic.servlet.jsp.StaleIndicator
- {
-
- // StaleIndicator interface
public boolean _isStale() {
weblogic.servlet.jsp.StaleChecker sci =(weblogic.servlet.jsp.StaleChecker)(getServletConfig().getServletContext());
java.io.File f = null;
long lastModWhenBuilt = 0L;
if (sci.isResourceStale("/showvote.jsp", 1081087556000L, "WebLogic Server 7.0 Thu Jun 20 11:47:11 PDT 2002 190955 ")) return true;
return false;
}
public static boolean _staticIsStale(weblogic.servlet.jsp.StaleChecker sci) {
java.io.File f = null;
long lastModWhenBuilt = 0L;
if (sci.isResourceStale("/showvote.jsp", 1081087556000L, "WebLogic Server 7.0 Thu Jun 20 11:47:11 PDT 2002 190955 ")) return true;
return false;
}
-
- public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
- {
-
- // declare and set well-known variables:
- javax.servlet.ServletConfig config = getServletConfig();
- javax.servlet.ServletContext application = config.getServletContext();
- javax.servlet.jsp.tagext.Tag _activeTag = null;
- // variables for Tag extension protocol
- Object page = this;
- javax.servlet.jsp.JspWriter out;
- javax.servlet.jsp.PageContext pageContext =
javax.servlet.jsp.JspFactory.getDefaultFactory().getPageContext(this, request, response, null, true, 8192, true);
- response.setHeader("Content-Type", "text/html; charset=GBK");
out = pageContext.getOut();
JspWriter _originalOut = out;
- javax.servlet.http.HttpSession session = request.getSession(true);
-
-
- try { // error page try block
response.setContentType("text/html; charset=GBK");
out.print("rn");
out.print("rn");
out.print("rn");
//[ /showvote.jsp; Line: 4]
try{ //[ /showvote.jsp; Line: 5]
//数据库连接 //[ /showvote.jsp; Line: 6]
Class.forName("oracle.jdbc.driver.OracleDriver"); //[ /showvote.jsp; Line: 7]
String strUrl = "jdbc:oracle:thin:@slight:1521:LOCAL"; //[ /showvote.jsp; Line: 8]
String strUser = "eshop"; //[ /showvote.jsp; Line: 9]
String strPassword = "eshop"; //[ /showvote.jsp; Line: 10]
Connection con = DriverManager.getConnection(strUrl, strUser, strPassword); //[ /showvote.jsp; Line: 11]
Statement st = con.createStatement(); //[ /showvote.jsp; Line: 12]
String sql = "select * from type"; //[ /showvote.jsp; Line: 13]
ResultSet rs = st.executeQuery(sql); //[ /showvote.jsp; Line: 14]
out.print("rn<html>rn<head>rn<title>rnshowvotern</title>rn</head>rn<body bgcolor="#ffffff">rn<table width="100%" border="0" cellspacing="1" cellpadding="2">rn <tr>rn <td class="text1">rn <p align="left">rn");
//[ /showvote.jsp; Line: 27]
if (rs.next()) out.println(rs.getString("type")); //[ /showvote.jsp; Line: 28]
out.print("rn</td>rn </tr>rn <tr>rn");
//[ /showvote.jsp; Line: 33]
rs.close(); //[ /showvote.jsp; Line: 34]
sql = "select id,note from vote order by id"; //[ /showvote.jsp; Line: 35]
rs = st.executeQuery(sql); //[ /showvote.jsp; Line: 36]
out.print("rn<td class="text1">rn<form method="post" action="vote.jsp" target="_Blank">rn<p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom: 0">rn ");
while (rs.next()){ //[ /showvote.jsp; Line: 41]
out.print("rn <input type="radio" name="rb" value="");
out.print(String.valueOf(rs.getLong("id"))); //[ /showvote.jsp; Line: 43]
out.print("">rn ");
out.print(String.valueOf(rs.getString("note"))); //[ /showvote.jsp; Line: 44]
out.print(" </p>rn <p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom: 0">rn ");
} //[ /showvote.jsp; Line: 46]
//[ /showvote.jsp; Line: 47]
//[ /showvote.jsp; Line: 47]
out.print("rn <br>rn <input type="submit" name="submit" value="提交" style=" BACKGROUND-COLOR: #cccccc" disabled>rntttt<input type="button" onClick="window.open('admin/votedetail.jsp')" value="查看" style=" BACKGROUND-COLOR: #cccccc" disabled>rn </p>rn </form>rn </td>rn </tr>rn </table>rn</body>rn</html>rn");
//[ /showvote.jsp; Line: 58]
}catch(Exception e){ //[ /showvote.jsp; Line: 59]
e.printStackTrace(); //[ /showvote.jsp; Line: 60]
} //[ /showvote.jsp; Line: 61]
} catch (Throwable __ee) {
while (out != null && out != _originalOut) out = pageContext.popBody();
((weblogic.servlet.jsp.PageContextImpl)pageContext).handlePageException((Throwable)__ee);
}
- //before final close brace...
- }
-
-
- }