Re: how to hide all the suffix of the url

Splash Forums PrettyFaces Users how to hide all the suffix of the url Re: how to hide all the suffix of the url

#21868

qeryui
Participant

http://ocpsoft.com/support/topic/rewriting-problem#post-1056

I found this.

and I use

<url-mapping id=”global”>

<pattern value=”/*” />

<view-id> #{bean.getViewPath} </view-id>

</url-mapping>

@Named(“bean”)

@RequestScoped

public class Bean {

public String getViewPath() {

URL url = PrettyContext.getCurrentInstance().getRequestURL();

String viewId = url.toString();

if(viewId.endsWith(“.xhtml”) return viewId;

else return viewId + “.xhtml”;

}

}

But it is strange that <pattern value=”/*” /> only match http://localhost:8080/pair/*, and it doesn’t match any other urls.

The <pattern value=”/#{*}” /> doesn’t work yet.

Do I mistake that the regular expression could be used for the <pattern value=””> ??

the Pretty I used is 3.3.2