wood burning stoves*
The moose likes Servlets and the fly likes How include servlet output in PHP? 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 » Java » Servlets
Bookmark "How include servlet output in PHP?" Watch "How include servlet output in PHP?" New topic

How include servlet output in PHP?

Jessica Doe
Ranch Hand

Joined: Dec 11, 2003
Posts: 32

Anyone know how to include servlet output in a PHP file? In a JSP file, I would be doing this:

<jsp:include page="Servlet?f=2" />

Thanks for any comments.


Jessica Doe<br /> <br />C# Online.NET<br /> <a href="http://wiki.csharp-online.net/" target="_blank" rel="nofollow">http://wiki.csharp-online.net/</a>
Al Petersen

Joined: Nov 27, 2004
Posts: 9
Well, this is really a PHP question, not a servlet question, but here goes.

In a JSP, the <jsp:include> standard tag performs a dispatch... but you can only dispatch to a servlet from something else (servlet or JSP) in that web container. A PHP page isn't running inside that web container (unless running under some servlet bridge). You could do something like

in your PHP page to include the output of the servlet execution in your PHP.

- alan
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: How include servlet output in PHP?
Similar Threads
Relative call to a servlet.
when i upload file using html:file repeatedly,the broser will be hanged
Java Servlets
servlets & XML
Calling PHP from Servlet