Eclipse环境下如何消除JSTL <c:out>标签出现的”Multiple annotations found at this line“告警

来源:互联网 发布:淘宝我的购物车打不开 编辑:程序博客网 时间:2024/05/19 05:30

简介

在使用Eclipse的环境下,使用JSTL的<c:out>标签输出内容中,如果包含需转义字符的,Eclipse会报告"Multiple annotations found at this line"错误告警。本文简要介绍如何消除这种告警。

<c:out>输出实例

先看一个<c:out>的简单例子:

<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title><c:out value="<c:set>, <c:remove> tags"></c:out></title></head><body>    <h1>Test</h1></body></html>

Eclipse错误告警及消除方法。

在HTML的title标签中,使用了<c:out> JSTL标签来输出内容"<c:set>, <c:remove> tags",Eclipse报告了下面的错误告警:

Multiple annotations found at this line:- Missing end tag for "c:set"- Missing end tag for "c:remove"
告警标识<c:set>, <c:remove>告警没有结束标签。这里的输出内容并没有什么错误,只是Eclipse解析时,对于语义检查给出错误告警。可以通过下面的配置取消JSP语义检查:Window--->preference--->Validation---->JSP Synatax Validator--->取消build检查。


阅读全文
0 0
原创粉丝点击