Re: [Freemarker-devel] temporary fix for inability to run on GAE?

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user,gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
Sunday, February 14, 2010, 11:38:59 AM, Attila Szegedi wrote:

> Folks,
>
> I have a build of FreeMarker 2.3.16 that *should* run on GAE.

Great! For those who has no time looking into it, the package still
uses Swing for FreemarkerTree, however that's a class that's not used
unless the application explicitly uses it, which however means that
the application itself (not just FreeMarker) depends on Swing, so then
it wouldn't run on GAE anyway. The unavoidable TemplateElement doesn't
implement Swing interfaces anymore, however it still has public
methods for tree-traversal, so if someone wants to do that without
FreemarkerTree, it's still possible, only not by using the Swing
interfaces.

One thing that I'm not sure about: 2.3-gae could become the basis of
2.4 later. However, you started to require J2SE 1.5 here if I saw
well. Surely that's OK for GAE, but I'm not 100% sure it's OK for 2.4.

> I'm saying "should" because I don't use GAE myself, so it's up to
> you to verify it.
>
> Go to <https://sourceforge.net/projects/freemarker/files/>,

Rather go to:
http://sourceforge.net/projects/freemarker/files/freemarker/2.3.16/freemarker-gae-pre1.jar/download

(Attila: You have accidentally made freemarker-gae-pre1.jar to be the
default download (big green button) on the project Summary page. I
fixed this already. The way it works in the new sf.net File Manage is
this: You name your files as you want, and you can use whatever folder
structure, the system doesn't try to comprehend it. It has no idea
about version numbers (as far as I can see). File dates doesn't mater
either, when it comes to do decide what the default download is.
Instead, you can mark a single(!) file in the whole file structure for
a given platform (like "Windows"), and that will be the default
download for the visitors who are using that platform. So in our case
(Java) it means that for the file you want to be the default download,
check all platforms.)

> and grab "freemarker-gae-pre1.jar" from freemarker/2.3.16 directory.
> The file is labelled "pre1" as it's considered a prerelease -- all
> you people who wish to use FreeMarker on GAE, please start using it
> and hammer at it, and report back any problems you can find. That
> said, I sincerely hope there will be none. The changes themselves
> are fairly light - I removed the dependency on Swing from AST
> classes, and worked around GAE's reflection security bugs.
>
> The development for this version is done in SVN branch
> <https://freemarker.svn.sourceforge.net/svnroot/freemarker/branches/2.3-gae>.
>
> This doesn't replace our longer term effort of having default
> FreeMarker be able to run under GAE, but is intended to provide you people with an instant solution.
>
> Attila.
>
> On 2010.02.03., at 17:11, Stephen Huey wrote:
>
>> Hello everyone, I'm having trouble getting FreeMarker running on Google App Engine even with the hacked TextBlock class that was posted on the GAE for Java group.  I just subscribed to this list, and looking through the FreeMarker archives, I see that Jeremy wrote Attila a couple days ago to ask about putting him in contact with someone at Google for support on this issue.  I'm curious what Jeremy meant by that--who is he putting Attila in touch with, and what is expected of that?  
>> 
>> More to the point, I am chiefly looking for an easy way to bypass the dependency on javax.swing.tree.TreeNode, but I'm guessing there won't be any easy way around it--at least none that would seem easier than simply trying another solution like Velocity instead.  I was curious as to whether or not someone working on FreeMarker has come up with a fix that we could access even if it's not part of a stable release.  
>> 
>> Thanks so much,
>> Stephen
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> FreeMarker-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-devel

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.