I think so, I have to write a few parsing jsp,asp,php compiler is not realistic, so I do this server when the supervisor hears the Dynamic Web request, the request forwarded to IIS (if the request is ASP), similarly, if the JSP is forwarded to Tomcat, PHP is forwarded to Apache, and then the static content returned to the client browser is returned after receiving the above server parsing. So how does this forwarding function be implemented in Java? If not, do you have any other languages?
Reply content:
Pro, you need a reverse proxy. Java SE does not know, but if it is given to python/nodejs/c++ the principle of implementation is such a few words:
(The following pseudo-code)
Server =Httpservice.Createserver()Server. on ' http request ', (req, res) Req_ext =req.Require_url.Split /\. [Asp|php|jsp|do]/i Switch Req_ext Case ' php ': Res.Send OS.Execute ' php req.require_url ' Case ' ASP ': Res.Pip http.require ' IIS server ... ' Case ' Do ', ' JSP ': Res.Send http.require ' Tomcat server ... ' Default: Res.Send file.Read '' if file.exist