<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<!-- jQuery -->
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
</head>
<body>
<c:if test="${error}">
<script>
alert("You must have something...");
</script>
</c:if>
</body>
</html>
<c:if test="${error}">
<script>
alert("You must have something...");
</script>
</c:if>
@RequestMapping(value = "/sample/board.do", method = RequestMethod.POST)
public ModelAndView updateBoard(@ModelAttribute HistoryBoard historyBoard) throws Exception {
ModelAndView mv = new ModelAndView("redirect");
mv.addObject("error", true);
return mv;
}
并制作网址http://localhost:8080/test/board/board.do?error=true
但c:if
代码无效
<c:if test="${not empty error}">
<h1>TEST</h1>
</c:if>
c:if
不空也不起作用。
如何修复此标记?
答案 0 :(得分:1)
错误是参数,而不是范围变量。
If GetKeyState("LAlt") & GetKeyState("RAlt")
send {Shift Down}
else
send {Shift Up}