IEngineServiceView engine,
IRequestCycle cycle,
ResponseOutputStream output)
throws ServletException, IOException
{try { __CLOVER_105_0.M[585]++;
__CLOVER_105_0.S[2493]++;RequestContext context = cycle.getRequestContext();
__CLOVER_105_0.S[2494]++;HttpServletRequest request = context.getRequest();
__CLOVER_105_0.S[2495]++;String serviceName = getAttribute(request, Tapestry.TAG_SUPPORT_SERVICE_ATTRIBUTE);
__CLOVER_105_0.S[2496]++;Object raw = request.getAttribute(Tapestry.TAG_SUPPORT_PARAMETERS_ATTRIBUTE);
__CLOVER_105_0.S[2497]++;Object[] parameters = null;
__CLOVER_105_0.S[2498]++;try
{
__CLOVER_105_0.S[2499]++;parameters = (Object[]) raw;
}
catch (ClassCastException ex)
{
__CLOVER_105_0.S[2500]++;throw new ServletException(
Tapestry.format(
"TagSupportService.attribute-not-array",
Tapestry.TAG_SUPPORT_PARAMETERS_ATTRIBUTE,
Tapestry.getClassName(raw.getClass())));
}
__CLOVER_105_0.S[2501]++;IEngineService service = cycle.getEngine().getService(serviceName);
__CLOVER_105_0.S[2502]++;ILink link = service.getLink(cycle, null, parameters);
__CLOVER_105_0.S[2503]++;String URI = link.getURL();
__CLOVER_105_0.S[2504]++;if ((((LOG.isDebugEnabled()) && (++__CLOVER_105_0.CT[464] != 0)) || (++__CLOVER_105_0.CF[464] == 0))){
{
__CLOVER_105_0.S[2505]++;LOG.debug("Request servlet path = " + request.getServletPath());
__CLOVER_105_0.S[2506]++;Enumeration e = request.getParameterNames();
__CLOVER_105_0.S[2507]++;while ((((e.hasMoreElements()) && (++__CLOVER_105_0.CT[465] != 0)) || (++__CLOVER_105_0.CF[465] == 0))){
{
__CLOVER_105_0.S[2508]++;String name = (String) e.nextElement();
__CLOVER_105_0.S[2509]++;LOG.debug("Request parameter " + name + " = " + request.getParameter(name));
}}
__CLOVER_105_0.S[2510]++;e = request.getAttributeNames();
__CLOVER_105_0.S[2511]++;while ((((e.hasMoreElements()) && (++__CLOVER_105_0.CT[466] != 0)) || (++__CLOVER_105_0.CF[466] == 0))){
{
__CLOVER_105_0.S[2512]++;String name = (String) e.nextElement();
__CLOVER_105_0.S[2513]++;LOG.debug("Request attribute " + name + " = " + request.getAttribute(name));
}}
__CLOVER_105_0.S[2514]++;LOG.debug("Result URI: " + URI);
}}
__CLOVER_105_0.S[2515]++;HttpServletResponse response = context.getResponse();
__CLOVER_105_0.S[2516]++;PrintWriter servletWriter = response.getWriter();
__CLOVER_105_0.S[2517]++;IMarkupWriter writer = new HTMLWriter(servletWriter);
__CLOVER_105_0.S[2518]++;writer.print(URI);