remove application name from URL

Splash Forums PrettyFaces Users remove application name from URL

This topic contains 1 reply, has 2 voices, and was last updated by  Christian Kaltepoth 6 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17978

    parindam
    Participant

    my site uses JSF and the url appears to be, http://mysitename.com/wompower6/faces/home.xhtml

    I am using prettyfaces, so if I use the following in pretty-config.xml, i can change the name to http://mysitename.com/wompower6/home

    <url-mapping id=”home”>

    <pattern value=”/home” />

    <view-id value=”/faces/home.xhtml” />

    </url-mapping>

    my questions are

    how can i remove the application name wompower6 , so that the url becomes mysitename.com/home ?

    in my web.xml, i have home.xhtml, but this does not seem to work. When i type, mysitename.com, it does not get mapped to home.xhtml. any clue here?

    Note: I have posted the same question in stackoverflow, but considering this would be most apprpriate to post here, I have repeated my question here.

    #21105

    The part of the URL that you want to remove is the context path of your application. PrettyFaces cannot change the context path because it is assigned for application by the container.

    But you can easily configure some other context path for your application. But how to do this depends on the container you are using. In case of Apache Tomcat for example you just have to name the WAR file you are deploying ROOT.war.

    What container do you use?

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

You must be logged in to reply to this topic.

Comments are closed.