JSP 请求参数在包含 Weblogic 的 jsp 上返回 null

发布于 2024-09-01 11:35:17 字数 778 浏览 5 评论 0原文

我在使用 jsp:include 标记时遇到问题。我有如下代码:

<jsp:include page="./Address.jsp">
    <jsp:param value="30" name="tabIndex"/>
    <jsp:param value="true" name="showBox"/>
    <jsp:param value="none" name="display"/>    
</jsp:include>

该页面包含得很好,但是当我尝试访问 Address.jsp 页面上的参数时,它们为空。我尝试通过以下方式访问它们(使用 jstl):

     <c:out value="${param.tabIndex}" />
     <c:out value="${param['tabIndex']} />
     <%= request.getParameter("tabIndex") %>
     <c:out value="${pageScope.param.tabIndex} />
     ${param.tabIndex}

等等...

这是关键,上面的内容在 tomcat 5.5 中工作正常。但是,当我在 Weblogic 10 中部署该应用程序时,却没有。

此外,该代码在我的应用程序的其他区域(在 weblogic 上)运行良好,只是不是特定页面。

有什么想法吗?

谢谢!

I am having trouble with the jsp:include tag. I have code like the following:

<jsp:include page="./Address.jsp">
    <jsp:param value="30" name="tabIndex"/>
    <jsp:param value="true" name="showBox"/>
    <jsp:param value="none" name="display"/>    
</jsp:include>

The page is included fine, but when I try to access the parameters on the Address.jsp page, they are null. I have tried accessing them the following ways (with jstl):

     <c:out value="${param.tabIndex}" />
     <c:out value="${param['tabIndex']} />
     <%= request.getParameter("tabIndex") %>
     <c:out value="${pageScope.param.tabIndex} />
     ${param.tabIndex}

etc...

Here is the kicker, The above works fine in tomcat 5.5. However, when I deploy the application in Weblogic 10, it does not.

Also, the code works fine in other areas of my application (on weblogic) just not a particular page.

Any Ideas?

Thanks!

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

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

发布评论

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

评论(1

沩ん囻菔务 2024-09-08 11:35:17

试试这个

<jsp:include page="./Address.jsp?tabIndex=30&showBox=true&display=none" />

Try this

<jsp:include page="./Address.jsp?tabIndex=30&showBox=true&display=none" />
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文