Re: Generic URL mapping, is it possible ?

Splash Forums PrettyFaces Users Generic URL mapping, is it possible ? Re: Generic URL mapping, is it possible ?

#21488

mika
Participant

ok, here is what i did:

1- the dynamicView managedBean:

@Service(“dynamicViewBean”)

public class DynamicViewBean {

private String path;

public String getPath() {

return path;

}

public void setPath(String path) {

this.path = path;

}

public String getViewId() {

return “/” + path + “.xhtml”;

}

}

2- The pretty-config.xml:

<pretty-config xmlns=”http://ocpsoft.com/prettyfaces/3.3.0″

xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”

xsi:schemaLocation=”http://ocpsoft.com/prettyfaces/3.3.0

http://ocpsoft.com/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.3.0.xsd“>

<url-mapping id=”generic”>

<pattern value=”/#{dynamicViewBean.path}” />

<view-id value=”#{dynamicViewBean.getViewId }” />

</url-mapping>

</pretty-config>

3- NOTE: My xhtml pages are under the webapp folder directly, they are not in a subfolder views or stuff like that.

and i am still getting the same repeating error in eclipse console:

at com.ocpsoft.pretty.faces.config.annotation.AbstractClassFinder.processClass(AbstractClassFinder.java:219)

please advise.