邵阳到洞口要多久:jstl的错误

来源:百度文库 编辑:九乡新闻网 时间:2024/04/30 19:22:27

执行某jsp页面时,弹出如标题所示异常,jsp代码如下:

<%@ page language="java" contentType="text/html;charset=gbk" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>



 
   
 
 
 
    This is the result:
   
 


异常的原因是不能识别“${userInfo}”,解决办法有两种:
一、在page指令里,加入isELIgnored="true"属性,即
<%@ page language="java" contentType="text/html;charset=gbk"  isELIgnored="true" %>
二、把<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>变为:
<%@ taglib prefix="c" uri=http://java.sun.com/jstl/core_rt  %>
经过改动之后,jsp页面能正常执行了。