*/
public class SpecificationBrowser extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
WorklistController controller = null;
ServletContext context = getServletContext();
controller = (WorklistController) context.getAttribute(
"au.edu.qut.yawl.worklist.model.WorklistController");
if (controller == null) {
controller = new WorklistController();
controller.setUpInterfaceBClient(context.getInitParameter("InterfaceB_BackEnd"));
controller.setUpInterfaceAClient(context.getInitParameter("InterfaceA_BackEnd"));
context.setAttribute("au.edu.qut.yawl.worklist.model.WorklistController", controller);
}
response.setContentType("text/xml");
StringBuffer output = new StringBuffer();
PrintWriter outputWriter = response.getWriter();
String specID = request.getParameter("specID");
if (specID != null) {
SpecificationData specData = controller.getSpecificationData(
specID,
(String) request.getSession().getAttribute("sessionHandle"));
String specAsXML = specData.getAsXML();
output.append(specAsXML);
}