jsp - 在 HTML 注释中描述 jsp:setProperty 操作标记时出现内部服务器错误
问题描述
问题:是否需要在 JSP 页面的 HTML 注释部分中“转义”jsp 标记?
背景:
我们有有效的 JSP 代码,我们在其中通过描述jsp:setProperty
动作标记来详细说明 HTML 注释部分。换句话说,我们扩展了
<!--
blah blah blah
-->
至
<!--
blah blah blah
<jsp:setProperty name="myBean" property="*"/>
more blah-blah-blah
-->
请记住,jsp:setProperty 操作标记完全在 HTML 注释的范围内。
在这个看似无害的更改之后,我们的应用程序抛出了以下异常:
HTTP Status 500 - Internal Server Error
type Exception report
message Internal Server Error
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.NullPointerException
root cause
java.lang.NullPointerException
解决方案
推荐阅读
- django - 连接django html模板的问题
- java - Spring boot Embedded MongoDB 在构建期间无法正常工作
- javascript - 一个人如何根据 React 状态重复一个“摇晃”的 CSS 类(所以不是 onClick)
- java - Spring Data Elasticsearch 文档没有被反序列化
- jquery - 如何调用与我单击的缩略图具有相同“.length”的 div?
- html - border-image 在 Firefox 上有其他行为
- python - 在比较两个文件的更改时实现忽略更改列表
- c# - 如何在 ColdFusion 中使用 C#.NET 程序集?
- python - 从一串行中提取特定列
- python - 点击网页上的按钮(python、webscraping)