This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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
Have you checked out Aspose?
subject: How include servlet output in PHP?
It's not a secret anymore!