- Timestamp:
- 2003-01-06T15:23:47+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/PageAction.java
r3568 r3645 14 14 public class PageAction extends Action { 15 15 16 public static final String SHORT_ACTION_NAME = "p"; 17 public static final String HOME_PAGE = "home"; 18 public static final String ABOUT_PAGE = "about"; 19 20 public String getActionShortName() { 21 return SHORT_ACTION_NAME; 22 } 16 23 public Element process (Element message) { 17 24 … … 20 27 String page_name = request.getAttribute(GSXML.SUBACTION_ATT); 21 28 if (page_name.equals("")) { // if no page specified, assume home page 22 page_name = "home";29 page_name = HOME_PAGE; 23 30 } 24 31 … … 30 37 // add the system stuff from message 31 38 page.appendChild(doc_.importNode(GSXML.getChildByTagName(message, GSXML.CONFIGURATION_ELEM), true)); 32 33 if (page_name.equals("home")) { 39 // add the cgi args request 40 Element cgi_request = (Element)doc_.importNode(request, true); 41 page.appendChild(cgi_request); 42 43 if (page_name.equals(HOME_PAGE)) { 34 44 return homePage(page, request); 35 } else if (page_name.equals( "about")) {45 } else if (page_name.equals(ABOUT_PAGE)) { 36 46 return aboutPage(page, request); 37 47 } else { … … 111 121 HashMap params = GSXML.extractParams(cgi_paramList); 112 122 113 String coll_name = (String)params.get("collection"); 114 if (coll_name == null || coll_name.equals("")) { 115 coll_name = (String)params.get("serviceCluster"); // cluster name 116 } 123 String coll_name = (String)params.get(GSCGI.COLLECTION_ARG); 117 124 if (coll_name == null || coll_name.equals("")) { 118 125 System.err.println("PageAction Error: about page requested with no collection or cluster specified!");
Note:
See TracChangeset
for help on using the changeset viewer.