1

I am porting my J2EE project from Eclipse Helios to Eclipse Kepler. My project validates and works correctly on Helios, but, when moving it and all of its dependencies to Kepler I get this "Premature end of file" during the validation. The file that causes the error is a simple JSPF file that is included in other JSP files.

This is the file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Can anyone help me please?

Thank you very much!

4

1 回答 1

1

我找到了解决办法:首先,很明显文件本身没有任何问题,所以解决办法是在Eclipse中对jspf文件禁用xhtml验证:

  • 从窗口菜单中打开首选项
  • 选择“验证”
  • 搜索 XHTML Syntax Validator 并单击设置按钮
  • 添加“排除组”
  • 将文件扩展名“jspf”添加到此排除组

显然,只有当问题与验证有关时,这才是解决方案,如果文件本身有问题或格式不正确,这不是解决方案。

于 2014-06-05T12:54:33.570 回答