2012-07-12 106 views
0

下面包括JSP是我在JSP页面在JSF页面

example.jsp

<html> 
    <body> 
     //report using mysql connection 
    </body> 
</html> 

现在,我想在我的JSF页面的一个此页面。我怎么能这样做?

我试着用下面,但是我得到错误的javax.faces.view.facelets.FaceletException: Error Parsing /detailedReports.jsp: Error Traced[line: 1] The markup in the document preceding the root element must be well-formed.

代码我想是

<h:form> 
    <ui:include src="detailedReports.jsp" /> 
</h:form> 

任何帮助表示赞赏。

+0

如果你有一个答案,应张贴*作为一个答案*不添加到问题的文本。 – 2012-07-13 02:38:38

+0

@GeorgeStocker:曾经有一次我收到版主的反馈,只回答问题,因此我自己提出质疑。现在我添加了答案... – 2012-07-13 13:58:01

+1

我会非常有兴趣知道谁告诉你,因为我们有关于meta的常见问题解答,告诉你如何处理这个问题。 http://meta.stackexchange.com/questions/12513/should-i-not-answer-my-own-questions – 2012-07-13 17:54:12

回答

2

我用同样的omnifaces。

<o:resourceInclude path="detailedReports.jsp" /> 

的伎俩....