From what I've heard, A controller command can be invoked from within a scriptlet. But I am not sure of other methods. Any code level information would be very helpful.
-
What is the use case under which you would want to do this, yes you can, but you shouldn't. If this is your plan, you are misusing the framework. – Michael Rasmussen Apr 30 '13 at 19:31
-
Thanks for the suggestion. This is just for knowledge sake as this was asked once when we had a discussion on WCS. – sreejith Jul 05 '13 at 09:09
4 Answers
You really shouldn't be directly executing a controller command from within the scriptlet code of a JSP. You could use AJAX to call a command service. Or you could use a DataBean Command, though they are really meant to be commands that populate the databean not really call controller commands. You may also be in a situation that you need to review your use of a controller command, possibly BOD commands would be a better fit if you are wanting to invoke a service from the JSP during the page generation.

- 21
- 2
You could create your own mapping of your ControllerCommand to REST.
Then you use the REST tag to run the ControllerCommand.
In the new implementation from IBM in FEP8 this will be done locally if possible and will therefor not add any extra network overhead.

- 602
- 7
- 17
By Using Databean also we can invoke controller commands.
ex : <wcbase:usebean>

- 122,561
- 47
- 239
- 335

- 1