Changeset 21995


Ignore:
Timestamp:
2010-04-29T16:30:36+12:00 (14 years ago)
Author:
sjm84
Message:

MatServlet.java now gives its host name and port number to the mat-colbuild.bash script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/mat/trunk/src/org/greenstone/mat/servlet/MatServlet.java

    r21972 r21995  
    461461   
    462462       
    463         String[] arrays = new String[13];
     463        String[] arrays = new String[15];
    464464        arrays[0] = "cmd";
    465465        arrays[1] = "/c";
     
    475475        arrays[11] = collectDir;
    476476        arrays[12] = logFile;
     477        arrays[13] = hostName;
     478        arrays[14] = "" + port_number;
    477479       
    478480        Process p2 = processBatch(arrays,out,wd);
     
    615617    String matShell2 = "";
    616618
    617         matShell2 = gsdl3Root + fileSeparator + "ext" + fileSeparator +"mat"+ fileSeparator +"bin" + fileSeparator + "script" + fileSeparator + "mat-colbuild.bash "
     619    matShell2 = gsdl3Root + fileSeparator + "ext" + fileSeparator +"mat"+ fileSeparator +"bin" + fileSeparator + "script" + fileSeparator + "mat-colbuild.bash "
    618620        + collName
    619621        + " "
     
    630632        + collectDir
    631633        + " "
    632         + logFile;
    633 
     634        + logFile
     635        + " "
     636        + hostName + ":" + port_number;
    634637       
    635638    out.println("<form method=\"post\" name=\"collectionForm\">");
     
    674677            StringBuffer stdInputBuffer = new StringBuffer();
    675678            while ((s = stdInput.readLine()) != null) {
    676                 stdInputBuffer.append(s+"\n");
    677                 if(s.indexOf("-->")!=-1){
     679        stdInputBuffer.append(s+"\n");
     680        if(s.indexOf("-->")!=-1){
    678681                s = s.replaceAll("-->", "");
    679                 out.println("<!-- " + s + " -->");
    680                 }
    681                 else{
    682                 out.println("<!-- " + s + " -->");
    683                 }
     682                //out.println("<!-- " + s + " -->");
     683        }
     684        else{
     685                //out.println("<!-- " + s + " -->");
     686        }
    684687            out.flush();
    685688            }
     
    749752        if(s.indexOf("-->")!=-1){
    750753            s = s.replaceAll("-->", "");
    751             out.println("<!-- " + s + " -->");
     754            //out.println("<!-- " + s + " -->");
    752755        }
    753756        else{
    754             out.println("<!-- " + s + " -->");
     757            //out.println("<!-- " + s + " -->");
    755758        }
    756759        out.flush();
Note: See TracChangeset for help on using the changeset viewer.