Wicket 和 JSP

发布于 2024-07-06 06:58:32 字数 109 浏览 5 评论 0原文

使用 add(new Include()) 语法,我能够包含位于顶层的 jsps。

但是,无法引用“WEB-INF”中存在的内容,有什么方法可以实现这一点吗?

Using add(new Include()) syntax, I was able to include jsps which are at the top level.

However those which are present inside 'WEB-INF' cannot be referenced, is there any way to achieve this?

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

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

发布评论

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

评论(2

丶情人眼里出诗心の 2024-07-13 06:58:32

我认为 Include 类发出外部请求,而不是包含/转发当前请求,这使您的情况变得不可能。 WEB-INF 不可用于外部请求,如果我没记错的话,只能包含/转发。

I think the Include class makes an external request instead of including/forwarding current one, which makes your case impossible. WEB-INF is not available to external requests, only include/forward if I remember correctly.

恬淡成诗 2024-07-13 06:58:32

为什么要尝试将两者包含在一个应用程序中? 如果我是您,并且您实际上正在尝试从 JSP 迁移到 Wicket,我将创建一个新的 Wicket 应用程序,您可以将其安装在服务器上的单独上下文路径下,并让 Wicket 独立运行。 然后,您还可以直接包含其他应用程序中的 css 和 js 等资源,避免任何重复。

Why are you trying to include both inside one application? If I were you, and if you are in fact trying to migrate from JSP to Wicket, I would create a new Wicket application which you could mount under a separate context path on your server, and let Wicket sit by itself. You can then also include resources such as css and js from the other application directly, avoiding any repetition.

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