Wednesday 13 June 2012

Remember:strut 2.0



->You can change the default action and URL mapping using the Action annotation

-->One action consisting of one or more methods can process single request but to execute multiple actions  on a single request,we use INTERCEPTOR






-->. Action can also get associate with a JavaBean in our Struts configuration file. Java bean is nothing but a class having getter and setter methods that can be used to communicate between the view and the controller layer. These java beans are validated by invoking the validate() method on the ActionForm by the help of the Struts system. The client sends the request by the normal form submission by using Get or Post method, and the Struts system updates that data in the Bean before calling the controller components.


-->anything that touches the database is Model


-->result can be of different types such as dispatcher ->that forward control to jsp and simarly some more result types are required to perform diff task such as send an error message,generate a pdf,redirecting to external resource etc

-->we set the constant struts.devMode to true, because we are working in development environment and we need to see some useful log messages. 

> if we write "return javascript:functionname()" on some event  in strut 2.0 tag then it will not work.....no need to write javascript here
-> In <s:a href="javascript:void(0)" must explicitly to tell that no action is invoked here.......
-><s:a href="register.action" must there to explicitly tell  that it is action name





              

No comments:

Post a Comment