【问题标题】:setting cookie in externalRedirect in Spring web flow在 Spring Web 流中的 externalRedirect 中设置 cookie
【发布时间】:2017-02-07 22:50:47
【问题描述】:

我正在使用 Spring Web Flow 重定向到外部应用程序。 外部应用程序在同一个域中,并使用 cookie 来设置一些数据。 问题是我不确定我是否可以在发送重定向之前设置 cookie,以便外部应用程序已经设置了 cookie 以读取详细信息。

    <webflow:view-state id="displayTerms" view="externalRedirect:#{flowScope.redirectURL}">

这是将重定向到外部应用程序的视图状态。

【问题讨论】:

    标签: spring redirect cookies spring-webflow


    【解决方案1】:

    改为&lt;action-state&gt;(或在&lt;view-state&gt; 之前插入&lt;action-state&gt;),并让evaluate 在转换到重定向视图之前设置cookie。 WebFlow 的部分优点在于无需对现有代码进行深度更改即可轻松插入逻辑。

    【讨论】:

      猜你喜欢
      • 2015-04-22
      • 2018-03-02
      • 2016-06-20
      • 1970-01-01
      • 2020-10-04
      • 2019-07-16
      • 1970-01-01
      • 2015-03-16
      • 2015-09-29
      相关资源
      最近更新 更多