[jboss-user] [JBoss Seam] - Re: how to redirecto back to intented page after login

mgombocz do-not-reply at jboss.com
Fri Feb 23 19:23:05 EST 2007


Hi,

I have following problem: if an inital GET request with parameters is sent to a restricted view, 
the redirect to the login page works fine, 
after successful authentication a redirect happens to the captured view, 
but the request parameters are NOT restored.

This can be reproduced with the seamspace example:
- add the following to components.xml
   <event type="org.jboss.seam.notLoggedIn">
  |       <action expression="#{redirect.captureCurrentView}" />
  |    </event>
  |    <event type="org.jboss.seam.postAuthenticate">
  |       <action expression="#{redirect.returnToCapturedView}" />
  |    </event>
- change the redirected view in pages.xml (home.xhtml instead of register.xhtml) at
    <exception class="org.jboss.seam.security.NotLoggedInException">
  |         <redirect view-id="/home.xhtml">
  |             <message>You must be a member to use this feature</message>
  |         </redirect>
  |     </exception>
- start a browser and enter http://localhost:8080/seam-space/comment.seam?name=Mr_Smiley&blogId=2
- login with demo/demo
--> no more request parameters in the URL

I debugged Redirect.captureCurrentView() and realized that variable "parameters" gets no request parameters.

Is this possibly a bug?

Thx, Manuel

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021404#4021404

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021404



More information about the jboss-user mailing list