Basic prettyfaces trouble

Splash Forums PrettyFaces Users Basic prettyfaces trouble

This topic contains 4 replies, has 2 voices, and was last updated by  Christian Kaltepoth 10 years, 12 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #17871



    I am trying to create rest like urls for my site using prettyfaces and jsf2.

    However I can’t seem to make it work, even a simple Hello World page. Can anyone point out what I’m doing wrong?

    I’m expecting to output “Hello, jon”, but I only get the EL “#{theBean.hello}” in clear text, and no errors. Why?


    @URLMapping(id = "hello", pattern = "/hello/#{}", viewId = "/hello.xhtml")
    public class TheBean {
    private String name;
    private String hello;

    public String loadHello() {
    hello = "Hello, " + name;
    return null;

    public String getName() {
    return name;

    public void setName(String name) { = name;

    public String getHello() {
    return hello;

    public void setHello(String hello) {
    this.hello = hello;

    hello.xhtml has: #{theBean.hello}

    pretty-config.xml only contains root tag as I’m using annotations

    Using PrettyFaces 3.2.0

    Any help would be great, thanks


    I think you will have to change the viewId to something like /hello.jsf (depends on the mapping of the FacesServlet). It must contain a valid view ID like you would use in an application without PrettyFaces.



    The viewId is valid (I have mapped FacesServlet to *.jsf).

    Here’s my hello.xhtml:

    <!DOCTYPE html>
    <html xmlns=""



    Oh sorry my bad, so the viewId must match the facesservlet mapping.

    Got it working now, thanks! :)


    No problem! :-)

    Let us know if you have any other problem!

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.