AW: [opencms-dev] <%@ include Question %>

Anatol opencms at
Wed Dec 14 16:15:30 CET 2005

Hi Kai,

Kai Schliemann schrieb:

>Hi Anatol,
>why don't you use <% cms.include("/path/file.jsp"); %> instead? I guess this
>should work.
I need some global declarations and calculations like :

String myPath = request.getAttribute("myPath");
String myFile = request.getAttribute("myFile");
String CONF_FILE = "/content/" + myPath + "/" + myFile + ".conf";
String CONF_PATH = "/content/" + myPath;
String CONTENT_PATH = "/content/";
etc. ...

in the other JSPs I want to use this Vars without a

I assume it needs more power than a simple
  <%= CONF_FILE %>

If I understand it right, so would use cms.include its own namespace.

And the lines:

org.opencms.jsp.CmsJspActionElement cms = new 
CmsJspActionElement(pageContext, request, response);
org.opencms.file.CmsObject cmsobject = cms.getCmsObject();

should hidden in one of these includes files ;-)


More information about the opencms-dev mailing list