useclassInsert.jsp
资源名称:shop.rar [点击查看]
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:1k
源码类别:
Applet
开发平台:
Java
- <%@ page contentType="text/html; charset=GB2312"%>
- <%@ page import="java.sql.*"%>
- <% request.setCharacterEncoding("GB2312");%>
- <jsp:useBean id="useclassBean" class="MyFly.Bean.useclassBean" scope="request"/>
- <%
- String name=request.getParameter("name");
- String content=request.getParameter("content");
- String charactor=request.getParameter("characterID");
- if(name == "" || content == ""||charactor.equals("all"))
- {
- out.println("<Script language=JavaScript>alert('请输入正确信息');javascript:history.back();</Script>");
- }
- else
- {
- useclassBean.setUseclassName(name);
- useclassBean.setUseclassInfo(content);
- useclassBean.setUseclasscharacterID(Integer.parseInt(charactor));
- //System.out.print(charactor);
- if(useclassBean.addNew() == 0)
- {
- out.println("<Script language=JavaScript>alert('添加出错');javascript:history.back();</Script>");
- }
- else
- {
- response.sendRedirect("useclassView.jsp");
- }
- }
- %>