<%@ page import="WebFlow.*" %> <%@ page import="WebFlow.submitJob.*" %> <%@ page import="java.util.Hashtable" %> <%@ page import="java.util.StringTokenizer" %> <%! boolean validateInput(String logit){ //int logitindex = 0; //String logitsubstring = null; StringTokenizer st = null; boolean result = false; //logitindex = logit.indexOf("STDERR:"); //logitsubstring = logit.substring(logitindex); //st = new StringTokenizer(logitsubstring); st = new StringTokenizer(logit); if(st.hasMoreTokens()) result = true; else result = false; return result; } %> <% String[] machinenames = request.getParameterValues("machineName"); boolean checkflag = true; String errormachine = null; for (int l = 0; l < machinenames.length; l++) { for( int m = l+1; m < machinenames.length; m++) { if(machinenames[l].equals(machinenames[m])) { errormachine = machinenames[l]; checkflag = false; break; } } } if(checkflag) { String userName=storeInfo.getTableVal("userName"); submitJob sj=ServerServlet.getSubmitJob(userName); String[] execpaths = request.getParameterValues("execpath"); String[] workspaces = request.getParameterValues("workspace"); String[] qsubpaths = request.getParameterValues("qsubpath"); String execpathcheck; String workdircheck; String qsubcheck; String checktmp; String logit = null; String command = "ls -l "; String errorcode = null; for(int j = 0; j < machinenames.length;j++) { execpathcheck = "execpathverify"+ j; checktmp = request.getParameter(execpathcheck); if(checktmp.equals("Yes")) { command += execpaths[j]; logit=sj.execRemoteCommand(machinenames[j],userName,command, "rsh"); if(!validateInput(logit)) { errormachine = machinenames[j]; errorcode = "Execution Path: "+execpaths[j]; checkflag = false; break; } else command = "ls -l "; } workdircheck = "workdirverify"+ j; checktmp = request.getParameter(workdircheck); if(checktmp.equals("Yes")) { command += workspaces[j]; logit=sj.execRemoteCommand(machinenames[j],userName,command,"rsh"); if(!validateInput(logit)) { errormachine = machinenames[j]; errorcode = "Work Directory: "+workspaces[j]; checkflag = false; break; } else command = "ls -l "; } qsubcheck = "qsubverify"+ j; checktmp = request.getParameter(qsubcheck); if(checktmp.equals("Yes")) { command += qsubpaths[j]; logit=sj.execRemoteCommand(machinenames[j],userName,command,"rsh"); if(!validateInput(logit)) { errormachine = machinenames[j]; errorcode = "Qsub Path: "+qsubpaths[j]; checkflag = false; break; } else command = "ls -l "; } } if(checkflag) { Hashtable applData = new Hashtable(); String xmlpath = "/a/birch.csit.fsu.edu/shared/home/cyoun/GATEWAY/apache1.3.12/WWW/GOW/WEB-INF/src/generic/ApplDesc.xml"; String codeName=request.getParameter("codeName"); String NumOfInParam = request.getParameter("numofinparam"); String NumOfInFiles = request.getParameter("numofinfiles"); String NumOfOutParam = request.getParameter("numofoutparam"); String NumOfOutFiles = request.getParameter("numofoutfiles"); String Iostyle = request.getParameter("iostyle"); String[] queuetypes = request.getParameterValues("queuetype"); String cmachinenames = ""; String cqueuetypes = ""; String cexecpaths = ""; String cworkspaces = ""; String cqsubpaths = ""; for(int i=0;i

Updated the Application Data


code: <%= codeName %>
input param: <%= NumOfInParam %>
input files: <%= NumOfInFiles %>
output param: <%= NumOfOutParam %>
outfiles: <%= NumOfOutFiles %>
iostyle: <%= Iostyle %>
machine: <%= cmachinenames %>
queue: <%= cqueuetypes %>
exec: <%= cexecpaths %>
work: <%= cworkspaces %>
qsub: <%= cqsubpaths %>
the content of the hahtable: <%= applData.toString() %>
The Number of the existing Applications: <%= nappl %>

Your application was updated. if you want to do more things, Please choose buttons as below.

<% } else { %>

Error Report for updating the Application Data


<%= errormachine %> has NOT the correct path for <%= errorcode %>
Please try it again. <% } %> <% } else { %>

Error Report for updating the Application Data


You used the SAME hostname, <%= errormachine %>.
In order to update this application, You must use the UNIQUE hostname.
Please try it again. <% } %>