Is there a way to specify a dynamic action attribute in the s:form tag in Struts2? I want something like below.
<c:set var="formAction" value="baseAction" /> <c:if test="${someCondition}"> <c:set var="formAction" value="childAction" />Ac <s:form method="post" action="${formAction}"> <s:input....../> <s:select...../> </s:form>
I know this can be achieved using javascript, but I want to avoid refactoring. I tried to achieve this using scripts, but the problem is that Struts2 tags do not accept runtime attributes . I tried even with OGNL, but that didn't help either.
dynamic jsp struts2 action ognl
Kashif nazar
source share