问题
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