You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ray Clark <rc...@yahoo.com> on 2005/04/21 00:39:31 UTC

URL for JSF different than physical path

A friend at work was telling me that there is no way
with JSF to have the URL that the user types in be
different than the physical path of the deployed page.
 He also said that he can do this sort of thing with
Struts.  He said this was because there is no mapping
file in JSF to do this like there is in Struts with
the struts-config file.  Is this right?

Thanks,
Ray

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: URL for JSF different than physical path

Posted by Craig McClanahan <cr...@gmail.com>.
On 4/20/05, Ray Clark <rc...@yahoo.com> wrote:
> A friend at work was telling me that there is no way
> with JSF to have the URL that the user types in be
> different than the physical path of the deployed page.
>  He also said that he can do this sort of thing with
> Struts.  He said this was because there is no mapping
> file in JSF to do this like there is in Struts with
> the struts-config file.  Is this right?

There is no built in support for mapping to a different page (the way
that Struts lets you do that), but there is an extensible API that
would allow you to build such a thing yourself pretty easily.  If you
implement your own javax.faces.application.ViewHandler, you can
customize the createView() and restoreView() methods to do this sort
of mapping before they delegate the actual behavior to the standard
implementation.

> Thanks,
> Ray

Craig