__spjj.java
上传用户:xjrzjk
上传日期:2022-07-31
资源大小:1585k
文件大小:5k
- /* compiled from JSP: /spjj.jsp
- *
- * This code was automatically generated at 21:02:12 on 2004-4-19
- * 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.*; //[ /spjj.jsp; Line: 2]
- // 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:02:12 on 2004-4-19
- * by weblogic.servlet.jsp.Jsp2Java -- do not edit.
- *
- * Copyright (c) 2004 by BEA Systems, Inc. All Rights Reserved.
- */
- public final class __spjj
- 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("/spjj.jsp", 1082379730000L, "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("/spjj.jsp", 1082379730000L, "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");
//[ /spjj.jsp; Line: 3]
try{ //[ /spjj.jsp; Line: 4]
//数据库连接 //[ /spjj.jsp; Line: 5]
Class.forName("oracle.jdbc.driver.OracleDriver"); //[ /spjj.jsp; Line: 6]
String strUrl = "jdbc:oracle:thin:@slight:1521:LOCAL"; //[ /spjj.jsp; Line: 7]
String strUser = "eshop"; //[ /spjj.jsp; Line: 8]
String strPassword = "eshop"; //[ /spjj.jsp; Line: 9]
Connection con = DriverManager.getConnection(strUrl, strUser, strPassword); //[ /spjj.jsp; Line: 10]
Statement st = con.createStatement(); //[ /spjj.jsp; Line: 11]
//得到商品号 //[ /spjj.jsp; Line: 12]
long longNum = Long.parseLong(request.getParameter("ProductNO")); //[ /spjj.jsp; Line: 13]
//更改商品点击次数 //[ /spjj.jsp; Line: 14]
String sql = "update Product set look_count = look_count+1 where product_no =" //[ /spjj.jsp; Line: 15]
+ longNum; //[ /spjj.jsp; Line: 16]
out.print("rn<html>rn<head>rn<title>rn商品简介rn</title>rn</head>rn<body bgcolor="#ffffff">rn</body>rn</html>rn");
//[ /spjj.jsp; Line: 27]
}catch(Exception e){ //[ /spjj.jsp; Line: 28]
//错误处理 //[ /spjj.jsp; Line: 29]
throw (e); //[ /spjj.jsp; Line: 30]
} //[ /spjj.jsp; Line: 31]
out.print("rn");
} catch (Throwable __ee) {
while (out != null && out != _originalOut) out = pageContext.popBody();
((weblogic.servlet.jsp.PageContextImpl)pageContext).handlePageException((Throwable)__ee);
}
- //before final close brace...
- }
-
-
- }