如何修改jsp页面中的include文件而不显示空白内容

发布于 2024-11-16 15:26:54 字数 1490 浏览 0 评论 0原文

我是 jsp servlet 的初学者,我需要一些帮助,让我的页面在进行更改时不会显示为空白。我试图将 donate-box.jsp 中的代码包含到 org-about-panel.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">

$ - /donate/<%= formatter.getUrlPath((Receiver) 接收者) %>"> “已检查> “> $   (其他)

该文件正包含在具有此代码的另一个文件中。我尝试注释掉logic:notequal或logic:empty标签。

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

提前致谢!

I am a beginner with jsp servlets, and I need some help having my page not show up blank when I make changes. 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. 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)

This file is being included in another file with this code. I have tried commenting out the logic:notequal or logic:empty tags.

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

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

林空鹿饮溪 2024-11-23 15:26:54

出现这个问题是因为你的jsp(donate-box)无法编译(我在tomcat中见过这种行为)。

从快速查看来看,我可以说 requestPathWithQuery - 变量在脚本中未定义。

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

This problems appears because your jsp (donate-box) can't be compiled (Such behavior I've seen in tomcat).

From quick look, I can say that requestedPathWithQuery - variable is undefined in scripting.

For more precise description you can take a look in logs

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文