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. cookie和session的那些事

    对于经常网购的朋友来说,经常会遇到一种情况: 打开淘宝或京东商城的首页,输入个人账号和密码进行登陆,然后进行购物,支付等操作都不需要用户再次输入用户名和密码 但是如果用户换一个浏览器或者等几个小时后再 ...

  2. c#代码启动任务管理器的几种方法

    1.直接启动 ProcessStartInfo info = new ProcessStartInfo(); info.FileName = Path.Combine(Environment.GetE ...

  3. 自动化测试selenium(三) 由于iframe 定位不到元素

    iframe原因定位不到元素 现在的项目后台基本都是上左右结构,要出现这个结构效果,需要使用到了iframe标签: 我们先说说iframe在java中使用的方法: driver.switchTo(). ...

  4. H5动画

    1.参考:http://blog.csdn.net/whqet/article/details/42911059?readlog https://developer.mozilla.org/zh-CN ...

  5. shell实现centos7双网卡修改网卡名eth0,eth1,并设置网络

    #!/bin/bash interface1=`ls /sys/class/net|grep en|awk 'NR==1{print}'` interface2=`ls /sys/class/net| ...

  6. IOS开发之记录用户登陆状态,ios开发用户登陆

    IOS开发之记录用户登陆状态,ios开发用户登陆 上一篇博客中提到了用CoreData来进行数据的持久化,CoreData的配置和使用步骤还是挺复杂的.但熟悉CoreData的使用流程后,CoreDa ...

  7. ubuntu下安装memcached与php扩展测试使用

    1,memcached需要libevent,所以要先安装它 下载地址:http://download.chinaunix.net/download.php?id=45065&ResourceI ...

  8. 利用Python爬取可用的代理IP

    前言 就以最近发现的一个免费代理IP网站为例:http://www.xicidaili.com/nn/.在使用的时候发现很多IP都用不了. 所以用Python写了个脚本,该脚本可以把能用的代理IP检测 ...

  9. ASP.NET Core的身份认证框架IdentityServer4--(2)API跟WEB端配置

    API配置 可以使用ASP.NET Core Web API模板.同样,我们建议您控制端口并使用与之前一样的方法来配置Kestrel和启动配置文件.端口配置为http://localhost:5001 ...

  10. 正"/" 和 反"\"的区别?

    反斜杠"\"是电脑出现了之后为了表示程序设计里的特殊含义才发明的专用标点.就是说,除了程序设计领域外,任何地方你都不应该有使用反斜杠的时候,请永远使用正斜杠"/" ...