I can't say it's not possible, as you can now run scripts in Java.  You should look at 
apache's Jakarta projects, as I remember one of them giving the ability to run script 
languages from a Java web server.  I'm not sure if you could extend this to run PHP.  
Even if you do, how would PHP access the session information?  You'd probably end up 
creating a servlet wrapper for your PHP so it could supply this info.  

Other than that, though, I'd say typically the answer to your question is no.  PHP is 
configured in Apache.  The way you configure JK is you tell Apache to forward requests 
that match a pattern to Tomcat.  I've never heard of Tomcat being able to handle PHP, 
except possibly through the theoretical method I mentioned in the first paragraph.

I've thought a lot about this problem.  You can have Apache forward only requests that 
match *.jsp or /servlet/*, but then what about images and other things that could 
feasibly be in both Apache and your war?  For the time being, I've resorted to putting 
everything in the war, because I don't want a war to have to depend on external 
images, html, or any other type of file.

There is one work around, though.  You could create separate virtual hosts, and have 
one forward to Tomcat, while another accesses a local repository.  You might use a 
different subdomain.  You can setup each virtual host's JK forwarding differently.  If 
I need infrastructure outside J2EE, such as PHP, this is what I do.  

But, let's say you have php.mydomain.com setup for your php applications, and 
www.mydomain.com setup for Tomcat.  The problem in your case is still session 
management.  Since J2EE handle's user session manangement internally, how can your PHP 
content running through Apache possibly share the same session information?

I do plan to solve this sometime down the road with JoshuaBranch AS (JB-AS), which 
uses tokenized user access.  Eventually, I'll have SSO completely integrated in it, 
which can be shared across any server using JB-AS.  Then, I'll have client interfaces 
for PHP, among other languages.  This will permit J2EE, PHP, Python, Perl, and even 
.NET to share a user's session across all servers in an enterprise.  This is down the 
road, though.  

Today, JB-AS has a client interface for any J2EE container (JBoss, WebSphere, 
etc,...), and can secure both the Web and EJB modules  They can all share the same 
live data, so you can centrally manage your application security for all your J2EE 
applications on all your servers.  However, the current API doesn't offer applications 
the ability to share a user session (SSO), and the API for non-J2EE clients isn't 
available, yet.  Since, the security is centralized and tokenized, though, most of the 
development to enable these features is in the API.    

Let me know how you end up solving your PHP problem.  If I can help answer any 
questions you have, feel free to ask.  


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3830616#3830616

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3830616


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to