html - 从jsp调用html文件
问题描述
我想从一个jsp文件中调用一个html文件index.html。我尝试通过以下两种方法添加,但它不起作用。
<%@ include file="C:\Users\vishal.tripathi\Desktop\bio-integration\bio-integration\verify\verify\index.html" %>
<c:import url="file:///C:/Users/vishal.tripathi/Desktop/bio-integration/bio-integration/verify/verify/index.html" />
任何人都可以帮助我在jsp中添加它的方法和确切位置。
解决方案
你可以试试这个将html调用到jsp中,你只需要改变url中的路径,我推荐你使用相对路径。
<c:import var="html" url="${file.name}.html" />
<c:out value="${html}" escapeXml="false" />
推荐阅读
- api - 在 ASP Net Core API 中使用 NLog 进行 Elasticsearch 日志记录失败
- scheme - 这个 Scheme 代码如何返回值?
- c# - 如何将字典转换为数据表?
- bash - 打开 SQLite 控制台并在不退出的情况下执行 SQL
- javascript - 如何在构造函数中执行异步函数?
- java - Java没有打开PDF
- django - Django 和 React 作为离线应用程序。你的意见
- hibernate-search - 将相同的分析器应用于查询和字段
- c# - 有没有办法将场景的内容设置为变量?
- php - PHP - 如何检查字符串是否有 0 和 1 或 0 或 1