Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How include servlet output in PHP?

 
Jessica Doe
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

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.

Jess
 
Al Petersen
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic