<#include "someOtherPage.ftl"> does nothing!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

<#include "someOtherPage.ftl"> does nothing!

John W Newman
Hi,

I just started using freemarker this morning, so far so good except for some
reason I can't use #include

here's my index.ftl:
--------------------
[#ftl]
[#assign s=JspTaglibs["http://stripes.sourceforge.net/stripes.tld"]]
<html>

<head>
        <link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
        <title>blah blah</title>
</head>

<body style="font-size: smaller;">

<#include "ftl/queryForm.ftl">

</body>
</html>
-------------------------------

when i open my browser to this page, all i see is

<#include "someOtherPage.ftl">

Freemarker does nothing with it.  Why?  I'm able to use domain objects and every
other feature of freemarker just fine, so it is working and I don't think it is
a servlet configuration issue, what is going on?

thanks,
 - john


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: <#include "someOtherPage.ftl"> does nothing!

YoavShapira
Hi,
If you're including ftl/queryForm.ftl, why would you see <#include
"someOtherPage.ftl"> on the page?  What does queryForm.ftl contain?

Yoav

On 8/15/06, John Newman <[hidden email]> wrote:

> Hi,
>
> I just started using freemarker this morning, so far so good except for some
> reason I can't use #include
>
> here's my index.ftl:
> --------------------
> [#ftl]
> [#assign s=JspTaglibs["http://stripes.sourceforge.net/stripes.tld"]]
> <html>
>
> <head>
>         <link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
>         <title>blah blah</title>
> </head>
>
> <body style="font-size: smaller;">
>
> <#include "ftl/queryForm.ftl">
>
> </body>
> </html>
> -------------------------------
>
> when i open my browser to this page, all i see is
>
> <#include "someOtherPage.ftl">
>
> Freemarker does nothing with it.  Why?  I'm able to use domain objects and every
> other feature of freemarker just fine, so it is working and I don't think it is
> a servlet configuration issue, what is going on?
>
> thanks,
>  - john
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> FreeMarker-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: <#include "someOtherPage.ftl"> does nothing!

Daniel Dekany
In reply to this post by John W Newman
Tuesday, August 15, 2006, 5:18:35 PM, John Newman wrote:

> Hi,
>
> I just started using freemarker this morning, so far so good except for some
> reason I can't use #include
>
> here's my index.ftl:
> --------------------
> [#ftl]
> [#assign s=JspTaglibs["http://stripes.sourceforge.net/stripes.tld"]]
> <html>
>
> <head>
>         <link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
>         <title>blah blah</title>
> </head>
>
> <body style="font-size: smaller;">
>
> <#include "ftl/queryForm.ftl">
>
> </body>
> </html>
> -------------------------------
>
> when i open my browser to this page, all i see is
>
> <#include "someOtherPage.ftl">
>
> Freemarker does nothing with it.  Why?

Because by using [#ftl] you have switched the syntax of the template
to square bracket mode, so <#whatever> is just simple static text. You
should write [#include "ftl/queryForm.ftl"] (or remove [#ftl], but I
don't recommend that).

> I'm able to use domain objects and every
> other feature of freemarker just fine, so it is working and I don't think it is
> a servlet configuration issue, what is going on?
>
> thanks,
>  - john

--
Best regards,
 Daniel Dekany


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: <#include

John W Newman
Sorry, the someOtherPage.ftl was a mistake.
I should have said I see queryForm.ftl.

Anyways, using the [] instead of <> fixed it.  
I guess I missed that when I read the docs.  Is that the preferred syntax?

Thanks a bunch, no more jsp!!!!  Stripes, hibernate, and freemarker.

John






-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: <#include

Daniel Dekany
Tuesday, August 15, 2006, 7:38:12 PM, John Newman wrote:

> Sorry, the someOtherPage.ftl was a mistake.
> I should have said I see queryForm.ftl.
>
> Anyways, using the [] instead of <> fixed it.  
> I guess I missed that when I read the docs.
> Is that the preferred syntax?

So, as you maybe already realized, you either use <> everywhere in the
template or [] everywhere in a template, but not both. (See:
http://freemarker.org/docs/dgui_misc_alternativesyntax.html) The
traditional FreeMarker syntax uses <>, [] was added not so long ago
because <> was confused many HTML/XML editor programs. So currently
the standard is using <> (and this is the syntax that the
documentation uses), however looking at the popularity of the new
syntax I'm not sure what will be the standard few years later. Note
that you can use templates of different syntaxes together without
problem (like you can #include a <> template into a [] template), so
it probably will not cause any migration headaches later.

> Thanks a bunch, no more jsp!!!!  Stripes, hibernate, and freemarker.
>
> John

--
Best regards,
 Daniel Dekany


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: <#include "someOtherPage.ftl"> does nothing!

Matt.Ward
In reply to this post by YoavShapira
Hi,

You've used [#ftl/] at the beginning of your template -- this tells
freemarker that from then on in, you're going to use square brackets as
delimeters. Then you are using <#include .../> which freemarker just sees
as plain text. You can only use one form or other as delimeters in a
single template. Change it to [#include .../] and it should work.

Matt




"Yoav Shapira" <[hidden email]>
Sent by: [hidden email]
15/08/2006 16:45
Please respond to
FreeMarker-user <[hidden email]>


To
FreeMarker-user <[hidden email]>
cc

Subject
Re: [FreeMarker-user] <#include "someOtherPage.ftl"> does nothing!






Hi,
If you're including ftl/queryForm.ftl, why would you see <#include
"someOtherPage.ftl"> on the page?  What does queryForm.ftl contain?

Yoav

On 8/15/06, John Newman <[hidden email]> wrote:
> Hi,
>
> I just started using freemarker this morning, so far so good except for
some

> reason I can't use #include
>
> here's my index.ftl:
> --------------------
> [#ftl]
> [#assign s=JspTaglibs["http://stripes.sourceforge.net/stripes.tld"]]
> <html>
>
> <head>
>         <link href="css/stylesheet.css" rel="stylesheet" type="text/css"
/>

>         <title>blah blah</title>
> </head>
>
> <body style="font-size: smaller;">
>
> <#include "ftl/queryForm.ftl">
>
> </body>
> </html>
> -------------------------------
>
> when i open my browser to this page, all i see is
>
> <#include "someOtherPage.ftl">
>
> Freemarker does nothing with it.  Why?  I'm able to use domain objects
and every
> other feature of freemarker just fine, so it is working and I don't
think it is
> a servlet configuration issue, what is going on?
>
> thanks,
>  - john
>
>
>
-------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services,
security?
> Get stuff done quickly with pre-integrated technology to make your job
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> FreeMarker-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
Loading...