Stripes:所有 URL 通过 StripesDispatcher 解析并转发到预编译的 JSP
是否可以通过查看操作 bean 上的 @UrlBinding 注释并将这些操作 bean 转发到预编译的 JSP/servlet,而不需要定义和维护
也许有一种方法可以将 Jasper 指向我的 servlet 所在的位置并自动加载它们,而无需显式定义每一个?
实现这一点的具体方式并不重要,只是我离开了显式 servlet web.xml 依赖关系。
Is it possible to have the StripesDispatcher be the sole determiner of webserver urls by looking at the @UrlBinding annotations on action beans AND also having those action beans forward to pre-compiled JSPs / servlets WITHOUT needing to define and maintain <servlet> <servlet-mapping> pairs in web.xml? Basically, I just want to have to only maintain the @UrlBinding annotations as the sole determiners of available webapp paths.
Perhaps there is a way to point Jasper to where my servlets are and load them all up automatically without having to explicitly define each and every one?
The particular way in which this is achieved is not important, only that I leave the land of explicit servlet web.xml dependencies.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许我不明白你的问题,但我会尝试一下。 AFAIK 您在 Stripes 应用程序的 web.xml 中需要的唯一映射,以使用 @URLBinding 作为 Web 应用程序中 URL 的“真实来源”:
……
有了这个
,无需更改 Web 中的任何内容.xml 当您添加/删除操作 bean 和/或 JSP 时。
Maybe I don't understand your question, but I'll give it a go. AFAIK the only mapping you need in a Stripes app's web.xml to use @URLBinding as the 'source of truth' for URLs in your web-app:
...
...
With this, there is no need to change anything in web.xml when you add/remove action beans and/or JSPs.