# HG changeset patch # User robcast # Date 1029447615 -7200 # Node ID 36505ac4a3347c5e358e59159717b57f4b9072c7 # Parent aa63c2f1c3ca890b8ea22918b42d1e057b0afdae 13.8.2002 - [different files] : roc - changed all hardcoded occurrences of /docuserver/digitallibrary to work relative or take the path from the request URL. Introduced a variable baseURL to hold the URL path (up to digilib.jsp etc.). Now it should be possible to install digilib in other directories. - removed xerces.jar. It seems not necessary any more (JDK 1.3.1, Tomcat 4.0.4) diff -r aa63c2f1c3ca -r 36505ac4a334 client/digitallibrary/digicat.jsp --- a/client/digitallibrary/digicat.jsp Thu Aug 15 23:40:15 2002 +0200 +++ b/client/digitallibrary/digicat.jsp Thu Aug 15 23:40:15 2002 +0200 @@ -8,10 +8,22 @@ DB.setConfig(getServletConfig()); // check if authentication is needed and redirect if necessary DB.doAuthentication(request, response); + +// calculate base URL string from request (minus last part) +String baseUrl = request.getRequestURL().toString(); +int eop = baseUrl.lastIndexOf("/"); +if (eop > 0) { + baseUrl = baseUrl.substring(0, eop); +} else { + baseUrl = "http://" + request.getServerName() + "/docuserver/digitallibrary"; +} + %>