Jsp 看不到包含的标记库。 似乎是本地 webshpere 6 配置问题?

发布于 2024-07-26 00:34:38 字数 2176 浏览 7 评论 0原文

我会尽可能地进行描述。

情况: struts 标签未在 jsp 上解析。 当您查看应该解析为链接的内容时,您会看到:

<html:link page="/dto/initDTO.do"><b><i>Design To Order Control System ( DTOCS )</i></b></html:link>

这使我相信 struts 标签没有被解析。

该页面的源代码包括:

<%@ include file="/common/taglibs.jsp" %>

如果您查看该 jsp:

<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %>
<%@ taglib uri='/WEB-INF/tlds/struts-html.tld' prefix='html' %>
<%@ taglib uri="/WEB-INF/tlds/cat-input.tld" prefix="input" %>
<% String URLRoot = request.getContextPath(); %> 

如果您查看 web.xml:

    <taglib>
        <taglib-uri>/WEB-INF/tlds/struts-bean.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
        <taglib-uri>/WEB-INF/tlds/struts-html.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
        <taglib-uri>/WEB-INF/tlds/struts-logic.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
        <taglib-uri>/WEB-INF/tlds/struts-template.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-template.tld</taglib-location>
    </taglib>
    <taglib>
        <taglib-uri>/WEB-INF/webTrends.tld</taglib-uri>
        <taglib-location>/WEB-INF/webTrends.tld</taglib-location>
    </taglib>
</jsp-config>

无需重新粘贴文件夹结构......顶级域名的路径是正确的。 我还可以告诉你,我已经检查了类加载器,并且 struts jar 已加载。

现在,它正在我的本地 websphere 6 服务器上运行,该服务器由 IBM RAD 启动。 当我检查这个项目时,链接在我的本地无法解析。 但是,当我的队友检查它时,它在他的本地运行。 显然,我已确保按照与我的队友相同的步骤在本地运行此应用程序。 该应用程序还可以在我们的 websphere TEST、QA 和 PROD 环境中运行。 所以,这种情况只针对我的盒子。

Ill try to be as descriptive as possible.

situation:
struts tag's not being resolved on a jsp. When you look at what should resolve as links you see:

<html:link page="/dto/initDTO.do"><b><i>Design To Order Control System ( DTOCS )</i></b></html:link>

Which leads me to believe that the struts tag is not being resolved.

The source of this page includes:

<%@ include file="/common/taglibs.jsp" %>

And if you look at that jsp:

<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %>
<%@ taglib uri='/WEB-INF/tlds/struts-html.tld' prefix='html' %>
<%@ taglib uri="/WEB-INF/tlds/cat-input.tld" prefix="input" %>
<% String URLRoot = request.getContextPath(); %> 

If you look at the web.xml:

    <taglib>
        <taglib-uri>/WEB-INF/tlds/struts-bean.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
        <taglib-uri>/WEB-INF/tlds/struts-html.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
        <taglib-uri>/WEB-INF/tlds/struts-logic.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
        <taglib-uri>/WEB-INF/tlds/struts-template.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-template.tld</taglib-location>
    </taglib>
    <taglib>
        <taglib-uri>/WEB-INF/webTrends.tld</taglib-uri>
        <taglib-location>/WEB-INF/webTrends.tld</taglib-location>
    </taglib>
</jsp-config>

Without re-pasting the folder structure.. the pathing for the tlds is correct. I can also tell you that I've checked the classloader, and the struts jar is loaded.

Now, This is running on my local websphere 6 server, which is spun up by IBM RAD. When I check this project out, the links do not resolve on my local. BUT, when my teammate checks it out, it runs on his local. I have obviously made sure that I have followed the same steps for running this app locally as my teammate has. This app also runs on our websphere TEST, QA, and PROD environments. So, this situation is only specific to my box.

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

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

发布评论

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

评论(2

输什么也不输骨气 2024-08-02 00:34:38

(您看到什么错误?404 还是其他错误?)

一些想法:

您和您的同事是否对服务器或工作区中的资源使用相同的设置?

您是否尝试过复制他们的工作空间?

您是否运行完全相同相同版本的 WAS? 您的同事是否对其测试环境或 RAD 应用了任何修复?

(What error do you see? 404 or something else?)

Some ideas:

Are both you and your colleague using the same setting for resources on server or in workspace?

Have you tried taking a copy of their workspace?

Are you running exactly the same version of WAS? Did your colleague apply any fixes to their test environment or RAD.

蝶…霜飞 2024-08-02 00:34:38

最后...

将 WTE 从 6.0.0.0 升级到 6.0.2.3,现在标记库已解决。

不确定到底是什么问题,只是旧的 WTE 无法做到这一点。

-蒂姆

Finally...

Upgraded WTE to 6.0.2.3 from 6.0.0.0, and taglibs are now resolved.

Not sure exactly what the prob was there, just that the older WTE couldn't do it.

-Tim

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