AnsweredAssumed Answered


Question asked by raghav on Feb 22, 2018
Latest reply on Feb 24, 2018 by afaust

I can successfully write a (e.g. MyWebScript1), which extends from AbstractWebScript.

However, my goal is to define another webscript (e.g. MyWebScript2), which will extend from MyWebScript1 (and MyWebScript1 will extend from AbstractWebScript).

The goal is to define MyWebScript1 as a base web script with some boiler plate/common code inside execute, which MyWebScript2, MyWebScript3 etc. can inherit (by calling super, without having to duplicate them in MyWebScript2, MyWebScript3).
MyWebScript1 will just serve as a superclass.
This is what I am not able to accomplish.

My questions:
1. Do I still need to define a XML for the common/base MyWebScript1? However, MyWebScript1 is not associated with any get, post etc.
2. Do I still need to define MyWebScript1 inside webscripts-context.xml?

I am only seen the examples where a given WebScript extends from AbstractWebScript, but seen a hirerachy like the way I am trying to accomplish.