Web Application Name

Splash Forums PrettyFaces Users Web Application Name

This topic contains 2 replies, has 2 voices, and was last updated by  Anonymous 4 years, 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #19498

    Anonymous

    Hi,

    I am new to PrettyFaces and have a question about it’s URL rewriting capabilities. Using PrettyFaces, can I change the web application name? For example:

    https://server/old_web_app_name/faces/index.xhtml

    to

    https://server/new_web_app_name/faces/index

    I have successfully applied the rules to rewrite anything after the web application name. Just can’t figure out how to change the the web application name itself.

    I am using the following:

    Tomcat and JSF 2.1.

    #23408

    You cannot change the context path of your application using PrettyFaces or any other library. That’s a restriction by the Servlet specification, which is very reasonable from a security perspective. All the APIs are using URLs relative to the context path of the application.

    But typically containers allow you to change the context path of you application. For Tomcat you could either change the name of your WAR file or you can change it using the context.xml file.

    #23409

    Anonymous

    This is what I was sort of thinking – thanks for the confirmation.

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

You must be logged in to reply to this topic.

Comments are closed.