本系统提供在线商品浏览和购买功能
源代码在线查看: clearall_0002ejsp_jsp.java
软件大小: |
2200 K |
上传用户: |
haoding306 |
|
|
关键词: |
商
|
下载地址: |
免注册下载 普通下载
|
|
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 clearall_0002ejsp_jsp extends HttpJspBase {
// begin [file="/shop/clearall.jsp";from=(3,0);to=(3,66)]
// end
static {
}
public clearall_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=gb2312");
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/clearall.jsp";from=(0,92);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/shop/clearall.jsp";from=(1,42);to=(2,0)]
out.write("\r\n");
// end
// HTML // begin [file="/shop/clearall.jsp";from=(2,43);to=(3,0)]
out.write("\r\n");
// end
// begin [file="/shop/clearall.jsp";from=(3,0);to=(3,66)]
test.models.Cart cart = null;
boolean _jspx_specialcart = false;
synchronized (session) {
cart= (test.models.Cart)
pageContext.getAttribute("cart",PageContext.SESSION_SCOPE);
if ( cart == null ) {
_jspx_specialcart = true;
try {
cart = (test.models.Cart) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "test.models.Cart");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException (" Cannot create bean of class "+"test.models.Cart", exc);
}
pageContext.setAttribute("cart", cart, PageContext.SESSION_SCOPE);
}
}
if(_jspx_specialcart == true) {
// end
// begin [file="/shop/clearall.jsp";from=(3,0);to=(3,66)]
}
// end
// HTML // begin [file="/shop/clearall.jsp";from=(3,66);to=(5,0)]
out.write("\r\n\r\n");
// end
// begin [file="/shop/clearall.jsp";from=(5,2);to=(8,0)]
cart.clear();
response.sendRedirect("viewCategory.jsp");
// end
// HTML // begin [file="/shop/clearall.jsp";from=(8,2);to=(9,0)]
out.write("\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);
}
}
}