jsp - How to resolve this issue? Failed to Compile JSP: This attribute is not recognized
问题描述
Im trying to pass a boolean value using request.setattribute in my Struts Action Class and in my JSP I am trying to disable a field based on that value. Here is my code:
if("update".equals(pRequest.getParameter(Request_type))){
pRequest.setAttribute("checker", false);
}
else{
pRequest.setAttribute("checker", true);
}
My JSP element
<tr id="startDateRow" >
<td class="Fieldname" style="text-align: left"><bean:message
key="3888.key" /></td>
<td id="startDate" style="display:none" width="20%" ><html:text property="StartDate" maxlength="10"
size="20" disabled = "<%request.getAttribute("checker"); %>" styleClass="Fieldcontent" /></td>
</tr>
But when Im running my code console error is: Failed to compile JSP: This attribute is not recognized disabled = "<%request.getAttribute("checker"); %>" styleClass="Fieldcontent" />
解决方案
推荐阅读
- python - 如何加入两个 Spark 结构化流?
- javascript - 通过操作 CSS 文件和我的 Javascript 文件仅显示具有特定 id 的 div
- c++ - 内存地址在 8 位后被截断
- r - r 国家和部门的总值
- reactjs - 为什么我的 POST 请求会导致 404 错误?
- db2 - 重启 DB2 服务后,应用服务器在数据库连接中得到 ERRORCODE=-4499, SQLSTATE=58009
- spring-boot - 如何将 POJO 传递给 SpringBoot 应用程序的运行方法?
- api - 不获取访问令牌
- javascript - 在不使用内置 array.pop() 函数的情况下从数组中弹出最后一项
- elixir - ecto_fixtures,预加载关联