How to rewrite the URL

走远了吗. 提交于 2019-12-12 11:23:08

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/3052745/how-to-rewrite-the-url

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