No effect of & ldquo; Resultpath & rdquo; Constant in struts.xml

综合编程 Hello, buddy! (源链)

I have all the jsp pages (ex: index.jsp) in the WebContent folder and my application is working smoothly. Now, I created a folder “pages” inside WebContent, where I transferred all my jsp pages.

And I added the following line inside the
tags:

But still, its not searching for jsp inside the “pages” folder. I am getting:

HTTP Status 404 – /MyApplicationName/index.jsp

Where am I doing a mistake?

EDIT: The current structure of my application is as follows:

The welcome page is an action instead of a jsp page. The result page of this action is index.jsp. This action populates the dropdown menu and some other fields in index.jsp. Now, I want to keep index.jsp along with other jsp pages in the folder “WebContent/pages”. I have over 30 jsp pages in my application, and I don’t want to mention the full path of every jsp in the result-tag. Thats why I want to make use of the struts2 constant “struts.convention.result.path”

My question is, why the code I have mentioned above is not working?

Accessing index.jsp
directly bypasses all S2 request handling.

There’s no S2 or S2 Convention plugin involved, you’re just accessing a JSP page.

您可能感兴趣的

Struts2 之 modelDriven & prepare 拦截器详解... struts2 ModelDriven & Prepareable 拦截器 前面对于 Struts2 的开发环境的搭建、配置文件以及 Struts2 的值栈都已经进行过叙述了!这次博文我们讲解利用 Struts2 进行 CURD 操作,体验和 Servlet 的不一样,以此案例理解 M...
万年漏洞王Struts2插件再现高危漏洞S2-052,波及半数以上财富500强企业... 热门开源框架Apache Struts又被曝存在远程代码执行漏洞(高危),漏洞编号CVE-2017-9805,S2-052,再一次没有辜负其“万年漏洞王”的美名。 Semmle研究人员发现了这个高危漏洞,该漏洞一旦被黑客利用可轻易控制受影响的服务器,危及公司的敏感数据安全。攻击者利用该漏洞可在使...
Value of the Struts 2. radio button&... i have following code in jsp used with struts2 radio button i want to know which radio button is selected in my action class so can anyone give me sol...
彻底搞定LayoutInflater 前提回顾 我有篇文章 你的自定义View是否真的支持Margin 讲到 子View的margin属性的支持需要在 自定义ViewGroup 通过generateLayoutParams设置,而子View的padding支持则是自己在onDraw中处...
SSH电商项目实战之一:整合Struts2、Hibernate和Spring... (友情提示:本文介绍的SSH整合中所需要的完整jar包免费下载地址: http://download.csdn.net/detail/eson_15/9522068 ) 今天开始做一个网上商城的项目,首先从搭建环境开始,一步步整合S2SH。这篇博文主要总结一下如何整合Struts2 、Hib...
Hello, buddy!责编内容来自:Hello, buddy! (源链) | 更多关于

阅读提示:酷辣虫无法对本内容的真实性提供任何保证,请自行验证并承担相关的风险与后果!
本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » No effect of & ldquo; Resultpath & rdquo; Constant in struts.xml



专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录