• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 and PHP Integeration

 
Arun Ak
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 1208
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no understanding why you'd want to do this--it's an unnecessary complication. Why mix two entirely different frameworks?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic