Rodrigo_Sasaki 10 de mai. de 2012
Você pode postar seu web.xml ?
raf4ever 10 de mai. de 2012
web.xml:
& lt ; ? xml version = "1.0" encoding = "UTF-8" ? & gt ;
& lt ; web - app xmlns : xsi = "http://www.w3.org/2001/XMLSchema-instance"
xmlns = "http://java.sun.com/xml/ns/javaee" xmlns : web = "http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
xsi : schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id = "WebApp_ID" version = "3.0" & gt ;
& lt ; display - name & gt ; prime & lt ; / display - name & gt ;
& lt ; context - param & gt ;
& lt ; param - name & gt ; com . sun . faces . expressionFactory & lt ; / param - name & gt ;
& lt ; param - value & gt ; org . jboss . el . ExpressionFactoryImpl & lt ; / param - value & gt ;
& lt ; / context - param & gt ;
& lt ; context - param & gt ;
& lt ; param - name & gt ; javax . faces . DEFAULT_SUFFIX & lt ; / param - name & gt ;
& lt ; param - value & gt ; . xhtml & lt ; / param - value & gt ;
& lt ; / context - param & gt ;
& lt ; listener & gt ;
& lt ; listener - class & gt ; org . springframework . web . context . ContextLoaderListener & lt ; / listener - class & gt ;
& lt ; / listener & gt ;
& lt ; welcome - file - list & gt ;
& lt ; welcome - file & gt ; index . html & lt ; / welcome - file & gt ;
& lt ; welcome - file & gt ; index . htm & lt ; / welcome - file & gt ;
& lt ; welcome - file & gt ; index . jsp & lt ; / welcome - file & gt ;
& lt ; welcome - file & gt ; default . html & lt ; / welcome - file & gt ;
& lt ; welcome - file & gt ; default . htm & lt ; / welcome - file & gt ;
& lt ; welcome - file & gt ; default . jsp & lt ; / welcome - file & gt ;
& lt ; / welcome - file - list & gt ;
& lt ; servlet & gt ;
& lt ; servlet - name & gt ; Faces Servlet & lt ; / servlet - name & gt ;
& lt ; servlet - class & gt ; javax . faces . webapp . FacesServlet & lt ; / servlet - class & gt ;
& lt ; load - on - startup & gt ; 0 & lt ; / load - on - startup & gt ;
& lt ; / servlet & gt ;
& lt ; servlet - mapping & gt ;
& lt ; servlet - name & gt ; Faces Servlet & lt ; / servlet - name & gt ;
& lt ; url - pattern & gt ; *. jsf & lt ; / url - pattern & gt ;
& lt ; / servlet - mapping & gt ;
& lt ; / web - app & gt ;
faces-config.xml:
& lt ;? xml version = "1.0" encoding = "UTF-8" ?& gt ;
& lt ; faces-config
xmlns = "http://java.sun.com/xml/ns/javaee"
xmlns : xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi : schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version = "2.0" & gt ;
& lt ; application & gt ;
& lt ; el-resolver & gt ; org . springframework . web . jsf . el . SpringBeanFacesELResolver & lt ;/ el-resolver & gt ;
& lt ;/ application & gt ;
& lt ;/ faces-config & gt ;
applicationContext.xml:
& lt ;? xml version = "1.0" encoding = "UTF-8" ? & gt ;
& lt ; beans xmlns = "http://www.springframework.org/schema/beans"
xmlns : context = "http://www.springframework.org/schema/context"
xmlns : xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns : aop = "http://www.springframework.org/schema/aop"
xmlns : faces = "http://www.springframework.org/schema/faces"
xmlns : int - security = "http://www.springframework.org/schema/integration/security"
xmlns : tx = "http://www.springframework.org/schema/tx" xmlns : sec = "http://www.springframework.org/schema/security"
xsi : schemaLocation = "http://www.springframework.org/schema/integration/security http://www.springframework.org/schema/integration/security/spring-integration-security-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd" & gt ;
& lt ; context : component - scan base - package = "*" /& gt ;
& lt ; / beans & gt ;
Rodrigo_Sasaki 10 de mai. de 2012
passos:
Acho que so ta faltando vc informar onde esta o XML do Spring.
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/applicationContext.xml</param-value>
</context-param>
Encontrei esse post no GUJ simplesmente buscando a sua Exception no Google.
raf4ever 10 de mai. de 2012
Se não colocar esse context-param,o padrão do Spring é buscar em WEB-INF/applicationContext.xml,mas de qualquer forma eu tinha essa configuração e tbm não tava funcionado.
Retirado da doc:
Processes a “contextConfigLocation” context-param and passes its value to the context instance, parsing it into potentially multiple file paths which can be separated by any number of commas and spaces, e.g. “WEB-INF/applicationContext1.xml, WEB-INF/applicationContext2.xml”. Ant-style path patterns are supported as well, e.g. “WEB-INF/Context.xml,WEB-INF/spring .xml” or “WEB-INF/**/*Context.xml”. If not explicitly specified, the context implementation is supposed to use a default location (with XmlWebApplicationContext: “/WEB-INF/applicationContext.xml”).
Rodrigo_Sasaki 10 de mai. de 2012
Será que não faltou adicionar a servlet? Estou só chutando.
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
raf4ever 10 de mai. de 2012
digaoneves:
Será que não faltou adicionar a servlet? Estou só chutando.
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
Essa configuração é pra versão dos servidores abaixo da especificação de Servlets 2.4,não é o meu caso.
Eu tenho essa integração rodando blz no JSF 1.2 com Spring 3.0,ainda n entendi pq n ta rolando,qdo achar o problema volto a postar aqui.