如果用jboss部署seam文件出現:Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.錯誤
每個.xhtml對應一個.page.xml文件,如果某個.page.xml文件出錯就會出現Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.錯誤。
解決方案:
每個.page.xml文件至少包含以下內容
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns="http://jboss.com/products/seam/pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd">
</page>
如果有需要可在<page> …… </page>裏面添加所需代碼