Can I have PHP code within a JSP page?

Ivo Limmen

Yes and no. Yes, you can place PHP code inside your JSP's but it will have no effect. The JSP's are compiled using the Jasper servlet and this component has no knowledge of PHP, and hence will do nothing with it. There might be some way to redirect the output of the JSP (the response) to a Apache server with a PHP module but I've never heared of anybody having done this.