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 PSEaddApplication 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 { String ApplDir = "/npac/home/webflow/WEBFLOW/JIGSAW/Jigsaw/WWW/"; ApplDir += "DESCRIPTORS/APPLICATION/"; String ApplUrl = "http://osprey4.npac.syr.edu:8001/DESCRIPTORS/APPLICATION/"; out = res.getWriter(); String ProjectName = req.getParameter("Project"); String SessionName = req.getParameter("Session"); res.setContentType("text/html"); out.println("
"); //JavaScript out.println(" "); System.out.println("done with JavaScript"); out.println(""); out.println(""); out.println(""); out.println("
");
out.println(" | ");
out.println(" describing the applications "); System.out.println("make a list of xml files"); out.println(" DTD "); File appDir = new File(ApplDir); if(appDir.exists()) { if(appDir.isDirectory()) { String[] appfiles=appDir.list(); int nfiles = appfiles.length; System.out.println("nfiles = "+nfiles); for(int i=0; i "); out.println(""+appName+""); } else { System.out.println("No suffix: "+appfiles[i]); } } else { System.out.println("Other file: "+appfiles[i]); } } System.out.println("end of do"); } else { System.out.println("Oops, file "+appDir+"is not a directory"); } } else { System.out.println("Oops, file "+appDir+" does not exist"); } out.println(" |