Questions tagged [valuestack]

The ValueStack is a context for the beans evaluated via the EL expressions.

The ValueStack is a context for the beans evaluated via the EL expressions. ValueStack allows multiple beans to be pushed in and dynamic EL expressions to be evaluated against it. When evaluating an expression, the stack will be searched down the stack, from the latest objects pushed in to the earliest, looking for a bean with a getter or setter for the given property or a method of the given name (depending on the expression being evaluated).

One of the known implementations of the ValueStack is OGNL (Object Graph Notation Language). OGNL allows for dynamic OGNL expressions to be evaluated against it.

The XWork provides extension to OGNL and support for the ValueStack. While OGNL operates under the assumption there is only one "root", XWork's ValueStack concept requires there be many "roots".

The value value stack internals page: http://struts.apache.org/docs/value-stack-internals

92 questions
2
votes
1 answer

Why can't I change the valueStack of Struts2?

I do some operation of Struts2's value stack in an interceptor,code like this: public String intercept(ActionInvocation actionInvocation) throws Exception { String invokeRes = actionInvocation.invoke(); ValueStack valueStack =…
yonney.yang
  • 135
  • 8
2
votes
1 answer

Is ValueStack container thread-safe?

Action classes are thread-safe since Struts filter creates new action object for each request. All the action objects along with variables will be stored in ValueStack. So, Is the ValueStack container thread-safe? Could we able to take values form…
2
votes
2 answers

Why my custom interceptor is not working?

I have created a custom interceptor MyInterceptor.java in Struts 2, which take the parameters value username and password from index.jsp page and convert the String in these parameters to uppercase. Below is my interceptor code in which I am getting…
2
votes
1 answer

Struts 2 - Accessing different properties on the ValueStack sharing the same name

Struts 2 will resolve all property names during view rendering against the top object in the ValueStack first. But how can one access a property with the same name on the object lower on the stack? Example: Let's say I have an Action class called…
kaqqao
  • 12,984
  • 10
  • 64
  • 118
2
votes
2 answers

How to write expression in

Hello friend I am trying to write Decryption value expression into s:textfield value"<%=custFirstName%>" something like this but it give me an error i.e According to TLD or attribute directive in tag file, attribute value does not accept any…
Harshit
  • 153
  • 1
  • 11
2
votes
2 answers

Struts 2 select tag with values of a array list

I am developing a simple struts application. In my JSP I have a dropdown list box (using s:select tag). I need to fill the values with a arraylist values in the action class. How can I do that? what changes needed in the structs.xml file for…
sareeshmnair
  • 441
  • 1
  • 6
  • 18
2
votes
3 answers

Struts 2 - Understanding the working between OGNL and params interceptor

I am new to Struts 2. I am studying it from the book Struts2 In Action. I am having difficulty in understanding some concepts in OGNL which are as follows- We know that params interceptor moves the data from the request parameters to the action…
Esh
  • 21
  • 2
2
votes
0 answers

Struts2 Interceptor post processing

I written custom interceptor and while post processing I want to add actionError/actionMessage by checking whether exception object exist or not on Value Stack. public String intercept(ActionInvocation invocation) throws Exception { result=…
Tush
  • 181
  • 1
  • 10
2
votes
2 answers

How do I convert a JSP variable to a Struts2 variable?

How do I convert a JSP variable to a Struts2 variable? I've tried the following: <%=scoredDocument%>
Chloe
  • 25,162
  • 40
  • 190
  • 357
2
votes
1 answer

Interceptor can't access Action Parameters

I'm creating an example for struts2 interceptors. I created a simple login page and used a custom interceptor class to encrypt the input. But the interceptor is reading the values of input from ValueStack as null. I don't understand what am I doing…
Keyur Golani
  • 573
  • 8
  • 26
2
votes
1 answer

How to pass object from action class to JSP using Bean in Struts2?

I have to send object of Bean class back to JSP from my action class. I am instantiating the Bean class in my action class and and setting some values in my Action class. ElasticitiesVariable elasticitiesVariable = new…
promil pandey
  • 95
  • 1
  • 4
  • 13
2
votes
1 answer

In Struts2 named variable not getting cleared when redirected to another action

I am having a weird problem when redirecting to an action from another action. In short the named variable captured in the first action (from which I am redirecting) is still preserved somehow in the value stack and it is overwriting the same named…
Chantz
  • 5,883
  • 10
  • 56
  • 79
1
vote
1 answer

Value of Value stack is changed after execute another action in Struts2

I have like following jsp.I send some data via form and execute Action, case.jsp before action:${CasePostFormBean.subject} after…
Heisenberg
  • 4,787
  • 9
  • 47
  • 76
1
vote
1 answer

dandelion runtime expression

I have in a dandalion datatable a column with a s:a tag. In this title attribute i want to call getText with a property of my row variable. How can I do it right?
Falk
  • 13
  • 4
1
vote
1 answer

Struts 2 calling static method when struts.ognl.allowStaticMethodAccess is false

The struts 2 set the struts.ognl.allowStaticMethodAccess to false, for security issues. The static method invocation may be useful in some cases for example when dealing with expression base validators Struts 2 using StringUtils in validator…
Alireza Fattahi
  • 42,517
  • 14
  • 123
  • 173