Mercurial > hg > digilib-old
comparison client/digitallibrary/dlImage.jsp @ 50: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 |
comparison
equal
deleted
inserted
replaced
49:67bbba76f34a | 50:866e798e2bef |
---|---|
54 if (request.getParameter("wh") != null) wh = request.getParameter("wh"); | 54 if (request.getParameter("wh") != null) wh = request.getParameter("wh"); |
55 if (request.getParameter("dw") != null) dw = request.getParameter("dw"); | 55 if (request.getParameter("dw") != null) dw = request.getParameter("dw"); |
56 if (request.getParameter("dh") != null) dh = request.getParameter("dh"); | 56 if (request.getParameter("dh") != null) dh = request.getParameter("dh"); |
57 if (request.getParameter("pt") != null) pt = request.getParameter("pt"); | 57 if (request.getParameter("pt") != null) pt = request.getParameter("pt"); |
58 | 58 |
59 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; | 59 //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; |
60 | |
61 String baseUrl = request.getRequestURL().toString(); | |
62 int eop = baseUrl.lastIndexOf("/"); | |
63 if (eop > 0) { | |
64 baseUrl = baseUrl.substring(0, eop); | |
65 } else { | |
66 baseUrl = "http://" + request.getServerName() + "/docuserver/digitallibrary"; | |
67 } | |
68 | |
69 String imageLocation = baseUrl + "/servlet/Scaler/" + fn + "?pn=" + pn + "&ws=" + ws + "&mo=" + mo + "&wx=" + wx + "&wy=" + wy + "&ww=" + ww + "&wh=" + wh + "&dw=" + dw + "&dh=" + dh; | |
60 | 70 |
61 %> | 71 %> |
62 | 72 |
63 <html> | 73 <html> |
64 <head> | 74 <head> |
65 <script language="JavaScript"> | 75 <script language="JavaScript"> |
76 | |
77 var baseUrl = "<%= baseUrl %>"; | |
66 | 78 |
67 // browser version test to include the corresponding navigation-file | 79 // browser version test to include the corresponding navigation-file |
68 if (navigator.userAgent.toLowerCase().indexOf("opera") > -1) { | 80 if (navigator.userAgent.toLowerCase().indexOf("opera") > -1) { |
69 document.write('<script src="navigation_o6.js"><\/script>'); | 81 document.write('<script src="navigation_o6.js"><\/script>'); |
70 } else if (navigator.userAgent.toLowerCase().indexOf("msie") > -1) { | 82 } else if (navigator.userAgent.toLowerCase().indexOf("msie") > -1) { |
78 document.write('<script src="navigation_n6.js"><\/script>'); | 90 document.write('<script src="navigation_n6.js"><\/script>'); |
79 } | 91 } |
80 | 92 |
81 // add module to show the total number of pages (not browser dependant!) | 93 // add module to show the total number of pages (not browser dependant!) |
82 document.write('<script src="modules\/pagesTotal.js"><\/script>'); | 94 document.write('<script src="modules\/pagesTotal.js"><\/script>'); |
83 document.write('<script src="modules\/pdfMaker.js"><\/script>'); | 95 // document.write('<script src="modules\/pdfMaker.js"><\/script>'); |
84 | 96 |
85 </script> | 97 </script> |
86 </head> | 98 </head> |
87 <body bgcolor="#666666" onload='init_pagesTotal("<%= fn %>", "<%= pn %>", "<%= ws %>", "<%= mo %>", "<%= mk %>", "<%= wx %>", "<%= wy %>", "<%= ww %>", "<%= wh %>", "<%= pt %>")'> | 99 <body bgcolor="#666666" onload='init_pagesTotal("<%= fn %>", "<%= pn %>", "<%= ws %>", "<%= mo %>", "<%= mk %>", "<%= wx %>", "<%= wy %>", "<%= ww %>", "<%= wh %>", "<%= pt %>")'> |
88 | 100 |