作为 Spring Web Bundle 的 JSF 2.0 应用程序

发布于 2024-09-19 13:23:39 字数 179 浏览 3 评论 0原文

是否可以将 JSF 2.0 应用程序作为 Spring Web Bundle 运行? OSGi 对 JSF 2.0 有支持吗?我没有找到任何适用于 Apache MyFaces 2.0 的 OSGified 捆绑包。

提前感谢

is it possible to run JSF 2.0 Application as Spring Web Bundle? Is there any OSGi support for JSF 2.0? I didn't found any OSGified bundles for Apache MyFaces 2.0.

Thanx in advance

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

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

发布评论

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

评论(2

日记撕了你也走了 2024-09-26 13:23:39

如果您仍然感兴趣。是的,这是可能的。在 Virgo 论坛上,我知道有人已经使用 PrettyFaces lib 运行它,例如

,但是您问“是否有对 JSF 2.0 的 OSGi 支持”...

事实是(如果我理解得很好...我仍在学习OSGi),您应该从另一个角度来看待它,这意味着 JSF 2 堆栈是否足够结构化/干净,以便能够更接近 OSGI 化的禅宗世界。 :)

请保持此线程更新,以防您发现有用的内容。我投入了大量的时间和精力来解决这个混乱的问题,并希望能够与您分享一个不错的答案。

最美好的祝愿,

约亨

In case you're still interested. Yes it is possible. On the Virgo forums I know someone has got it running with the PrettyFaces lib e.g.

But you ask "Is there any OSGi support for JSF 2.0"...

the fact is (if I get it well... I'm still just learning OSGi) that you should look at it from the other point of view, meaning, is the JSF 2 stack structured/clean enough for being able to come nearer to the world of OSGI'ified zen. :)

Please keep this thread updated in case you find something useful. I'm putting a lot of time and effort in figuring this mess out and hope I'll be able to share a decent answer with you.

Best wishes,

Jochen

枉心 2024-09-26 13:23:39

10 个月前的帖子,但如果对某人有帮助,请发布此链接:
'Virgo 3.0.0.RELEASE 上的简单 JSF 2 应用程序' -- http://www.eclipse.org/forums/index.php/mv/msg/203215/724346/#msg_724346

这是在 OSGi 环境中使用 JSF 2 的一个很好的开始(Virgo Tomcat 是具体的)。
从那里到使其与 Spring dm 一起工作是一个很短的跳跃。

  1. 将 SpringBeanFacesELResolver 添加到 faces-config.xml
  2. 添加 WEB-INF/applicationContext.xml,在 web.xml 中定义 bean
  3. 添加: (i) contextClass 参数并将其设置为 org.eclipse.virgo.web.dm。 ServerOsgiBundleXmlWebApplicationContext,(ii) Spring ContextLoaderListener
  4. 创建 META-INF/spring/osgi-context.xml,在其中将 Spring bean 声明/引用为 OSGi 服务:

    ...http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd" xmlns:osgi="http:// /www.springframework.org/schema/osgi">
    
        
    

HTH某人。

10 month old thread, but posting this link if it helps someone:
'simple JSF 2 application on Virgo 3.0.0.RELEASE' -- http://www.eclipse.org/forums/index.php/mv/msg/203215/724346/#msg_724346

It's a great start for using JSF 2 in an OSGi envmt (Virgo Tomcat to be specific).
From there to making it work with Spring dm is a short hop.

  1. add SpringBeanFacesELResolver to your faces-config.xml
  2. add a WEB-INF/applicationContext.xml where you define your beans
  3. in your web.xml add: (i) a contextClass param and set it to org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext, (ii) the Spring ContextLoaderListener
  4. Create a META-INF/spring/osgi-context.xml where you declare/reference your Spring bean as an OSGi service:

    ...http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd" xmlns:osgi="http://www.springframework.org/schema/osgi">
    
        <osgi:reference id="springBeanId" interface="exposed.service.interface"/>
    

HTH someone.

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