防止Sql时间戳更改整个链接

时间:2018-07-17 13:50:29

标签: java eclipse jsp servlets

嘿,我正在尝试发送链接进行注册,但TimeStamp倾向于修改链接 这是我的代码

     Timestamp timestamp = new Timestamp(System.currentTimeMillis());

     String newStampFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(timestamp);

     String confirUrl="http://localhost:8088/E-dealing/register.jsp?email='"+email+"'&timestamp='"+newStampFormat+"'";
     String emailStr="<p>Dear "+register.getfName()+",<br> Welcome to Project5 platform.....<br> Click <a href=\""+confirUrl+"\">this link</a> to set your secure password</p>";

像这样获得电子邮件链接:http://localhost:8088/Project5/register.jsp?email=%27harfrank3@gmail.com%27&timestamp=%2707/17/2018%2015:40:41%27

当我尝试获取:http://localhost:8088/Project5/register.jsp?email=harfrank3@gmail.com&timestamp=07/17/2018 15:40:41

0 个答案:

没有答案