You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Oscar <os...@gmail.com> on 2010/03/10 18:21:44 UTC

Problem with freemaker, basic Struts2 app in Google App Engine

Hi to all, i'm testing Google App Engine uploading a basic Struts2
application (without hibernate, spring or something like that) and i have an
error concerning freemaker when i use struts tags. My index.jsp is the next:

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
   <head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <title>Ejemplos con Struts 2</title>
   </head>
   <body>
       <h1>Pagina de Inicio</h1>
       <s:a href="FormularioEntrada.action">Formulario Entrada</s:a>
   </body>
</html>

As you can see i use a <s:a tag but i see that i have this error:

<pre>Expression parameters.templateDir is undefined on line 42, column 15 in
template/simple/a.ftl. The problematic instruction: ---------- ==&gt;
${parameters.templateDir} [on line 42, column 13 in template/simple/a.ftl]
in include "/${parameters.templateDir}/simple/scripting-events.ftl" [on line
42, column 1 in template/simple/a.ftl] ---------- Java backtrace for
programmers: ---------- freemarker.core.InvalidReferenceException:
Expression parameters.templateDir is undefined on line 42, column 15 in
template/simple/a.ftl. at
freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at
freemarker.core.Expression.getStringValue(Expression.java:118) at
freemarker.core.Expression.getStringValue(Expression.java:93) at
freemarker.core.DollarVariable.accept(DollarVariable.java:76) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.MixedContent.accept(MixedContent.java:92) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.Environment.renderElementToString(Environment.java:1461) at
freemarker.core.StringLiteral.getStringValue(StringLiteral.java:95) at
freemarker.core.Include.accept(Include.java:110) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.MixedContent.accept(MixedContent.java:92) at
freemarker.core.Environment.visit(Environment.java:196) at
freemarker.core.Environment.process(Environment.java:176) at
freemarker.template.Template.process(Template.java:232) </pre>

I'm not using any template or something like that, i´ve set the ui.theme to
simple, also you can see the error here (the url of google application):

https://anicetoapp2.appspot.com/

I don't know about this but i imagine that the solution is to override some
property value or something like that, or not?

Regards.
-- 
Oscar

http://www.javahowto.net/

Re: Problem with freemaker, basic Struts2 app in Google App Engine

Posted by Oscar Calderon <os...@gmail.com>.
Ok, i'm going to do that and after that tell us if works.

Regards.

El 3/11/2010 8:52 AM, Lukasz Lenart escribió:
> No problem, but I think you have to upgrade to latest version - 2.1.8.1
>    

-- 
Oscar Calderon

JAVA Tutorials and How to's? Visit http://www.javahowto.net/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with freemaker, basic Struts2 app in Google App Engine

Posted by Lukasz Lenart <lu...@googlemail.com>.
2010/3/11 Oscar Calderon <os...@gmail.com>:
> Sorry, i had a problem so i can't answer. The Struts version is 2.0.11

No problem, but I think you have to upgrade to latest version - 2.1.8.1


Regards
-- 
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with freemaker, basic Struts2 app in Google App Engine

Posted by Oscar Calderon <os...@gmail.com>.
Sorry, i had a problem so i can't answer. The Struts version is 2.0.11

El 3/10/2010 11:58 AM, Lukasz Lenart escribió:
> 2010/3/10 Oscar<os...@gmail.com>:
>    
>> I've changed my appengine-web-app as you said but i still get the same
>> error. You can see it here (in a new application):
>>      
> What version of Struts 2 are you using?
>
>
> Regards
>    

-- 
Oscar Calderon

JAVA Tutorials and How to's? Visit http://www.javahowto.net/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with freemaker, basic Struts2 app in Google App Engine

Posted by Lukasz Lenart <lu...@googlemail.com>.
2010/3/10 Oscar <os...@gmail.com>:
> I've changed my appengine-web-app as you said but i still get the same
> error. You can see it here (in a new application):

What version of Struts 2 are you using?


Regards
-- 
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with freemaker, basic Struts2 app in Google App Engine

Posted by Oscar <os...@gmail.com>.
I've changed my appengine-web-app as you said but i still get the same
error. You can see it here (in a new application):

https://anicetoapp3.appspot.com/

Regards

2010/3/10 Lukasz Lenart <lu...@googlemail.com>

> 2010/3/10 Oscar <os...@gmail.com>:
> > Do you mean in web.xml right? Well, no. This is the web.xml as you can
> see:
>
> No, in appengine-web.xml, as below
>
> <?xml version="1.0" encoding="utf-8"?>
> <appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
>
>    <application>gruuf-done</application>
>    <version>2</version>
>
>    <sessions-enabled>true</sessions-enabled>
>
>    <system-properties>
>        <property name="java.util.logging.config.file"
> value="WEB-INF/classes/logging.properties"/>
>    </system-properties>
>
>     <static-files>
>        <include path="/struts/*" />
>        <include path="/js/*" />
>    </static-files>
>
> </appengine-web-app>
>
>
> Regards
> --
> Łukasz
> http://www.lenart.org.pl/
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Oscar

Re: Problem with freemaker, basic Struts2 app in Google App Engine

Posted by Lukasz Lenart <lu...@googlemail.com>.
2010/3/10 Oscar <os...@gmail.com>:
> Do you mean in web.xml right? Well, no. This is the web.xml as you can see:

No, in appengine-web.xml, as below

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">

    <application>gruuf-done</application>
    <version>2</version>

    <sessions-enabled>true</sessions-enabled>

    <system-properties>
        <property name="java.util.logging.config.file"
value="WEB-INF/classes/logging.properties"/>
    </system-properties>

     <static-files>
        <include path="/struts/*" />
        <include path="/js/*" />
    </static-files>

</appengine-web-app>


Regards
-- 
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with freemaker, basic Struts2 app in Google App Engine

Posted by Oscar <os...@gmail.com>.
Do you mean in web.xml right? Well, no. This is the web.xml as you can see:

    <filter>
        <filter-name>struts2</filter-name>

<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts2</filter-name>
*        <url-pattern>/*</url-pattern>*
    </filter-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
    </web-app>

And thanks for answering.

Regards.

2010/3/10 Lukasz Lenart <lu...@googlemail.com>

> Did you specify /struts/* as a static content?
>
>
> Regards
> --
> Łukasz
> http://www.lenart.org.pl/
> Kapituła Javarsovia 2010
> http://javarsovia.pl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Oscar

Re: Problem with freemaker, basic Struts2 app in Google App Engine

Posted by Lukasz Lenart <lu...@googlemail.com>.
Did you specify /struts/* as a static content?


Regards
-- 
Łukasz
http://www.lenart.org.pl/
Kapituła Javarsovia 2010
http://javarsovia.pl

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org