请修改并指出程序中的错误,使jsp页面可以正常运行提交,

[复制链接]
查看11 | 回复2 | 2010-11-27 04:16:31 | 显示全部楼层 |阅读模式


身份证号



电话号码

选修课程

[I]健美课程

[I]形体课程

[I]减脂课程










对应的servlet相关细节为
public class addServlet extends HttpServlet
{
public void init(ServletConfig config) throws ServletException

{super.init(config); }
publicvoiddoPost(HttpServletRequest request,HttpServletResponse response)

throws ServletException,IOException

{HttpSession session=request.getSession(true);
User u=(User)session.getAttribute("user");

try{Connection con=DBConnection.getCon();

PreparedStatement prst=con.prepareStatement("insert into clubinfo values(?,?,?)");

prst.setString(1,NumFormat.transInsert(request.getParameter("memberID")));

prst.setString(6, NumFormat.transInsert(request.getParameter("telephone")));

prst.setString(8, NumFormat.transInsert(request.getParameter("course")));

prst.setString(9, NumFormat.transInsert(u.getUsername()));

prst.executeUpdate();

con.close();

回复

使用道具 举报

千问 | 2010-11-27 04:16:31 | 显示全部楼层
表达式求值主要错误在operator()函数,因为调用传递的是char型参数虽然operator(int,int),但是数值还要转换下的,最后传回去是也要变回char数据类型好入栈。下面是可通过的程序。#include#include#include#define STACK_INIT_SIZE 100#define STACKINCREMENT 10#define OK 1#define ERROR 0#define OVERFLOW 0typedef struct//栈{ char *b
回复

使用道具 举报

千问 | 2010-11-27 04:16:31 | 显示全部楼层
<form action=
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行