Pass params to the server using AJS or within a form

Thank you for your view.

I get a custom panel view in JIRA with the configuration of atlassian-plugin.xml as follows.

<web-item key="my_custom_item" name="Project_release report" section="jira.project.sidebar.plugins.navigation" weight="300">
	<label key="" />
	<link linkId="report_link">
	<param name="iconClass" value="aui-icon-large project-settings-icon"/>
<web-panel key="report-panel" location="">  		
        <resource name="view" type="velocity" location="/templates/panel/**report_view.vm**"/>
	<context-provider class=""/>

And some snippet in report_view.vm as follows.

<form action="${baseUrl}/projects/${projectKey}" method="post">

Post method is not allowed in the web panel.

But GET method has a limit to length of parameters.

I try to use AJS and ajax with post method, but it seems not work.


So how to pass the parameters in a right way?

Thank you.

You’ll need your HTML form, or associated AJAX call, to post to a servlet. Your atlassian-plugin.xml file will need a Servlet Plugin Module. Take particular note of the instructions under “Accessing your Servlet”, which describes the format of the URL to which you will need to send your POST request.

1 Like

Thank you very much.