Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get message passed from server side to velocity template file?

Agniswar Dutta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 7, 2017

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?

1 answer

0 votes
Panos
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 7, 2017
Agniswar Dutta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 9, 2017

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events