import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import WebFlow.*; import WebFlow.event.*; import WebFlow.xml.*; import org.omg.CORBA.*; import WebFlow.QS.*; import WebFlow.hashtable.*; import java.lang.reflect.*; //import WebFlow.Util.*; import WebFlow.PSEscript; public class PSEcode extends HttpServlet { private ORB orb; private WebFlowContext ws = null; PrintWriter out; protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { doPost(req, res); } protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { System.out.println("start PSEcode"); out = res.getWriter(); String Application = req.getParameter("appl"); String xmlIOR = req.getParameter("xmlIOR"); String ProjectName = req.getParameter("Project"); String inputFile = req.getParameter("inputFile"); String SessionName = req.getParameter("Session"); int idx = Application.indexOf("."); String ApplicationName = Application.substring(0,idx); String[] args = new String[1]; args[0] = new String(""); orb = ORB.init(args, new java.util.Properties()); org.omg.CORBA.Object obj = orb.string_to_object(xmlIOR); XmlServer parser = XmlServerHelper.narrow(obj); String XmlInput = "/npac/home/webflow/WEBFLOW/JIGSAW/Jigsaw/WWW/"; XmlInput += "DESCRIPTORS/APPLICATION/"+Application; File f = new File(XmlInput); System.out.println("do real thing"); if(f.exists()) { if (parser.instantiateParser(XmlInput)) { String[] iHosts=parser.getInstalledHosts(); res.setContentType("text/html"); out.println("
"); //JavaScript out.println(" "); System.out.println("JavaScript done"); out.println(""); out.println(""); out.println(""); out.println("
"); out.println("Selected Input File: "+inputFile+"
"); out.println("
"); out.println("
"); out.println(""); out.println("