Revision 382
Added by berkley over 24 years ago
src/edu/ucsb/nceas/metacat/MetaCatServlet.java | ||
---|---|---|
160 | 160 |
/** |
161 | 161 |
* Control servlet response depending on the action parameter specified |
162 | 162 |
*/ |
163 |
protected void handleGetOrPost(HttpServletRequest request,
|
|
163 |
private void handleGetOrPost(HttpServletRequest request,
|
|
164 | 164 |
HttpServletResponse response) |
165 | 165 |
throws ServletException, IOException |
166 | 166 |
{ |
... | ... | |
325 | 325 |
// value is inappropriate |
326 | 326 |
//out.println("<P>Caught exception looking for Y value."); |
327 | 327 |
return "error"; |
328 |
} |
|
328 |
}
|
|
329 | 329 |
} |
330 | 330 |
|
331 | 331 |
/** |
... | ... | |
473 | 473 |
* |
474 | 474 |
* @param xmlquery the query to run |
475 | 475 |
*/ |
476 |
protected Hashtable runQuery(String xmlquery)
|
|
476 |
private Hashtable runQuery(String xmlquery)
|
|
477 | 477 |
{ |
478 | 478 |
Hashtable doclist=null; |
479 | 479 |
Connection conn = null; |
... | ... | |
516 | 516 |
response.setContentType("text/html"); |
517 | 517 |
trans.transformXMLDocument(resultdoc, "-//NCEAS//resultset//EN", |
518 | 518 |
"-//W3C//HTML//EN", out); |
519 |
} catch(Exception e) { |
|
520 |
if (conn != null) { |
|
519 |
util.returnConnection(conn); |
|
520 |
} |
|
521 |
catch(Exception e) |
|
522 |
{ |
|
523 |
//if (conn != null) |
|
524 |
{ |
|
521 | 525 |
util.returnConnection(conn); |
522 | 526 |
} |
523 | 527 |
} |
... | ... | |
534 | 538 |
// Create a buffer to hold the xml result |
535 | 539 |
StringBuffer resultset = new StringBuffer(); |
536 | 540 |
|
537 |
// Print the resulting root nodes |
|
541 |
// Print the resulting root nodes
|
|
538 | 542 |
String docid = null; |
539 | 543 |
String document = null; |
540 | 544 |
resultset.append("<?xml version=\"1.0\"?>\n"); |
... | ... | |
561 | 565 |
* Handle the database getdocument request and return a XML document, |
562 | 566 |
* possibly transformed from XML into HTML |
563 | 567 |
*/ |
564 |
protected void handleGetDocumentAction(PrintWriter out, Hashtable params,
|
|
568 |
private void handleGetDocumentAction(PrintWriter out, Hashtable params,
|
|
565 | 569 |
HttpServletResponse response) |
566 | 570 |
throws ClassNotFoundException, IOException, SQLException { |
567 | 571 |
String docidstr = null; |
... | ... | |
617 | 621 |
* Handle the database putdocument request and write an XML document |
618 | 622 |
* to the database connection |
619 | 623 |
*/ |
620 |
protected void handleInsertOrUpdateAction(PrintWriter out, Hashtable params,
|
|
624 |
private void handleInsertOrUpdateAction(PrintWriter out, Hashtable params,
|
|
621 | 625 |
HttpServletResponse response) { |
622 | 626 |
|
623 | 627 |
Connection conn = null; |
Also available in: Unified diff
removed extraneous protected tags and replaced them with private tags