You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by eysman <je...@gmail.com> on 2009/11/16 21:32:53 UTC
Problem with <#include> directive
hi everyone,
I'm having an issue with the include directive in ofbiz. I'm doing a simple
<#include "file.ftl"> command, but getting back a FileNotFoundException. The
file is definetly where it should be, and I'm using the same code base as a
few co-workers of mine, but I'm the only one experiencing this issue.
Has anyone come across this problem and can help me out?
Much appreciated,
John
--
View this message in context: http://n4.nabble.com/Problem-with-include-directive-tp622347p622347.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Problem with <#include> directive
Posted by eysman <je...@gmail.com>.
I have included that handler in common-controller.xml, but I'm still having
the same problem as before.
abdullah shaikh wrote:
>
> I guess you have included the freemarker handler
>
> <handler name="ftl" type="view"
> class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
>
> If not then you need to include the common-controller.xml, in your
> controller, as below
>
> <include
> location="component://common/webcommon/WEB-INF/common-controller.xml"/>
>
> common controller includeds all the event / view handlers.
>
> Abdullah
>
> On Tue, Nov 17, 2009 at 3:11 AM, Adrian Crum <ad...@hlmksw.com> wrote:
>
>> Make sure the include directive has the file name in the correct case.
>> Sometimes problems like that are caused by the underlying OS and how it
>> handles filenames.
>>
>> Windows: file.ftl == File.Ftl
>> Unix: file.ftl != File.Ftl
>>
>>
>> -Adrian
>>
>>
>> eysman wrote:
>>
>>> The file is located in the same directory, but Freemarker can't find it.
>>> I've
>>> also tried relative and absolute paths just for the sake of it and
>>> neither
>>> way works.
>>>
>>>
>>> Adrian Crum wrote:
>>>
>>>> Freemarker will assume the included file is in the same folder as the
>>>> file that contains the include directive. If the file is located
>>>> somewhere
>>>> else, then you will have to supply a complete pathname or URL.
>>>>
>>>> -Adrian
>>>>
>>>> eysman wrote:
>>>>
>>>>> hi everyone,
>>>>>
>>>>> I'm having an issue with the include directive in ofbiz. I'm doing a
>>>>> simple
>>>>> <#include "file.ftl"> command, but getting back a
>>>>> FileNotFoundException.
>>>>> The
>>>>> file is definetly where it should be, and I'm using the same code base
>>>>> as
>>>>> a
>>>>> few co-workers of mine, but I'm the only one experiencing this issue.
>>>>>
>>>>> Has anyone come across this problem and can help me out?
>>>>>
>>>>> Much appreciated,
>>>>>
>>>>> John
>>>>>
>>>>
>>>>
>>>
>
>
--
View this message in context: http://n4.nabble.com/Problem-with-include-directive-tp622347p622830.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Problem with <#include> directive
Posted by Abdullah Shaikh <ab...@viithiisys.com>.
I guess you have included the freemarker handler
<handler name="ftl" type="view"
class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
If not then you need to include the common-controller.xml, in your
controller, as below
<include
location="component://common/webcommon/WEB-INF/common-controller.xml"/>
common controller includeds all the event / view handlers.
Abdullah
On Tue, Nov 17, 2009 at 3:11 AM, Adrian Crum <ad...@hlmksw.com> wrote:
> Make sure the include directive has the file name in the correct case.
> Sometimes problems like that are caused by the underlying OS and how it
> handles filenames.
>
> Windows: file.ftl == File.Ftl
> Unix: file.ftl != File.Ftl
>
>
> -Adrian
>
>
> eysman wrote:
>
>> The file is located in the same directory, but Freemarker can't find it.
>> I've
>> also tried relative and absolute paths just for the sake of it and neither
>> way works.
>>
>>
>> Adrian Crum wrote:
>>
>>> Freemarker will assume the included file is in the same folder as the
>>> file that contains the include directive. If the file is located somewhere
>>> else, then you will have to supply a complete pathname or URL.
>>>
>>> -Adrian
>>>
>>> eysman wrote:
>>>
>>>> hi everyone,
>>>>
>>>> I'm having an issue with the include directive in ofbiz. I'm doing a
>>>> simple
>>>> <#include "file.ftl"> command, but getting back a FileNotFoundException.
>>>> The
>>>> file is definetly where it should be, and I'm using the same code base
>>>> as
>>>> a
>>>> few co-workers of mine, but I'm the only one experiencing this issue.
>>>>
>>>> Has anyone come across this problem and can help me out?
>>>>
>>>> Much appreciated,
>>>>
>>>> John
>>>>
>>>
>>>
>>
Re: Problem with <#include> directive
Posted by Adrian Crum <ad...@hlmksw.com>.
I created a file called test.ftl and included it using
<#include "test.ftl"/>
and it works fine. I am unable to reproduce the problem you are having.
-Adrian
eysman wrote:
> Thanks Adrian,
>
> The files are named correctly and are in the correct directory. I'm quite
> certain it has something to do with the configuration of OFBiz and not the
> implementation.
>
>
> Adrian Crum wrote:
>> Make sure the include directive has the file name in the correct case.
>> Sometimes problems like that are caused by the underlying OS and how it
>> handles filenames.
>>
>> Windows: file.ftl == File.Ftl
>> Unix: file.ftl != File.Ftl
>>
>>
>> -Adrian
>>
>> eysman wrote:
>>> The file is located in the same directory, but Freemarker can't find it.
>>> I've
>>> also tried relative and absolute paths just for the sake of it and
>>> neither
>>> way works.
>>>
>>>
>>> Adrian Crum wrote:
>>>> Freemarker will assume the included file is in the same folder as the
>>>> file that contains the include directive. If the file is located
>>>> somewhere else, then you will have to supply a complete pathname or URL.
>>>>
>>>> -Adrian
>>>>
>>>> eysman wrote:
>>>>> hi everyone,
>>>>>
>>>>> I'm having an issue with the include directive in ofbiz. I'm doing a
>>>>> simple
>>>>> <#include "file.ftl"> command, but getting back a
>>>>> FileNotFoundException.
>>>>> The
>>>>> file is definetly where it should be, and I'm using the same code base
>>>>> as
>>>>> a
>>>>> few co-workers of mine, but I'm the only one experiencing this issue.
>>>>>
>>>>> Has anyone come across this problem and can help me out?
>>>>>
>>>>> Much appreciated,
>>>>>
>>>>> John
>>
>
Re: Problem with <#include> directive
Posted by eysman <je...@gmail.com>.
Thanks Adrian,
The files are named correctly and are in the correct directory. I'm quite
certain it has something to do with the configuration of OFBiz and not the
implementation.
Adrian Crum wrote:
>
> Make sure the include directive has the file name in the correct case.
> Sometimes problems like that are caused by the underlying OS and how it
> handles filenames.
>
> Windows: file.ftl == File.Ftl
> Unix: file.ftl != File.Ftl
>
>
> -Adrian
>
> eysman wrote:
>> The file is located in the same directory, but Freemarker can't find it.
>> I've
>> also tried relative and absolute paths just for the sake of it and
>> neither
>> way works.
>>
>>
>> Adrian Crum wrote:
>>> Freemarker will assume the included file is in the same folder as the
>>> file that contains the include directive. If the file is located
>>> somewhere else, then you will have to supply a complete pathname or URL.
>>>
>>> -Adrian
>>>
>>> eysman wrote:
>>>> hi everyone,
>>>>
>>>> I'm having an issue with the include directive in ofbiz. I'm doing a
>>>> simple
>>>> <#include "file.ftl"> command, but getting back a
>>>> FileNotFoundException.
>>>> The
>>>> file is definetly where it should be, and I'm using the same code base
>>>> as
>>>> a
>>>> few co-workers of mine, but I'm the only one experiencing this issue.
>>>>
>>>> Has anyone come across this problem and can help me out?
>>>>
>>>> Much appreciated,
>>>>
>>>> John
>>>
>>
>
>
--
View this message in context: http://n4.nabble.com/Problem-with-include-directive-tp622347p622786.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Problem with <#include> directive
Posted by Adrian Crum <ad...@hlmksw.com>.
Make sure the include directive has the file name in the correct case.
Sometimes problems like that are caused by the underlying OS and how it
handles filenames.
Windows: file.ftl == File.Ftl
Unix: file.ftl != File.Ftl
-Adrian
eysman wrote:
> The file is located in the same directory, but Freemarker can't find it. I've
> also tried relative and absolute paths just for the sake of it and neither
> way works.
>
>
> Adrian Crum wrote:
>> Freemarker will assume the included file is in the same folder as the
>> file that contains the include directive. If the file is located
>> somewhere else, then you will have to supply a complete pathname or URL.
>>
>> -Adrian
>>
>> eysman wrote:
>>> hi everyone,
>>>
>>> I'm having an issue with the include directive in ofbiz. I'm doing a
>>> simple
>>> <#include "file.ftl"> command, but getting back a FileNotFoundException.
>>> The
>>> file is definetly where it should be, and I'm using the same code base as
>>> a
>>> few co-workers of mine, but I'm the only one experiencing this issue.
>>>
>>> Has anyone come across this problem and can help me out?
>>>
>>> Much appreciated,
>>>
>>> John
>>
>
Re: Problem with <#include> directive
Posted by eysman <je...@gmail.com>.
The file is located in the same directory, but Freemarker can't find it. I've
also tried relative and absolute paths just for the sake of it and neither
way works.
Adrian Crum wrote:
>
> Freemarker will assume the included file is in the same folder as the
> file that contains the include directive. If the file is located
> somewhere else, then you will have to supply a complete pathname or URL.
>
> -Adrian
>
> eysman wrote:
>> hi everyone,
>>
>> I'm having an issue with the include directive in ofbiz. I'm doing a
>> simple
>> <#include "file.ftl"> command, but getting back a FileNotFoundException.
>> The
>> file is definetly where it should be, and I'm using the same code base as
>> a
>> few co-workers of mine, but I'm the only one experiencing this issue.
>>
>> Has anyone come across this problem and can help me out?
>>
>> Much appreciated,
>>
>> John
>
>
--
View this message in context: http://n4.nabble.com/Problem-with-include-directive-tp622347p622357.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Problem with <#include> directive
Posted by Adrian Crum <ad...@hlmksw.com>.
Freemarker will assume the included file is in the same folder as the
file that contains the include directive. If the file is located
somewhere else, then you will have to supply a complete pathname or URL.
-Adrian
eysman wrote:
> hi everyone,
>
> I'm having an issue with the include directive in ofbiz. I'm doing a simple
> <#include "file.ftl"> command, but getting back a FileNotFoundException. The
> file is definetly where it should be, and I'm using the same code base as a
> few co-workers of mine, but I'm the only one experiencing this issue.
>
> Has anyone come across this problem and can help me out?
>
> Much appreciated,
>
> John