我创建了一个Servlet,可以在指定条件下发送电子邮件警报。用户可以通过主页上的gui设置警报,但是我想让他们选择在发送的每封电子邮件中取消注册。我想在电子邮件中包含以下内容:

If you'd like to unregister for this alert, please go to http://mysite.com/myUnregisterServlet?id=uniqueID


其中uniqueID是警报的唯一键(1个电子邮件可以设置许多不同的警报)。

我怎样才能做到这一点,或达到某种效果?谢谢!

最佳答案

@Override
public void doGet(final HttpServletRequest req, final HttpServletResponse resp)
  throws IOException, ServletException
{
  final String id = req.getParameter("id");
  ...
}

关于java - 如何将参数传递给Google App Engine Servlet?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2215836/

10-11 22:30
查看更多