[opencms-dev] requestContext cannot be resolved

Antonio Cordeddu antoniocordeddu at coranto.it
Thu Apr 9 18:56:49 CEST 2015


Hi Corrado,

try this:

CmsProperty titleProp = cmsObject.readPropertyObject 
(*cmsAction.getRequestContext()*.getUri(), "Title", false);

Best regards
Antonio Cordeddu


On 09/04/2015 17:54, Paoletti Corrado wrote:
> Hi all,
> in my template I'd like to read a custom property.
>
> Reading article:
>
> http://www.opencms-wiki.org/wiki/Read_a_property_of_an_arbitrary_CmsResource
>
> I copied and pasted code suggested but when I click over a html based on the template I get the error:
>
> Unable to compile class for JSP:
> An error occurred at line: 15 in the jsp file: [my jsp file]
> requestContext cannot be resolved
>
> I don't know what i'm doing wrong.
>
> Thank you.
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>

  
_______________________________________________
Coranto informatica di Antonio Cordeddu
Via Torricelli, 9 09047 Selargius (CA) - Italy
antoniocordeddu at coranto.it
http://www.coranto.it
_______________________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20150409/338cacb1/attachment.htm>


More information about the opencms-dev mailing list