File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache: Java, PHP

 
Pinki Roy
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How does Apache recognize whether the request is coming from Java or php application?
 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pinki Roy wrote:How does Apache recognize whether the request is coming from Java or php application?

Wait, request comes from client/browser and for the Java or Php processes... correct me if I am wrong.
And is it Apache(WebServer) or Apache Tomcat you are talking about?
 
Pinki Roy
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its Apache Web Server.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11833
181
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Apache HTTP Server does not know anything about Java. However what it can do is specify that certain resources should be handled by some other process, such as a Java Web Application Server (e.g. Tomcat). As an example, you can say that anything that starts with /myApplication/... should be served by Tomcat. Everything else will be handled by the Apache HTTP Server.

For the files that are processed by the Apache HTTP Server, you normally specify that PHP files will be identified by having a ".php" extension (there are ways around that), so that the Apache HTTP Server knows to run it through the PHP processor.

There are more nuances to configuration, but that gives a high-level overview.
 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apache web server itself doesn't serve to process java. Rather it delegates java processing to other servers like Tomcat. As Andrew said it does so based on the incoming requests, anything with /so-and-so should go to so and so process etc. So if the request has a .php extension in the end it has something to with PHP likewise. You manually configure these things in one of the Apache's configuration file. (I'm not sure if it is httpd.conf)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic