我在閱讀spring 4的動作,但是我很困惑這個例子沒有說明如何從請求中獲取Session。
我想實現一個完整的登錄流程,我想從jsp獲取會話來檢查用戶是否存在。
這個例子剛剛展示了requestParameters這個類?(我甚至不知道它是什麼)
並通過使用'。'從Get方法獲取參數。但我如何獲得會話?
如果方法是Post?如何從彈簧web流xml中獲取會話?
<action-state id="lookupCustomer">
<evaluate result="order.customer"
result-type="com.springinaction.pizza.domain.Customer"
expression="pizzaFlowActions.lookupCustomer(requestParameters.phoneNumber)" />
<transition to="registrationForm"
on-exception="com.springinaction.pizza.service.CustomerNotFoundException" />
<transition to="showOrder" />
</action-state>
總之,我只想從流程中獲取會話,登錄的人,用戶信息將保存在會話中,我只是想獲得它,以便我可以繼續下一個流程。 –