facebook

jsf spring integration deployed – run – but no output why?

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #254300 Reply

    amir55
    Participant

    hi all :
    here is the sipleset code to link jsf with spring but why no putput produced.

    it is deplyed and run with no error but no o/p. he files are:

    1 –
    package test;

    public class JsfBean {
    private SpringBean _springBean;

    public JsfBean() {
    super();
    }

    public SpringBean getSpringBean() {
    return _springBean;
    }

    public void setSpringBean(SpringBean paramSpringBean) {
    _springBean = paramSpringBean;
    }
    }

    2 –
    package test;
    public class SpringBean {
    String _text ;

    public SpringBean() {
    super();
    }

    public String getText() {
    return _text;
    }

    public void setText(String paramText) {
    _text = paramText;
    }
    }
    3 – faces-config.xml
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE faces-config PUBLIC “-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN” “http://java.sun.com/dtd/web-facesconfig_1_1.dtd”&gt;

    <faces-config >
    <application>
    <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
    <locale-config>
    <default-locale>en</default-locale>
    <supported-locale>en</supported-locale>
    <supported-locale>es</supported-locale>
    </locale-config>
    </application>

    <managed-bean>
    <description>JSF managed bean referencing a spring bean</description>
    <managed-bean-name>jsfBean</managed-bean-name>
    <managed-bean-class>test.JsfBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>

    <navigation-rule>
    <from-view-id>/showText.jsp</from-view-id>
    </navigation-rule>

    </faces-config>

    4 – applicationContext.xml
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE beans PUBLIC “-//SPRING//DTD BEAN//EN” “http://www.springframework.org/dtd/spring-beans.dtd”&gt;

    <beans>
    <bean id=”springBean” class=”test.SpringBean”>
    <property name=”text”><value>some example text</value></property>
    </bean>
    </beans>

    5 – web.xml

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <web-app xmlns=”http://java.sun.com/xml/ns/j2ee&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; version=”2.4″ xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”&gt;
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>

    <listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>

    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    </web-app>

    #254315

    Riyad Kalla
    Member

    I’ve asked our JSF guy to take a look when he gets a chance.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: jsf spring integration deployed – run – but no output why?

You must be logged in to post in the forum log in