*
The moose likes Struts and the fly likes Struts 2 and PHP Integeration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 and PHP Integeration" Watch "Struts 2 and PHP Integeration" New topic
Author

Struts 2 and PHP Integeration

Arun Ak
Greenhorn

Joined: Jun 21, 2009
Posts: 21
Hello,

My web application currently using struts 2 frame work, it has got its sessions and works fine, I want use PHP as an interfcae to struts2, user provide all input in php form and my struts frame work executes with php inputs, and finaly php will read struts framework output and present data to user.

I have installed xampp intergated with tomcat and java bridge.

Can any one know how use php pages as an interfcae to struts actions

Thanks & Regards,
Arun
srinivas srinivasmeenavalli
Ranch Hand

Joined: Jul 13, 2008
Posts: 65
I have no idea why you want to integrate Struts with PHP.
As i know PHP is a script language with can be used to build web sites.Do you want to migrate structs based web application in to PHP based web site.Refer http://www.phpwact.org/java/struts
Arun Ak
Greenhorn

Joined: Jun 21, 2009
Posts: 21
Hi srinivas,

No I dont want to imgrate, I want to use php as an interface for user, php form accept user inputs and struts framework process it.

Regards,
Arun
srinivas srinivasmeenavalli
Ranch Hand

Joined: Jul 13, 2008
Posts: 65
I have never experienced this kind of approach. I would say you might need to have a bridge between PHP and Java .
Following URL has more details
PHP/Java Bridge
Karthik Shiraly
Ranch Hand

Joined: Apr 04, 2009
Posts: 489
    
    5
Arun Ak wrote:Hi srinivas,

No I dont want to imgrate, I want to use php as an interface for user, php form accept user inputs and struts framework process it.

Regards,
Arun



Hi,

1. PHP (on Apache) gets the form input as HTTP POST and submits it to "process.do" (on Tomcat) as another HTTP POST.
2. "process.do" action processes and sends back HTTP response, which is received by PHP.
3. PHP sends back that response to browser.

Seems simple enough...or have I misunderstood the question?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I have no understanding why you'd want to do this--it's an unnecessary complication. Why mix two entirely different frameworks?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 and PHP Integeration
 
Similar Threads
When to use Interfcae and abstract class
Have an interfcae question
EAD4J from IBM
how to make php script to run in eclipse(helios)
Swing interfcae distorted look?