I'm developing a webapp using Struts2. I used to work with Struts1
is there a way to reference a session object directly to the JSP so that if I change the value in the formular, the value in the referenced session object will also be updated.
You could try having the name be the string
session.order.amount and make your action implement SessionAware, and expose the session. Currently you're setting the name to the value of
I don't know if it would work, and you might need to use array/collection notation, but off the top of my head I don't know why it wouldn't work.
That said, I feel like direct view-layer writes into web app internals is a Bad Idea.