MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology


Class ActionForward in struts
Previous Home Next

An ActionForward represents a destination to which the controller, RequestProcessor, might be directed to perform a RequestDispatcher.forward or HttpServletResponse.sendRedirect to, as a result of processing activities of an Action class. ActionForward is class of org.apache.struts.action package and it has following minimal set of properties like:

  • name - The logical parameter which instance is mapping into ActionMapping in struts-config.xml.
  • path - The URI to which control should be forwarded/ redirected to a give destination.
  • contextRelative - Should the path value be interpreted as context-relative (instead of module-relative, if it starts with a '/' character)
  • redirect - Set true if the controller servlet should call HttpServletResponse.sendRedirect() on the associated path; otherwise false.

Three main subclass of ActionForward in org.apache.struts.action package-

  • ActionRedirect- Designed for redirecting all requests, with support adding parameters at runtime
  • RedirectingActionForward- Designed for redirecting the default attribute to false.
  • ForwardingActionForward- Designed for redirecting defaults attribute to true.

PlugIn Classes in struts


The PlugIn interface extends Action and so that applications can easily hook into the ActionServlet lifecycle. This interface defines two methods-

  • init() - method is called when application is startup.
  • destroy()- method is called when application is shutdown.

A common use of a Plugin Action is to configure or load application-specific data as the web application is starting up.At runtime, any resource setup by init would be accessed by Actions or business tier classes. The PlugIn interface allows you to setup resources, but does not provide any special way to access them. Most often, the resource would be stored in application context, under a known key, where other components can find it.

Previous Home Next