Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

execute method in struts

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In Action class, we will be overriding the execute method generally. My doubt is, can we have some other method instead of execute(), like some xyz() and is it possible to call this xyz() method instead of execute(). Is there any place where it is mentioned/mapped like we need to call execute in the Action class? Kindly clear my doubt.
 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Please specify in the heading of your post whether your question is about Struts 1 or Struts 2

!
 
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the section "Action Methods" at http://struts.apache.org/2.0.14/docs/action-configuration.html
 
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are extending Actionsupport then you need to override that method...this is for struts-2
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Pradeep Adibatla wrote:If you are extending Actionsupport then you need to override that method...this is for struts-2


That's not necessarily true at all; action mappings can specify the method to execute, and if dynamic method invocation is allowed you don't even need to map it explicitly.
 
Shruthi Sam
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Shruthi Sam wrote:Hi,
In Action class, we will be overriding the execute method generally. My doubt is, can we have some other method instead of execute(), like some xyz() and is it possible to call this xyz() method instead of execute(). Is there any place where it is mentioned/mapped like we need to call execute in the Action class? Kindly clear my doubt.





[Pragati]Hi

In Action class, we will be overriding the execute method generally. My doubt is, can we have some other method instead of execute(), like some xyz() and is it possible to call this xyz() method instead of execute().mention method="xyz"in struts.xml file.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't that what I said?
 
reply
    Bookmark Topic Watch Topic
  • New Topic