主题:看看错在哪?? 有一条语句,不好搞. 我的意图是这样的:在上一个页面中有两个输入项,一个是数据的ID:loginNo一个是数字money 在数据查询页中这样写: String accountId = request.getParameter("accountId"); String loginNo = request.getParameter("loginNo"); if(accountId.equals("")&&loginNo.equals("")) { session.setAttribute("ERROR_MSG","请输入查询条件"); %> <jsp:forward page="<%=resource.get("jsp_ShowMessage")%>" /> <% } if(loginNo!=null&&loginNo.length()>0) { List userBriefList = null; HashMap map = new HashMap(); List userTypeList = cmsBean.getItemByType("userType"); String typeString = null; for(int j = 0;j<userTypeList.size();j++) { DictItem item =(DictItem)userTypeList.get(j); map.put(""+item.value,item.name); } userBriefList = cmsBean.getUserListByLoginNo(loginNo.trim()); if(userBriefList.size() == 0) { session.setAttribute("ERROR_MSG","该客户不存在"); %> <jsp:forward page="<%=resource.get("jsp_ShowMessage")%>" /> <% } accountId =String.valueOf(bmsBean.getAccountByLoginId(((UserBrief)userBriefList.get(0)).loginId).accountId); } response.sendRedirectCash.jsp?paidAmount=" + request.getParameter("money") & "cashGet=" + request.getParameter("money") & "accountId=" + accountId); 调试错误如下: 500 Internal Server Error Error parsing JSP page /UBS/CustomerMgr/PrePay_10.jsp Syntax error in source/CustomerMgr/PrePay_10.jsp.java:196: Incompatible type for &. Can't convert java.lang.String to int. (JSP page line 110) response.sendRedirect("Cash.jsp?paidAmount=" + request.getParameter("money") & "cashGet=" + request.getParameter("money") & "accountId=" + accountId); ^ /CustomerMgr/PrePay_10.jsp.java:196: Incompatible type for &. Can't convert java.lang.String to int. (JSP page line 110) response.sendRedirect("Cash.jsp?paidAmount=" + request.getParameter("money") & "cashGet=" + request.getParameter("money") & "accountId=" + accountId); ^ /CustomerMgr/PrePay_10.jsp.java:196: Incompatible type for method. Can't convert int to java.lang.String. (JSP page line 110) response.sendRedirect("Cash.jsp?paidAmount=" + request.getParameter("money") & "cashGet=" + request.getParameter("money") & "accountId=" + accountId); ^ 3 errors 意思是最后一句出错,请问如何更正.谢谢!!!!!
该问题已经结贴 ,得分记录:sgcl(20)、 |