mvnforum context_path problems

Fri, Jan 12, 2007

So here’s the problem I had with mvnForum in the latest CLAN release. Threads coming out of the database had their icons displayed just fine. All icons were prefixed with the server_path from mvncore.xml:

http://www.clan-beta.uhi.ac.uk//mvnplugin/mvnforum/images/emotion/love.gif

However, icons that were referenced from JSPs, using < %= context_path %> where coming out blank with this URL:

http://mvnplugin/mvnforum/images/icon/button_profile.gif

Our mvncore.xml setting was:

<context_path>../</context_path>

I just couldn’t work out why the icons weren’t displaying. Then I finally found the cause of the problem. Nothing to do with mvnForum, it was Tomcat. The Host was set to:

<Host name=“www.clan-beta.uhi.ac.uk” debug=“0” appBase="/WWW/" unpackWARs=“true” autoDeploy=“true”>   <Context path="/" docBase=“www.clan-beta.uhi.ac.uk” debug=“0”>     <Valve className=“org.apache.catalina.valves.AccessLogValve”            directory=“logs”            prefix=“www.clan-beta.uhi.ac.uk”            suffix="-access_log"            pattern=“common”            rotatable=“false”            resolveHosts=“true”/>   </Context> </Host>

so I corrected it to:

<Host name=“www.clan-beta.uhi.ac.uk” debug=“0” appBase="/WWW/www.clan-beta.uhi.ac.uk/" unpackWARs=“true” autoDeploy=“true”>   <Context path="" docBase="" debug=“0”>     <Valve className=“org.apache.catalina.valves.AccessLogValve”            directory=“logs”            prefix=“www.clan-beta.uhi.ac.uk”            suffix="-access_log"            pattern=“common”            rotatable=“false”            resolveHosts=“true”/>   </Context> </Host>

and it all worked!

comments powered by Disqus