Facelets 和 JSP 在同一个项目中?

发布于 2024-08-04 17:24:13 字数 221 浏览 7 评论 0原文

是否可以在同一个项目中使用 Facelets 页面和 .jsp 样式的 ICEfaces 页面?在查看 ICEFaces Facelets 教程时,迁移似乎是一个全-或无开关。是否可以同时支持两者(用于缓慢迁移)?

Is it possible to use Facelets pages and .jsp style ICEfaces pages in the same project? In looking at the ICEFaces Facelets tutorial, the migration appears to be an all-or-nothing switch. Is it possible to support both (for a slow migration)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

靖瑶 2024-08-11 17:24:13

我从未尝试过,但认为您可以编写高优先级过滤器来在 JSP 或 ICEF 之间分派请求。并放置到web.xml中以拦截所有

<filter-mapping>
    <filter-name>MyDispatcher</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

I've never try, but thinking you can write high priority filter to dispatch request between JSP or ICEF. And place to web.xml to intercept all

<filter-mapping>
    <filter-name>MyDispatcher</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
听风吹 2024-08-11 17:24:13

您可以一起使用 Facelet 和 IceFaces。 Facelet 是 JSF 应用程序的视图处理程序。如果你想在你的应用程序中使用facelet,你必须将其设置为faces-config.xml中的视图处理程序,如下所示

<application>
<view-handler>
    com.sun.facelets.FaceletViewHandler (com.icesoft.faces.facelets.D2DFaceletViewHandler for icefaces facelet)
</view-handler>
</application>

我认为Iceface将拥有默认的过滤器和调度程序。

You can use Facelet and IceFaces together. Facelet is view handler for JSF applications. If you want to use the facelet in your application you have to set it as the viewhandler in faces-config.xml as follows

<application>
<view-handler>
    com.sun.facelets.FaceletViewHandler (com.icesoft.faces.facelets.D2DFaceletViewHandler for icefaces facelet)
</view-handler>
</application>

I think Iceface will be having their default filters and dispatchers .

绅刃 2024-08-11 17:24:13

我个人发现从 JSP 到 Facelets 的迁移非常简单。我能够在一天之内迁移一个大小合适的应用程序。我认为任何拼凑在一起的解决方案所增加的复杂性都会给您带来更多的麻烦,而不是硬着头皮快速移植。调试功能、改进的错误消息和提高的速度都是很好的优点。

如果我没记错的话,我在 JSF 2.0 上看到的最后一次演讲表明未来将需要 Facelets。

I personally found the migration from JSP to facelets pretty simple. I was able to migrate a decent sized app within the span of a day. I would think the added complexity from any hacked together solution will cause you more headaches than just biting the bullet and porting quickly. The debugging features, improved error messages and gained speed are nice pluses.

If I recall correctly, the last talk I saw on JSF 2.0 suggested that Facelets was going to be required going forward.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文