简体   繁体   English

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

[英]How to modify include file in jsp page without showing blank content

I am a beginner with jsp servlets, and I need some help having my page not show up blank when I make changes. 我是jsp servlet的初学者,我需要一些帮助,使我的页面在进行更改时不会空白显示。 I am trying to include the the code from a donate-box.jsp into the layout of the org-about-panel.jsp page, which itself is included in another view jsp file. 我正在尝试将donate-box.jsp中的代码包含到org-about-panel.jsp页面的布局中,该页面本身也包含在另一个视图jsp文件中。 When I makes change to donate-box, then load the view file, I am seeing a blank site, and then upon refreshing, it shows up as before without the donate-box. 当我对捐赠箱进行更改,然后加载视图文件时,我看到一个空白站点,然后刷新后,它像以前一样显示,没有捐赠箱。

Here is the code I am trying to include, from the donate-box: 这是我要包含在捐赠框中的代码:

    <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">

$ - /donate/<%= formatter.getUrlPath((Receiver) receiver) %>"> " CHECKED> "> $ (Other) $-/ donate / <%= formatter.getUrlPath(((Receiver)receiver))%>“>” CHECKED>“> $(其他)

This file is being included in another file with this code. 该文件包含在具有此代码的另一个文件中。 I have tried commenting out the logic:notequal or logic:empty tags. 我尝试注释掉逻辑:notequal或逻辑:空标记。

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

Thanks in advance! 提前致谢!

This problems appears because your jsp (donate-box) can't be compiled (Such behavior I've seen in tomcat). 出现此问题是因为无法编译您的jsp(捐款箱)(我在tomcat中看到的这种行为)。

From quick look, I can say that requestedPathWithQuery - variable is undefined in scripting. 从快速的角度来看,我可以说在脚本中未定义requestPathWithQuery-变量。

For more precise description you can take a look in logs 有关更精确的描述,您可以查看日志

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM