67. What is the difference between perform() and execute()

  • Perform method is the method which was deprecated in the Struts Version 1.1. 
  • In Struts 1.x, Action.perform() is the method called by the ActionServlet. This is typically where your business logic resides, or at least the flow control to your JavaBeans and EJBs that handle your business logic.
  • As we already mentioned, to support declarative exception handling, the method signature changed in perform.
  • Now execute just throws Exception. Action.perform() is now deprecated;
  • however, the Struts v1.1 ActionServlet is smart enough to know whether or not it should call perform or execute in the Action, depending on which one is available.
Advertisements

10 Responses

  1. what is the difference between struts1.1 and struts 1.2.9?

  2. how to cast uti.date to sql.date?

  3. what is the difference between struts1.2 and struts 1.3?

  4. what is the difference between struts1.1 and struts 1.2

  5. In which condition we will use more than on struts-config.xml
    and differ between struts 1.0 and 1.1and .2

  6. can u solve the problem

    class A
    {
    ……
    int i=10;
    ……
    }
    class B extends A
    {
    ……
    int i=20;
    public void m1()
    {
    i=30;
    System.out.println(” Value of Super class var i:::” +______);
    System.out.println(” Value of Sub class var i:::” +___________);
    System.out.println(” Value of Sub class var i after re-initialization ::::” ________);
    }

    how can i print all these three values?

    • third blank u will place directly super.i.
      second blank u will place this.i.
      first blank u will place i.

  7. what is the difference between struts 1.2 & struts 1.3

  8. very interesting, but I don’t agree with you
    Idetrorce

  9. class A
    {
    ……
    int i=10;
    ……
    }
    class B extends A
    {
    ……
    int i=20;
    public void m1()
    {
    i=30;
    System.out.println(” Value of Super class var i:::” +super.i);
    System.out.println(” Value of Sub class var i:::” +new B().i);
    System.out.println(” Value of Sub class var i after re-initialization ::::” +i);
    }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: