简体   繁体   中英

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.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM