views:

35

answers:

1

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 option 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!

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