How is the viewtool method VelocityWebUtil.doesVelocityResourceExist() supposed to work?

Skip to first unread message

Rahul Patel

May 24, 2022, 6:59:52 PMMay 24
to dotCMS User Group
I'm trying to use this method as follows:


The file definitely exists but it always returns false.  How is this supposed to be call?

I do see the following in the logs:

dotcms_1         | 22:57:09.447  WARN  services.DotResourceLoader - filePath: /application/themes/my_theme/my_custom_file.vtl, msg:cannot find resource @ url:GET// | lang:1 | ip: | Admin:false | start:05-24-2022 01:25:42 GMT  ref:http://localhost:8080/
dotcms_1         | org.apache.velocity.exception.ResourceNotFoundException: cannot find resource

The use-case is that we're trying to check for the existence of file to see if it should be `#dotParse`d otherwise we fallback to a default file.
Reply all
Reply to author
0 new messages