On Dec 31, 2010, at 11:11 PM, is_maximum <[email protected]> wrote:

>
> Thanks Kito,
> Can you please tell me about url rewrite? I know what it is but my question
> is that isn't it the same Servlet Filter?
>
> I created a Filter in which I check the URL and in that case I set an
> attribute in request, then I have a PhaseListener, in which I can retrieve
> the attribute and if it is true, I invoke a certain action in a managed
> bean. What is your idea about this?
>
> I think URL rewriting won't work because changing URL cannot help, I need to
> invoke an action as well.

Well, if your action method adds a parameter to the URL, you can do
the same thing with urlrewrite (assuming there isn't complicated logic
involved). Urlrewrite is just a sophisticated Servlet filter.

Have you looked at PrettyFaces though?

>
>
>
> Kito Mann wrote:
>>
>> Hello Mohammad,
>>
>> There are at least three options:
>>
>> (1) Use PrettyFaces
>> (2) Use urlrewrite
>> (3) Write a custom Servlet filter
>>
>> These options are listed in my order of preference :-).
>>
>> Sent from my iPhone
>>
>> http://www.jsfcentral.com
>> http://www.Virtua.com
>>
>>
>> On Dec 30, 2010, at 11:14 PM, is_maximum <[email protected]> wrote:
>>
>>>
>>> Hi all,
>>>
>>> I have an application which is displaying the content of another wb
>>> application in a frame. In this process, the jsf will rewrite new links
>>> with
>>> current application context path:
>>>
>>> APP1 --> calls APP2
>>>
>>> link1: http://localhost:8080/pages/newPath/newPage.xhtml
>>>
>>> in above link, /newPath/newPage.xhtml is for the other application (APP2)
>>> and doesn't exist in APP1
>>>
>>> I want to write a filter or something to check that if the path is not
>>> from
>>> my application I invoke an action method (#{dispatcher.dispatch}) and add
>>> this new path as an parameter, say,
>>>
>>> EXT_PATH=/newPath/newPage.xhtml
>>>
>>> so the controller (here is dispatcher) decides how to do with it.
>>>
>>> I wrote a PhaseListener but it seems this URL will be resolved even
>>> before
>>> that so in result, because I don't have that path in my APP1 and I get an
>>> error!
>>>
>>> Could you please help me on this?
>>>
>>>
>>> -----
>>> --
>>> Regards
>>>
>>> Mohammad Norouzi
>>>
>>> Help each other to reach the future faster
>>>
>>> http://pixelshot.wordpress.com Pixelshot Photoblog
>>>
>>> http://brainable.blogspot.com Brainable Blog
>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/How-to-manage-URLs-in-JSF-tp30561750p30561750.html
>>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>>
>>
>>
>
>
> -----
> --
> Regards
>
> Mohammad Norouzi
>
> Help each other to reach the future faster
>
> http://pixelshot.wordpress.com Pixelshot Photoblog
>
> http://brainable.blogspot.com Brainable Blog
>
>
> --
> View this message in context: 
> http://old.nabble.com/How-to-manage-URLs-in-JSF-tp30561750p30566263.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>

Reply via email to