weld2

Omnifaces exception on deployment on Tomcat 7

社会主义新天地 提交于 2019-12-20 02:52:35
问题 I'm trying to add Omnifaces 2.1 to a web application to use FullAjaxExceptionHandler and possibly other functionality in Omnifaces 2.1. I've read and followed following post by BallusC and am still stuck: How to install and use CDI on Tomcat? Tried to install Weld 2.2.9.Final and configure as described above. I am using the following: JSF 2.2, EL 2.2, Servlet 3, Java 7 web.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http:/

Seed value in Weld CDI custom scope

给你一囗甜甜゛ 提交于 2019-12-10 12:57:01
问题 Coming from a Guice background, I know that it is possible to seed an object value from a scope using. scope.seed(Key.get(SomeObject.class), someObject); I suppose one could do this by registering a Bean that gets a value from an AbstractBoundContext , but examples just seeding one value from a Custom Scope seem hard to find. How do I create a custom scope that seeds a value that can be injected elsewhere? Edit: I am currently using the following workaround, that can be injected in an