[opencms-dev] getting an instance of CmsObject from a JSP (again)

martin koeck martin.koeck at gmx.at
Thu Apr 10 09:09:00 CEST 2003


Hi everybody out there,

working with opencms 5.0rc2, trying to get access to CmsObject I have a 
twoliner JSP which simply always returns null for the CmsObject instance:

<%
com.opencms.flex.jsp.CmsJspActionElement element = new 
com.opencms.flex.jsp.CmsJspActionElement( pageContext, request, response );
out.write( "element=" + element + "<p>" );
com.opencms.file.CmsObject cmsObject = element.getCmsObject();
out.write( "cmsObject=" + cmsObject + "<p>" );
%>

The instance of CmsJspActionElement looks fine but cmsObject is always 
null.

I have already scanned the mailing list and tried things like purging 
the flex cache over and over again, restarting tomcat, but to no avail.

I would be very glad if somebody could post a working twoliner that does 
the trick.

TIA




More information about the opencms-dev mailing list