Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Playframework 将生成的HTML页面与Play framework应用程序集成_Playframework_Playframework 1.x - Fatal编程技术网

Playframework 将生成的HTML页面与Play framework应用程序集成

Playframework 将生成的HTML页面与Play framework应用程序集成,playframework,playframework-1.x,Playframework,Playframework 1.x,我有一个完整的HTML的web服务生成代码,我想将生成的HTML代码集成到我的Play framework应用程序的视图中。以下是我的控制器中的代码: public static void showReport(String specification) { String[] results= ReportRunner2.generateReport(specification); //call web service String output = HTMLUtil.extra

我有一个完整的HTML的web服务生成代码,我想将生成的HTML代码集成到我的Play framework应用程序的视图中。以下是我的控制器中的代码:

public static void showReport(String specification) {
    String[] results= ReportRunner2.generateReport(specification); //call web service
    String output = HTMLUtil.extractBody(results[0]); //output is the complete HTML code
    render(output);
}
在my showReport.html中:

#{extends 'main.html' /}
${output}

结果是生成的HTML没有正确呈现,因为从模板中添加了冗余的
,我尝试删除main.HTML中的那些标记,但不起作用,有人能帮我吗?

尝试使用
renderHtml(输出)
而不是
render(输出)
。没有模板将被使用,只是你的html