📄 updatetypeaction.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:requestEncoding value="gb2312"/>
<%@ page isELIgnored="false"%>
<c:if test="${(empty param.type_name) or (empty param.type_id)}">
<c:redirect url="booktypeview.jsp"/>
</c:if>
<!------设置数据源------>
<sql:setDataSource dataSource="jdbc/sqlserver" var="sqlDS"/>
<!-------构造作更新操作的SQL语句-------->
<c:set var="updateSQL" value="update book_type set type_name='${param.type_name}'
where type_id=${param.type_id}"/>
<!------作数据库操作------>
<sql:update sql="${updateSQL}" dataSource="${sqlDS}"/>
<c:redirect url="booktypeview.jsp" />
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -