This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Struts and the fly likes <s:submit> problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<s:submit> problem" Watch "<s:submit> problem" New topic

<s:submit> problem

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Struts: 2.0.16


I'm wrestling with the <s:submit> tag. Its src attribute does not take expressions and I need to put to context root into it (We have our jsps inside WEB-INF and our images outside of it -- don't ask me why). I try:

which doesn't work as well as:

which doesn't work either.

Has anybody run into this problem?
David Newton

Joined: Sep 29, 2008
Posts: 12617

Try using OGNL and escaping the "src" attribute value in the OGNL escape sequence %{}.
It is sorta covered in the JavaRanch Style Guide.
subject: <s:submit> problem