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?
It would be much easier to create an action.
https://developer.atlassian.com/confdev/tutorials/adding-a-custom-action-to-confluence
The purpose of creating "xproduct-admin-ui-plugin" (https://developer.atlassian.com/docs/common-coding-tasks/creating-an-admin-configuration-form) is to create a configuration for my macro. Does creating an action solve the same purpose? And my aim is to just display a success message after successful saving of the configuration.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.