Skip to content
Snippets Groups Projects
Commit 962e6165 authored by Praditya Raudi's avatar Praditya Raudi
Browse files

implementasi bonus di editproduct

parent a05d69d1
No related merge requests found
......@@ -24,7 +24,20 @@
}
//java.lang.String token = "qwertyuiop";
// TODO process result here
account.AccountObject resultValid = portValid.validate(token);
if (resultValid.getValidate() == 2) {
for (int i = 0; i < cookies.length; i++) {
cookie = cookies[i];
if((cookie.getName()).compareTo("token") == 0 ){
token = cookie.getValue();
cookie.setMaxAge(0);
}
}
Cookie cookieExpires = new Cookie("token",resultValid.getToken());
response.addCookie(cookieExpires);
} else if (resultValid.getValidate() == 3) {
response.sendRedirect("http://localhost:8000/WebApp/index.jsp");
}
%>
<head>
<title>Edit Product</title>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment