- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在使用 richfaces 配置 tomcat 时遇到问题。我复制了:
richfaces-components-ui-4.2.2.Final.jar
richfaces-components-api-4.2.2.Final.jar
richfaces-core-api-4.2.2.Final.jar
richfaces-core-impl-4.2.2.Final.jar
将 jar 放入 tomcat 的\lib 并重新启动我的服务器。我的 xhtml 页面的定义如下所示:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
但是 eclipse 会生成一个警告,上面写着
NSL missing: CANNOT_FIND_FACELET_TAGLIB in : org.eclipse.jst.jsf.core.validation.internal.facelet.messages
我还需要配置什么吗?我浏览了很多教程,但几乎都使用 JBoss。有没有办法用我的 eclipse 和 tomcat 配置 richfaces?
已编辑
当我将 jar 添加为外部 jar 并添加依赖项时,它不会使站点崩溃,尽管在控制台中它会产生这样的信息:
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value true
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.RENDER_VIEWSTATE_ID' found, using default value true
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.STRICT_XHTML_LINKS' found, using default value true
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getLongInitParameter
INFO: No context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' found, using default value 2
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.VIEWSTATE_JAVASCRIPT' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getStringInitParameter
INFO: No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS' found, using default value auto
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.VALIDATE_XML' found, using default value false
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig getBooleanInitParameter
INFO: No context init parameter 'org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG' found, using default value true
Jun 10, 2012 2:15:55 PM org.apache.myfaces.shared_impl.config.MyfacesConfig createAndInitializeMyFacesConfig
INFO: Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
Jun 10, 2012 2:15:55 PM org.apache.myfaces.config.FacesConfigurator feedStandardConfig
INFO: Reading standard config META-INF/standard-faces-config.xml
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator getWebAppConfig
INFO: Reading config /WEB-INF/faces-config.xml
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: Starting up MyFaces-package : myfaces-api in version : 2.0.2 from path : file:/D:/Programming/Eclipse%20Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/OnTheRun/WEB-INF/lib/myfaces-api-2.0.2.jar
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: Starting up MyFaces-package : myfaces-impl in version : 2.0.2 from path : file:/D:/Programming/Eclipse%20Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/OnTheRun/WEB-INF/lib/myfaces-impl-2.0.2.jar
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk12 not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk-sandbox not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk-sandbox12 not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tomahawk-sandbox15 not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : myfaces-orchestra-core not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : myfaces-orchestra-core12 not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : trinidad-api not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : trinidad-impl not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : tobago not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : commons-el not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator startLib
INFO: MyFaces-package : jsp-api not found.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.util.ExternalSpecifications isBeanValidationAvailable
INFO: MyFaces Bean Validation support disabled
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.FacesConfigurator handleSerialFactory
INFO: Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
Jun 10, 2012 2:15:56 PM org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory getLifecycleProvider
INFO: Using LifecycleProvider java.lang.String
Jun 10, 2012 2:15:56 PM org.apache.myfaces.webapp.AbstractFacesInitializer initFaces
INFO: ServletContext 'D:\Programming\Eclipse Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\OnTheRun\' initialized.
Jun 10, 2012 2:15:56 PM org.apache.myfaces.webapp.AbstractFacesInitializer initFaces
我猜这是因为缺少一些库
更新
这是我的配置文件:
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
<application>
<resource-bundle>
<base-name>on.run.messages</base-name>
<var>msgs</var>
</resource-bundle>
</application>
<navigation-rule>
<from-view-id>/login.xhtml</from-view-id>
<navigation-case>
<from-outcome>secret</from-outcome>
<to-view-id>/restricted/transactions.xhtml</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
</faces-config>
和
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>OnTheRun</display-name>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
<filter>
<filter-name>AuthFilter</filter-name>
<filter-class>on.run.AuthFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>AuthFilter</filter-name>
<url-pattern>/restricted/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
</web-app>
我也试过 tomahawk lib,但我删除了它并清理了项目。我试过这个例子来测试 richface但没有显示任何内容。
控制台消息仍然有效,即使我没有任何对 tomahawk 的引用,我的构建路径中也没有它,而且项目和服务器是干净的。我还尝试将 myfaces-impl.jar 添加到构建路径中,但没有帮助。出现相同的控制台消息。
最佳答案
But eclipse generates a warning which says
NSL missing: CANNOT_FIND_FACELET_TAGLIB in : org.eclipse.jst.jsf.core.validation.internal.facelet.messages
那是因为您将 RichFaces 库放在了 Tomcat 中,而不是放在 webapp 本身中。这些库应该放在 webapp 自己的 /WEB-INF/lib
中。否则,您需要将 RichFaces 库添加到 Eclipse 项目构建路径设置中的服务器提供的库中。即 Eclipse 不希望您修改 Tomcat 的默认库。
When I add the jars as external jars, and add the dependencies too, it does not crash the site,though in the console it produces a this:
这些只是 INFO 消息,而不是 WARNING 消息。这是 MyFaces 特有的,那些只是为了通知开发人员/服务器管理员 MyFaces 采取了哪些操作来设置一些应用程序范围的参数。别理他们。只有当您收到 WARNING、SEVERE、ERROR 或 FATAL 时,您才可能开始担心。您不一定需要战斧。
关于jsf - richfaces + eclipse ee + tomcat 7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10967190/
我想了解为什么一些 Jakarta EE 规范是空的。 例如 Jakarta Annotations规范由免责声明和快速描述(3 行)组成,但是有 Javadoc . 当 JCP 负责 J2EE 规范
我们将在我们的开发中使用 WebSphere 8.0 应用服务器。 我们的网络应用程序使用 Amazon aws java sdk,而后者又使用 Apache http-client 4.1。 但是
Java EE Web Profile 认证服务器(如 JOnAS)和 Java EE Full Platform 认证服务器(如 JBoss AS)有什么区别? 最佳答案 这是一张很好的图片来解释它
Java EE 5 和 Java EE 6 的主要区别是什么? 最佳答案 Oracle 有一篇由三部分组成的文章详细介绍了这些更改:Introducing the Java EE 6 Platform
自从我将 web.xml 从 Java-EE-5 迁移到 Java-EE-6 后,我的应用程序出现问题。这是我部署应用程序时得到的堆栈跟踪: 24 août 2011 14:10:45 org.apa
我想让我的 Java EE 应用程序可插入。主应用程序将部署在一个ear 中,但它在EJB 中的代码将包含插件的入口点。插件可以部署在它们自己的 jar 文件中。有什么好的框架可以做到这一点吗?我正在
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引起辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the he
我有一个关于 EE 容器如何控制事务的问题。这是为我的问题提供一些上下文的伪代码。这不是我编码的方式,所以请留在问题上,不要将主题演变成其他内容。 考虑以下两个服务和相关 Controller 。这两
如果在应用程序初始化期间发生异常,是否有任何方法可以防止 Java EE 应用程序启动?在从 JSR-77 抛出未处理的异常之后,我基本上是在寻找一种方法来使应用程序进入“j2ee.state.fai
我们正在开发几个独立的应用程序/模块,我们将它们部署到 Glassfish 3.1.1 应用程序服务器上。在某些情况下,这些应用程序需要通过远程接口(interface)调用彼此的方法。打包这些远程接
我对 Java 有所了解,但对 Enterprise Java 完全陌生。我正在尝试使用 NetBeans 6.1 和 GlassFish Application Server。 请指导我一些资源,这
这个问题在这里已经有了答案: Java / Jakarta EE web development, where do I start and what skills do I need? [close
我有现有的Java EE Web应用程序。我还有一个新的Grails 1.3.7应用程序。 要求是将此Grails应用程序嵌入现有Java EE应用程序中,并将其部署在一个war文件中。请让我知道是否
我熟悉 LAMP 堆栈,多年来已经成功部署了一些基于它的网络站点。我使用过从 Apache + modPerl 到 PHP、Ruby 和 Rails 的一切。通过充分利用缓存,我的 Rails 站点可
这个问题已经有答案了: What exactly is Java EE? (6 个回答) 已关闭 8 年前。 我意识到它的字面意思是Java Enterprise Edition。但我要问的是,这到底
我当前在服务器上有一个 Java EE 应用程序。它使用struts2和Hibernate。我需要访问客户端计算机并搜索客户端计算机检测到的所有蓝牙外设的MAC地址。 那么问题是:如何访问客户端计算机
我们在 StatelessSessionBean 中有一个性能不佳的业务方法。为了提高性能,我们希望将此业务方法拆分为多个异步方法调用。 问题是这些异步方法必须在同一个事务中运行(它们必须使用同一个
希望使用 JSTL 和 Apache Torque 以及某种模板引擎来扩展当前的 Java EE 项目,以便我们可以轻松修改 View 。 有什么建议? 最佳答案 我想 Freemarker是领先的
我有一个在 tomcat 上运行的非常大的 Java EE 应用程序。不幸的是,最近我遇到了堆空间和内存泄漏错误。 所以我想知道是否有一个工具可以帮助我监控我的应用程序并给我一个每个对象的可视化展示,
这个问题在这里已经有了答案: What exactly is Java EE? (6 个答案) 关闭 4 年前。 我知道这个问题已经被问了一百万次,我也做了功课,但最后一件事我不完全理解的是,是否有
我是一名优秀的程序员,十分优秀!