First of all, remove your Action Class it won’t fit with your requirement
I would highly recommend you to use a Simple HTTPServlet. Take a look right here
So, once you have a servlet you should communicate with it via AJAX. So when you only want to change the content of your panel, why would you trigger a page load? With AJAX you have a much better user experience. Now lets say you defined a servlet with URL Pattern “/helloworld”, then your link of version005 would look like this: JIRA_BASE_URL/plugins/servlet/helloworld?version=005
See, you just pass the version as a request-parameter and now you can prepare the content on the server side
public class MyServlet extends HttpServlet {
@Override
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp)
throws ServletException, IOException {
String versionString = req.getParameter("version");
VersionManager versionManager = ComponentAccessor.getVersionManager();
Version versionObj = versionManager.getVersion(Long.valueOf(versionString));
...prepare your content here....
}
}
And here for example a simple AJAX call to your servlet
$.get("JIRA_BASE_URL/plugins/servlet/helloworld?version=005", function(data, status){
...check the status and do something with the data...
});
I hope I could help you with this
So long