📄 viewproductbycategory_0002ejsp_jsp.java
字号:
package shop;
import java.util.*;
import java.sql.*;
import test.bo.*;
import test.models.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class viewProductByCategory_0002ejsp_jsp extends HttpJspBase {
// begin [file="/shop/viewProductByCategory.jsp";from=(3,0);to=(3,62)]
// end
static {
}
public viewProductByCategory_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,
"../error.jsp", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/shop/viewProductByCategory.jsp";from=(0,89);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/shop/viewProductByCategory.jsp";from=(1,42);to=(2,0)]
out.write("\r\n");
// end
// HTML // begin [file="/shop/viewProductByCategory.jsp";from=(2,43);to=(3,0)]
out.write("\r\n");
// end
// begin [file="/shop/viewProductByCategory.jsp";from=(3,0);to=(3,62)]
test.bo.CartBO cartBO = null;
boolean _jspx_specialcartBO = false;
synchronized (pageContext) {
cartBO= (test.bo.CartBO)
pageContext.getAttribute("cartBO",PageContext.PAGE_SCOPE);
if ( cartBO == null ) {
_jspx_specialcartBO = true;
try {
cartBO = (test.bo.CartBO) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "test.bo.CartBO");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class "+"test.bo.CartBO", exc);
}
pageContext.setAttribute("cartBO", cartBO, PageContext.PAGE_SCOPE);
}
}
if(_jspx_specialcartBO == true) {
// end
// begin [file="/shop/viewProductByCategory.jsp";from=(3,0);to=(3,62)]
}
// end
// HTML // begin [file="/shop/viewProductByCategory.jsp";from=(3,62);to=(5,0)]
out.write("\r\n\r\n");
// end
// begin [file="/shop/viewProductByCategory.jsp";from=(5,2);to=(21,0)]
//request.setCharacterEncoding("gbk");
String catid=request.getParameter("catid");
String sql="select product.productid as productid,"+
"product.name as name,item.listprice as listprice,"+
"item.unitcost as unitcost,item.itemid as itemid,"+
"item.supplier as supplier from product as product,"+
"item as item where product.category='"+ catid +"'"+
" and product.productid=item.productid and item.status='1'";
Collection temp=null;
try{
temp=cartBO.searchItem(sql);
}
catch(Exception e){}
Iterator it=temp.iterator();
// end
// HTML // begin [file="/shop/viewProductByCategory.jsp";from=(21,2);to=(31,2)]
out.write("\r\n <table align=\"center\" bgcolor=\"#008800\" border=\"0\" cellspacing=\"2\" cellpadding=\"5\">\r\n <tr bgcolor=\"#cccccc\">\r\n <td align=\"center\"><b>鍚嶇О </b></td>\r\n <td align=\"center\"><b>浠锋牸 </b></td>\r\n <td align=\"center\"><b>浼氬憳浠锋牸 </b></td>\r\n <td align=\"center\"><b>鍑虹増绀
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -