Following the tutorial of "xproduct-admin-ui-plugin", I need to pass a value from doGet() method of AdminServlet to admin.vm.
Code in AdminServlet.java:
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
String username = userManager.getRemoteUsername(request);
if (username == null || !userManager.isSystemAdmin(username))
{
redirectToLogin(request, response);
return;
}
response.setContentType("text/html;charset=utf-8");
request.setAttribute("success", "success");
renderer.render("admin.vm", response.getWriter());
}
How do I display the message pushed in the variable "success" in admin.vm?