2014-06-18 75 views
2

喜有在JSF選項生成這樣的鏈接:JSF URL路由

我這個實現
localhost:8080/something/:myParamHere 

最近的事情是URL,如:

localhost:8080/something?id=55 

,但我需要:

localhost:8080/something/55 

回答

1

您可以使用Pretty Faces(http://ocpsoft.org/prettyfaces/)將幾乎任何URL的請求參數重寫。

實施例:

@URLMapping(id = "process", pattern = "/process/#{processId}", viewId = "/faces/page/process.xhtml")