http://qs1969.pair.com?node_id=303108


in reply to OT: Calling a Servlet from mod-Perl/Apache

I'm not sure I get the problem. One interpretation is you have something (a static page, CGI / hander generated output) that contains a link to a URL which is in turn handled by a Java servlet ... somewhere else. In which case, a link to the URL handled by that servlet should be sufficient. Another interpretation is that you have the code for a Java servlet that you'd like to be able to execute when someone accesses a specific URL on your site.

Apache httpd can't do this on its own. Java servlets must run inside a servlet container, such as Tomcat. Now, what you can do is set up a servlet container, and set Apache httpd to run "in front of" the servlet container, and to set up Apache to pass requests for certain URLs onto the servlet container. How to do that with Tomcat is documented on the Tomcat site (op cit.); other servlet containers do it in different ways. But a discussion of setting up Tomcat and Apache really is a topic for another site.

HTH.

If not P, what? Q maybe?
"Sidney Morgenbesser"