电子邮件如何通过Java Servlet从激活链接获取数据
我正在使用GWT,在用户注册之后,我需要向用户发送一封带有激活链接的邮件
激活链接可能包含用户的用户名和哈希值
使用PHP,我知道如何使用get方法检索这些值
我是新的GWT Java,我希望能够在激活链接中获取值。我还在服务器上使用Java
我只是想知道,当用户点击激活链接(其中包含一些识别用户的数据)后被重定向到我的网站时,我需要做什么
你可以在下面搜索框中键入要查询的问题!
我正在使用GWT,在用户注册之后,我需要向用户发送一封带有激活链接的邮件
激活链接可能包含用户的用户名和哈希值
使用PHP,我知道如何使用get方法检索这些值
我是新的GWT Java,我希望能够在激活链接中获取值。我还在服务器上使用Java
我只是想知道,当用户点击激活链接(其中包含一些识别用户的数据)后被重定向到我的网站时,我需要做什么
# 1 楼答案
这与GWT无关。当用户单击激活链接时,将调用您的servlet。例如,您有一个映射到
/useractivate
的servlet,您的URL是http://yoursite.com/useractivate?hash=4342bc322&user=foo
然后在servlet的
doGet()
方法中,您需要调用:# 2 楼答案
还可以使用
RequestBuilder
调用GWT中的HTTP.GET
方法。看看RequestBuilder.GET和its usage我认为这将对你有所帮助,我建议你看看similar topic - making http request in GWT
来自GWT教程: