Changeset 21972 for gs3-extensions/mat

Show
Ignore:
Timestamp:
28.04.2010 11:50:01 (9 years ago)
Author:
sjm84
Message:

MatServlet? now uses the correct /mat/ rather than /greenstone/mat

Files:
1 modified

Legend:

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

    r21927 r21972  
    5858    out.println(h1String); 
    5959    out.println("<p>"+description+"</p>"); 
    60     out.println("<div><form method=\"post\" action=\"http://"+hostName+":"+port_number+"/greenstone3/mat\">"); 
     60    out.println("<div><form method=\"post\" action=\"http://"+hostName+":"+port_number+"/mat/analyse\">"); 
    6161 
    6262    out.println("<p>OAI URL: <input type=\"text\" name=\"oaiurl\" size=\"140\"></p>");  
     
    318318             
    319319            out.println("<p>Choose one metadata prefix to use:</p>"); 
    320             out.println("<form method=\"post\" action=\"http://"+hostName+":"+port_number+"/greenstone3/mat\">"); 
     320            out.println("<form method=\"post\" action=\"http://"+hostName+":"+port_number+"/mat/analyse\">"); 
    321321            out.println("<table rules =\"none\">"); 
    322322             
     
    426426    out.println("<p>Building collection...</p>"); 
    427427     
    428     String host = "http://"+hostName+":"+port_number+"/greenstone3/mat/"; 
     428    String host = "http://"+hostName+":"+port_number+"/mat/"; 
    429429     
    430430    out.println("<form method=\"post\" name=\"aForm\">"); 
     
    577577    } 
    578578    else{ 
    579     matShell = "source "+ gsdl3Root + fileSeparator + "ext" + fileSeparator + "mat" + fileSeparator + "bin" + fileSeparator +"script" + fileSeparator + "mat-colbuild-download.bash " 
     579    matShell = gsdl3Root + fileSeparator + "ext" + fileSeparator + "mat" + fileSeparator + "bin" + fileSeparator +"script" + fileSeparator + "mat-colbuild-download.bash " 
    580580        + collName 
    581581        + " " 
     
    601601    out.flush(); 
    602602    Process p = processShell(matShell, out); 
    603      
     603 
    604604    if (p.exitValue() == 0){ 
    605605        out.println("<p>Collection downloaded.</p>"); 
     
    615615    String matShell2 = ""; 
    616616 
    617         matShell2 = "source "+ gsdl3Root + fileSeparator + "ext" + fileSeparator +"mat"+ fileSeparator +"bin" + fileSeparator + "script" + fileSeparator + "mat-colbuild.bash " 
     617        matShell2 = gsdl3Root + fileSeparator + "ext" + fileSeparator +"mat"+ fileSeparator +"bin" + fileSeparator + "script" + fileSeparator + "mat-colbuild.bash " 
    618618        + collName 
    619619        + " " 
     
    740740            String[] args = new String[]{"sh", "-c", command}; 
    741741        Process p = Runtime.getRuntime().exec(args); 
     742 
    742743        BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream())); 
    743744        BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream()));         
    744745        StringBuffer stdInputBuffer = new StringBuffer(); 
    745              
     746 
    746747        while ((s = stdInput.readLine()) != null) { 
    747748            stdInputBuffer.append(s+"\n"); 
    748             if(s.indexOf("-->")!=-1){ 
     749        if(s.indexOf("-->")!=-1){ 
    749750            s = s.replaceAll("-->", ""); 
    750751            out.println("<!-- " + s + " -->"); 
    751             } 
    752             else{ 
     752        } 
     753        else{ 
    753754            out.println("<!-- " + s + " -->"); 
    754             } 
     755        } 
    755756        out.flush(); 
    756757        } 
     
    823824        if(status){ 
    824825             
    825             out.println("<script type=\"text/javascript\" language=\"JavaScript\"    src = \"http://"+hostName+":"+port_number+"/greenstone3/mat/script/getInfomation.js\">"); 
     826            out.println("<script type=\"text/javascript\" language=\"JavaScript\"    src = \"http://"+hostName+":"+port_number+"/mat/script/getInfomation.js\">"); 
    826827            out.println("reconfig();"); 
    827828            out.println("</script>"); 
     
    865866        titleString ="<title>"+ prop.getProperty("Servlet.Title")+"</title>"; 
    866867        h1String ="<h2>"+ prop.getProperty("Servlet.Head")+"</h2>"; 
    867         cssString = "<link rel=\"stylesheet\" href=\"http://"+hostName+":"+port_number+"/greenstone3/mat/script/mat.css\" type=\"text/css\" >"; 
    868         javaScript = "<script type=\"text/javascript\" src=\"http://"+hostName+":"+port_number+"/greenstone3/mat/script/status3.js\"></script>";; 
     868        cssString = "<link rel=\"stylesheet\" href=\"http://"+hostName+":"+port_number+"/mat/script/mat.css\" type=\"text/css\" >"; 
     869        javaScript = "<script type=\"text/javascript\" src=\"http://"+hostName+":"+port_number+"/mat/script/status3.js\"></script>";; 
    869870        headerString2 = "<head>" + titleString + "\n" +  javaScript + cssString+"</head>\n"; 
    870871        headerString ="<head>" + titleString + "\n" + cssString + "</head>\n";