diff --git a/webapp/config/web.xml b/webapp/config/web.xml index 849f7991c..7664c0541 100644 --- a/webapp/config/web.xml +++ b/webapp/config/web.xml @@ -381,15 +381,6 @@ /flagUpdate - - SitemapIndexController - edu.cornell.mannlib.vitro.webapp.controller.SitemapIndexController - - - SitemapIndexController - /sitemap.xml - - RDFUploadFormController edu.cornell.mannlib.vitro.webapp.controller.jena.RDFUploadFormController diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/ContactMailServlet.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/ContactMailServlet.java index 4f5c50e6a..5301b74ed 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/ContactMailServlet.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/ContactMailServlet.java @@ -31,8 +31,8 @@ import edu.cornell.mannlib.vitro.webapp.beans.Portal; public class ContactMailServlet extends VitroHttpServlet { private static final Log log = LogFactory.getLog(ContactMailServlet.class); - private final static String CONFIRM_PAGE = "/thankyou.jsp"; - private final static String ERR_PAGE = "/contact_err.jsp"; + private final static String CONFIRM_PAGE = "/templates/parts/thankyou.jsp"; + private final static String ERR_PAGE = "/templates/parts/contact_err.jsp"; private final static String SPAM_MESSAGE = "Your message was flagged as spam."; private final static String EMAIL_BACKUP_FILE_PATH = "/WEB-INF/LatestMessage.html"; diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/Controllers.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/Controllers.java index 96f4b47be..defa3700d 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/Controllers.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/Controllers.java @@ -39,7 +39,6 @@ public class Controllers { // jsps go here: - public static final String EMPTY = "/empty.jsp"; public static final String TAB = "/index.jsp"; public static final String LOGIN_JSP = "/login_process.jsp"; @@ -80,17 +79,17 @@ public class Controllers { public static final String BROWSE_GROUP_JSP = "/templates/browse/browseGroup.jsp"; - public static final String HORIZONTAL_JSP = "/horizontal.jsp"; + public static final String HORIZONTAL_JSP = "/templates/edit/fetch/horizontal.jsp"; public static final String VERTICAL_JSP = "/templates/edit/fetch/vertical.jsp"; - public static final String CHECK_DATATYPE_PROPERTIES = "/checkDatatypeProperties.jsp"; + public static final String CHECK_DATATYPE_PROPERTIES = "/jsp/checkDatatypeProperties.jsp"; public static final String EXPORT_SELECTION_JSP = "/jenaIngest/exportSelection.jsp"; public static final String VCLASS_RETRY_URL = "vclass_retry"; public static final String TOGGLE_SCRIPT_ELEMENT = ""; - public static final Object SEARCH_ERROR_JSP = "/search_error.jsp"; + public static final Object SEARCH_ERROR_JSP = "/templates/parts/search_error.jsp"; //public static final String TAB_ENTITIES_LIST_JSP = "templates/tab/tabEntities.jsp"; diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/SitemapIndexController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/SitemapIndexController.java deleted file mode 100644 index 0a52a69b9..000000000 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/SitemapIndexController.java +++ /dev/null @@ -1,178 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.controller; - -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.Portal; -import edu.cornell.mannlib.vitro.webapp.beans.Tab; - -public class SitemapIndexController extends VitroHttpServlet { - private static final Log log = LogFactory.getLog(SitemapIndexController.class.getName()); - - private static ArrayList> urlIndex = null; - - public void doGet( HttpServletRequest req, HttpServletResponse res ) - throws IOException, ServletException { - try { - super.doGet(req, res); - VitroRequest vreq = new VitroRequest(req); - String entityListString = vreq.getParameter("entityListNum"); - Integer entityListNum = null; - if(entityListString != null) entityListNum = Integer.parseInt(entityListString); - if(entityListNum != null) - { - generateEntitySitemap(req, res, entityListNum); - return; - } - String tabsPortalString = vreq.getParameter("tabsPortalNum"); - Integer tabsPortalNum = null; - if(tabsPortalString != null) tabsPortalNum = Integer.parseInt(tabsPortalString); - if(tabsPortalNum != null) - { - generateTabsSitemap(req, res, tabsPortalNum); - return; - } - - setUrlIndex(vreq); - - vreq.setAttribute("individuals", urlIndex.size()); - vreq.setAttribute("context", req.getServerName()+":"+req.getServerPort()+req.getContextPath()); - Portal portal = vreq.getPortal(); - RequestDispatcher rd = vreq.getRequestDispatcher("/siteMapIndex.jsp"); - rd.forward(req,res); - - } catch (Throwable e) { - log.error(e); - req.setAttribute("javax.servlet.jsp.jspException",e); - RequestDispatcher rd = req.getRequestDispatcher("/error.jsp"); - rd.forward(req, res); - } - } - - private void generateEntitySitemap(HttpServletRequest req, HttpServletResponse res, int listNum) - { - VitroRequest vreq = new VitroRequest(req); - if(urlIndex == null) setUrlIndex(vreq); - RequestDispatcher rd = vreq.getRequestDispatcher("/siteMap.jsp"); - vreq.setAttribute("list", urlIndex.get(listNum)); - try { - rd.forward(req,res); - } - catch(Exception e) - { - log.error(e); - } - } - private void generateTabsSitemap(HttpServletRequest req, HttpServletResponse res, int portalNum) - { - VitroRequest vreq = new VitroRequest(req); - List tabs = (List)vreq.getWebappDaoFactory().getTabDao().getTabsForPortal(portalNum); - ArrayList tabsList = new ArrayList(); - for(int i=0; i tabsList, Tab tab, int portalNum, String contextPath) - { - if(tab == null) return; - String tabURI = contextPath+escapeEntity("/index.jsp?home="+portalNum+"&"+tab.getTabDepthName()+"="+tab.getTabId()); - tabsList.add(tabURI); - //tabsList.add(tabURI); - - Collection childTabs = tab.getChildTabs(); - if(childTabs != null) - for(Tab t:childTabs) addDecendentTabs(tabsList, t, portalNum, contextPath); - } - - private void setUrlIndex(VitroRequest vreq) - { - Iterator individualIter = vreq.getWebappDaoFactory().getIndividualDao().getAllOfThisTypeIterator(); - ArrayList> arrays = new ArrayList>(); - for(int i=0; individualIter.hasNext(); i++) - { - ArrayList individuals = new ArrayList(); - for(int j=0; j<50000 && individualIter.hasNext(); j++) - { - String individualUri = SitemapIndexController.forURL(individualIter.next().getURI()); - - individualUri = "http://"+vreq.getServerName()+":"+vreq.getServerPort()+vreq.getContextPath()+"/entity?home=1&uri="+individualUri; - //individualUri = "http://vivo.cornell.edu/entity?home=1&uri="+individualUri; - - individuals.add(escapeEntity(individualUri)); - - } - arrays.add(individuals); - } - urlIndex = arrays; - } - - private static String forURL(String frag) - { - String result = null; - try - { - result = URLEncoder.encode(frag, "UTF-8"); - } catch (UnsupportedEncodingException ex) { - throw new RuntimeException("UTF-8 not supported", ex); - } - return result; - } - - private String escapeEntity(String frag) - { - if(frag.contains("&")) frag = replaceAll(frag, "&", "&"); - if(frag.contains("'")) frag = replaceAll(frag, "'", "'"); - if(frag.contains("\"")) frag = replaceAll(frag, "\"", """); - if(frag.contains(">")) frag = replaceAll(frag, ">", ">"); - if(frag.contains("<")) frag = replaceAll(frag, "<", "<"); - return frag; - } - - private String replaceAll(String original, String match, String replace) - { - int index1 = original.indexOf(match); - int index2 = original.indexOf(replace); - if(index1 == index2 && index1 != -1) - { - original = original.substring(0, index1+replace.length()+1)+replaceAll(original.substring(index1+replace.length()+1), match, replace); - return original; - } - if(index1 == -1) return original; - String before = original.substring(0, index1) + replace; - return before + replaceAll(original.substring(index1+1), match, replace); - } - - - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException,IOException { - doGet(request, response); - } - -} diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/TermsOfUseController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/TermsOfUseController.java deleted file mode 100644 index 083970b22..000000000 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/TermsOfUseController.java +++ /dev/null @@ -1,58 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webapp.controller; - -import java.io.IOException; - -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean; -import edu.cornell.mannlib.vitro.webapp.beans.Portal; - -/** - * Controller for Terms of Use page - * @author bjl23 - */ -public class TermsOfUseController extends VitroHttpServlet{ - private static final long serialVersionUID = 1L; - - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - doGet(request, response); - } - - public void doGet( HttpServletRequest request, HttpServletResponse response ) - throws IOException, ServletException { - try { - super.doGet(request,response); - VitroRequest vreq = new VitroRequest(request); - - ApplicationBean appBean=vreq.getAppBean(); - Portal portalBean=vreq.getPortal(); - - request.setAttribute("rootBreadCrumbAnchorOrAppName", portalBean.getRootBreadCrumbAnchor()==null || portalBean.getRootBreadCrumbAnchor().equals("")?portalBean.getAppName():portalBean.getRootBreadCrumbAnchor()); - request.setAttribute("copyrightAnchor", portalBean.getCopyrightAnchor()); - //request.setAttribute("rootLogotypeTitle", appBean.getRootLogotypeTitle()); THIS IS NOT POPULATED - request.setAttribute("appName", portalBean.getAppName()); - - request.setAttribute("title", portalBean.getAppName()+" Terms of Use"); - request.setAttribute("bodyJsp", "/usageTerms.jsp");// <<< this is where the body gets set - request.setAttribute("portalBean",portalBean); - - RequestDispatcher rd = - request.getRequestDispatcher(Controllers.BASIC_JSP); - rd.forward(request, response); - - } catch (Throwable e) { - // This is how we use an error.jsp - //it expects javax.servlet.jsp.jspException to be set to the - //exception so that it can display the info out of that. - request.setAttribute("javax.servlet.jsp.jspException", e); - RequestDispatcher rd = request.getRequestDispatcher("/error.jsp"); - rd.include(request, response); - } - } -} diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/UserMailController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/UserMailController.java index c8c14e1ce..45449cf45 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/UserMailController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/UserMailController.java @@ -68,7 +68,7 @@ public class UserMailController extends VitroHttpServlet{ request.setAttribute("portalId",Integer.valueOf(portalBean.getPortalId())); request.setAttribute("title", portalBean.getAppName()+" Mail Users Form"); - request.setAttribute("bodyJsp", "/emailUsers.jsp");// <<< this is where the body gets set + request.setAttribute("bodyJsp", "/templates/parts/emailUsers.jsp");// <<< this is where the body gets set request.setAttribute("portalBean",portalBean); RequestDispatcher rd = diff --git a/webapp/web/about.jsp b/webapp/web/about.jsp index 63a3f0264..d4d1e787f 100644 --- a/webapp/web/about.jsp +++ b/webapp/web/about.jsp @@ -1,4 +1,6 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> +<%-- This the non-freemarker AboutController iis still used by datastar. That + controller uses this jsp. --%>
diff --git a/webapp/web/authtest.jsp b/webapp/web/authtest.jsp deleted file mode 100755 index 34b0ad1e5..000000000 --- a/webapp/web/authtest.jsp +++ /dev/null @@ -1,42 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - -<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %> - - - -Authroization Test - - - - - - - - - - - <% - - out.println("here"); -java.util.Map params = request.getParameterMap(); -java.util.Iterator keys = params.keySet().iterator(); - -%> <% -while (keys.hasNext()){ - String name = (String) keys.next(); - String val = (String) params.get(name); - out.println(""); -} -%> <% - java.util.Enumeration hnames = request.getHeaderNames(); -while( hnames.hasMoreElements() ){ - String name = (String) hnames.nextElement(); - String val = request.getHeader(name); - out.println(""); -}%> -
params
"+ name + ""+ val +"
headers
"+ name + ""+ val +"
- -<%= MiscWebUtils.getReqInfo(request) %> - - - diff --git a/webapp/web/displayRSS.jsp b/webapp/web/displayRSS.jsp deleted file mode 100644 index 19cbf4ccb..000000000 --- a/webapp/web/displayRSS.jsp +++ /dev/null @@ -1,169 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - - -<%@ taglib uri='WEB-INF/tlds/database.tld' prefix='database'%> -<%@ page import="java.util.*,java.io.*,javax.xml.parsers.*,java.net.*,org.gnu.stealthp.rsslib.*" %> -<% -/** - * @version 1 2005-08-04 - * @author Jon Corson-Rikert - * - * CHANGE HISTORY - * 2005-08-18 jc55 added "raw" mode for inclusion in tabs - */ - -final int DEFAULT_PORTAL_ID=1; -String portalIdStr=(portalIdStr=request.getParameter("home"))==null?String.valueOf(DEFAULT_PORTAL_ID): portalIdStr.equals("")?String.valueOf(DEFAULT_PORTAL_ID):portalIdStr; -int incomingPortalId=Integer.parseInt(portalIdStr); - -final String DEFAULT_RSS_URL="http://www.nsf.gov/mynsf/RSS/rss2news.xml"; //http://www.nsf.gov/mynsf/RSS/rss2discoveries.xml -boolean includeHeaders=true; -String rawStr=(rawStr=request.getParameter("raw"))==null?"false": rawStr.equals("")?"false":rawStr; -if (rawStr!=null && rawStr.equalsIgnoreCase("true")) { - includeHeaders=false; -} -if (includeHeaders) {%> - - - - - RSS -<% final String DEFAULT_APPNAME="RSS"; - final String DEFAULT_STYLESHEET="portal"; - String appName=DEFAULT_APPNAME; - String styleSheet=DEFAULT_STYLESHEET;%> - - SELECT appName,styleSheet FROM portals WHERE id='<%=portalIdStr%>' - - -<% int portal_col=0; %> - -<% switch (portal_col) { - case 0: appName=theValue; break; - case 1: styleSheet="portal"; break; - } - ++portal_col; %> - - - - - <% -}%> - -<% -if (includeHeaders) {%> - - -<% -} %> - - -<% -if (includeHeaders) {%> - -<% -}%> -
- - - -
-<% String noisyStr=(noisyStr=(String)request.getAttribute("noisy"))==null || noisyStr.equals("")?((noisyStr=request.getParameter("noisy"))==null || noisyStr.equals("")?"false":noisyStr):noisyStr; - boolean NOISY=(noisyStr.equalsIgnoreCase("true"))?true:false; - String urlStr=(urlStr=(String)request.getAttribute("url"))==null || urlStr.equals("")?((urlStr=request.getParameter("url"))==null || urlStr.equals("")?DEFAULT_RSS_URL:urlStr):urlStr; - if (urlStr==null || urlStr.equals("")) {%> -

Error in URL parameter

-

System could not decode <%=urlStr%> as a URL

-<% } else { - URL u=null; - try { - u = new URL(urlStr); - RSSHandler hand=new RSSHandler(); - try { - RSSParser.parseXmlFile(u,hand,false); - RSSChannel ch= hand.getRSSChannel();%> -

<%=ch.getTitle()%>

-<% String lastDateStr=ch.getLastBuildDate(); - if (lastDateStr==null || lastDateStr.equals("")) { - RSSDoublinCoreModule dcModule=ch.getRSSDoublinCoreModule(); - if (dcModule!=null){ - lastDateStr=dcModule.getDcDate(); - if (lastDateStr!=null && !lastDateStr.equals("")){ - int timeStartPos=lastDateStr.indexOf("T"); - int timeEndPos=lastDateStr.indexOf("Z"); - if (timeStartPos>0 && timeEndPos>0){ %> -

listings current as of <%=lastDateStr.substring(0,timeStartPos)%> at <%=lastDateStr.substring(timeStartPos+1,timeEndPos)%>

-<% } else {%> -

listings current as of: <%=lastDateStr%>

-<% } - } else {%> -

RSSDoublinCoreModule.getDcDate() returns null or blank String

-<% } - } else {%> -

RSSDoublinCoreModule is null

-<% } - } - String copyrightStr=ch.getCopyright(); - if (copyrightStr!=null && !copyrightStr.equals("")){%> -

<%=ch.getCopyright()%>

-<% } - if (NOISY && ch.getRSSImage()!=null) {%> -

IMAGE INFO:
<%=ch.getRSSImage().toString()%>

-

IMAGE IN HTML:
<%=ch.getRSSImage().toHTML()%>

-<% } else if (NOISY) {%> -

CHANNEL HAS NO IMAGE

-<% } - - if (NOISY && ch.getRSSTextInput()!=null) {%> -

INPUT INFO:
<%=ch.getRSSTextInput().toString()%>

-

HTML INPUT:
<%=ch.getRSSTextInput().toHTML()%>

-<% } else if (NOISY) {%> -

CHANNEL HAS NO FORM INPUT

-<% } - - if (NOISY && ch.getDoublinCoreElements()!=null) {%> -

DUBLIN CORE INFO:
<%=ch.getDoublinCoreElements().toString()%>

-<% } else if (NOISY) {%> -

CHANNEL HAS NO DUBLIN CORE TAGS

-<% }%> - -<% if (NOISY) {%> -

SEQUENCE INFO

-<% if (ch.getItemsSequence()!=null) {%> -

<%=hand.getRSSChannel().getItemsSequence().toString()%>

-<% } else if (NOISY) {%> -

CHANNEL HAS NO SEQUENCE; MAYBE VERSION 0.9 or 2+?

-<% } - } - LinkedList lst = hand.getRSSChannel().getItems();%> -

ITEMS INFO (<%=lst.size()%>)

-
    -<% for (int i = 0; i < lst.size(); i++){ - RSSItem itm = (RSSItem)lst.get(i);%> -
  • <%=itm.toString()%>
  • -<% if (itm.getDoublinCoreElements()!=null) {%> -
    DUBLIN CORE INFO FOR ITEM: <%=itm.getDoublinCoreElements().toString()%> -<% } else if (NOISY) {%> -
    ITEM HAS NO DUBLIN CORE TAGS -<% }%> - -<% } // end for - } catch (org.gnu.stealthp.rsslib.RSSException ex) {%> -

    error initializing RSSHandler

    -

    <%=ex.getMessage()%>

    -<% } - } catch (java.net.MalformedURLException ex) {%> -

    Error in URL parameter

    -

    System could not convert <%=urlStr%> to a Java URL: <%=ex.getMessage()%>

    -<% } - - } // end else URLstr not null or blank%> -
- - - -
<% -if (includeHeaders) {%> - -<% -}%> diff --git a/webapp/web/empty.jsp b/webapp/web/empty.jsp deleted file mode 100644 index 5a94e58e6..000000000 --- a/webapp/web/empty.jsp +++ /dev/null @@ -1,2 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - diff --git a/webapp/web/checkDatatypeProperties.jsp b/webapp/web/jsp/checkDatatypeProperties.jsp similarity index 94% rename from webapp/web/checkDatatypeProperties.jsp rename to webapp/web/jsp/checkDatatypeProperties.jsp index 150456052..6c501f22c 100644 --- a/webapp/web/checkDatatypeProperties.jsp +++ b/webapp/web/jsp/checkDatatypeProperties.jsp @@ -1,5 +1,7 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> +<%-- used by RefactorOperationController.java --%> + <%@ page import="java.util.*, java.lang.String.*"%> <%@ page import="edu.cornell.mannlib.vedit.beans.ButtonForm" %> diff --git a/webapp/web/login_process.jsp b/webapp/web/login_process.jsp deleted file mode 100644 index 6a3c7d227..000000000 --- a/webapp/web/login_process.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - -<%@ page isThreadSafe="false" %> -<%@ page import="java.util.*" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %> - -<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> - -<% final int DEFAULT_PORTAL_ID=1; - String portalIdStr=(portalIdStr=(String)request.getAttribute("home"))==null ? - ((portalIdStr=request.getParameter("home"))==null?String.valueOf(DEFAULT_PORTAL_ID):portalIdStr):portalIdStr; - //int incomingPortalId=Integer.parseInt(portalIdStr); -%> - - - - - - - -<% - - String submitModeStr = request.getParameter("loginSubmitMode"); - if ( submitModeStr == null ) { - submitModeStr = "unknown"; - } - - if ( submitModeStr.equalsIgnoreCase("Log Out")) { %> - - - - -<% } else if ( submitModeStr.equalsIgnoreCase("Log In")) { - String loginNameStr = request.getParameter("loginName"); - String loginPasswordStr = request.getParameter("loginPassword"); %> - - - - -<% if ( loginHandler.validateLoginForm() ) { %> - - - -<% } else { - String redirectURL = "${siteAdminUrl}?home=" + portalIdStr + "&login=block"; - response.sendRedirect(redirectURL); - } - } -%> \ No newline at end of file diff --git a/webapp/web/owl.jsp b/webapp/web/owl.jsp deleted file mode 100644 index a1f91d65a..000000000 --- a/webapp/web/owl.jsp +++ /dev/null @@ -1,34 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - - -
- -

Import OWL/RDFS Ontologies

- -Note: This is not yet fully stable. Avoid running on production servers. - -
-

Import OWL/RDF XML ontology from URI:

- - - - -

Value to use for property domains/ranges that are not specified or cannot be interpreted: -

- -

Format

- -
- -
- - -
- diff --git a/webapp/web/selfEditIntro.jsp b/webapp/web/selfEditIntro.jsp deleted file mode 100644 index dd342e8b3..000000000 --- a/webapp/web/selfEditIntro.jsp +++ /dev/null @@ -1,43 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - -<%@ page import="edu.cornell.mannlib.vitro.webapp.web.*" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %> -<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> -<%@ page errorPage="/error.jsp"%> -<%@ page contentType="text/html; charset=UTF-8"%> - - - - - - - " media="screen"/> - - - Edit Your Profile - - - -
- -
- -
-
- If you are a member of the Cornell community and would like to edit you profile - in the Vivo system please login using your netId. -
-
- - -
- -
- -
- -
- - diff --git a/webapp/web/siteMap.jsp b/webapp/web/siteMap.jsp deleted file mode 100644 index 6559e74c5..000000000 --- a/webapp/web/siteMap.jsp +++ /dev/null @@ -1,30 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - -<%@ page import="java.util.*, java.lang.String.*"%> -<%@ page import="edu.cornell.mannlib.vedit.beans.ButtonForm" %> -<%@ page import="java.util.ArrayList" %> - -<% - - ArrayList list = (ArrayList)request.getAttribute("list"); - String changeFrequency = "weekly"; - response.setContentType("application/xml"); -%> - - - - -<% - // List Sitemaps for individuals - for(int i=0; i - - <%= list.get(i) %> - <%= changeFrequency %> - -<% } -%> - \ No newline at end of file diff --git a/webapp/web/siteMapIndex.jsp b/webapp/web/siteMapIndex.jsp deleted file mode 100644 index dd78704ab..000000000 --- a/webapp/web/siteMapIndex.jsp +++ /dev/null @@ -1,38 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - -<%@ page import="java.util.*, java.lang.String.*"%> -<%@ page import="edu.cornell.mannlib.vedit.beans.ButtonForm" %> -<%@ page import="java.util.ArrayList" %> - -<% - int individuals = (Integer)request.getAttribute("individuals"); - String context = (String)request.getAttribute("context"); - int numPortals = 16; - response.setContentType("application/xml"); -%> - - - - -<% - // List Sitemaps for individuals - for(int i=0; i - - http://<%= context %>/sitemap.xml?entityListNum=<%= i %> - - <% - } - for(int i=0; i - - http://<%= context %>/sitemap.xml?tabsPortalNum=<%= i %> - - <% - } - %> - \ No newline at end of file diff --git a/webapp/web/horizontal.jsp b/webapp/web/templates/edit/fetch/horizontal.jsp similarity index 100% rename from webapp/web/horizontal.jsp rename to webapp/web/templates/edit/fetch/horizontal.jsp diff --git a/webapp/web/emailUsers.jsp b/webapp/web/templates/parts/emailUsers.jsp similarity index 100% rename from webapp/web/emailUsers.jsp rename to webapp/web/templates/parts/emailUsers.jsp diff --git a/webapp/web/search_error.jsp b/webapp/web/templates/parts/search_error.jsp similarity index 100% rename from webapp/web/search_error.jsp rename to webapp/web/templates/parts/search_error.jsp diff --git a/webapp/web/thankyou.jsp b/webapp/web/templates/parts/thankyou.jsp similarity index 100% rename from webapp/web/thankyou.jsp rename to webapp/web/templates/parts/thankyou.jsp diff --git a/webapp/web/testauth.jsp b/webapp/web/testauth.jsp deleted file mode 100644 index ceeca6fee..000000000 --- a/webapp/web/testauth.jsp +++ /dev/null @@ -1,54 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - -<%@ page import="edu.cornell.mannlib.vedit.beans.LoginFormBean" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.ArrayIdentifierBundle" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.IdentifierBundle" %> -<%@ page -import="edu.cornell.mannlib.vitro.webapp.auth.identifier.NetIdIdentifierFactory" -%> -<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %> -<%@ page import="java.util.Enumeration" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> - -<% - if( request.getParameter("force") != null ){ - VitroRequestPrep.forceToSelfEditing(request); - } - if( request.getParameter("stopfaking") != null){ - VitroRequestPrep.forceOutOfSelfEditing(request); - } -%> - - - - - -

auth info

- -
" > - - -
- -

- -

" > - - -
- - -<% - out.println(""); - - Enumeration fj = request.getHeaderNames(); - while( fj.hasMoreElements()){ - String name = (String)fj.nextElement(); - out.print("\n"); - out.print(""); - } - - out.println("
" + name + "" + request.getHeader(name) + "
"); - %> - - diff --git a/webapp/web/toggle.js b/webapp/web/toggle.js deleted file mode 100644 index d6b247f47..000000000 --- a/webapp/web/toggle.js +++ /dev/null @@ -1,151 +0,0 @@ -//GLOBAL VARIABLES -//*************************************************************************************** -//vars from DHTMLapi.js, Edition 2 -//**************************************************************************************** -// Global variables -var isCSS, isW3C, isIE4, isNN4, isIE6CSS; -// initialize upon load to let all browsers establish content objects -function initDHTMLAPI() { - if (document.images) { - isCSS = (document.body && document.body.style) ? true : false; - isW3C = (isCSS && document.getElementById) ? true : false; - isIE4 = (isCSS && document.all) ? true : false; - isNN4 = (document.layers) ? true : false; - isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false; - //alert("isCSS: "+isCSS+", isW3C: "+isW3C+", isIE4: "+isIE4 +", isNN4: "+isNN4+", isIE6CSS: "+isIE6CSS ); - } else { - alert("document.images not defined in initDHTMLAPI()"); - } -} -// set event handler to initialize API -window.onload = initDHTMLAPI; -//window.onresize = resizeWindow; - - -//*************************************************************************************** -//vars from ZoomBox.htm -//**************************************************************************************** -// Global vars for browser type and version -var isNav = (navigator.appName.indexOf("Netscape")>=0); -var isNav4 = false; -var isIE4_old = false; -var is5up = false; -//alert(navigator.appVersion); -if (isNav) { - if (parseFloat(navigator.appVersion)<5) { - isNav4=true; - //alert("Netscape 4.x or older"); - } else { - is5up = true; - } -} else { - isIE4_old=true; - if (navigator.appVersion.indexOf("MSIE 5")>0) { - isIE4_old = false; - is5up = true; - //alert("IE5"); - } -} - -function getTagById(tagId) { - var selectedTag; - if (document.all) { - selectedTag=document.all.item(tagId); - } else { - selectedTag=document.getElementById(tagId); - } - return selectedTag; -} - -function switchElementDisplay( whichTag ) { - var tagToSwitch = getTagById( whichTag ); - if ( tagToSwitch == null ) - return; - if ( tagToSwitch.style.display == "" || tagToSwitch.style.display == "none" ) { - tagToSwitch.style.display = "block"; - } else { - tagToSwitch.style.display="none"; - } -} - -function switchGroupDisplay( whichTag, whichToggleImage, imageDirectory ) { - var tagToSwitch = getTagById( whichTag ); - if ( tagToSwitch == null ) - return; - if ( imageDirectory == null ) { - imageDirectory="images"; - } - var toggleIcon = getTagById( whichToggleImage ); - if ( tagToSwitch.style.display == "" || tagToSwitch.style.display == "none" ) { - tagToSwitch.style.display = "block"; - toggleIcon.src = imageDirectory + ((whichTag=="textblock") ? "/togglelegend.gif" : "/minus.gif"); - //if ( document.all ) { - // tagToSwitch.scrollIntoView(); - //} - if (whichTag != "legend" && whichTag != "themelist" && whichTag != "textblock" && whichTag != "overviewMap" ) { - closeAllButThisGroupDisplay( whichTag ); - } - } else { - tagToSwitch.style.display="none"; - toggleIcon.src= imageDirectory + ((whichTag=="textblock") ? "/Toc.gif" : "/plus.gif"); - } -} - -function closeGroupDisplay( whichTag, whichToggleImage, imageDirectory ) { - var tagToClose = getTagById( whichTag ); - if ( tagToClose == null ) - return; - var toggleIcon = getTagById( whichToggleImage ); - if ( tagToClose.style.display != "" && tagToClose.style.display != "none" ) { - tagToClose.style.display="none"; - toggleIcon.src = imageDirectory + "/plus.gif"; - } -} - -function closeAllButThisGroupDisplay( whichTag, whichVal ) { - if ( whichTag != "layerGrp1" ) closeGroupDisplay("layerGrp1","layerGrp1Switch"); - if ( whichTag != "layerGrp2" ) closeGroupDisplay("layerGrp2","layerGrp2Switch"); - if ( whichTag != "layerGrp3" ) closeGroupDisplay("layerGrp3","layerGrp3Switch"); - if ( whichTag != "layerGrp4" ) closeGroupDisplay("layerGrp4","layerGrp4Switch"); - if ( whichTag != "layerGrp5" ) closeGroupDisplay("layerGrp5","layerGrp5Switch"); -} - -function initGroupDisplay( whichTag, value ) { - var tagToSet = getTagById( whichTag ); - if (tagToSet == null ) { - alert("whichTag " + whichTag + " cannot be found in initGroupDisplay"); - return; - } - if ( value == "block" ) { - tagToSet.style.display="block"; - } else { - tagToSet.style.display="none"; - } - tagToSet.style.color="#6A5ACD"; -} - -function getGroupDisplayValue( whichTag ) { - var tagToSwitch = getTagById( whichTag ); - if ( tagToSwitch == null ) - return; - return tagToSwitch.style.display; -} - -function onMouseOverHeading( tagToHighlight ) { - // don't do getTagById because tag does not have id: var tagToHighlight = getTagById( whichTag ); - //if (tagToHighlight == null ) // leave in for Mozilla diagnostics - // return; - //thisTag.style.textDecoration = 'underline'; - tagToHighlight.style.color = "#CC9933"; // - tagToHighlight.style.cursor="pointer"; -} - -function onMouseOutHeading( tagToUnHighlight ) { - // don't do this because tag does not have id: var tagToUnHighlight = getTagById( whichTag ); - //if (tagToUnHighlight == null ) // leave in for Mozilla diagnostics - // return; - //tagToUnHighlight.style.textDecoration = 'none'; - tagToUnHighlight.style.color = "black" //"#6A5ACD"; // - tagToUnHighlight.style.cursor="pointer"; -} - diff --git a/webapp/web/vertical.jsp b/webapp/web/vertical.jsp deleted file mode 100644 index f4337970a..000000000 --- a/webapp/web/vertical.jsp +++ /dev/null @@ -1,116 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - -<%@ page isThreadSafe = "false" %> -<%@ page import="java.util.*,java.lang.String.*" %> - -<% -String editFormStr = (String)request.getAttribute("editform"); -String editFormHeadStr = editFormStr.substring(0,editFormStr.length()-4)+".head.jsp"; -%> - -<% -String headerStr = (String)request.getAttribute("header"); -if ( headerStr == null || (!headerStr.equalsIgnoreCase("noheader")) ) { %> -<% } %> - -<% -int rows = 0; - - -String minEditRoleStr = (String)request.getAttribute("min_edit_role"); - -String firstValue = "null"; -Integer columnCount = (Integer)request.getAttribute("columncount"); -rows = columnCount.intValue(); - -String clickSortStr = (String)request.getAttribute("clicksort"); - -if ( rows > 0 && results.size() > rows ) { // avoid divide by zero error in next statement - String suppressStr = null; - int columns = results.size() / rows; - if ( ( suppressStr = (String)request.getAttribute("suppressquery")) == null ) { // only inserted into request if true %> -

<%= columns - 1 %> results were retrieved in <%= rows %> rows for query "<%=request.getAttribute("querystring")%>".

-<% } - if ( clickSortStr != null && clickSortStr.equals("true")) { - if ( columns > 2 ) { %> -

Click on the row header to sort columns by that row.

-<% } - } %> - -<% String[] resultsArray = new String[results.size()]; // see Core Java Vol. 1 p.216 - results.toArray( resultsArray ); - firstValue = resultsArray[ rows ]; - request.setAttribute("firstvalue",firstValue); - //secondValue= resultsArray[ rows + 1 ]; - String classString = ""; - boolean[] postQHeaderCols = new boolean[ columns ]; - for ( int eachcol=0; eachcol < columns; eachcol++ ) { - postQHeaderCols[ eachcol ] = false; - } - for ( int thisrow = 0; thisrow < rows; thisrow++ ) { - //int currentPostQCol = 0; - boolean dropRow = false; - for ( int thiscol = 0; thiscol < columns; thiscol++ ) { - String thisResult= resultsArray[ (rows * thiscol) + thisrow ]; - if ( thisResult.equals("+")) { /* occurs all in first row, so postQHeaderCols should be correctly initialized */ - classString = "postheaderright"; - postQHeaderCols[ thiscol ] = true; - //++currentPostQCol; - thisResult=" "; - } else if ( thisResult.indexOf("@@")== 0) { - classString="postheadercenter"; - thisResult ="query values"; //leave as follows for diagnostics: thisResult.substring(2); - thisResult = thisResult.substring(2); - } else { - if ( postQHeaderCols[ thiscol ] == true ) - classString = "postheaderright"; - else if ( thiscol == 1 && thisrow < 2 ) - classString = "rowbold"; - else - classString = "row"; - if ( thisResult.equals("")) - thisResult=" "; - } - if ( thiscol == 0 ) { // 1st column of new row - if ( thisrow > 0 ) { // first must close prior row %> - -<% if (thisResult.equals("XX")) { - dropRow = true; - } %> - -<% } else { %> - -<% } - if ( !dropRow ) { %> - -<% } - } - } %> - -
- <%=thisResult%> -<% } - } else { // 2nd or higher column - if ( !dropRow ) { %> - -<% if (thisResult.equals("XX")) { %> - <%=" "%> -<% } else { %> - <%=thisResult%> -<% } - } - } - if ( !dropRow ) { %> -
-<% -} else { - System.out.println("No results reported when " + rows + " rows and a result array size of " + results.size()); %> - No results retrieved for query "<%=request.getAttribute("querystring")%>". -<% Iterator errorIter = results.iterator(); - while ( errorIter.hasNext()) { - String errorResult = (String)errorIter.next(); %> -

Error returned: <%= errorResult%>

-<% } -} %> - -