Would it be possible to trigger a Java action from a JSP?

Question

In some cases it is needed to call an action to get content from a third party resource (like another database, another web service, etc). 

Answer

There are multiple possibilities to call an action. 

  1. You can define a static Java Bean, which is called when the JSP is called, and inside the Java you can do (call) any action that is needed (also recommended to use a OSGI Bean). 
  2. You can use JavaScript to call an action (like with jQuery, the result could be a JSON, which can be used in the JSP).