File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes integrate sturts application with PHP/Ruby Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "integrate sturts application with PHP/Ruby" Watch "integrate sturts application with PHP/Ruby" New topic
Author

integrate sturts application with PHP/Ruby

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
Hi all,

I wonder if it's possible to integrate a struts application with php/ruby. by that I mean, I would like to have the ability to invoke a php file from a jsp page or activate a php file from an Action.

1. is it possible to do that.
2. if so, where can I read a tutorial/example about that.

thank you!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Sure it's possible. Since PHP and Ruby pages are invoked by URIs, all you'd have to do is create a link or a forward that specifies a Ruby or PHP URI. In the case of a forward, it would be mandatory to specify redirect="true" and specify the full URI including the "http://". Just be aware, though that any information you pass would have to be in the form of parameters. You wouldn't be able to pass information via the request or session objects like you're used to in Struts.


Merrill
Consultant, Sima Solutions
Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
thank you Merrill, is it a good practice to have this integration or is it consider as not recommended. also, do you know any tutorial that does this mix

thanks
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you're creating a web application from scratch, I'd say it's definitely not a good idea to mix technologies like that. It's often necessary, though, to interface with applications that have already been built in another technology. In this case it's sometimes better to make your Struts application interface with the existing application rather than doing a complete rewrite of the other application.

Sorry, I don't know of any tutorials that address this issue.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: integrate sturts application with PHP/Ruby
 
Similar Threads
Can Cucumber be integrated with a Java IDE?
Live Chat support
Ruby? Prospects
Calling PHP from Servlet
A few Ruby questions