用于在facelets页面中添加JSP taglib支持的命名空间是什么?

时间:2022-04-10 20:07:18

Something like the following

像下面这样的东西

     xmlns:jsp="http://java.sun.com/JSP/Page"

seems to not work, any hint? alternatively how can I inject beans into JSF lifecycle flow at startup without the filter usage?

似乎不起作用,任何提示?或者如何在启动时将bean注入JSF生命周期流而不使用过滤器?

1 个解决方案

#1


What is the namespace to use for adding JSP taglib support into facelets pages?

用于在facelets页面中添加JSP taglib支持的命名空间是什么?

You cannot. Facelets are not JSPs and do not use JSP tag libraries. From the project page:

你不能。 Facelets不是JSP,也不使用JSP标记库。从项目页面:

The difference is under the hood where all the burden of the JSP Vendor API is removed to more greatly enhance JSF performance and provide easy plug-and-go development.

不同之处在于,JSP Vendor API的所有负担都被删除,从而更大程度地增强了JSF性能并提供了简单的即插即用开发。


how can I inject beans into JSF

我怎样才能将bean注入JSF

Add them to your WEB-INF/faces-config.xml file using managed-bean elements.

使用managed-bean元素将它们添加到WEB-INF / faces-config.xml文件中。

#1


What is the namespace to use for adding JSP taglib support into facelets pages?

用于在facelets页面中添加JSP taglib支持的命名空间是什么?

You cannot. Facelets are not JSPs and do not use JSP tag libraries. From the project page:

你不能。 Facelets不是JSP,也不使用JSP标记库。从项目页面:

The difference is under the hood where all the burden of the JSP Vendor API is removed to more greatly enhance JSF performance and provide easy plug-and-go development.

不同之处在于,JSP Vendor API的所有负担都被删除,从而更大程度地增强了JSF性能并提供了简单的即插即用开发。


how can I inject beans into JSF

我怎样才能将bean注入JSF

Add them to your WEB-INF/faces-config.xml file using managed-bean elements.

使用managed-bean元素将它们添加到WEB-INF / faces-config.xml文件中。