Hi everyone,

Sorry for my bad English, I´m from Brazil.

We are trying to implement a JSF project using Oracle Jdev (10.1.3)
that comes with JSF and Struts, MyFaces (1.1.0), Struts(Validator) and
Tiles(MyFaces).

We created a Jdev JSP Tag Library pointing to the file tomahawk.jar
using the steps found on Oracle website
(http://www.oracle.com/technology/products/jdev/101/howtos/myfaces/index.html).

When we introduce the listener
org.apache.myfaces.webapp.StartupServletContextListener into web.xml
and the view-handler
org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl into
faces-config,  the faces-config.xml file seems to became to be
uninterpreted and neither the navigation and the managed-beans are not
recognized anymore.

The error log is below:

500 Internal Server Error
javax.faces.el.PropertyNotFoundException: Base is null: login
        at 
org.apache.myfaces.el.ValueBindingImpl.resolveToBaseAndProperty(ValueBindingImpl.java:457)
        at 
org.apache.myfaces.el.ValueBindingImpl.getType(ValueBindingImpl.java:169)
        at 
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:111)
        at javax.faces.component.UIInput.getConvertedValue(UIInput.java:289)
        at javax.faces.component.UIInput.validate(UIInput.java:265)
        at javax.faces.component.UIInput.processValidators(UIInput.java:144)
        at javax.faces.component.UIForm.processValidators(UIForm.java:68)
        at 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:417)
        at 
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:142)
        at 
org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:208)
        at 
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) -
Developer Preview
3].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:61)
        at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) -
Developer Preview
3].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:672)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) -
Developer Preview
3].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:378)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) -
Developer Preview
3].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:869)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) -
Developer Preview
3].server.http.HttpRequestHandler.run(HttpRequestHandler.java:288)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) -
Developer Preview
3].server.http.HttpRequestHandler.run(HttpRequestHandler.java:120)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) -
Developer Preview
3].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:299)
        at java.lang.Thread.run(Thread.java:534)



Our JSP source code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/extensions"; prefix="x"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"; prefix="html"%>
<html>
  <f:view>
    <head>
      <f:verbatim>
        <f:loadBundle basename="br.com.cvrd.eservices.messages" var="msgs"/>
        <html:javascript formName="loginForm"/>
        <title>
          Teste
        </title>
      </f:verbatim>
    </head>
    <body scroll="no" leftmargin="0" topmargin="0">
      <h:form id="loginForm" onsubmit="return validateLoginForm(this);">
        <h:outputText value="Login:"/>
        <h:inputText id="name" value="#{login.name}"/>
        <br>
        <h:outputText value="Password:"/>
        <h:inputSecret id="password" value="#{login.password}"/>
        <br>
        <h:commandButton value="OK" action="#{login.testeAction}"/>
      </h:form>
    </body>
  </f:view>
</html>




Our managed-bean referenced by the JSP file:

package br.com.cvrd.eservices.beans;

public class LoginBean {
  private String name;
  private String password;

  public String getName() {
    return this.name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getPassword() {
    return this.password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public String testeAction()
  {
    return "success";
  }
}





Our faces-config file:

<?xml version="1.0" encoding="windows-1252"?>
<!DOCTYPE faces-config PUBLIC
  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd";>
<faces-config xmlns="http://java.sun.com/JSF/Configuration";>
  <application>
    
<view-handler>org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl</view-handler>
    <message-bundle>br.com.cvrd.eservices.messages</message-bundle>
  </application>
  <navigation-rule>
    <from-view-id>/login.jsp</from-view-id>
    <navigation-case>
      <from-outcome>success</from-outcome>
      <to-view-id>/eservices/jsp/home.jsp</to-view-id>
    </navigation-case>
  </navigation-rule>
  <managed-bean>
    <managed-bean-name>login</managed-bean-name>
    
<managed-bean-class>br.com.cvrd.eservices.beans.LoginBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
      <property-name>name</property-name>
      <null-value/>
    </managed-property>
    <managed-property>
      <property-name>password</property-name>
      <null-value/>
    </managed-property>
  </managed-bean>
</faces-config>




Our web.xml file:

<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
         version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee";>
  <description>Empty web.xml file for Web Application</description>
  <context-param>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <param-name>tiles-definitions</param-name>
    <param-value>/WEB-INF/tiles.xml</param-value>
  </context-param>
  <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
  </context-param>
  <listener>
    
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  </listener>
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>




Our struts-config file:

<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD
Struts Configuration 1.1//EN"
"file://X:/JDeveloper/jakarta-struts/lib/struts-config_1_1.dtd">
<struts-config>
  <message-resources parameter="br.com.cvrd.eservices.messages"/>
  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"
value="/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml" />
  </plug-in>
</struts-config>



The WEB-INF/lib contains the following jars:

- commons-logging.jar
- jsf-impl.jar
- myfaces-all.jar
- struts.jar
- tomahawk.jar




And the libraries added in the JDeveloper project are:

- JSP Runtime
- JSF (jsf-api.jar, jsf-impl.jar), ambas do JDeveloper.
- Commons Beanutils 1.6.1
- Commons Digester 1.5
- Commons Logging 1.0.3
- Commons Collections 2.1
- JSTL 1.1
- MyFaces (myfaces-all.jar, myfaces-impl.jar) ambas do myfaces-1.1.0
- Struts Runtime


Does anyone has any idea of what could be happening?

Thanks a lot.

Guedes

Reply via email to