Stripes ActionBean URL 绑定
我正在尝试使用 Eclipse 设置 Stripes 计算器示例应用程序。 我能够在服务器上运行 .jsp,但是一旦我通过单击其中一个按钮(例如“添加”)来调用 ActionBean,我就会得到: ActionBeanNotFoundException:无法找到绑定到 URL 的 ActionBean [/quickstart/Calculator.action]
这是有道理的,因为设置了包目录,所以 Calculator.action 位于 /示例/快速入门/计算器。
所以我想我可以通过将 CalculatorActionBean.java 复制到“examples”文件夹之外的正确文件夹中来解决问题。 同样的问题。 我的猜测是,过滤器的设置使其仅关注“examples”文件夹内的文件。
如何设置目录结构和/或过滤器来查找我正在寻找的 ActionBean 并将其绑定到正确的 URL? 也许对 URL 绑定进行一些解释也会有所帮助。
I'm trying to set up the Stripes calculator example application using Eclipse. I'm able to run the .jsp on the server, but as soon as I invoke an ActionBean by clicking one of the buttons (such as "add"), I get:
ActionBeanNotFoundException: Could not locate an ActionBean that is bound to the URL
[/quickstart/Calculator.action]
This makes sense, because the package directory is set up so Calculator.action is in
/examples/quickstart/Calculator.
So I figured I could fix the problem by copying CalculatorActionBean.java into the correct folder, outside of the "examples" folder. Same problem. My guess is that the filter is set up so that it only pays attention to files inside the "examples" folder.
How can I set up the directory structure and/or filter to find the ActionBean I'm looking for and bind it to the right URL? Maybe a little explanation on URL bindings would be helpful too.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,我已将项目的根目录命名为“examples”,并且它正在目录结构中解析该名称。 我重命名了我的项目,现在它可以工作了。
Turns out I had named the root directory of my project "examples" and it was parsing out that name in the directory structure. I renamed my project and it works now.