question about faces and the URL

Hi

I have been working one month now with faces and one thing thing that bugs me is how faces handles URL.

I use commandLinks,commandButton's and outputLinks and the url is always something.jsp#. This could be good in one web application, but if I wanna develop an website \ portal, some parameters on url come handy for bookmarking issues.

I can I tell faces to keep the GET parameters on the URL?

Thanks

[437 byte] By [RicardoMa] at [2007-11-27 10:13:38]
# 1

Yes, by specifying a managed property to automatically store the query parameters in the backing bean and using f:param to pass query parameters through commandLinks and outputLinks.

Also see http://balusc.xs4all.nl/srv/dev-jep-com.html for some insights.

BalusCa at 2007-7-28 15:28:05 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Thanks for your feedback, but as u said the parameters aren't showed on the URL.

RicardoMa at 2007-7-28 15:28:05 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Are you talking about POST or GET? If GET, just use f:param. If POST, then checkout the Post-Redirect-GET article.

BalusCa at 2007-7-28 15:28:05 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

I had look at the article you mentioned, it resolves my problem, thanks

RicardoMa at 2007-7-28 15:28:05 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

by the way

i have look that's good pratice to use slash directories, like www.server.com/product/machines/coffeemachiche , instead of www.server.com?produtct?id=666

Any idea how can i do that in faces?

RicardoMa at 2007-7-28 15:28:05 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

Write a Filter which determines the URL and does a redirect or a dispatch, depending on the URL type: friendly URL = dispatch the unfriendly URL in request, unfriendly URL = redirect to friendly URL.

BalusCa at 2007-7-28 15:28:05 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...