Search code examples
dspace

DSpace's OAI servlet uses wrong baseUrl


I use the following Tomcat context descriptor named OAIHandler.xml to deploy DSpace 5.4's OAI servlet:

<?xml version="1.0" encoding="utf-8"?>
<!-- inside file ${DSPACE_CATALINA_BASE}/conf/Catalina/localhost/OAIHandler.xml
<Context docBase="c:/dspace/webapps/oai">
</Context>

So, as the file is named OAIHandler.xml, Tomcat deploys the OAI servlet at http://localhost:8080/OAIHandler.

Accessing a URL such as http://localhost:8080/OAIHandler/request?verb=Identify works - the page looks good. Yet links on this page don't use http://localhost:8080/OAIHandler/..., but http://localhost:8080/oai/... instead.

I don't have any servlet deployed at /oai, therefore these links point to nowhere.

I noticed that the configuration file config/modules/oai.cfg can have a property dspace.oai.url, so I set it to http://localhost:8080/OAIHandler - but my problem persists.

I looked into the XSLT stylesheet used by the OAI servlet (static/style.xsl). It uses the XSLT expression /oai:OAI-PMH/oai:request/text() to construct the beginning part of links. The relevant XML part indeed says <request verb="Identify">http://localhost:8080/oai/request</request> instead of the expected <request verb="Identify">http://localhost:8080/OAIHandler/request</request>.

Can someone help me point to the wrong configuration and/or Java classes that are responsible for generating the wrong <request> XML element?


Solution

  • It sounds like you have examined the correct files. One quick thing to try is clearing your oai cache. Run .../dspace/bin/dspace oai clean-cache to force the pages in the cache to be rebuilt.