Changeset 3467
- Timestamp:
- 2002-10-16T09:27:55+13:00 (22 years ago)
- Location:
- trunk/gsdl3/src/java/org/greenstone/gsdl3
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/LibraryServlet.java
r3438 r3467 52 52 config_.createXML(); 53 53 54 // new message router - create it and pass a handle to recept.54 // new message router - create it and pass reference to recept. 55 55 // the servlet wont use this directly 56 56 message_router_ = new MessageRouter(); … … 85 85 // display the home page 86 86 // a=p&p=home 87 xml_request +="<request type='action' output='html' info='p/home'/>";87 xml_request +="<request type='action' output='html' action='p' subaction='home'/>"; 88 88 } else { 89 89 String subaction = request.getParameter("sa"); 90 xml_request += "<request type='action' info='"+action;90 xml_request += "<request type='action' action='"+action+"'"; 91 91 if (subaction != null) { 92 xml_request += " /"+subaction;92 xml_request += " subaction='"+subaction+"'"; 93 93 } 94 xml_request += " '><paramList>";94 xml_request += "><paramList>"; 95 95 Enumeration params = request.getParameterNames(); 96 96 while(params.hasMoreElements()) { -
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/AppletAction.java
r3460 r3467 26 26 27 27 Element request = (Element)message.getElementsByTagName("request").item(0); 28 // the applet info is like a/d = applet/display 29 String info = request.getAttribute("info"); 30 // remove the a/ bit 31 info = GSPath.removeFirstLink(info); 32 String request_type = GSPath.getFirstLink(info); // should be 'd' or 'r' 28 29 // subaction is display/request 30 String request_type = request.getAttribute("subaction"); // should be 'd' or 'r' 33 31 if (!request_type.equals("d")&&!request_type.equals("r")) { 34 32 return GSHTML.errorPage("the sa arg to a=a should be d or r!!"); -
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/BrowseAction.java
r3459 r3467 25 25 Element request = (Element)message.getElementsByTagName("request").item(0); 26 26 27 String info = request.getAttribute("info"); 28 // remove the b/ bit 29 info = GSPath.removeFirstLink(info); 30 String browse_type = GSPath.getFirstLink(info); 27 // the browse type is the subaction 28 String browse_type = request.getAttribute("subaction"); 31 29 32 30 if (browse_type.equals("classifier")) { -
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/PageAction.java
r3455 r3467 17 17 18 18 Element request = (Element)message.getElementsByTagName("request").item(0); 19 String info = request.getAttribute("info"); 20 // remove the page/ bit 21 info = GSPath.removeFirstLink(info); 22 String page_name = GSPath.getFirstLink(info); 19 // the page name is the subaction 20 String page_name = request.getAttribute("subaction"); 23 21 24 22 // create the return page tree … … 87 85 Document style_doc = converter_.getDOM(new File(stylesheet)); 88 86 GSXSLT.absoluteIncludePaths(style_doc, config_); 87 //System.out.println("page="); 88 //System.out.println(converter_.getString(page)); 89 89 return transformer_.transform(style_doc, page); 90 90 … … 97 97 HashMap params = GSXML.extractParams((Element)GSXML.getNodeByPath(request, "paramList")); 98 98 String coll_name = (String)params.get("c"); 99 if (coll_name == null || coll_name.equals("")) { 100 coll_name = (String)params.get("sc"); // cluster name 101 } 102 if (coll_name == null || coll_name.equals("")) { 103 return GSHTML.errorPage("about page - need to specify coll name or cluster name"); 104 } 99 105 100 106 Element coll_about_message = doc_.createElement("message"); … … 108 114 Element coll_about_response = (Element)mr_.process(coll_about_message); 109 115 110 116 // System.out.println("coll response="); 117 //System.out.println(converter_.getString(coll_about_response)); 111 118 // add the response to the page 112 119 page.appendChild(doc_.importNode(GSXML.getChildByTagName(coll_about_response, "response"), true)); -
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/QueryAction.java
r3455 r3467 30 30 31 31 Element request = (Element)message.getElementsByTagName("request").item(0); 32 String info = request.getAttribute("info"); 33 // remove the q/ bit 34 info = GSPath.removeFirstLink(info); 35 String query_type = GSPath.getFirstLink(info); 32 // query type is teh subaction 33 String query_type = request.getAttribute("subaction"); 36 34 37 35 if (query_type.equals("")) { -
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/ResourceAction.java
r3455 r3467 25 25 } 26 26 27 // for now, info="r" eventually we may want to change to r/text r/assoc28 // or something27 // for now, no subaction eventually we may want to have subactions such as text assoc or something ? 28 29 29 Element request = (Element)message.getElementsByTagName("request").item(0); 30 30
Note:
See TracChangeset
for help on using the changeset viewer.