I'm trying to add a forgot password branch to login-webflow.xml. I added an 
anchor on casLoginView.jsp which points to a new view, 
myForgotPasswordView.jsp. The user should enter their username, then press the 
submit button. When they do, I invoke a back-end action.



Unfortunately, when I hit the submit button, apparently nothing is happening. 
myForgotPasswordView.jsp appears to reload with an empty username field. What's 
funny is the webflow log isn't showing anything after they reach 
myForgotPasswordView.jsp.



Does anybody have any idea as to what might be going on?



Thanks,
Eric





>From casLoginView.jsp:

<a 
href="/authentication/login?execution=${flowExecutionKey}&_eventId=forgotPassword">Forgot
 Password</a>



>From myForgotPasswordView.jsp:

<form:form commandName="forgotPasswordAction" method="post">



   <!-- <form:errors path="*" id="msg" cssClass="errors" element="div" /> -->

   <c:forEach items="${flowRequestContext.messageContext.allMessages}" 
var="message">

      <div class="error-msg">${message.text}</div>

   </c:forEach>



   <div>

       Enter your user id. When you submit this request, a new password

       will be sent to your email address.

   </div>



   <input type="hidden" name="execution" value="${flowExecutionKey}" />

   Username: <input type="text" name="username"/><br/>

   <input type="submit" class="button" name="_eventId" value="submit" />



</form:form>



Rendered myForgotPasswordView:

<form id="forgotPasswordAction" 
action="/authentication/login?execution=e1s1&amp;_eventId=forgotPassword" 
method="post">



   <!--  -->





   <div>

       Enter your user id. When you submit this request, a new password

       will be sent to your email address.

   </div>



   <input type="hidden" name="execution" value="e1s2" />

   Username: <input type="text" name="username"/><br/>

   <input type="submit" class="button" name="_eventId" value="submit" />





</form>



>From login-webflow.xml:

    <view-state id="viewLoginForm" view="casLoginView" model="credentials">

        <!-- ... other transitions here ... -->

        <transition on="forgotPassword" bind="false" validate="false" 
to="forgotPasswordView"/>

    </view-state>



    <view-state id="forgotPasswordView" view="myForgotPasswordView" 
model="forgotPasswordBean">

         <binder>

              <binding property="username" required="true"/>

        </binder>

        <transition on="submit" to="forgotPasswordAction"/>

    </view-state>



    <action-state id="forgotPasswordAction">

        <evaluate 
expression="forgotPasswordAction.submit(flowScope.forgotPasswordBean)" />

        <transition on="success" to="newPasswordSentView"/>

        <transition on="error" to="forgotPasswordView"/>

    </action-state>



    <end-state id="newPasswordSentView" view="myNewPasswordSentView" />



And finally, the tail of the CAS log file. Note that there's no webflow entry 
from when I hit the submit button:



DEBUG [org.springframework.webflow.mvc.servlet.FlowHandlerMapping] - Mapping 
request with URI '/authentication/login' to flow with id 'login'

DEBUG [org.springframework.webflow.executor.FlowExecutorImpl] - Resuming flow 
execution with key 'e1s1

DEBUG 
[org.springframework.webflow.conversation.impl.SessionBindingConversationManager]
 - Locking conversation 1

DEBUG 
[org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository]
 - Getting flow execution with key 'e1s1'

DEBUG 
[org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl] - 
Getting FlowDefinition with id 'login'

DEBUG 
[org.springframework.webflow.execution.factory.ConditionalFlowExecutionListenerLoader]
 - Loaded [1] of possible 1 listeners for this execution request for flow 
'login', the listeners to attach are 
list[org.jasig.cas.web.flow.TerminateWebSessionListener@2447e380]

DEBUG [org.springframework.webflow.engine.impl.FlowExecutionImpl] - Resuming in 
org.springframework.webflow.mvc.servlet.MvcExternalContext@2fcf1d57

DEBUG [org.springframework.webflow.engine.Flow] - Restoring 
[FlowVariable@9e76345 name = 'credentials', valueFactory = 
[BeanFactoryVariableValueFactory@36264c17 type = UsernamePasswordCredentials]]

DEBUG [org.springframework.webflow.engine.Flow] - Restoring 
[FlowVariable@431c4ef6 name = 'changePasswordBean', valueFactory = 
[BeanFactoryVariableValueFactory@77841ae5 type = ChangePasswordBean]]

DEBUG [org.springframework.webflow.engine.Flow] - Restoring 
[FlowVariable@50e3c8c name = 'forgotPasswordBean', valueFactory = 
[BeanFactoryVariableValueFactory@69a90deb type = ForgotPasswordBean]]

DEBUG [org.springframework.webflow.engine.Flow] - Restoring 
[FlowVariable@87a1904 name = 'userInfoBean', valueFactory = 
[BeanFactoryVariableValueFactory@80059f5 type = UserInfoBean]]

DEBUG [org.springframework.webflow.mvc.view.AbstractMvcView] - Processing user 
event 'forgotPassword'

DEBUG [org.springframework.webflow.mvc.view.AbstractMvcView] - Resolved model 
[username: null]

DEBUG [org.springframework.webflow.engine.ViewState] - Event 'forgotPassword' 
returned from view [ServletMvcView@468f5346 view = 
org.springframework.web.servlet.view.JstlView: name 'casLoginView'; URL 
[/WEB-INF/view/jsp/default/ui/casLoginView.jsp]]

DEBUG [org.springframework.webflow.engine.Transition] - Executing 
[Transition@6e7badec on = forgotPassword, to = forgotPasswordView]

DEBUG [org.springframework.webflow.engine.Transition] - Exiting state 
'viewLoginForm'

DEBUG [org.springframework.webflow.engine.ViewState] - Entering state 
'forgotPasswordView' of flow 'login'

DEBUG [org.springframework.webflow.engine.impl.FlowExecutionImpl] - Assigned 
key e1s3

DEBUG [org.springframework.webflow.engine.ViewState] - Rendering + 
[ServletMvcView@356e1c1a view = org.springframework.web.servlet.view.JstlView: 
name 'myForgotPasswordView'; URL 
[/WEB-INF/view/jsp/default/ui/myForgotPasswordView.jsp]]

DEBUG [org.springframework.webflow.engine.ViewState] -   Flash scope = 
map[[empty]]

DEBUG [org.springframework.webflow.engine.ViewState] -   Messages = 
[DefaultMessageContext@4ff70a5d sourceMessages = map[[null] -> list[[empty]]]]

DEBUG [org.springframework.webflow.mvc.view.AbstractMvcView] - Rendering MVC 
[org.springframework.web.servlet.view.JstlView: name 'myForgotPasswordView'; 
URL [/WEB-INF/view/jsp/default/ui/myForgotPasswordView.jsp]] with model map 
[{flowRequestContext=[RequestControlContextImpl@3d721ae2 externalContext = 
org.springframework.webflow.mvc.servlet.MvcExternalContext@2fcf1d57, 
currentEvent = forgotPassword, requestScope = map[[empty]], attributes = 
map[[empty]], messageContext = [DefaultMessageContext@4ff70a5d sourceMessages = 
map[[null] -> list[[empty]]]], flowExecution = [FlowExecutionImpl@6ba43cda flow 
= 'login', flowSessions = list[[FlowSessionImpl@17cb5cfc flow = 'login', state 
= 'forgotPasswordView', scope = map['forgotPasswordBean' -> 
com.mycompany.authentication.ForgotPasswordBean(username=null), 'loginTicket' 
-> 'LT-1-ONj5gj9ajNLYmEXAaPRkFaRRqe2WiH', 'userInfoBean' -> 
com.mycompany.authentication.UserInfoBean@279e5431[username=<null>,firstName=<null>,lastName=<null>,emailAddress=<null>,streetAddress=<null>,city=<null>,state=<null>,zip=<null>,country=<null>],
 'service' -> 
https://my.server.com:443/casauth/facade/norenew?idp=https://my.server.com/idp/externalAuthnCallback,
 'changePasswordBean' -> 
com.mycompany.authentication.ChangePasswordBean(username=null, 
newPassword=null, confirmNewPassword=null), 'credentials' -> [username: null], 
'warnCookieValue' -> false, 'ticketGrantingTicketId' -> [null], 'viewScope' -> 
map[[empty]]]]]]], 
forgotPasswordBean=com.mycompany.authentication.ForgotPasswordBean(username=null),
 currentUser=null, loginTicket=LT-1-ONj5gj9ajNLYmEXAaPRkFaRRqe2WiH, 
changePasswordBean=com.mycompany.authentication.ChangePasswordBean(username=null,
 newPassword=null, confirmNewPassword=null), flowExecutionKey=e1s3, 
warnCookieValue=false, flashScope=map[[empty]], 
userInfoBean=com.mycompany.authentication.UserInfoBean@279e5431[username=<null>,firstName=<null>,lastName=<null>,emailAddress=<null>,streetAddress=<null>,city=<null>,state=<null>,zip=<null>,country=<null>],
 
service=https://my.server.com:443/casauth/facade/norenew?idp=https://my.server.com/idp/externalAuthnCallback,
 credentials=[username: null], 
flowExecutionUrl=/authentication/login?username=%5BLjava.lang.String%3B%4063c988ae&_eventId=%5BLjava.lang.String%3B%40442c8ab0&execution=%5BLjava.lang.String%3B%4048454bc7,
 ticketGrantingTicketId=null, 
org.springframework.validation.BindingResult.forgotPasswordBean=org.springframework.webflow.mvc.view.BindingModel:
 0 errors, viewScope=map[[empty]]}]

DEBUG [org.jasig.cas.web.support.CasArgumentExtractor] - Extractor did not 
generate service.

DEBUG [org.jasig.cas.web.support.SamlArgumentExtractor] - Extractor did not 
generate service.

DEBUG [org.springframework.webflow.engine.Transition] - Completed transition 
execution.  As a result, the new state is 'forgotPasswordView' in flow 'login'

DEBUG 
[org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository]
 - Putting flow execution '[FlowExecutionImpl@6ba43cda flow = 'login', 
flowSessions = list[[FlowSessionImpl@17cb5cfc flow = 'login', state = 
'forgotPasswordView', scope = map['forgotPasswordBean' -> 
com.mycompany.authentication.ForgotPasswordBean(username=null), 'loginTicket' 
-> 'LT-1-ONj5gj9ajNLYmEXAaPRkFaRRqe2WiH', 'userInfoBean' -> 
com.mycompany.authentication.UserInfoBean@279e5431[username=<null>,firstName=<null>,lastName=<null>,emailAddress=<null>,streetAddress=<null>,city=<null>,state=<null>,zip=<null>,country=<null>],
 'service' -> 
https://my.server.com:443/casauth/facade/norenew?idp=https://my.server.com/idp/externalAuthnCallback,
 'changePasswordBean' -> 
com.mycompany.authentication.ChangePasswordBean(username=null, 
newPassword=null, confirmNewPassword=null), 'credentials' -> [username: null], 
'warnCookieValue' -> false, 'ticketGrantingTicketId' -> [null], 'viewScope' -> 
map[[empty]]]]]]' into repository

DEBUG 
[org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository]
 - Adding snapshot to group with id 3

DEBUG 
[org.springframework.webflow.conversation.impl.SessionBindingConversationManager]
 - Putting conversation attribute 'scope' with value map['flashScope' -> 
map['messagesMemento' -> map[[empty]]]]

DEBUG 
[org.springframework.webflow.conversation.impl.SessionBindingConversationManager]
 - Unlocking conversation 1



-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to