%@ 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(logit);
//st.nextToken();
if(st.hasMoreTokens()) result = true;
else result = false;
return result;
}
%>
<%
String[] machinenames = request.getParameterValues("machineName");
String machinenametext = request.getParameter("machineNametext");
boolean checkflag = true;
for (int l = 0; l < machinenames.length; l++) {
if(machinenametext.equals(machinenames[l])) {
checkflag = false;
break;
}
}
if(checkflag) {
String userName=storeInfo.getTableVal("userName");
submitJob sj=ServerServlet.getSubmitJob(userName);
String execpathtext = request.getParameter("execpathtext");
String workspacetext = request.getParameter("workspacetext");
String qsubpathtext = request.getParameter("qsubpathtext");
String execpathcheck = request.getParameter("execpathverify");
String workdircheck = request.getParameter("workdirverify");
String qsubcheck= request.getParameter("qsubverify");
String logit = null;
String command = "ls -l ";
String errorcode = null;
if(execpathcheck.equals("Yes") && checkflag) {
command += execpathtext;
logit=sj.execRemoteCommand(machinenametext,userName,command,"rsh");
if(!validateInput(logit)) {
errorcode = "Execution Path: "+execpathtext;
checkflag = false;
}
else command = "ls -l ";
}
if(workdircheck.equals("Yes") && checkflag) {
command += workspacetext;
logit=sj.execRemoteCommand(machinenametext,userName,command,"rsh");
if(!validateInput(logit)) {
errorcode = "Work Directory: "+workspacetext;
checkflag = false;
}
else command = "ls -l ";
}
if(qsubcheck.equals("Yes") && checkflag) {
command += qsubpathtext;
logit=sj.execRemoteCommand(machinenametext,userName,command,"rsh");
if(!validateInput(logit)) {
errorcode = "Qsub Path: "+qsubpathtext;
checkflag = false;
}
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[] execpaths = request.getParameterValues("execpath");
String[] queuetypes = request.getParameterValues("queuetype");
String[] workspaces = request.getParameterValues("workspace");
String[] qsubpaths = request.getParameterValues("qsubpath");
String queuetypetext = request.getParameter("queuetypetext");
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
<%= machinenametext %> has NOT the correct path for
<%= errorcode %>
Please try it again.
<%
}
%>
<% }
else {
%>
Error Report for updating the Application Data
You used the SAME hostname, <%= machinenametext %>.
In order to update this application, You must use the UNIQUE hostname.
Please try it again.
<%
}
%>