Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

invoke a Java program in Apache HTTP Server

Is there any way to invoke a Java program for a particular URL in Apache HTTP Server? Thanks.

The architecture is like this: Browser > Apache > WebLogic Application Server. My requirement is to invoke a Java code in Apache before request goes to WebLogic Application Server.

like image 307
keeping_it_simple Avatar asked Nov 29 '25 08:11

keeping_it_simple


2 Answers

You probably want to stick with the Java EE Filter solution. But if, for some reason, you can't do that and absolutely must do this at the Apache layer, Apache does offer filters. See here: http://httpd.apache.org/docs/2.2/mod/mod_ext_filter.html

like image 56
Jeff Knecht Avatar answered Nov 30 '25 22:11

Jeff Knecht


If you need to change some values before a Servlet is invoked, your best option is to implement a Java EE Filter, and deploy it at your web app.

There, you can do all the pre-processing you need before invoking your servlet/JSP/WS.

Reference: The Essentials of Filters

like image 41
Tomas Narros Avatar answered Nov 30 '25 22:11

Tomas Narros