javaweb交易平台的订单支付判断

运行显示错误

org.apache.jasper.JasperException: An exception occurred processing JSP page [/jsp/buyGoods.jsp] at line [25]

22: <body>
23:     <%
24:         ShoppingCartDao scDao = DAOFactory.getShoppingCartServiceInstance();
25:         if (scDao.payAllGoods(Integer.parseInt(uid))) {
26:             response.sendRedirect("alreadyBuy.jsp");
27:         } else {
28:     

该怎么判断

<%@page import="com.czy.factory.DAOFactory"%>
<%@page import="com.czy.dao.ShoppingCartDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%
    String uid = String.valueOf(session.getAttribute("uid"));
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>支付商品</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
</head>
<body>
    <%
        ShoppingCartDao scDao = DAOFactory.getShoppingCartServiceInstance();
        if (scDao.payAllGoods(Integer.parseInt(uid))) {
            response.sendRedirect("alreadyBuy.jsp");
        } else {
    %>
    支付失败,请重试。
    <%
        }
    %>
</body>
</html>
查看全部
weixin_44220949
lllrc
2019/04/12 17:25
  • java
  • html5
  • mysql
  • javascript
  • eclipse
  • 点赞
  • 收藏
  • 回答
    私信

0个回复