You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jan Zach <za...@centrum.cz> on 2006/07/20 22:28:52 UTC
one step delayed url
Hi, don't you have anobody idea why url is laggin one step behind the actual url of the application? For example the app is in /page1.jsf with navigation control pointing to /page2.jsf. After firing the control the navigation properly handles the request and /page2.jsf is displayed, however, in the brower (and also in navigation handler) I'm getting /page1.jsf. The proper url is shown after another step.
I'm using myfaces 1.1.1, web.xml and faces-config in the attachment.
Thanks
jan
Re: one step delayed url
Posted by Mike Kienenberger <mk...@gmail.com>.
On 7/20/06, Jan Zach <za...@centrum.cz> wrote:
> Hi, don't you have anobody idea why url is laggin one step behind the actual url of the application? For example the app is in /page1.jsf with navigation control pointing to /page2.jsf. After firing the control the navigation properly handles the request and /page2.jsf is displayed, however, in the brower (and also in navigation handler) I'm getting /page1.jsf. The proper url is shown after another step.
That's just how page-based application frameworks work. The url
generated to reach the next view is based on the existing view name --
it doesn't represent the page source code. You can use redirect
tags in your navigation cases to fix this where the transition between
one page and the next is stateless (ie, you'll lose all messages and
savestate and other request-scoped data when you add a redirect tag).
RE: one step delayed url
Posted by David Friedman <hu...@ix.netcom.com>.
You could always check out the source code for the OSS project
http://securityfilter.sourceforge.net to get you started. You might even be
able to drop it in to quickly use it. If I had thought of it before I would
have mentioned it. It is around 2 years old but I believe it is still
relevant. Or http://jguard.sourceforge.net which was updated just last
month. I have never tried JGuard so I can't say anything about it. Whereas
I have actually read the source code to securityfilter and found it very
instructional.
Regards,
David
-----Original Message-----
From: Jan Zach [mailto:zach@centrum.cz]
Sent: Thursday, July 20, 2006 5:47 PM
To: MyFaces Discussion
Cc: humble@ix.netcom.com
Subject: RE: one step delayed url
Hi David,
thanks for explaining. I was writing my own security filter (I did not want
to use the tomcat one because I'm unable to set up pricipal programatically
and probably it would not solve the problem) and this delay complicates the
thing. If I would like to handle access restriction properly I'd have to
have add another check into the navigation handler computing new state from
current state, action, and configuration in addition to checks in servlet
filter.
Or am I wrong and there is a better way?
Regard
jan
RE: one step delayed url
Posted by Jan Zach <za...@centrum.cz>.
Hi David,
thanks for explaining. I was writing my own security filter (I did not want to use the tomcat one because I'm unable to set up pricipal programatically and probably it would not solve the problem) and this delay complicates the thing. If I would like to handle access restriction properly I'd have to have add another check into the navigation handler computing new state from current state, action, and configuration in addition to checks in servlet filter.
Or am I wrong and there is a better way?
Regard
jan
______________________________________________________________
> Od: humble@ix.netcom.com
> Komu: "MyFaces Discussion" <us...@myfaces.apache.org>
> Datum: 20.07.2006 23:24
> Předmět: RE: one step delayed url
>
>Jan,
>
>That is the way myfaces works. If you want the URLs to match you'll
>probably have to add the <redirect /> tag/parameter/attribute to your
>navigation rules plus make sure that you put your beans in a scope where you
>can use them in the next request if you need them such as a flash scope
>(oops, nevermind that scope isn't myfaces), session scope, dialog scope,
>SEAM (if you use it) conversation scope, etc.
>
>Regards,
>David
>
>-----Original Message-----
>From: Jan Zach [mailto:zach@centrum.cz]
>Sent: Thursday, July 20, 2006 4:29 PM
>To: users@myfaces.apache.org
>Subject: one step delayed url
>
>
>Hi, don't you have anobody idea why url is laggin one step behind the actual
>url of the application? For example the app is in /page1.jsf with navigation
>control pointing to /page2.jsf. After firing the control the navigation
>properly handles the request and /page2.jsf is displayed, however, in the
>brower (and also in navigation handler) I'm getting /page1.jsf. The proper
>url is shown after another step.
>
>I'm using myfaces 1.1.1, web.xml and faces-config in the attachment.
>
>Thanks
>jan
>
>
>
>
>
RE: one step delayed url
Posted by David Friedman <hu...@ix.netcom.com>.
Jan,
That is the way myfaces works. If you want the URLs to match you'll
probably have to add the <redirect /> tag/parameter/attribute to your
navigation rules plus make sure that you put your beans in a scope where you
can use them in the next request if you need them such as a flash scope
(oops, nevermind that scope isn't myfaces), session scope, dialog scope,
SEAM (if you use it) conversation scope, etc.
Regards,
David
-----Original Message-----
From: Jan Zach [mailto:zach@centrum.cz]
Sent: Thursday, July 20, 2006 4:29 PM
To: users@myfaces.apache.org
Subject: one step delayed url
Hi, don't you have anobody idea why url is laggin one step behind the actual
url of the application? For example the app is in /page1.jsf with navigation
control pointing to /page2.jsf. After firing the control the navigation
properly handles the request and /page2.jsf is displayed, however, in the
brower (and also in navigation handler) I'm getting /page1.jsf. The proper
url is shown after another step.
I'm using myfaces 1.1.1, web.xml and faces-config in the attachment.
Thanks
jan