xyzxyz
xyzxyz

Reputation:

Combining servlets and a "normal" webserver

I am about to migrate a web application from PHP to JAVA (GWT) but I would like to do it iteratively, chunk by chunk. Currently I use apache to serve the HTML and PHP files, but in the conversion period I also need Jetty or Tomcat to handle the servlets. And also from port 80 I guess? How can I do such a mix?

Upvotes: 1

Views: 175

Answers (2)

Astra
Astra

Reputation: 11221

Another option is to use mod_proxy, you send the requests destined for your servlet container using mod_proxy. In this case the apache host is acting as a reverse proxy to the servlet container while serving static content and PHP.

(This is basically reverse of what Jason Cohen suggested).

Choose whatever works best for you.

Upvotes: 0

Jason Cohen
Jason Cohen

Reputation: 83021

Start by switching from Apache-only to Tomcat-only.

Tomcat can serve the static files and can run PHP through a separate pipe. This way everything is on a single port and served in the same application space.

Then you can convert the parts, pages, etc. piecemeal into Java.

Upvotes: 1

Related Questions