0

I have a method residing at backend of GWT framework , I usually call this method via RPC.

I am in a situation where the application redirects to a separate JSP page , Now from this jsp page i like to call the same method which resides at the backend.

Is there a possibility i can call that method from my jsp page via RPC or some other means .

junaidp
  • 10,801
  • 29
  • 89
  • 137
  • Possible duplicate of [Using GWT backend but not frontend](http://stackoverflow.com/questions/14919229/using-gwt-backend-but-not-frontend) – walen Feb 15 '17 at 08:22

1 Answers1

0

There are 2 approaches I'd suggest:

  • Load the app's JS file (in your JSP), and have a JS function "exported" from it, which knows how to make RPC calls. This function would thus work as a passthrough JSP->GWT->Backend
  • Expose your GWT backend through an easier protocol, one that can be used easily from JSP (such as a REST API, or even a simple ajax call), and avoid RPC alltogether.

Other than this, please be aware that you can't easily decode and/or compose a RPC message, so I don't think you can do it yourself.

Andrei
  • 1,613
  • 3
  • 16
  • 36