【问题标题】:how to setCookie in gwt client?如何在 gwt 客户端中设置 Cookie?
【发布时间】:2009-06-29 14:13:16
【问题描述】:

在我的 servlet 中,我有这一行

CookieManager.getRequestCookieValue(request, "app-openid-identifier"); CookieManager.getRequestCookieValue(request, "app-openid-uniqueid");

在我的 gwt 客户端复合文件中,我如何为“app-openid-identifier”设置 cookie 并执行“get”来调用 servlet?

【问题讨论】:

    标签: gwt openid smartgwt gwt-rpc


    【解决方案1】:

    在您的 GWT 应用程序中,您可以使用:

    com.google.gwt.user.client.Cookies.setCookie("app-openid-identifier","some value");
    

    对于 GET 请求,请使用:

    com.google.gwt.http.client.RequestBuilder
    

    或者如果可能,尝试使用 RPC 调用。

    【讨论】:

      猜你喜欢
      • 2014-01-04
      • 1970-01-01
      • 2014-03-31
      • 2020-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-17
      • 1970-01-01
      相关资源
      最近更新 更多