web.xml没有配置taglib,在\WEB-INF\lib下放了jstl-1.2.jar和standard-1.1.2.jar
jsp源码:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>Core_catch.jsp</title>
</head>
<body>
<h2><c:out value="<c:catch> 的用法" /></h2>
<c:catch var="error_Message">
<%
String eFormat = "not number";
int i = Integer.parseInt(eFormat);
%>
</c:catch>
$ { error_Message }
</body>
</html>生成的网页源码:
<html>
<head>
<title>Core_catch.jsp</title>
</head>
<body>
<h2><c:catch> 的用法</h2>
$ { error_Message }
</body>
</html>
jsp源码:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>Core_catch.jsp</title>
</head>
<body>
<h2><c:out value="<c:catch> 的用法" /></h2>
<c:catch var="error_Message">
<%
String eFormat = "not number";
int i = Integer.parseInt(eFormat);
%>
</c:catch>
$ { error_Message }
</body>
</html>生成的网页源码:
<html>
<head>
<title>Core_catch.jsp</title>
</head>
<body>
<h2><c:catch> 的用法</h2>
$ { error_Message }
</body>
</html>
解决方案 »
- 网页抓取出错,跟编码有关!求助!
- META-INF目录下的MANIFEST.MF是做什么用的?
- 在struts中用SmartUpload上传文件时upload()很慢是什么原因啊,请教高手
- 【求助】jsp页面加载完毕但状态栏的进度条还在动
- java真是一个大垃圾,连字符串都设计的如此垃圾,还美其名纯面向对象.
- 用struts-menu显示树型导航菜单如何实现从数据库中动态取节点信息吗?
- 奇怪的中文乱码问题,大虾进
- 在线求救:一个出错信息
- sessin的问题!非常急!!!!!
- spring afterPropertiesSet执行修改sql无效
- jsp 首頁的登錄信息問題
- mySql查询queryForInt出错
<c:catch var="error_Message">
<%
String eFormat = "not number";
int i = Integer.parseInt(eFormat);
%>
</c:catch>
${error_Message}这里${error_Message}已经出来</c:catch>语句块了
error_Message只能在<c:catch> 和</c:catch>之间使用啊