如何重写URL [英] How to rewrite the URL
问题描述
我有一个使用Seam 2.2,Richfaces 3.3,JBoss 5.1构建的小应用程序。
大部分页面导航都将请求参数添加到目标 URL 。我想隐藏要使用应用程序的客户隐藏的参数(例如,我希望URL可以是 http:// localhost:8080 / books / Book.seam 。参数(userId,orderId和cmId)当前通过Book.page.xml映射到后端bean。
如何防止请求参数显示在浏览器URL中,因为它还允许客户操纵URL。
我们的确看过seam URL重写功能,它讨论了如何以REST格式表示主键ID,并不确定如何以优雅的方式完成像上述用例那样更复杂的工作。
PrettyFaces 提供url-rewriting for JSF。
然而,你不能'隐藏'GET参数,除非你让它们成为POST参数,但所有提交都默认是JSF中的POST。
I have a small application built using Seam 2.2, Richfaces 3.3, JBoss 5.1.
Most of the page navigation adds the request parameters to the target URL. I would like to hide parameters to be hidden to the customer who is using the application (e.g. I would expect the URL to be something like "http://localhost:8080/books/Book.seam". The parameters (userId, orderId and cmId) are currently mapped to the backend bean via Book.page.xml.
How do I prevent the request parameters from showing up in the browser URL, as it also allows the customer to manipulate the URL.
We did look at seam URL re-writing feature, it talked about manipulating say the primary key id in a REST format, not sure how to accomplish something more complex like the above use case in a elegant fashion.
PrettyFaces offers url-rewriting for JSF.
You can't, however, 'hide' the GET parameters. Unless you make them POST parameters. But all submissions are POST in JSF by default.
这篇关于如何重写URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!