<%@page contentType="text/html" import="nl.tue.win.riaca.monet.execmgr.client.*,javax.xml.transform.*,javax.xml.transform.stream.*,java.io.*,java.net.*" %> Monet Debugging and Tracing Client: Execution of a MPL plan or Jelly script

Monet Debugging and Tracing Client


Execution of a MPL plan or Jelly script.

<% /* * 1. Create the bean in the page. * 2. Get the object. */ Object result = null; if (request.getParameter("submit").equals("Execute It")) { ExecMgrBean bean = new ExecMgrBean(); result = bean.executePlan(request.getParameter("mpl")); } if (request.getParameter("submit").equals("Show Jelly")) { try { StreamSource xsl = new StreamSource(new URL("http://localhost:8080/execmgr/client/mpl2jelly.xsl").openStream()); Transformer transformer = TransformerFactory.newInstance().newTransformer(xsl); StringReader stringReader = new StringReader(request.getParameter("mpl")); StringWriter stringWriter = new StringWriter(); StreamSource streamSource = new StreamSource(stringReader); StreamResult streamResult = new StreamResult(stringWriter); transformer.transform(streamSource, streamResult); result = stringWriter.toString(); } catch(Exception exception) { exception.printStackTrace(); } } %>
Input Output



Up