[opencms-dev] OpenCMS install Error (RH8+JDK1.4+ Tomcat 4.1)

Daniel DesRosiers ddesros at hk.quamnet.com
Tue Dec 3 06:14:23 CET 2002



I am getting the same error out of the box mentioned by
http://www.opencms.org/majordomo/opencms-dev/0210/msg00008.html
and http://www.opencms.org/majordomo/opencms-dev/0210/msg00007.html
and http://www.opencms.org/majordomo/opencms-dev/0210/msg00047.html.

At the beginning of : index.jsp
<% /* Initialize the Bean */ %>
<jsp:useBean id="Bean" class="com.opencms.boot.CmsSetup" scope="session" />

<% /* Set the base path to the opencms home folder */ %>
<jsp:setProperty name="Bean" property="basePath" value='<%= 
config.getServletContext().getRealPath("/") %>' />


It is stated in the servlet API that:

getRealPath

public java.lang.String getRealPath(java.lang.String path)

     Returns a String containing the real path for a given virtual path. 
For example, the path "/index.html" returns the absolute file path on 
the server's filesystem would be served by a request for 
"http://host/contextPath/index.html", where contextPath is the context 
path of this ServletContext..

     The real path returned will be in a form appropriate to the 
computer and operating system on which the servlet container is running, 
including the proper path separators. This method returns null if the 
servlet container cannot translate the virtual path to a real path for 
any reason (such as when the content is being made available from a .war 
archive).


So if I unpack the war the application is working fine.  I think this is 
a bug in OpenCMS not in Tomcat.

Regards,

Daniel




More information about the opencms-dev mailing list