Hi,
I am writing a plugin which contains web-item and servlet.
<web-item key="key" name="webItem" section="chainResults.subMenu/chainResults" weight="60">
<link linkId="link_to_servlet" absolute="false">/plugins/servlet/static?planKey=${planKey}&amp;buildNumber=${buildNumber}</link>
</web-item>
<servlet name="Servlet" key="static-servlet" class="StaticServlet">
<description>The My Servlet Plugin</description>
<resource name="view" type="velocity" location="servlet.vm"/>
<url-pattern>/static</url-pattern>
</servlet>
public class StaticServlet extends HttpServlet{
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException{
response.setContentType("text/html;charset=utf-8");
renderer.render("/servlet.vm", map, response.getWriter());
}
}
<html>
<head>
<meta name="decorator" content="result">
</head>
<body>
...
When I am at Build summary or any other tab and click on web item, servlet has decorators and everything, but when I paste link to browser or reload servlet, there is an error (obviously).
Is there some way to process URL parameters "buildKey" and "buildNumber" so bamboo will know what decorator to use? I know how to do this in xwork but I want to use servlets for this task.
Thanks!