You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by suhas kokal <ko...@yahoo.com> on 2009/04/09 09:08:15 UTC

Freemarker in JSP

Hello experts,

I am new to Struts 2.0
Even though I am using JSP as result pager I am getting Freemarker template error.
I am using the follwing syntax
<s:select name="permissionlevel" list="%{permissionlevel}" theme="simple"/></td>
This will retrieve the Collection<String> from the action using getPermissionlevel() method
It is printing the values from the value stack but it also prints the Freemarker template error
I am forwarding the error page.
Please help me. 

Thanks 

Suhas.


      Cricket on your mind? Visit the ultimate cricket website. Enter http://beta.cricket.yahoo.com

Re: Freemarker in JSP

Posted by Muthu Velappan <mu...@aspiresys.com>.
Struts 2's default markup language is Freemarker and all themes are written
in this language only. Your view is using this tag "<s:select
name="permissionlevel" list="%{permissionlevel}" theme="simple"/>" right, in
that look at the theme="simple" attribute, these are written in freemarker
only. Its shipped as part ur jar. 

Now, coming to ur error. I think ur "permissionlevel" variable in action is
not properly populated and that's the reason why u get this error. Please
check where u populate this variable, if that is in input() or execute()
method change the location to prepare() method as mentioned in this link 
http://struts.apache.org/2.1.6/docs/how-do-we-repopulate-controls-when-validation-fails.html
Select/List control re-population issues  and then re-test code...
-- 
View this message in context: http://www.nabble.com/Freemarker-in-JSP-tp22965569p22969478.html
Sent from the Struts - User mailing list archive at Nabble.com.


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