How to call an external class from a webapp (i.e. – implement a plugin)

Goren Il wrote: Basically, I believe that this is what Chuck meant. The “plugin” would be another separate webapp, and your webapp would make a HTTP request to it.

In Apache httpd, there is a concept of an “internal sub-request”. This allows one “context” (the concept is a bit different there), to momentarily suspend its own execution while it is itself making an internal request to the server for another URL/resource, then collecting the result of this “sub-request”, and continue its own execution. Because this sub-request is purely internal to the webserver, it avoids a lot of the overhead that would result from a separate full HTTP request for instance (such as having to create its own HTTP loopback connection etc..).

It would be interesting to learn from the experts here, if there would exist an efficient and servlet-spec compatible way to implement such a mechanism in Tomcat.

Leave a comment

0 Comments.

Leave a Reply