首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Intellij不会识别OWASP标签库吗?

Intellij不会识别OWASP标签库吗?
EN

Stack Overflow用户
提问于 2022-10-12 00:39:25
回答 3查看 82关注 0票数 1

编辑:作为对评论的回应,我已经包含了JSP文件的起始部分,我正试图将OWASP库添加到其中。多个人指出了这一声明:

代码语言:javascript
运行
复制
<%@ taglib prefix="e" uri="https://www.owasp.org/index.php/OWASP_Java_Encoder_Project" %>

这个语句已经在JSP文件中了。我还在maven POM文件依赖项中添加了所需的jars。

以下是JSP文件的开头行。如您所见,文件中已经有多个taglib语句,它们已经被使用并且已经工作了。我无法解释为什么OWASP标记库不能工作。有人能提供一个有效的例子吗?

代码语言:javascript
运行
复制
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="asrs" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="e" uri="https://www.owasp.org/index.php/OWASP_Java_Encoder_Project" %>

<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" >

<asrs:cssPath relativePath="find.css" />

<asrs:dojoConfig relativePath="lib/dojo/dojo.js" configValue="parseOnLoad: true"/>
<asrs:javascriptPath relativePath="lib/dojo/io/iframe.js"/>
<asrs:javascriptPath relativePath="lib/spring/Spring.js"/>
<asrs:javascriptPath relativePath="lib/spring/Spring-Dojo.js"/>
<asrs:javascriptPath relativePath="Metadata.js"/>
</head>

<body onunload="javascript: exitpop()" onresize="resize()">

<c:if test="${saved}">
<script type="text/javascript" language="JavaScript">
top.close();
</script>
</c:if>

[code continues]

原始员额:

我试图使用嵌入式Tomcat将OWASP标记库添加到Spring项目中。项目文档这里和另一个问题这里表明这应该是正确的:

代码语言:javascript
运行
复制
<%@ taglib prefix="e" uri="https://www.owasp.org/index.php/OWASP_Java_Encoder_Project" %>
<p>Dynamic data via EL: ${e:forHtml(param.value)}</p>
<p>Dynamic data via tag: <e:forHtml value="${param.value}" /></p>

但是我不能让Intellij识别这个标签库。我在项目中添加了两个OWASP依赖项,但似乎没有任何帮助:

代码语言:javascript
运行
复制
<dependency>
    <groupId>org.owasp.encoder</groupId>
    <artifactId>encoder</artifactId>
    <version>1.2.3</version>
</dependency>
<dependency>
    <groupId>org.owasp.encoder</groupId>
    <artifactId>encoder-jsp</artifactId>
    <version>1.2.3</version>
</dependency>

这个问题是与OWASP库有关还是与Spring有关?

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74035324

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档