0

We are using JSF-2.0.3, Primefaces 5.0 . Page re-directing is not working in WAS 7.0 and working fine in Tomcat 6.0 . not working, what i mean is, page is redirected and Data is not rendered.

can anyone Help.

faces-config.xml:

<navigation-rule>
        <display-name>login.xhtml</display-name>
        <from-view-id>/login.xhtml</from-view-id>
        <navigation-case>
            <display-name>main.xhtml</display-name>
            <to-view-id>/main.xhtml</to-view-id>
            <redirect />
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <display-name>main.xhtml</display-name>
        <from-view-id>/main.xhtml</from-view-id>
        <navigation-case>
            <display-name>tab.xhtml</display-name>
            <to-view-id>/tab.xhtml</to-view-id>
            <redirect />
        </navigation-case>
    </navigation-rule>

Redirecting using:

FacesContext.getCurrentInstance().getExternalContext().redirect("tab.jsf");

web.xml:

<context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.xhtml</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>afterwork</param-value>
    </context-param>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
  <welcome-file-list>
    <welcome-file>login.jsf</welcome-file>
    </welcome-file-list>
    <context-param>
        <description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
    </context-param>
    <context-param>
        <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
        <param-value>resources.application</param-value>
    </context-param>
    <listener>
        <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>

pom.xml

    <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>2.0.3</version>
        </dependency>
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>2.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>5.0</version>
        </dependency>
        <dependency>
       <groupId>com.sun.facelets</groupId>
       <artifactId>jsf-facelets</artifactId>
       <version>1.1.14</version>
    </dependency>
        <dependency>
            <groupId>org.primefaces.themes</groupId>
            <artifactId>afterwork</artifactId>
            <version>1.0.10</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.3</version>
        </dependency>

         <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient-cache</artifactId>
                <version>4.2.2</version>
            </dependency>

i hope the configuration issue, can any one suggest

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • Forgot to add, storing the Bean data in Session: Example : session.setAttribute("dosView", personView); and trying to access in the Page like – Gangarapu Bhavani Aug 21 '14 at 08:59

1 Answers1

1

com.sun.faces(jsf-api) is library from mojarra not myfaces. Websphear will use myfaces by default. You should config your websphear server to use mojarra not myfaces. I do not know about different between Webspher 7 and 8.5 but I used to config my Websphear 8.5 that appear on this link

Community
  • 1
  • 1
wittakarn
  • 3,124
  • 1
  • 18
  • 31