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
17
votes
5 answers

struts2 - understanding the value stack

I have a question regarding the struts2 value stack. Let's say I have an Action class called RegisterAction that has an execute method as follows: public String execute() { ValueStack stack = ActionContext.getContext().getValueStack(); …
dcp
  • 54,410
  • 22
  • 144
  • 164
7
votes
4 answers

How to access ValueStack objects within Struts iterator?

I have following code: " />
Monika Michael
  • 1,274
  • 5
  • 13
  • 24
5
votes
3 answers

How to use multiple forms / actions in a single view in Struts 2

I have a search box which is displayed on every page. The JSP code for the search box is inserted into every page via tiles. The search box has a form and an action class SearchAction which needs to preload some properties for drop down boxes. The…
nharrer
  • 618
  • 7
  • 21
4
votes
2 answers

Using Java8 time in JSPs

For my open source project I'm in the process of switching date fields from java.util.Date to Java 8's java.time.LocalDateTime. In the JSP's I'm using Struts tags to format the java.util.Date from the passed-in bean, however, those won't work with…
Glen Mazza
  • 748
  • 1
  • 6
  • 27
4
votes
2 answers

Comparing the values of two dictionaries to receive their numerical difference Python

I am new to Python. I have two dictionaries which share the same keys but different values for the keys. I would like to compare the two dictionaries so that I would get the numerical difference of the values for each key. For example: dict1 =…
HR123r
  • 181
  • 2
  • 10
4
votes
1 answer

Struts2 Session Storage Location and Management

I was reading Struts2 In Action, and it says for each request an ActionContext, a ValueStack and an Action instance are created, so they are thread safe. I was wondering how does the framework manages session, because it can't be stored in these…
Udit Mishra
  • 150
  • 11
3
votes
2 answers

How data travels in Struts2?

I am trying to understand the path data takes within Struts2, how is data placed on the ValueStack? How can I find out which object is currently present in the ValueStack? What other data can I access from different scopes application, session,…
anon
  • 1,101
  • 3
  • 17
  • 33
3
votes
1 answer

Calling function of Action class in Jsp Struts2

I have a little scenario. I have two POJO classes and two tables User and Domain(same name for tables). Every user will belong to one and only one domain. I have two Action classes one is UsersManagemntAction and other is DomainsManagementAaction.…
Waqas Ali
  • 1,642
  • 4
  • 32
  • 55
3
votes
1 answer

Struts 2 WARNING: The default value expression contains "+" evaluated to 'nullnull'

I have a problem in my Struts 2 app. I read the content of an iterator of an array. The array elements are written out by an iterator: The tag finds the correct element and evaluates it, but the resulting expression…
mlorika
  • 125
  • 2
  • 7
3
votes
1 answer

Same ValueStack for 2 different struts apps

Im running my sruts 2 (2.1.8.1) applications in a jboss AS (5.1.0-GA). Im placing a.war and b.war in the same /server/default/deploy path and im placing the struts 2 libs in the /server/default/lib path. There is no error message in the app or the…
Ferdinand
  • 33
  • 4
2
votes
2 answers

Struts2 returns empty JSON in my AJAX call

I am struggling to get the JSON response from my Struts2 Action class, I think i am missing something. The following set up I have in my Project. in my module level action definition , The configuration looks like :
2
votes
3 answers

How can I exchange all the NAs in the columns for their medians?

I would like to exchange all NA values in the columns for the respective medians id <- c(1,2,3,4,5,6,7,8,9,10) varA <- c(15,10,8,19,7,5,NA,11,12,NA) varB <- c(NA,1,2,3,4,3,3,2,1,NA) df <- data.frame(id, varA,varB) median(df$varA,…
2
votes
1 answer

Passing an iterable object into a nested JSP

This is what I have in my action class code: private List listPerson; public void setListPerson(List listPerson) { this.listPerson = listPerson; } public List getListPerson() { return listPerson; } public…
ron
  • 239
  • 3
  • 18
2
votes
2 answers

How to redirect request after logoff in Struts2

The project has a servlet which is called when a person logs out. public class LogonServlet extends HttpServlet { private static final long serialVersionUID = -4899047924930198118L; public void doPost(HttpServletRequest request,…
Prashant
  • 152
  • 1
  • 16
2
votes
2 answers

What objects are stored in ValueStack

This is my code below, when I execute it shows me the size 3, but when I pop the object out I am getting only 2 objects. import java.util.*; import com.opensymphony.xwork2.util.ValueStack; import com.opensymphony.xwork2.ActionContext; import…
Sachin Singh
  • 49
  • 1
  • 6
1
2 3 4 5 6 7