开发者

JSP load external php not using iFrames

I have a bit of an issue with a site I maintain. I have been asked to add a report to a page that sits in a jsp page. The reporting information comes from a MySQL database. The problem is to connect the jsp to the database would require added functions to code that I do not have the original source of. I thought about redoing all the db connection again but thats a lot of time for something that will probably be rewritten in 3 weeks.

Then I thought of just using PHP to display the report in the jsp as I have other p开发者_JS百科ages connecting to the database using php (long story as to why were are using 2 languages). But the only way I know of is by using iFrames which is a bit of a no no. Using the object tag I've seen also has errors in IE.

What would be the best way to do this?


You can use the JSTL

   <c:import url="report.php"/>

to include the results of executing the PHP page.


<script language="php">
include_once ('report.php');
</script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜