在 Netbeans 中切换到 Maven
我目前正在尝试将 Netbeans 7.0.1 中的现有 Web 项目迁移到 Netbeans 中的 Maven 项目。该项目使用 JSF2 并在 Glassfish 3.1 上运行。
我在 Netbeans 中创建了一个新的 Maven 项目,并原封不动地复制了所有文件。然后,我按照建议此处为 Mojarra 添加了一个 maven 依赖项:
<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
该项目编译正常,但是当我运行它,由于 NullPointerException
出现错误 500。 Glassfish 的日志是这样写的:
INFO: JSF1027: [null] The ELResolvers for JSF were not registered with
the JSP container.
我可以做什么来修复这个错误?
I am currently trying to migrate an existing web-project in Netbeans 7.0.1 to a Maven-project in Netbeans. The project uses JSF2 and runs on Glassfish 3.1.
I have created a new Maven-project in Netbeans and copied all the files over unmodified. I have then added a maven-dependency for Mojarra as recommended here:
<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
The project compiles fine, but when I run it, I get an error 500 due to a NullPointerException
. The log of Glassfish says this:
INFO: JSF1027: [null] The ELResolvers for JSF were not registered with
the JSP container.
What can I do to fix this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论