有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何在jsp页面中修改包含文件而不显示空白内容

我是jsp servlet的初学者,我需要一些帮助,使我的页面在进行更改时不会显示为空白。我正试图从捐赠箱中输入代码。jsp进入组织的布局关于面板。jsp页面,它本身包含在另一个视图jsp文件中。当我更改“捐赠”框,然后加载视图文件时,我看到一个空白站点,然后在刷新时,它会像以前一样显示,没有“捐赠”框

以下是我试图从“捐赠”框中包含的代码:

    <logic:notEqual name="hideDonateBox" value="true">

    <form action="https://<%=request.getServerName()%><%=contextPath%>/cartDonate.do method="get">
    <input type="hidden" name="targetPage" value="<%=requestedPathWithQuery%>">
    <div class="donateBox">
    <logic:notEmpty name="detailOrgBean" property="offerings">
    <table class="donateBox" cellpadding="0" cellspacing="0">
    <logic:iterate name="detailOrgBean" property="relatedOfferings" id="receiver"         indexId="oppIndex" length="5">
    <tr class="donateBox">
    <td class="donateBox">
    <input type="radio" name="receiverId" 
           value="<bean:write name="receiver" property="id"/>">
    </td>
    <th class="donateBox" align="right">

美元- /捐赠/<;%=格式化程序。getUrlPath((接收器)接收器)%>;“>; “已检查>; “>; $(其他)

此文件包含在另一个包含此代码的文件中。我试着注释掉logic:notequal或logic:empty标记

<;%@include file=“/templates/donate box.jsp”%>

提前谢谢


共 (1) 个答案

  1. # 1 楼答案

    出现这个问题是因为无法编译jsp(捐赠框)(我在tomcat中见过这种行为)

    通过快速查看,我可以说requestedPathWithQuery变量在脚本中未定义

    要获得更精确的描述,可以查看日志