Re: Question about OGNL in JSP

2009-11-09 Thread Oscar Calderón
Ohh ok, thanks. I googled about that and i found that i can add a variable or Object to page context with this: pageContext.setAttribute("obj", obj); Thanks. 2009/11/9 Musachy Barroso > That's because creating an object in a scriptlet doesn't mean it will > be in the page context, you need to

Re: Question about OGNL in JSP

2009-11-09 Thread Musachy Barroso
That's because creating an object in a scriptlet doesn't mean it will be in the page context, you need to actually add it to the context. musachy On Mon, Nov 9, 2009 at 1:47 PM, Oscar Calderón wrote: > Hi to all, this is my first question here. I have a doubt about the use of > OGNL expressions

Question about OGNL in JSP

2009-11-09 Thread Oscar Calderón
Hi to all, this is my first question here. I have a doubt about the use of OGNL expressions on JSP to access to an object that i declared in a scriptlet in the same JSP. I have the following code: <% AnObject obj = request.getSession().getAttribute(AnObject.OBJECT_NAME); %>

Re: OGNL in JSP

2007-09-29 Thread Zarar Siddiqi
If the variable you're looking for is stored in the context you will be able to retrieve it like this in a JSP: ${stack.context['com.opensymphony.xwork2.ActionContext.name']} If you're using Freemarker then you can simply go: stack.findString("com.opensymphony.xwork2.ActionContext.name") But yo

Re: OGNL in JSP

2007-09-28 Thread stanlick
Yes, but how does solve this problem? On 9/28/07, Zarar Siddiqi <[EMAIL PROTECTED]> wrote: > > Did you know you have all the variables declared in this class as > public static final at your disposal: > > > http://svn.apache.org/viewvc/struts/struts2/tags/STRUTS_2_0_9/core/src/main/java/org/apache

Re: OGNL in JSP

2007-09-28 Thread Zarar Siddiqi
Did you know you have all the variables declared in this class as public static final at your disposal: http://svn.apache.org/viewvc/struts/struts2/tags/STRUTS_2_0_9/core/src/main/java/org/apache/struts2/views/util/ContextUtil.java?revision=558805&view=markup They include "stack"and "ognl". Zara

OGNL in JSP

2007-09-28 Thread stanlick
Hell, I give up! Can someone show me how to fetch the action context name off the value stack from inside a jsp? This works fine from an action but doesn't quite follow the java beans convention! invocation.getStack().findString("com.opensymphony.xwork2.ActionContext.name ") -- Scott [EMAIL PR