Render servlet response in project view

Hello Community!

I would like to render my velocity template with a html form in project view - non amin, i just want to have the project menu and selected project on the screen.
This form then would post some data to my servlet and the same velocity template should show the response from the post, which is a table possibly holding hundreds of rows.

So far i can’t find a way to do it:
If i use templateRenderer from the servlet i cannot keep the project context and only the main menu is displayed.

If i use a web-panel then i cannot

  • render the response from the servlet into the web panel - so project view is lost
  • do an ajax post instead and send the response to my template, as that is parsed server side.

Is there a way to

  • render into the web-panel from the servlet perhaps?
  • use templateRenderer and render the non admin project menu as well without using web-panel?
  • trigger rerender of the web-panel from javascript and add new properties to the velocity context?
  • access the web panel’s context provider from the servlet on post and redirect to the panel?

What’s the proper way of doing this?

If rendering the response from javascript is the only option could anyone recommend a framework/method that works well in a jira plugin?

I kept the web panel, which only consists of an iframe that has it’s source on the servlet url.

Can you please show us the example code flow of this one, am not getting any snippet on how to render web-panel content with java script using servlet