📄 specialprice_0002ejsp_jsp.java
字号:
import java.sql.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class SpecialPrice_0002ejsp_jsp extends HttpJspBase {
static {
}
public SpecialPrice_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/SpecialPrice.jsp";from=(0,48);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(1,30);to=(2,0)]
out.write("\r\n");
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(2,31);to=(7,0)]
out.write("\r\n<html>\r\n<body background=\"images\\\\book1.jpg\">\r\n<table>\r\n<tr><td>书名</td><td>作者</td><td>出版社</td><td><font size=\"3\" color=\"#086306\"><b>会员价</b></font></td><td>详细</td><tr>\r\n");
// end
// begin [file="/SpecialPrice.jsp";from=(7,2);to=(27,0)]
String sql="select * from book where sale_number<1000";
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
Connection con=DriverManager.getConnection("jdbc:odbc:Shopping");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery(sql);
while(rs.next()){
int book_ID=rs.getInt("book_ID") ;
//String book_type=rs.getString("book_type") ;
String book_name=rs.getString("book_name") ;
session.setAttribute("bookname",book_name);
String author=rs.getString("author") ;
String publishing_house=rs.getString("publishing_house") ;
//String description=rs.getString("description") ;
//Date startTime=rs.getDate("startTime") ;
//float value=(float)rs.getDouble("value") ;
float T_value=(float)rs.getDouble("T_value") ;
float vip_value=(float)rs.getDouble("vip_value") ;
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(27,2);to=(28,45)]
out.write("\r\n<tr><td><font size=\"3\" color=\"blue\"><a href=\"");
// end
// begin [file="/SpecialPrice.jsp";from=(28,48);to=(28,72)]
out.print(request.getContextPath());
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(28,74);to=(28,100)]
out.write("/bookdetails.jsp?bookname=");
// end
// begin [file="/SpecialPrice.jsp";from=(28,103);to=(28,112)]
out.print(book_name);
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(28,114);to=(28,133)]
out.write("\" name=\"show\" ><b>");
// end
// begin [file="/SpecialPrice.jsp";from=(28,136);to=(28,145)]
out.print(book_name);
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(28,147);to=(28,171)]
out.write("</b></a></font></td><td>");
// end
// begin [file="/SpecialPrice.jsp";from=(28,174);to=(28,180)]
out.print(author);
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(28,182);to=(28,191)]
out.write("</td><td>");
// end
// begin [file="/SpecialPrice.jsp";from=(28,194);to=(28,210)]
out.print(publishing_house);
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(28,212);to=(28,221)]
out.write("</td><td>");
// end
// begin [file="/SpecialPrice.jsp";from=(28,224);to=(28,233)]
out.print(vip_value);
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(28,235);to=(28,258)]
out.write("</td><td><form action=\"");
// end
// begin [file="/SpecialPrice.jsp";from=(28,261);to=(28,285)]
out.print(request.getContextPath());
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(28,287);to=(28,313)]
out.write("/bookdetails.jsp?bookname=");
// end
// begin [file="/SpecialPrice.jsp";from=(28,316);to=(28,325)]
out.print(book_name);
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(28,327);to=(29,0)]
out.write("\" method=\"post\"><input type=\"image\" src=\"images\\\\view.gif\" name=\"view\"></form></td></tr>\r\n");
// end
// begin [file="/SpecialPrice.jsp";from=(29,2);to=(29,44)]
request.setAttribute("t_show",book_name) ;
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(29,46);to=(30,0)]
out.write("\r\n");
// end
// begin [file="/SpecialPrice.jsp";from=(30,2);to=(30,3)]
}
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(30,5);to=(31,0)]
out.write("\r\n");
// end
// begin [file="/SpecialPrice.jsp";from=(31,2);to=(33,0)]
}
catch(Exception e){System.out.println("ktyu"+e.getMessage() ) ;}
// end
// HTML // begin [file="/SpecialPrice.jsp";from=(33,2);to=(37,0)]
out.write("\r\n</table>\r\n</body>\r\n</html>\r\n");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -