Ashes Ashes - 1 month ago 5
Java Question

Difference between various Actions in programming

i have been studying about Struts2 and come across a question in my mind that what is the major difference between using various form actions

like we have action in our scripting language

we have action in

also in
we have action attribute in form and in submit also
so what is the basic purpose and the best used place for them .hope an example would clear all the difference.

<s:form name="xyz" action="xyz" method="post">


<s:submit action="xyz" />



although i know the advantage of using javascripts and jquery but wanted to know this so that net time i'll chose according to my need.


The main and major difference between then is that the Struts tags are JSP tags and run on server side, while HTML and javascript run on client side (in the browser). First action is an attribute of the Struts tag that accepts OGNL expressions to parse for URL. The second is just a static text referencing a JSP in the current context.