Wicket 和 JSP
使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为 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.
为什么要尝试将两者包含在一个应用程序中? 如果我是您,并且您实际上正在尝试从 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.