1、错误描述

javax.servlet.JspTagException:Illegal use of <when>-style tag without <choose >as its direct parent

2、错误原因

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <title></title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

  </head>

  <body>
     <table>
         <tr>
           <th>时间</th>
           <th>地域</th>
           <th>姓名</th>
           <th>年龄</th>
           <th>性别</th>
           <th>QQ</th>
           <th>地址</th>
           <th>爱好</th>
           <th>备注</th>
         </tr>
         <tr>
           <c:forEach var="area" varStatus="areaStatus" items="{areaList}">
           		<c:when test="areaList == null || areaList.size()==0">
           			<td colspan="9"><center>无数据</center></td>
           		</c:when>
           		<c:otherwise>
           			<td>${area.statisDate}</td>
           			<td>${area.areaDesc}</td>
           			<td>${area.username}</td>
           			<td>${area.age}</td>
           			<td>${area.sex}</td>
           			<td>${area.qq}</td>
           			<td>${area.address}</td>
           			<td>${area.intester}</td>
           			<td>${area.shuoMing}</td>
           		</c:otherwise>
           </c:forEach>
         </tr>
     </table>
  </body>
</html>

3、解决办法

(1)将<c:when></c:when>换成<c:if>

(2)利用struts2中的s标签中的<s:if>

javax.servlet.JspTagException:Illegal use of &lt;when&gt;-style tag without &lt;choose &gt;as its di的更多相关文章

  1. HTTP Status 500 - javax.servlet.ServletException

    运行某个jsp页面时提示 type Exception report message javax.servlet.ServletException: java.lang.NoClassDefFound ...

  2. 关于javax.servlet.jsp.JspTagException: Don't know how to iterate over supplied "items" in &lt;forEach&gt;

    今天遇到这样一个异常: 严重: Servlet.service() for servlet jsp threw exceptionjavax.servlet.jsp.JspTagException: ...

  3. [springMVC]javax.servlet.jsp.JspTagException: Neither BindingResult nor plain target object for bean

    问题描述: 页面使用标签<form:form>进行提交时,出现[springMVC]javax.servlet.jsp.JspTagException: Neither BindingRe ...

  4. 【原】tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig的解决

    现象: tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig() ...

  5. 使用javax.servlet.http.Part类上传文件

    使用的是Servlet 3.0 新的特征标注(Annotaion)类描述部署,一些低版本的服务器需要使用标准依赖部署描述文件(web.xml)来部署,另外Part也是Java EE 6.0新增的类,P ...

  6. The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path解决方案

    0.环境: win7系统,Tomcat9配置无误. 1.错误: 项目中某一.jps页面忽然出现错误,鼠标点上去为:The superclass "javax.servlet.http.Htt ...

  7. The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path。问题

    JSP页面顶端出现“红色”的报错信息:The superclass "javax.servlet.http.HttpServlet" was not found on the Ja ...

  8. java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.isAsyncStarted()Z 的解决

    jetty 9 嵌入式开发时,启动正常,但是页面一浏览就报错如下: java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest ...

  9. NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

    今天调试SSM框架项目后台JSOn接口,报出来一个让人迷惑的错误:NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config 上网查了一下别人的博 ...

随机推荐

  1. iOS-Mac Charles抓包工具的使用【Mac 抓包工具Charles】

    1.下载文件 Charles安装包以及破解文件下载地址:http://charles.iiilab.com 2.安装及使用 使用介绍 http://www.cocoachina.com/ios/201 ...

  2. Spring-shiro源码陶冶-DelegatingFilterProxy和ShiroFilterFactoryBean

    阅读源码有助于陶冶情操,本文旨在简单的分析shiro在Spring中的使用 简单介绍 Shiro是一个强大易用的Java安全框架,提供了认证.授权.加密和会话管理等功能 web.xml配置Shiro环 ...

  3. UOJ 241. 【UR #16】破坏发射台 [矩阵乘法]

    UOJ 241. [UR #16]破坏发射台 题意:长度为 n 的环,每个点染色,有 m 种颜色,要求相邻相对不能同色,求方案数.(定义两个点相对为去掉这两个点后环能被分成相同大小的两段) 只想到一个 ...

  4. Laravel (5.5.33) 加载过程---instance方法(二)

    在bootstrap/app.php /** * 对于其中的instance register singleton 方法到时候单独拎出来说明 * * 1.设置基础路径 * 2.使用instance 方 ...

  5. NIO下_使用示例

    一.分散与聚集 1.分散读取(Scattering Reads):将通道中的数据分散到多个缓冲区中 2.聚集写入(Gathering Writes):将多个缓冲区中的数据聚集到通道中 public v ...

  6. Redis 学习(一) —— 安装、通用key操作命令

    一.Redis介绍 1.介绍 通常,在系统中,我们会把数据交由数据库来存储,但传统的数据库增删查改的性能较差,且比较复杂.根据 80/20 法则,百分之八十的业务访问集中在百分之二十的数据上.是否可以 ...

  7. TKCPP

    volume one: http://book.huihoo.com/thinking-in-cpp-2nd-ed-vol-one/ volume2 : http://book.huihoo.com/ ...

  8. 配置python虚拟环境Virtualenv及pyenv

    pyenv pyenv 可以让机器安装各种不同版本的python pyenv install --list 查看可以安装的python版本 pyenv versions 查看已安装的python版本 ...

  9. iOS 开发之 Xcode installation failed invalid argument!

    1.运行模拟器的时候 报出:installation failed invalid argument! 原因分析:我把Bundle indentifier 置为空了! http://stackover ...

  10. /dev/null 2>&1 详解

     今天一个朋友突然在自己的维护的Linux中, /var/spool/cron/root 中看到了以下的内容: 30 19 * * * /usr/bin/**dcon.sh > /dev/nul ...