jsf - jakarta 9.1 Facelets XHTML 页面命名空间指令
问题描述
我刚刚开始了一个基于 jakarta EE 9.1 和 jsf 的新 EE 项目。Jakarta EE 9 是新的,所以我从 Wildfly 25 开始非常简单。第一个测试结果是:“javax.el.PropertyNotFoundException: /test.xhtml @15,55 value="#{bean.input}": Target Unreachable,标识符'bean'解析为null”同时我将web.xml的命名空间指令更改为:
<web-app id="WebApp_ID" version="5.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://jakarta.ee/xml/ns/jakartaee"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd" >
对于 bean.xml 要:
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
https://jakarta.ee/xml/ns/jakartaee/beans_3_0.xsd"
version="3.0" bean-discovery-mode="all">
对于 faces-config 来:
<faces-config version="3.0"
xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
https://jakarta.ee/xml/ns/jakartaee/web-facesconfig_3_0.xsd">
我想到目前为止这是正确的。但我坚持使用带有声明的 test.xhtml:
<!DOCTYPE html>
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html">
我的简单测试仍然收到相同的错误消息,所以我怀疑,声明也应该是这样的:
<html lang="en"
xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:f="https://jakarta.xxx.xxx/jsf/core"
xmlns:h="https://jakarta.xxx.xxx/jsf/html">
但我找不到正确的声明。你知道吗?
解决方案
推荐阅读
- javascript - 加入地区地图
- laravel-5.2 - Cloudflare 禁用条带 webhook
- java - java中标记接口中的JVM角色
- c# - 使用 WCF 生成 SOAP 请求 (RSA-SHA256 PKCS #1 v1.5)
- python - 第一个带有 Celery 的 Django cron
- arrays - 在 Powershell 中内联创建和拆分数组两次
- r - 删除具有特定值的行的简单方法
- python - 在具有类型的对象中打印特定值
- opengl - 是否必须为几何着色器中发射的每个顶点设置每个变量?
- node.js - 在 cognito nodejs 中更新用户