Mercurial > hg > digilib-old
comparison client/digitallibrary/digicat.jsp @ 52:36505ac4a334
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 | d407cb901df4 |
children | 58d23f512c80 |
comparison
equal
deleted
inserted
replaced
51:aa63c2f1c3ca | 52:36505ac4a334 |
---|---|
6 <% | 6 <% |
7 // set servlet init-parameter | 7 // set servlet init-parameter |
8 DB.setConfig(getServletConfig()); | 8 DB.setConfig(getServletConfig()); |
9 // check if authentication is needed and redirect if necessary | 9 // check if authentication is needed and redirect if necessary |
10 DB.doAuthentication(request, response); | 10 DB.doAuthentication(request, response); |
11 | |
12 // calculate base URL string from request (minus last part) | |
13 String baseUrl = request.getRequestURL().toString(); | |
14 int eop = baseUrl.lastIndexOf("/"); | |
15 if (eop > 0) { | |
16 baseUrl = baseUrl.substring(0, eop); | |
17 } else { | |
18 baseUrl = "http://" + request.getServerName() + "/docuserver/digitallibrary"; | |
19 } | |
20 | |
11 %> | 21 %> |
12 | 22 |
13 <script language="JavaScript"> | 23 <script language="JavaScript"> |
24 | |
25 var baseUrl = "<%= baseUrl %>"; | |
14 | 26 |
15 // DEBUG | 27 // DEBUG |
16 //alert('DIR: <%= DB.getDocuPath(request) %> PAGES: <%= DB.getNumPages(request) %>'); | 28 //alert('DIR: <%= DB.getDocuPath(request) %> PAGES: <%= DB.getNumPages(request) %>'); |
17 | 29 |
18 // the document's query string (minus "?") | 30 // the document's query string (minus "?") |