Is it possible to submit a form that has been rendered from a JSF page location in WEB-INF?

…衆ロ難τιáo~ 提交于 2019-12-20 07:28:36

问题


The JSF 2.2 web based application I am developing makes use of various error pages which are located in the WEB-INF directory and are displayed when an HTTP error or Java exception is encountered based on the configuration in the web.xml file.

On some error pages I would like to include a form which allows the user to report the issue and include various attributes that would be helpful when investigating the issue such as the request URI and the error message.

The issue I've got is when the user attempts to submit the form it fails with a page not found error as the HTTP post request method is using the URI of the page in the WEB-INF directory rather than the original page that failed and consequently sent the user to the error page.

I know that files in WEB-INF are not publicly accessible and understand that this is the root cause of the problem described above.

The rational for locating the error pages in the WEB-INF directory is to prevent users from accessing these pages directly and reporting an erroneous issue via the form I'm trying to implement.

My question is to ask whether there are any other ways of allowing the end user to submit a form (in this case a bug report) which has been rendered from a page in the WEB-INF directory, or is the only solution to move the error pages to somewhere outside the WEB-INF directory? If this isn't possible are there any other options to achieve a similar result?

来源:https://stackoverflow.com/questions/26681640/is-it-possible-to-submit-a-form-that-has-been-rendered-from-a-jsf-page-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!