需要请求中的查询字符串与操作映射的输入属性一起使用

发布于 2024-11-19 16:27:48 字数 160 浏览 10 评论 0原文

我使用的是struts 1.3.10。我需要请求中的查询字符串与操作映射的输入属性一起使用,以便在验证失败时,转发到正确的页面,而不会出现任何空指针异常。我该怎么做?我确实将整个forward(myAction.do?foo="bar") 作为通过jsp 发布的表单属性。如果我不清楚问题的定义,请告诉我。

I am using struts 1.3.10. I need the query string from the request to use with the input attribute of the action mapping so that when validation fails, the forward goes to correct page without any null pointer exceptions. how can I do this? I do have the entire forward(myAction.do?foo="bar") as a form property posted throught he jsp. Plesae let me know if I am not clear on the problem definition.

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

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

发布评论

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

评论(1

情独悲 2024-11-26 16:27:48

您尝试过 request.getQueryString() 吗?

例子:

String queryString = request.getQueryString(); //where "request" is "HttpServletRequest"

Have you tried request.getQueryString()?

Example:

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