File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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="" target="_blank" rel="nofollow"></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
I agree. Here's the link:
subject: How include servlet output in PHP?
It's not a secret anymore!