Mercurial > hg > digilib
diff client/digitallibrary/dlImage.jsp @ 47:866e798e2bef
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)
author | robcast |
---|---|
date | Thu, 15 Aug 2002 23:40:15 +0200 |
parents | 44f653ae5df5 |
children | 58d23f512c80 |
line wrap: on
line diff
--- a/client/digitallibrary/dlImage.jsp Sun Jul 07 18:03:54 2002 +0200 +++ b/client/digitallibrary/dlImage.jsp Thu Aug 15 23:40:15 2002 +0200 @@ -56,7 +56,17 @@ if (request.getParameter("dh") != null) dh = request.getParameter("dh"); if (request.getParameter("pt") != null) pt = request.getParameter("pt"); -String imageLocation = "http://" + request.getServerName() + "/docuserver/digitallibrary/servlet/Scaler/" + fn + "?pn=" + pn + "&ws=" + ws + "&mo=" + mo + "&wx=" + wx + "&wy=" + wy + "&ww=" + ww + "&wh=" + wh + "&dw=" + dw + "&dh=" + dh; +//String imageLocation = "http://" + request.getServerName() + "/docuserver/digitallibrary/servlet/Scaler/" + fn + "?pn=" + pn + "&ws=" + ws + "&mo=" + mo + "&wx=" + wx + "&wy=" + wy + "&ww=" + ww + "&wh=" + wh + "&dw=" + dw + "&dh=" + dh; + +String baseUrl = request.getRequestURL().toString(); +int eop = baseUrl.lastIndexOf("/"); +if (eop > 0) { + baseUrl = baseUrl.substring(0, eop); +} else { + baseUrl = "http://" + request.getServerName() + "/docuserver/digitallibrary"; +} + +String imageLocation = baseUrl + "/servlet/Scaler/" + fn + "?pn=" + pn + "&ws=" + ws + "&mo=" + mo + "&wx=" + wx + "&wy=" + wy + "&ww=" + ww + "&wh=" + wh + "&dw=" + dw + "&dh=" + dh; %> @@ -64,6 +74,8 @@ <head> <script language="JavaScript"> +var baseUrl = "<%= baseUrl %>"; + // browser version test to include the corresponding navigation-file if (navigator.userAgent.toLowerCase().indexOf("opera") > -1) { document.write('<script src="navigation_o6.js"><\/script>'); @@ -80,7 +92,7 @@ // add module to show the total number of pages (not browser dependant!) document.write('<script src="modules\/pagesTotal.js"><\/script>'); -document.write('<script src="modules\/pdfMaker.js"><\/script>'); +// document.write('<script src="modules\/pdfMaker.js"><\/script>'); </script> </head>