开发者

How do I pass an argument to a Google App Engine servlet?

开发者 https://www.devze.com 2022-12-19 04:45 出处:网络
I created a servlet that sends email alerts on a specified condition.the users can set alerts through the gui on the main page, but i want to give them the opt开发者_开发问答ion of unregistering in ea

I created a servlet that sends email alerts on a specified condition. the users can set alerts through the gui on the main page, but i want to give them the opt开发者_开发问答ion of unregistering in each email thats sent. i want to include something like this in the email:

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

where uniqueID would be the alerts unique key (there can be many different alerts set for 1 email).

how can i accomplish this, or something to this effect? Thank you!


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

精彩评论

暂无评论...
验证码 换一张
取 消