jsf2.2 + cdi + Target Unreachable [message #1691179] |
Thu, 02 April 2015 20:12 |
José Antonio Delgado Trujillo Messages: 3 Registered: April 2015 |
Junior Member |
|
|
i'm using:
Eclipse Luna + jbossAsTool + wildfly 8.2
i'm trying the example hello1 (in the jee 7 tutorial).
In this example, it's use JSF 2.2 + CDI.
There are two pages:
index - A form to put your name
response - A greeting with your name
There is a manage bean Hello.java which is injected with the annotations:
@Named.
@RequestScoped
So in the xhtml page we can use #{hello.name}.
i haven´t any problems to build, install and deploy the project in the server.
But when i try to run in the server and put my name and clic the button suit i found the error:
/index.xhtml @20,43 value="#{hello.name}": Target Unreachable, identifier 'hello' resolved to null
I did the next:
Create a maven project with wildly-javaee7-webapp-blank-arquetype
Create the manage bean Hello with the annotations (src/main/java)
Create the index and response XHTML page (src/main/webapp)
Under src/main/webapp/WEB-INF there are:
web.xml
beans.xml
I don't know what is the problem. It fails the CDI because it can't find the bin Hello.
I attached the files.
Any suggestion?
-
Attachment: Hello.java
(Size: 0.30KB, Downloaded 153 times) -
Attachment: index.xhtml
(Size: 1.30KB, Downloaded 183 times) -
Attachment: response.xhtml
(Size: 0.66KB, Downloaded 175 times) -
Attachment: web.xml
(Size: 0.98KB, Downloaded 361 times) -
Attachment: beans.xml
(Size: 1.14KB, Downloaded 155 times)
|
|
|
Powered by
FUDForum. Page generated in 0.03781 seconds