List Info

Thread: Re: pls help with exception




Re: pls help with exception
country flaguser name
Spain
2007-09-24 06:36:05
Please, send your bean code #{yellProxy.encuentra}.

----- Mensaje original ----
De: Alonso Isidoro Roman <alonsoirgmail.com&gt;
Para: usersmyfaces.apache.org
Enviado: lunes, 24 de septiembre, 2007 12:08:21
Asunto: pls help with exception

hi everybody, i`m newbee with jsf first at all!


it takes me this exception when i submit the form:
javax.servlet.ServletException: Error calling action method of component with id formulario:boton
javax.faces.webapp.FacesServlet.service (FacesServlet.java:152)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)

causa raíz

javax.faces.FacesException: Error calling action method of component with id formulario:boton

org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
de.mindmatters.faces.application.DelegatingActionListener.processAction(DelegatingActionListener.java:106)
javax.faces.component.UICommand.broadcast (UICommand.java:106)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:274)
org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:250)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication (AjaxViewRoot.java:405)
de.mindmatters.faces.lifecycle.InvokeApplicationPhase.executePhase(InvokeApplicationPhase.java:43)
de.mindmatters.faces.lifecycle.AbstractPhase.execute(AbstractPhase.java:37)
de.mindmatters.faces.lifecycle.LifecycleImpl.executePhase (LifecycleImpl.java:166)
de.mindmatters.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:211)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter (MonitorFilter.java:368)


my faces page is

<% taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<% taglib uri=" http://java.sun.com/jsf/core" prefix="f" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html&gt;
<f:view>
 &nbsp;  <f:loadBundle basename="MessageResources" var="msg"/>
<head>
&nbsp; &nbsp; &nbsp; &nbsp; <title&gt;
 &nbsp;   ; &nbsp; &nbsp; &nbsp; ${msg.titulo}
 &nbsp;   ; &nbsp; </title>
</head>

&lt;body>
  ;  <h:form id="formulario">
&nbsp;   ; &nbsp;  <h:inputText id="campoQue" value="#{yellProxy.campoQue}" />
&nbsp; &nbsp; &nbsp; &nbsp; <h:inputText id="campoDonde" value="#{yellProxy.campoDonde }" />
&nbsp; &nbsp; &nbsp; &nbsp; <h:commandButton id="boton" value="#{msg.boton}" action="#{yellProxy.encuentra}"/>
   ; </h:form>
</f:view>
</body&gt;
</html>

my faces-config is:

<?xml version='1.0' encoding='UTF-8'?>


<!DOCTYPE faces-config PUBLIC
&nbsp; "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
&nbsp; " http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

<!-- =========== FULL CONFIGURATION FILE ================================== -->

&lt;faces-config>
 &nbsp;  <!-- El mantenimiento del bean proxy se delega al contenedor de spring--&gt;
 &nbsp; 
 &nbsp; &nbsp; <application>&nbsp;
 &nbsp; &nbsp; &nbsp;   <variable-resolver
 &nbsp; &nbsp; &nbsp;   ; &nbsp;  org.springframework.web.jsf.DelegatingVariableResolver
 &nbsp; &nbsp; &nbsp;   </variable-resolver> 
 &nbsp; &nbsp; </application>
 &nbsp; &nbsp;
 &nbsp; &nbsp; <!-- el unico idioma permitido es el español.-->
   ;  <application>
&nbsp;   ; &nbsp;  <locale-config>
 &nbsp; &nbsp; &nbsp; &nbsp;   ; <default-locale>;es</default-locale>
 &nbsp; &nbsp; &nbsp;  </locale-config>;
 &nbsp; &nbsp; </application>
  
 &nbsp; &nbsp; <!--
&nbsp; &nbsp;   - navigation rules
&nbsp; &nbsp; &nbsp; -->
&nbsp; &nbsp; <navigation-rule&gt;
 &nbsp; &nbsp;   ; <from-view-id>/index.jsp&lt;/from-view-id>
 &nbsp; &nbsp; &nbsp;  <navigation-case&gt;
 &nbsp; &nbsp;   ; &nbsp; &nbsp; <from-outcome>succesJS</from-outcome>
&nbsp; &nbsp; &nbsp; &nbsp;   ;  <to-view-id>/jsActivado.jsp</to-view-id>
&nbsp;   ; &nbsp;  </navigation-case&gt;
 &nbsp;   ; &nbsp; <navigation-case&gt;
 &nbsp; &nbsp; &nbsp;   ; &nbsp; <from-outcome>succesNoJS&lt;/from-outcome>
&nbsp; &nbsp;   ; &nbsp; &nbsp;  <to-view-id>/jsDesactivado.jsp</to-view-id>;
 &nbsp; &nbsp; &nbsp;  </navigation-case&gt;
 &nbsp;  </navigation-rule&gt;
</faces-config&gt;

my applicationContext.xml is

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
&nbsp;    &nbsp;    " http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<;beans>
  
 &nbsp;  <bean id="ParserSAX" class="es.yell.frontlite.parser.ParserPrincipalHandler" scope="singleton"/>;
 &nbsp; 
 &nbsp;  <bean id="Controller" class="es.yell.frontlite.servlets.Controller" scope="singleton"/>;
 &nbsp; 
 &nbsp;  <bean id="srvBusquedaNoxtrumService" class="es.yell.frontlite.service.impl.SrvBusquedaNoxtrumServiceImpl " scope="singleton">
 &nbsp; &nbsp; &nbsp;  <property name="parserSAX">&lt;ref bean="ParserSAX"/></property>
&nbsp; &nbsp; &nbsp; &nbsp; <property name="controlador">;<ref bean="Controller"/>;</property>
 &nbsp;  </bean&gt;
 &nbsp;   ; &nbsp; &nbsp; &nbsp;
 &nbsp;  <bean id="yellProxy" class="es.yell.frontlite.servlets.YellProxy" scope="singleton">
 &nbsp; &nbsp; &nbsp;  <property name="servicio">
&nbsp;   ; &nbsp; &nbsp; &nbsp;  <ref bean="srvBusquedaNoxtrumService"/>
 ; &nbsp; &nbsp; &nbsp; </property>
&nbsp; &nbsp; </bean&gt;
</beans>

another question:

why do i have to put the url http: // localhost:8084/index.faces i browser instead of 
Http: // localhost:8084/index.jsp
Or 
Http: // localhost:8084/index.jsf?

pls help
--
Alonso Isidoro Roman.




Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden! .
Re: pls help with exception
user name
2007-09-24 06:45:04
Buenos dias Angel, ojala puedas ayudarme!
/*
 * YellProxy.java
 *
 * Created on 13 de septiembre de 2007, 11:59
&nbsp;*
 * To change this template, choose Tools | Template Manager
&nbsp;* and open the template in the editor.
 */

package es.yell.frontlite.servlets;

import java.util.Collection;
import java.util.Locale;
import java.util.ResourceBundle;

import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent ;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
import org.springframework.beans.factory.InitializingBean;
import es.yell.frontlite.service.impl.*;
import org.springframework.util.Assert ;
/**
&nbsp;* Esta clase va a hacer las siguientes acciones:
 * Averiguar quien es el cliente, IE, firefox, PDA.
 ;* Averiguar si tiene el js activado.
 * en funcion si tiene el js activado o no, redirijo la peticion a un servicio u otro
&nbsp;* la peticion que hace el cliente
&nbsp;* author operador
&nbsp;*/
public class YellProxy{
 &nbsp; 
 &nbsp;  //campo que sirve para almacenar el resultado de la operacion que se hace en el cliente para ver si js esta activado.
 &nbsp;  private String jsActivado;
 &nbsp;  //campo que representa la identidad del navegador, IE, firefox...
 &nbsp;  private String quienSoy;
  ;  //campos que van a almacenar los campos que y donde de la pagina ppal.
  ;  private String campoQue;
  ;  //a este campo habra que destokenizar para rellenar los siguientes campos, direccion, localidad y cp
 &nbsp;  private String campoDonde;
 &nbsp;  //atributo que pasamos al servicio con los parametros que nos da el formulario de la jsp
&nbsp; &nbsp; private BusquedaVO busquedaVO;
 &nbsp;  //el servicio que nos da acceso a la capa de datos.INYECTADO
 ; &nbsp; private SrvBusquedaNoxtrumServiceImpl servicio;
  ;  //atributo q contiene toda la informacion cuando utilizamos AJAX
&nbsp; &nbsp; private String xml;
 ; &nbsp; //atributo q contiene toda la informacion cuando no utilizamos AJAX
 ; &nbsp; private Collection coleccion;
 &nbsp;  /** Creates a new instance of YellProxy */
 &nbsp;  public YellProxy() {
&nbsp; &nbsp; }
 &nbsp;  /**
   ;  *Este metodo responde al evento del boton encuentra que esta en la pagina principal.
 &nbsp; &nbsp; *Basicamente va a destokenizar el campo campoDonde en los subcampos Direccion, localidad y CP.
   ;  *Tambien y dependiendo de si el cliente tiene activado o no el js, ejecutaremos un servicio u otro.
&nbsp; &nbsp; */
 &nbsp;  public String encuentra(){
 &nbsp; &nbsp; &nbsp;  //deja los atributos privados rellenos.
 &nbsp; &nbsp; &nbsp;  String mensaje ;
 &nbsp; &nbsp; &nbsp;  crearYRellenarBusquedaVO();
   ; &nbsp; &nbsp; //Javscript activado
 &nbsp; &nbsp; &nbsp;  if (getJsActivado()!=null && getJsActivado().compareToIgnoreCase("S") == 0){
 &nbsp; &nbsp; &nbsp; &nbsp;   ; //invocamos servicio adecuado
 &nbsp; &nbsp; &nbsp; &nbsp;   ; setXml(this.getServicio().obtenerResultadosJSactivado(this.getBusquedaVO ()));
 &nbsp; &nbsp; &nbsp; &nbsp;   ; mensaje=&quot;succesJS";
 &nbsp; &nbsp; &nbsp;  }else{
 &nbsp; &nbsp; &nbsp; &nbsp;   ; //javascript no activado
 &nbsp; &nbsp; &nbsp; &nbsp;   ; this.setColeccion(this.getServicio().obtenerResultadosJSdesactivado( this.getBusquedaVO ()));
 &nbsp; &nbsp; &nbsp; &nbsp;   ; mensaje=&quot;succesNoJS";
 &nbsp; &nbsp; &nbsp;  }
 &nbsp; &nbsp; &nbsp; 
 &nbsp; &nbsp; &nbsp;  return mensaje;
 &nbsp;  }

 ; &nbsp; private void crearYRellenarBusquedaVO() {
 &nbsp; &nbsp;   ;
 &nbsp; &nbsp; &nbsp;  if (busquedaVO == null){
&nbsp; &nbsp; &nbsp;   ; &nbsp;  busquedaVO = new BusquedaVO();
 &nbsp;   ; &nbsp; }
 &nbsp; &nbsp;   ; busquedaVO.setCampoQue(this.getCampoQue());
 &nbsp; &nbsp; &nbsp;  busquedaVO.setCampoDonde(this.getCampoDonde());
&nbsp; &nbsp; }

 &nbsp;  public String getCampoQue() {
 &nbsp; &nbsp;   ; return campoQue;
  ;  }

 &nbsp;  public void setCampoQue(String campoQue) {
 &nbsp; &nbsp;   ; this.campoQue = campoQue;
 &nbsp;  }

 &nbsp;  public String getCampoDonde() {
 &nbsp; &nbsp;   ; return campoDonde;
 &nbsp;  }

 &nbsp;  public void setCampoDonde(String campoDonde) {
 &nbsp; &nbsp;   ; this.campoDonde = campoDonde;
 &nbsp;  }

 &nbsp;  public String getJsActivado() {
   ; &nbsp; &nbsp; return jsActivado;
 &nbsp;  }

 &nbsp;  public void setJsActivado(String jsActivado) {
 &nbsp; &nbsp;   ; this.jsActivado = jsActivado;
 &nbsp;  }

 &nbsp;  public String getQuienSoy() {
 &nbsp; &nbsp;   ; return quienSoy;
 &nbsp;  }

 ; &nbsp; public void setQuienSoy(String quienSoy) {
 &nbsp; &nbsp;   ; this.quienSoy = quienSoy;
  ;  }

 &nbsp;  public BusquedaVO getBusquedaVO() {
 &nbsp; &nbsp;   ; return busquedaVO;
 &nbsp;  }

 &nbsp;  public void setBusquedaVO(BusquedaVO busquedaVO) {
   ; &nbsp; &nbsp; this.busquedaVO = busquedaVO;
 &nbsp;  }

 &nbsp;  public String getXml() {
 &nbsp; &nbsp;   ; return xml;
 ; &nbsp; }

 &nbsp;  public void setXml(String xml) {
 &nbsp; &nbsp;   ; this.xml = xml;
 ; &nbsp; }

 &nbsp;  public Collection getColeccion() {
   ; &nbsp; &nbsp; return coleccion;
 &nbsp;  }

 &nbsp;  public void setColeccion(Collection coleccion) {
 &nbsp; &nbsp;   ; this.coleccion = coleccion;
 &nbsp;  }
 &nbsp; 
 &nbsp;  public SrvBusquedaNoxtrumServiceImpl getServicio() {
 &nbsp; &nbsp;   ; return servicio;
 &nbsp;  }

 &nbsp;  public void setServicio(SrvBusquedaNoxtrumServiceImpl servicio) {
 &nbsp; &nbsp;   ; this.servicio = servicio;
  ;  }
 &nbsp; 
}


2007/9/24, Angel Miralles Arevalo < anmirallesyahoo.es" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">anmirallesyahoo.es&gt;:
Please, send your bean code #{yellProxy.encuentra}.

----- Mensaje original ----
De: Alonso Isidoro Roman < alonsoirgmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> alonsoirgmail.com>
Para: usersmyfaces.apache.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">usersmyfaces.apache.org
Enviado: lunes, 24 de septiembre, 2007 12:08:21
Asunto: pls help with exception


hi everybody, i`m newbee with jsf first at all!


it takes me this exception when i submit the form:
javax.servlet.ServletException
: Error calling action method of component with id formulario:boton
javax.faces.webapp.FacesServlet.service
(FacesServlet.java:152)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java
:368)

causa raíz

javax.faces.FacesException: Error calling action method of component with id formulario:boton

org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)

de.mindmatters.faces.application.DelegatingActionListener.processAction(DelegatingActionListener.java:106)
javax.faces.component.UICommand.broadcast
(UICommand.java:106)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents
(AjaxViewRoot.java:274)
org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:250)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication
(AjaxViewRoot.java:405)
de.mindmatters.faces.lifecycle.InvokeApplicationPhase.executePhase
(InvokeApplicationPhase.java:43)
de.mindmatters.faces.lifecycle.AbstractPhase.execute(AbstractPhase.java:37)
de.mindmatters.faces.lifecycle.LifecycleImpl.executePhase
(LifecycleImpl.java:166)
de.mindmatters.faces.lifecycle.LifecycleImpl.execute
(LifecycleImpl.java:211)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter
(MonitorFilter.java:368)


my faces page is

<% taglib uri="http://java.sun.com/jsf/html&quot; prefix=&quot;h" %>
&lt;% taglib uri=" http://java.sun.com/jsf/core&quot; prefix=&quot;f" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN";>

<html>
&lt;f:view>;
 &nbsp;  <f:loadBundle basename=&quot;MessageResources&quot; var="msg"/&gt;
<head>
&nbsp;   ; &nbsp;  <title&gt;
 &nbsp;   ; &nbsp; &nbsp; &nbsp; ${msg.titulo}
 &nbsp;   ; &nbsp; </title>
</head>

&lt;body>
  ;  <h:form id="formulario&quot;>
&nbsp; &nbsp;   ;  <h:inputText id="campoQue&quot; value=&quot;#{ yellProxy.campoQue}" />
&nbsp; &nbsp; &nbsp; &nbsp; <h:inputText id="campoDonde&quot; value=&quot;#{yellProxy.campoDonde }" />
&nbsp; &nbsp; &nbsp; &nbsp; <h:commandButton id="boton" value=&quot;#{msg.boton}" action=&quot;#{yellProxy.encuentra }&quot;/>
&nbsp; &nbsp; </h:form>
</f:view>
</body&gt;
</html>

my faces-config is:

<?xml version=&#39;1.0' encoding=&#39;UTF-8&#39;?>


<!DOCTYPE faces-config PUBLIC
&nbsp; "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN&quot;
  " http://java.sun.com/dtd/web-facesconfig_1_1.dtd&quot;>

&lt;!-- =========== FULL CONFIGURATION FILE ================================== -->

&lt;faces-config>
 &nbsp;  <!-- El mantenimiento del bean proxy se delega al contenedor de spring--&gt;
   ;
 &nbsp; &nbsp; <application>&nbsp;
 &nbsp; &nbsp; &nbsp;   <variable-resolver
 &nbsp; &nbsp; &nbsp;   ; &nbsp;  org.springframework.web.jsf.DelegatingVariableResolver
 &nbsp; &nbsp; &nbsp;   </variable-resolver> 
 &nbsp; &nbsp; </application>
 &nbsp; &nbsp;
 &nbsp;   <!-- el unico idioma permitido es el español.-->
   ;  <application>
&nbsp;   ; &nbsp;  <locale-config>
 &nbsp; &nbsp; &nbsp; &nbsp;   ; <default-locale>;es</default-locale>
 &nbsp; &nbsp; &nbsp;  </locale-config>;
 &nbsp;   </application>
  
 &nbsp; &nbsp; <!--
&nbsp; &nbsp;   - navigation rules
&nbsp; &nbsp; &nbsp; -->
&nbsp; &nbsp; <navigation-rule&gt;
 &nbsp; &nbsp;   ; <from-view-id>/index.jsp&lt;/from-view-id>
 &nbsp; &nbsp; &nbsp;  <navigation-case&gt;
 &nbsp; &nbsp;   ; &nbsp; &nbsp; <from-outcome>succesJS</from-outcome>
&nbsp; &nbsp;   ; &nbsp; &nbsp;  <to-view-id>/jsActivado.jsp</to-view-id>
&nbsp;   ; &nbsp;  </navigation-case&gt;
 &nbsp;   ; &nbsp; <navigation-case&gt;
 &nbsp; &nbsp; &nbsp;   ; &nbsp; <from-outcome>succesNoJS&lt;/from-outcome>
&nbsp; &nbsp;   ; &nbsp; &nbsp;  <to-view-id>/jsDesactivado.jsp</to-view-id>;
 &nbsp;   ; &nbsp; </navigation-case&gt;
 &nbsp;  </navigation-rule&gt;
</faces-config&gt;

my applicationContext.xml is

<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN&quot;
 ; &nbsp;  &nbsp;    " http://www.springframework.org/dtd/spring-beans-2.0.dtd "&gt;
<beans>
&nbsp; &nbsp;
 &nbsp;  <bean id="ParserSAX&quot; class=&quot;es.yell.frontlite.parser.ParserPrincipalHandler" scope=&quot;singleton"/>
 &nbsp; 
 &nbsp;  <bean id="Controller&quot; class=&quot; es.yell.frontlite.servlets.Controller&quot; scope=&quot;singleton"/>
 &nbsp; 
 &nbsp;  <bean id="srvBusquedaNoxtrumService" class=&quot;es.yell.frontlite.service.impl.SrvBusquedaNoxtrumServiceImpl " scope=&quot;singleton">
  ; &nbsp; &nbsp;  <property name=";parserSAX&quot;>&lt;ref bean=";ParserSAX&quot;/>&lt;/property>
 ; &nbsp; &nbsp; &nbsp; <property name=";controlador"><ref bean=";Controller"/></property>
 &nbsp;  </bean&gt;
 &nbsp;   ; &nbsp; &nbsp; &nbsp;
 &nbsp;  <bean id="yellProxy&quot; class=&quot;es.yell.frontlite.servlets.YellProxy" scope=&quot;singleton">
  ; &nbsp; &nbsp;  <property name=";servicio&quot;>
 &nbsp; &nbsp; &nbsp;   ; &nbsp; <ref bean=";srvBusquedaNoxtrumService"/>
   ; &nbsp; &nbsp; </property>
&nbsp; &nbsp; </bean&gt;
</beans>

another question:

why do i have to put the url http: // localhost:8084/index.faces i browser instead of 
Http: // localhost:8084/index.jsp
Or 
Http: // localhost:8084/index.jsf?

pls help
--
Alonso Isidoro Roman.




Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden! .



--
Alonso Isidoro Roman.
Re: pls help with exception
user name
2007-09-24 06:47:49
Buenos dias Angel, ojala puedas ayudarme
/*
 * YellProxy.java
 *
 * Created on 13 de septiembre de 2007, 11:59
&nbsp;*
 * To change this template, choose Tools | Template Manager
&nbsp;* and open the template in the editor.
 */

package es.yell.frontlite.servlets;

import java.util.Collection;
import java.util.Locale;
import java.util.ResourceBundle;

import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent ;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
import org.springframework.beans.factory.InitializingBean;
import es.yell.frontlite.service.impl.*;
import org.springframework.util.Assert ;
/**
&nbsp;* Esta clase va a hacer las siguientes acciones:
 * Averiguar quien es el cliente, IE, firefox, PDA.
 ;* Averiguar si tiene el js activado.
 * en funcion si tiene el js activado o no, redirijo la peticion a un servicio u otro
&nbsp;* la peticion que hace el cliente
&nbsp;* author operador
&nbsp;*/
public class YellProxy{
 &nbsp; 
 &nbsp;  //campo que sirve para almacenar el resultado de la operacion que se hace en el cliente para ver si js esta activado.
 &nbsp;  private String jsActivado;
 &nbsp;  //campo que representa la identidad del navegador, IE, firefox...
 &nbsp;  private String quienSoy;
  ;  //campos que van a almacenar los campos que y donde de la pagina ppal.
&nbsp; &nbsp; private String campoQue;
  ;  //a este campo habra que destokenizar para rellenar los siguientes campos, direccion, localidad y cp
 &nbsp;  private String campoDonde;
 &nbsp;  //atributo que pasamos al servicio con los parametros que nos da el formulario de la jsp
&nbsp; &nbsp; private BusquedaVO busquedaVO;
 &nbsp;  //el servicio que nos da acceso a la capa de datos.INYECTADO
 ; &nbsp; private SrvBusquedaNoxtrumServiceImpl servicio;
  ;  //atributo q contiene toda la informacion cuando utilizamos AJAX
&nbsp; &nbsp; private String xml;
 ; &nbsp; //atributo q contiene toda la informacion cuando no utilizamos AJAX
 ; &nbsp; private Collection coleccion;
 &nbsp;  /** Creates a new instance of YellProxy */
 &nbsp;  public YellProxy() {
   ; }
 &nbsp;  /**
   ;  *Este metodo responde al evento del boton encuentra que esta en la pagina principal.
 &nbsp; &nbsp; *Basicamente va a destokenizar el campo campoDonde en los subcampos Direccion, localidad y CP.
   ;  *Tambien y dependiendo de si el cliente tiene activado o no el js, ejecutaremos un servicio u otro.
&nbsp; &nbsp; */
 &nbsp;  public String encuentra(){
 &nbsp; &nbsp; &nbsp;  //deja los atributos privados rellenos.
 &nbsp; &nbsp; &nbsp;  String mensaje ;
 &nbsp; &nbsp; &nbsp;  crearYRellenarBusquedaVO();
 &nbsp; &nbsp;   ; //Javscript activado
 &nbsp; &nbsp; &nbsp;  if (getJsActivado()!=null && getJsActivado().compareToIgnoreCase("S") == 0){
 &nbsp; &nbsp; &nbsp; &nbsp;   ; //invocamos servicio adecuado
 &nbsp; &nbsp; &nbsp; &nbsp;   ; setXml(this.getServicio().obtenerResultadosJSactivado(this.getBusquedaVO ()));
 &nbsp; &nbsp; &nbsp; &nbsp;   ; mensaje=&quot;succesJS";
 &nbsp; &nbsp; &nbsp;  }else{
 &nbsp; &nbsp; &nbsp; &nbsp;   ; //javascript no activado
 &nbsp; &nbsp; &nbsp; &nbsp;   ; this.setColeccion(this.getServicio().obtenerResultadosJSdesactivado(this.getBusquedaVO ()));
 &nbsp; &nbsp; &nbsp; &nbsp;   ; mensaje=&quot;succesNoJS";
 &nbsp; &nbsp; &nbsp;  }
 &nbsp; &nbsp; &nbsp; 
 &nbsp; &nbsp; &nbsp;  return mensaje;
 &nbsp;  }

 &nbsp;  private void crearYRellenarBusquedaVO() {
 &nbsp; &nbsp;   ;
 &nbsp; &nbsp; &nbsp;  if (busquedaVO == null){
&nbsp; &nbsp; &nbsp;   ; &nbsp;  busquedaVO = new BusquedaVO();
 &nbsp;   ; &nbsp; }
 &nbsp; &nbsp;   ; busquedaVO.setCampoQue(this.getCampoQue());
 &nbsp; &nbsp; &nbsp;  busquedaVO.setCampoDonde(this.getCampoDonde());
&nbsp; &nbsp; }

 &nbsp;  public String getCampoQue() {
 &nbsp; &nbsp;   ; return campoQue;
  ;  }

 &nbsp;  public void setCampoQue(String campoQue) {
 &nbsp; &nbsp;   ; this.campoQue = campoQue;
 &nbsp;  }

 &nbsp;  public String getCampoDonde() {
 &nbsp; &nbsp;   ; return campoDonde;
 &nbsp;  }

 &nbsp;  public void setCampoDonde(String campoDonde) {
 &nbsp; &nbsp;   ; this.campoDonde = campoDonde;
 &nbsp;  }

 &nbsp;  public String getJsActivado() {
   ; &nbsp; &nbsp; return jsActivado;
 &nbsp;  }

 &nbsp;  public void setJsActivado(String jsActivado) {
 &nbsp; &nbsp;   ; this.jsActivado = jsActivado;
 &nbsp;  }

 &nbsp;  public String getQuienSoy() {
 &nbsp; &nbsp;   ; return quienSoy;
  ;  }

 ; &nbsp; public void setQuienSoy(String quienSoy) {
 &nbsp; &nbsp;   ; this.quienSoy = quienSoy;
  ;  }

 &nbsp;  public BusquedaVO getBusquedaVO() {
 &nbsp; &nbsp;   ; return busquedaVO;
 &nbsp;  }

 &nbsp;  public void setBusquedaVO(BusquedaVO busquedaVO) {
   ; &nbsp; &nbsp; this.busquedaVO = busquedaVO;
 &nbsp;  }

 &nbsp;  public String getXml() {
 &nbsp; &nbsp;   ; return xml;
 ; &nbsp; }

 &nbsp;  public void setXml(String xml) {
 &nbsp; &nbsp;   ; this.xml = xml;
 ; &nbsp; }

 &nbsp;  public Collection getColeccion() {
   ; &nbsp; &nbsp; return coleccion;
 &nbsp;  }

 &nbsp;  public void setColeccion(Collection coleccion) {
 &nbsp; &nbsp;   ; this.coleccion = coleccion;
 &nbsp;  }
 &nbsp; 
 &nbsp;  public SrvBusquedaNoxtrumServiceImpl getServicio() {
 &nbsp; &nbsp;   ; return servicio;
 &nbsp;  }

 &nbsp;  public void setServicio(SrvBusquedaNoxtrumServiceImpl servicio) {
 &nbsp; &nbsp;   ; this.servicio = servicio;
  ;  }
 &nbsp; 
}


2007/9/24, Angel Miralles Arevalo < anmirallesyahoo.es">anmirallesyahoo.es&gt;:
Please, send your bean code #{yellProxy.encuentra}.

----- Mensaje original ----
De: Alonso Isidoro Roman < alonsoirgmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> alonsoirgmail.com>
Para: usersmyfaces.apache.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">usersmyfaces.apache.org
Enviado: lunes, 24 de septiembre, 2007 12:08:21
Asunto: pls help with exception


hi everybody, i`m newbee with jsf first at all!


it takes me this exception when i submit the form:
javax.servlet.ServletException
: Error calling action method of component with id formulario:boton
javax.faces.webapp.FacesServlet.service
(FacesServlet.java:152)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java :368)

causa raíz

javax.faces.FacesException: Error calling action method of component with id formulario:boton

org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
de.mindmatters.faces.application.DelegatingActionListener.processAction(DelegatingActionListener.java:106)
javax.faces.component.UICommand.broadcast
(UICommand.java:106)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents (AjaxViewRoot.java:274)
org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:250)
org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication
(AjaxViewRoot.java:405)
de.mindmatters.faces.lifecycle.InvokeApplicationPhase.executePhase (InvokeApplicationPhase.java:43)
de.mindmatters.faces.lifecycle.AbstractPhase.execute(AbstractPhase.java:37)
de.mindmatters.faces.lifecycle.LifecycleImpl.executePhase
(LifecycleImpl.java:166)
de.mindmatters.faces.lifecycle.LifecycleImpl.execute (LifecycleImpl.java:211)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter
(MonitorFilter.java:368)


my faces page is

<% taglib uri="http://java.sun.com/jsf/html&quot; prefix=&quot;h" %>
&lt;% taglib uri=" http://java.sun.com/jsf/core&quot; prefix=&quot;f" %>
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN";>

<html>
&lt;f:view>;
 &nbsp;  <f:loadBundle basename=&quot;MessageResources&quot; var="msg"/&gt;
<head>
&nbsp; &nbsp; &nbsp;   <title&gt;
 &nbsp;   ; &nbsp; &nbsp; &nbsp; ${msg.titulo}
 &nbsp;   ; &nbsp; </title>
</head>

&lt;body>
  ;  <h:form id="formulario&quot;>
&nbsp; &nbsp;   ;  <h:inputText id="campoQue&quot; value=&quot;#{ yellProxy.campoQue}" />
&nbsp; &nbsp; &nbsp; &nbsp; <h:inputText id="campoDonde&quot; value=&quot;#{yellProxy.campoDonde }" />
&nbsp; &nbsp; &nbsp; &nbsp; <h:commandButton id="boton" value=&quot;#{msg.boton}" action=&quot;#{yellProxy.encuentra }"/>
 ; &nbsp; </h:form>
</f:view>
</body&gt;
</html>

my faces-config is:

<?xml version=&#39;1.0' encoding=&#39;UTF-8&#39;?>


<!DOCTYPE faces-config PUBLIC
&nbsp; "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN&quot;
  " http://java.sun.com/dtd/web-facesconfig_1_1.dtd&quot;>

<;!-- =========== FULL CONFIGURATION FILE ================================== -->

&lt;faces-config>
 &nbsp;  <!-- El mantenimiento del bean proxy se delega al contenedor de spring--&gt;
   ;
 &nbsp; &nbsp; <application>&nbsp;
 &nbsp; &nbsp; &nbsp;   <variable-resolver
 &nbsp; &nbsp; &nbsp;   ; &nbsp;  org.springframework.web.jsf.DelegatingVariableResolver
 &nbsp; &nbsp; &nbsp;   </variable-resolver> 
 &nbsp; &nbsp; </application>
 &nbsp; &nbsp;
 &nbsp;   <!-- el unico idioma permitido es el español.-->
   ;  <application>
&nbsp;   ; &nbsp;  <locale-config>
 &nbsp; &nbsp; &nbsp; &nbsp;   ; <default-locale>;es</default-locale>
 &nbsp; &nbsp; &nbsp;  </locale-config>;
 &nbsp;   </application>
  
 &nbsp; &nbsp; <!--
&nbsp; &nbsp;   - navigation rules
&nbsp; &nbsp; &nbsp; -->
&nbsp; &nbsp; <navigation-rule&gt;
 &nbsp; &nbsp;   ; <from-view-id>/index.jsp&lt;/from-view-id>
 &nbsp; &nbsp; &nbsp;  <navigation-case&gt;
 &nbsp; &nbsp;   ; &nbsp; &nbsp; <from-outcome>succesJS</from-outcome>
&nbsp; &nbsp;   ; &nbsp; &nbsp;  <to-view-id>/jsActivado.jsp</to-view-id>
&nbsp;   ; &nbsp;  </navigation-case&gt;
 &nbsp;   ; &nbsp; <navigation-case&gt;
 &nbsp; &nbsp; &nbsp;   ; &nbsp; <from-outcome>succesNoJS&lt;/from-outcome>
&nbsp; &nbsp;   ; &nbsp; &nbsp;  <to-view-id>/jsDesactivado.jsp</to-view-id>;
 &nbsp;   ; &nbsp; </navigation-case&gt;
 &nbsp;  </navigation-rule&gt;
</faces-config&gt;

my applicationContext.xml is

<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN&quot;
 ; &nbsp;  &nbsp;    " http://www.springframework.org/dtd/spring-beans-2.0.dtd "&gt;
<beans>
&nbsp; &nbsp;
 &nbsp;  <bean id="ParserSAX&quot; class=&quot;es.yell.frontlite.parser.ParserPrincipalHandler" scope=&quot;singleton"/>
 &nbsp; 
 &nbsp;  <bean id="Controller&quot; class=&quot; es.yell.frontlite.servlets.Controller&quot; scope=&quot;singleton"/>
 &nbsp; 
 &nbsp;  <bean id="srvBusquedaNoxtrumService" class=&quot;es.yell.frontlite.service.impl.SrvBusquedaNoxtrumServiceImpl " scope=&quot;singleton">
  ; &nbsp; &nbsp;  <property name=";parserSAX&quot;>&lt;ref bean=";ParserSAX&quot;/>&lt;/property>
 ; &nbsp; &nbsp; &nbsp; <property name=";controlador"><ref bean=";Controller"/></property>
 &nbsp;  </bean&gt;
 &nbsp;   ; &nbsp; &nbsp; &nbsp;
 &nbsp;  <bean id="yellProxy&quot; class=&quot;es.yell.frontlite.servlets.YellProxy" scope=&quot;singleton">
  ; &nbsp; &nbsp;  <property name=";servicio&quot;>
  ; &nbsp; &nbsp; &nbsp; &nbsp;  <ref bean=";srvBusquedaNoxtrumService"/>
   ; &nbsp; &nbsp; </property>
&nbsp; &nbsp; </bean&gt;
</beans>

another question:

why do i have to put the url http: // localhost:8084/index.faces i browser instead of 
Http: // localhost:8084/index.jsp
Or 
Http: // localhost:8084/index.jsf?

pls help
--
Alonso Isidoro Roman.




Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden! .



--
Alonso Isidoro Roman.
Re: pls help with exception
user name
2007-09-24 06:51:56
Hi guys,

don't want to sound pedantic, but please stay in English
while
discussing here on the list - except you mark the
conversation clearly
as off-topic and explain why you have to write in a language
apart
from English.

regards,

Martin

On 9/24/07, Alonso Isidoro Roman <alonsoirgmail.com> wrote:
> Buenos dias Angel, ojala puedas ayudarme
> /*
>  * YellProxy.java
>  *
>  * Created on 13 de septiembre de 2007, 11:59
>  *
>  * To change this template, choose Tools | Template
Manager
>  * and open the template in the editor.
>  */
>
> package es.yell.frontlite.servlets;
>
> import java.util.Collection;
> import java.util.Locale;
> import java.util.ResourceBundle;
>
> import javax.faces.context.FacesContext;
> import javax.faces.event.ActionEvent ;
> import javax.faces.event.ValueChangeEvent;
> import javax.faces.model.SelectItem;
> import
org.springframework.beans.factory.InitializingBean;
> import es.yell.frontlite.service.impl.*;
> import org.springframework.util.Assert ;
> /**
>  * Esta clase va a hacer las siguientes acciones:
>  * Averiguar quien es el cliente, IE, firefox, PDA.
>  * Averiguar si tiene el js activado.
>  * en funcion si tiene el js activado o no, redirijo la
peticion a un
> servicio u otro
>  * la peticion que hace el cliente
>  * author operador
>  */
> public class YellProxy{
>
>     //campo que sirve para almacenar el resultado de la
operacion que se
> hace en el cliente para ver si js esta activado.
>     private String jsActivado;
>     //campo que representa la identidad del navegador,
IE, firefox...
>     private String quienSoy;
>     //campos que van a almacenar los campos que y donde
de la pagina ppal.
>      private String campoQue;
>     //a este campo habra que destokenizar para rellenar
los siguientes
> campos, direccion, localidad y cp
>     private String campoDonde;
>     //atributo que pasamos al servicio con los
parametros que nos da el
> formulario de la jsp
>     private BusquedaVO busquedaVO;
>     //el servicio que nos da acceso a la capa de
datos.INYECTADO
>     private SrvBusquedaNoxtrumServiceImpl servicio;
>     //atributo q contiene toda la informacion cuando
utilizamos AJAX
>     private String xml;
>     //atributo q contiene toda la informacion cuando no
utilizamos AJAX
>     private Collection coleccion;
>     /** Creates a new instance of YellProxy */
>     public YellProxy() {
>      }
>     /**
>      *Este metodo responde al evento del boton
encuentra que esta en la
> pagina principal.
>      *Basicamente va a destokenizar el campo campoDonde
en los subcampos
> Direccion, localidad y CP.
>      *Tambien y dependiendo de si el cliente tiene
activado o no el js,
> ejecutaremos un servicio u otro.
>     */
>     public String encuentra(){
>         //deja los atributos privados rellenos.
>          String mensaje ;
>         crearYRellenarBusquedaVO();
>          //Javscript activado
>         if (getJsActivado()!=null &&
> getJsActivado().compareToIgnoreCase("S") ==
0){
>              //invocamos servicio adecuado
>
>
setXml(this.getServicio().obtenerResultadosJSactivado(this.g
etBusquedaVO
> ()));
>             mensaje="succesJS";
>         }else{
>              //javascript no activado
>
>
this.setColeccion(this.getServicio().obtenerResultadosJSdesa
ctivado(this.getBusquedaVO
> ()));
>             mensaje="succesNoJS";
>         }
>
>         return mensaje;
>     }
>
>     private void crearYRellenarBusquedaVO() {
>
>         if (busquedaVO == null){
>             busquedaVO = new BusquedaVO();
>         }
>         busquedaVO.setCampoQue(this.getCampoQue());
>        
busquedaVO.setCampoDonde(this.getCampoDonde());
>     }
>
>     public String getCampoQue() {
>         return campoQue;
>     }
>
>     public void setCampoQue(String campoQue) {
>         this.campoQue = campoQue;
>     }
>
>     public String getCampoDonde() {
>         return campoDonde;
>     }
>
>     public void setCampoDonde(String campoDonde) {
>         this.campoDonde = campoDonde;
>     }
>
>     public String getJsActivado() {
>         return jsActivado;
>     }
>
>     public void setJsActivado(String jsActivado) {
>         this.jsActivado = jsActivado;
>     }
>
>     public String getQuienSoy() {
>         return quienSoy;
>     }
>
>     public void setQuienSoy(String quienSoy) {
>         this.quienSoy = quienSoy;
>     }
>
>     public BusquedaVO getBusquedaVO() {
>         return busquedaVO;
>     }
>
>     public void setBusquedaVO(BusquedaVO busquedaVO) {
>         this.busquedaVO = busquedaVO;
>     }
>
>     public String getXml() {
>         return xml;
>     }
>
>     public void setXml(String xml) {
>         this.xml = xml;
>     }
>
>     public Collection getColeccion() {
>         return coleccion;
>     }
>
>     public void setColeccion(Collection coleccion) {
>         this.coleccion = coleccion;
>     }
>
>     public SrvBusquedaNoxtrumServiceImpl getServicio()
{
>         return servicio;
>     }
>
>     public void
setServicio(SrvBusquedaNoxtrumServiceImpl
> servicio) {
>         this.servicio = servicio;
>     }
>
> }
>
>
>
> 2007/9/24, Angel Miralles Arevalo < anmirallesyahoo.es>:
> >
> >
> >
> >
> > Please, send your bean code
#{yellProxy.encuentra}.
> >
> >
> > ----- Mensaje original ----
> > De: Alonso Isidoro Roman < alonsoirgmail.com>
> > Para: usersmyfaces.apache.org
> > Enviado: lunes, 24 de septiembre, 2007 12:08:21
> > Asunto: pls help with exception
> >
> >
> > hi everybody, i`m newbee with jsf first at all!
> >
> >
> > it takes me this exception when i submit the
form:
> > javax.servlet.ServletException
> > : Error calling action method of component with id
formulario:boton
> > javax.faces.webapp.FacesServlet.service
> > (FacesServlet.java:152)
> >
>
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilt
er(MonitorFilter.java
> > :368)
> >
> >
> >
> > causa raíz javax.faces.FacesException: Error
calling action method of
> component with id formulario:boton
> >
> >
>
org.apache.myfaces.application.ActionListenerImpl.processAct
ion(ActionListenerImpl.java:74)
> >
> >
>
de.mindmatters.faces.application.DelegatingActionListener.pr
ocessAction(DelegatingActionListener.java:106)
> > javax.faces.component.UICommand.broadcast
> > (UICommand.java:106)
> >
org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents
> > (AjaxViewRoot.java:274)
> >
>
org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(Aja
xViewRoot.java:250)
> >
>
org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication
> > (AjaxViewRoot.java:405)
> >
>
de.mindmatters.faces.lifecycle.InvokeApplicationPhase.execut
ePhase
> > (InvokeApplicationPhase.java:43)
> >
>
de.mindmatters.faces.lifecycle.AbstractPhase.execute(Abstrac
tPhase.java:37)
> >
de.mindmatters.faces.lifecycle.LifecycleImpl.executePhase
> > (LifecycleImpl.java:166)
> >
de.mindmatters.faces.lifecycle.LifecycleImpl.execute
> > (LifecycleImpl.java:211)
> >
>
javax.faces.webapp.FacesServlet.service(FacesServlet.java:13
7)
> >
>
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilt
er
> > (MonitorFilter.java:368)
> >
> >
> >
> > my faces page is
> >
> > <% taglib uri="http://java.sun.co
m/jsf/html" prefix="h" %>
> > <% taglib uri=" http://java.sun.co
m/jsf/core" prefix="f" %>
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.0 Transitional//EN">
> >
> > <html>
> > <f:view>
> >     <f:loadBundle
basename="MessageResources"
var="msg"/>
> > <head>
> >         <title>
> >             ${msg.titulo}
> >         </title>
> > </head>
> >
> > <body>
> >     <h:form id="formulario">
> >         <h:inputText id="campoQue"
value="#{ yellProxy.campoQue}" />
> >         <h:inputText id="campoDonde"
value="#{yellProxy.campoDonde }" />
> >         <h:commandButton id="boton"
value="#{msg.boton}"
> action="#{yellProxy.encuentra }"/>
> >     </h:form>
> > </f:view>
> > </body>
> > </html>
> >
> > my faces-config is:
> >
> > <?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"&g
t;
> >
> > <!-- =========== FULL CONFIGURATION FILE
> ================================== -->
> >
> > <faces-config>
> >     <!-- El mantenimiento del bean proxy se
delega al contenedor de
> spring-->
> >
> >      <application>
> >          <variable-resolver>
> >
> org.springframework.web.jsf.DelegatingVariableResolver
> >          </variable-resolver>
> >      </application>
> >
> >      <!-- el unico idioma permitido es el
español.-->
> >      <application>
> >         <locale-config>
> >            
<default-locale>es</default-locale>
> >         </locale-config>
> >      </application>
> >
> >      <!--
> >       - navigation rules
> >       -->
> >     <navigation-rule>
> >        
<from-view-id>/index.jsp</from-view-id>
> >         <navigation-case>
> >            
<from-outcome>succesJS</from-outcome>
> >            
<to-view-id>/jsActivado.jsp</to-view-id>
> >         </navigation-case>
> >         <navigation-case>
> >            
<from-outcome>succesNoJS</from-outcome>
> >            
<to-view-id>/jsDesactivado.jsp</to-view-id>
> >         </navigation-case>
> >     </navigation-rule>
> > </faces-config>
> >
> > my applicationContext.xml is
> >
> > <?xml version="1.0"
encoding="UTF-8"?>
> > <!DOCTYPE beans PUBLIC "-//SPRING//DTD
BEAN 2.0//EN"
> >           "
> http://www.springframework.org/dtd/spring-beans-2.0.dtd ">
> > <beans>
> >
> >     <bean id="ParserSAX"
>
class="es.yell.frontlite.parser.ParserPrincipalHandler&
quot;
> scope="singleton"/>
> >
> >     <bean id="Controller"
class="
> es.yell.frontlite.servlets.Controller"
scope="singleton"/>
> >
> >     <bean
id="srvBusquedaNoxtrumService"
>
class="es.yell.frontlite.service.impl.SrvBusquedaNoxtru
mServiceImpl
> " scope="singleton">
> >         <property
name="parserSAX"><ref
bean="ParserSAX"/></property>
> >         <property
name="controlador"><ref
bean="Controller"/></property>
> >     </bean>
> >
> >     <bean id="yellProxy"
> class="es.yell.frontlite.servlets.YellProxy"
> scope="singleton">
> >         <property
name="servicio">
> >             <ref
bean="srvBusquedaNoxtrumService"/>
> >         </property>
> >     </bean>
> > </beans>
> >
> > another question:
> >
> > why do i have to put the url http: //
localhost:8084/index.faces i browser
> instead of
> > Http: // localhost:8084/index.jsp
> > Or
> > Http: // localhost:8084/index.jsf?
> >
> > pls help
> > --
> > Alonso Isidoro Roman.
> >
> >
> > ________________________________
>
> > Sé un Mejor Amante del Cine
> > ¿Quieres saber cómo? ¡Deja que otras personas te
ayuden! .
> >
>
>
>
> --
> Alonso Isidoro Roman.


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: pls help with exception
user name
2007-09-24 06:54:48
ok, no problem!

El día 24/09/07, Martin Marinschek < martin.marinschekgmail.com">martin.marinschekgmail.com> escribió:
Hi guys,

don't want to sound pedantic, but please stay in English while
discussing here on the list - except you mark the conversation clearly
as off-topic and explain why you have to write in a language apart
from English.

regards,

Martin

On 9/24/07, Alonso Isidoro Roman < alonsoirgmail.com">alonsoirgmail.com> wrote:
&gt; Buenos dias Angel, ojala puedas ayudarme
&gt; /*
>&nbsp; * YellProxy.java
>&nbsp; *
 * Created on 13 de septiembre de 2007, 11:59
>  ;*
>&nbsp; * To change this template, choose Tools | Template Manager
> &nbsp;* and open the template in the editor.
&gt; &nbsp;*/
>
> package es.yell.frontlite.servlets;
>
> import java.util.Collection;
> import java.util.Locale;
>; import java.util.ResourceBundle ;
>
> import javax.faces.context.FacesContext;
> import javax.faces.event.ActionEvent ;
> import javax.faces.event.ValueChangeEvent;
> import javax.faces.model.SelectItem;
&gt; import org.springframework.beans.factory.InitializingBean ;
> import es.yell.frontlite.service.impl.*;
> import org.springframework.util.Assert ;
> /**
>&nbsp; * Esta clase va a hacer las siguientes acciones:
> &nbsp;* Averiguar quien es el cliente, IE, firefox, PDA.
>; &nbsp;* Averiguar si tiene el js activado.
> &nbsp;* en funcion si tiene el js activado o no, redirijo la peticion a un
> servicio u otro
>&nbsp; * la peticion que hace el cliente
&gt; &nbsp;* author operador
 */
&gt; public class YellProxy{
>
>&nbsp;   ; //campo que sirve para almacenar el resultado de la operacion que se
> hace en el cliente para ver si js esta activado.
> &nbsp;   private String jsActivado;
>&nbsp; &nbsp;  //campo que representa la identidad del navegador, IE, firefox...
  ;  private String quienSoy;
> &nbsp;   //campos que van a almacenar los campos que y donde de la pagina ppal.
>  ; &nbsp; &nbsp;private String campoQue;
; &nbsp;  //a este campo habra que destokenizar para rellenar los siguientes
> campos, direccion, localidad y cp
>&nbsp; &nbsp;  private String campoDonde;
; &nbsp;  //atributo que pasamos al servicio con los parametros que nos da el
> formulario de la jsp
>&nbsp; &nbsp;  private BusquedaVO busquedaVO;
; &nbsp;  //el servicio que nos da acceso a la capa de datos.INYECTADO
>&nbsp;   ; private SrvBusquedaNoxtrumServiceImpl servicio;
> &nbsp;   //atributo q contiene toda la informacion cuando utilizamos AJAX
>; &nbsp; &nbsp; private String xml;
>&nbsp;   ; //atributo q contiene toda la informacion cuando no utilizamos AJAX
>&nbsp;   ; private Collection coleccion;
  ;  /** Creates a new instance of YellProxy */
>&nbsp; &nbsp;  public YellProxy() {
>&nbsp; &nbsp;   ;}
>&nbsp; &nbsp;  /**
>&nbsp; &nbsp;   ;*Este metodo responde al evento del boton encuentra que esta en la
> pagina principal.
  ; &nbsp; *Basicamente va a destokenizar el campo campoDonde en los subcampos
> Direccion, localidad y CP.
>&nbsp; &nbsp;   ;*Tambien y dependiendo de si el cliente tiene activado o no el js,
> ejecutaremos un servicio u otro.
>  ; &nbsp; */
>&nbsp; &nbsp;  public String encuentra(){
>&nbsp; &nbsp; &nbsp; &nbsp;  //deja los atributos privados rellenos.
; &nbsp; &nbsp; &nbsp; &nbsp; String mensaje ;
>&nbsp; &nbsp; &nbsp; &nbsp;  crearYRellenarBusquedaVO();
>  ; &nbsp; &nbsp; &nbsp; &nbsp;//Javscript activado
&gt; &nbsp; &nbsp;   ;  if (getJsActivado()!=null &&
> getJsActivado().compareToIgnoreCase("S") == 0){
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   ; //invocamos servicio adecuado
&gt;
> setXml(this.getServicio().obtenerResultadosJSactivado(this.getBusquedaVO
>; ()));
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   mensaje=&quot;succesJS";
&gt; &nbsp; &nbsp; &nbsp;   }else{
&gt; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; //javascript no activado
&gt;
> this.setColeccion(this.getServicio().obtenerResultadosJSdesactivado(this.getBusquedaVO
> ()));
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   mensaje=&quot;succesNoJS";
> &nbsp;   ; &nbsp;  }
>
&gt; &nbsp; &nbsp;   ;  return mensaje;
&gt; &nbsp; &nbsp; }
>
>; &nbsp; &nbsp; private void crearYRellenarBusquedaVO() {
>
>; &nbsp; &nbsp; &nbsp; &nbsp; if (busquedaVO == null){
>; &nbsp; &nbsp; &nbsp; &nbsp;   ;  busquedaVO = new BusquedaVO();
>&nbsp; &nbsp; &nbsp;   ; }
>&nbsp; &nbsp;   ; &nbsp; busquedaVO.setCampoQue(this.getCampoQue());
  ; &nbsp; &nbsp;  busquedaVO.setCampoDonde(this.getCampoDonde());
>&nbsp; &nbsp;  }
>
>; &nbsp; &nbsp; public String getCampoQue() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return campoQue;
; &nbsp;  }
>
>; &nbsp; &nbsp; public void setCampoQue(String campoQue) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.campoQue = campoQue;
> &nbsp;   }
>
>; &nbsp; &nbsp; public String getCampoDonde() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return campoDonde;
>&nbsp; &nbsp;  }
>
>; &nbsp; &nbsp; public void setCampoDonde(String campoDonde) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.campoDonde = campoDonde;
; &nbsp;  }
>
>; &nbsp; &nbsp; public String getJsActivado() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return jsActivado;
>&nbsp; &nbsp;  }
>
>; &nbsp; &nbsp; public void setJsActivado(String jsActivado) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.jsActivado = jsActivado;
; &nbsp;  }
>
>; &nbsp; &nbsp; public String getQuienSoy() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return quienSoy;
; &nbsp;  }
>
>; &nbsp; &nbsp; public void setQuienSoy(String quienSoy) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.quienSoy = quienSoy;
> &nbsp;   }
>
>; &nbsp; &nbsp; public BusquedaVO getBusquedaVO() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return busquedaVO;
>&nbsp; &nbsp;  }
>
>; &nbsp; &nbsp; public void setBusquedaVO(BusquedaVO busquedaVO) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.busquedaVO = busquedaVO;
; &nbsp;  }
>
>; &nbsp; &nbsp; public String getXml() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return xml;
>; &nbsp; &nbsp; }
>
>; &nbsp; &nbsp; public void setXml(String xml) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.xml = xml;
>&nbsp;   ; }
>
>; &nbsp; &nbsp; public Collection getColeccion() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return coleccion;
  ;  }
>
&gt; &nbsp; &nbsp; public void setColeccion(Collection coleccion) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.coleccion = coleccion;
  ;  }
>
>; &nbsp; &nbsp; public SrvBusquedaNoxtrumServiceImpl getServicio() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return servicio;
; &nbsp;  }
>
>; &nbsp; &nbsp; public void setServicio(SrvBusquedaNoxtrumServiceImpl
&gt; servicio) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.servicio = servicio;
> &nbsp;   }
>
>; }
>
>;
>
> 2007/9/24, Angel Miralles Arevalo < anmirallesyahoo.es">anmirallesyahoo.es&gt;:
> >
> >
> >
> >
> > Please, send your bean code #{yellProxy.encuentra}.
> >
> >
> > ----- Mensaje original ----
>; > De: Alonso Isidoro Roman < alonsoirgmail.com">alonsoirgmail.com>
> > Para: usersmyfaces.apache.org">usersmyfaces.apache.org
&gt; > Enviado: lunes, 24 de septiembre, 2007 12:08:21
> > Asunto: pls help with exception
> >
> >
> > hi everybody, i`m newbee with jsf first at all!
> >
> >
> > it takes me this exception when i submit the form:
&gt; > javax.servlet.ServletException
&gt; > : Error calling action method of component with id formulario:boton
> > javax.faces.webapp.FacesServlet.service
>; > (FacesServlet.java:152)
> >
>; org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java
> > :368)
> >
> >
> >
> > causa raíz javax.faces.FacesException: Error calling action method of
> component with id formulario:boton
> >
> >
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
> >
> >
> de.mindmatters.faces.application.DelegatingActionListener.processAction (DelegatingActionListener.java:106)
> > javax.faces.component.UICommand.broadcast
&gt; > (UICommand.java:106)
> > org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents
> > (AjaxViewRoot.java :274)
> >
> org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:250)
> >
> org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication
> > (AjaxViewRoot.java:405)
> >
> de.mindmatters.faces.lifecycle.InvokeApplicationPhase.executePhase
> > (InvokeApplicationPhase.java:43)
> >
> de.mindmatters.faces.lifecycle.AbstractPhase.execute(AbstractPhase.java :37)
> > de.mindmatters.faces.lifecycle.LifecycleImpl.executePhase
> > (LifecycleImpl.java:166)
> > de.mindmatters.faces.lifecycle.LifecycleImpl.execute
&gt; > (LifecycleImpl.java:211)
> >
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
&gt; >
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter
&gt; > (MonitorFilter.java:368)
> >
> >
>; >
> > my faces page is
> >
> > <% taglib uri="http://java.sun.com/jsf/html&quot; prefix=&quot;h" %>
> > <% taglib uri=" http://java.sun.com/jsf/core&quot; prefix=&quot;f" %>
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN";>
> >
> > <html&gt;
> > <f:view>
> >   ;  <f:loadBundle basename=&quot;MessageResources&quot; var="msg"/&gt;
> > <head&gt;
> >   ; &nbsp; &nbsp;  <title&gt;
> >   ; &nbsp; &nbsp; &nbsp; &nbsp;  ${msg.titulo }
> >   ; &nbsp; &nbsp;  </title>
> > </head&gt;
> >
> > <body&gt;
> >   ;  <h:form id="formulario&quot;>
&gt; >   ; &nbsp; &nbsp;  <h:inputText id="campoQue&quot; value=&quot;#{ yellProxy.campoQue}" />
>  ; &nbsp; &nbsp;  <h:inputText id="campoDonde&quot; value=&quot;#{yellProxy.campoDonde }" />
>  ; &nbsp; &nbsp;  <h:commandButton id="boton" value=&quot;#{msg.boton }"
> action=&quot;#{yellProxy.encuentra }"/&gt;
> >   ;  </h:form>
> > </f:view>
> > </body&gt;
> > </html&gt;
> >
> > my faces-config is:
> >
> > <?xml version=&#39;1.0' encoding=&#39;UTF-8&#39;?>
&gt; >
> >
> > <!DOCTYPE faces-config PUBLIC
>; >   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN&quot;
> >   " http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
> >
> > <!-- =========== FULL CONFIGURATION FILE
>; ================================== -->
>; >
> > <faces-config>
> >   ;  <!-- El mantenimiento del bean proxy se delega al contenedor de
> spring--&gt;
> >
> >   ; &nbsp; <;application>
>; >   ; &nbsp; &nbsp; &nbsp; &lt;variable-resolver&gt;
> >
> org.springframework.web.jsf.DelegatingVariableResolver
> >   ; &nbsp; &nbsp; &nbsp; &lt;/variable-resolver&gt;
> >   ; &nbsp; <;/application>
> >
>; >   ; &nbsp; <;!-- el unico idioma permitido es el español.-->
> >   ; &nbsp; <;application>
> >   ; &nbsp; &nbsp;  <locale-config>
> >   ; &nbsp; &nbsp; &nbsp; &nbsp;  <default-locale>;es</default-locale>
>  ; &nbsp; &nbsp;  </locale-config>;
> >   ; &nbsp; <;/application>
> >
> >   ; &nbsp; <;!--
> >   ; &nbsp;  - navigation rules
>  ; &nbsp;  -->
>; >   ;  <navigation-rule&gt;
> >   ; &nbsp; &nbsp;  <from-view-id>/index.jsp&lt;/from-view-id>
&gt; >   ; &nbsp; &nbsp;  <navigation-case&gt;
> >   ; &nbsp; &nbsp; &nbsp; &nbsp;  <from-outcome>succesJS</from-outcome>
>  ; &nbsp; &nbsp; &nbsp; &nbsp;  <to-view-id>/jsActivado.jsp</to-view-id>
> >   ; &nbsp; &nbsp;  </navigation-case&gt;
> >   ; &nbsp; &nbsp;  <navigation-case&gt;
> >   ; &nbsp; &nbsp; &nbsp; &nbsp;  <from-outcome>succesNoJS&lt;/from-outcome>
&gt; >   ; &nbsp; &nbsp; &nbsp; &nbsp;  <to-view-id>/jsDesactivado.jsp</to-view-id>;
> >   ; &nbsp; &nbsp;  </navigation-case&gt;
> >   ;  </navigation-rule&gt;
> > </faces-config>
> >
> > my applicationContext.xml is
> >
> > <?xml version=&quot; 1.0&quot; encoding=&quot;UTF-8&quot;?>
> > <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN&quot;
> >   ; &nbsp; &nbsp; &nbsp;  "
>; http://www.springframework.org/dtd/spring-beans-2.0.dtd ">
> > <beans&gt;
> >
> >   ;  <bean id="ParserSAX&quot;
> class=&quot;es.yell.frontlite.parser.ParserPrincipalHandler &quot;
> scope=&quot;singleton"/>
> >
> >   ;  <bean id="Controller&quot; class=&quot;
> es.yell.frontlite.servlets.Controller" scope=&quot;singleton"/>
> >
>; >   ;  <bean id="srvBusquedaNoxtrumService"
&gt; class=&quot;es.yell.frontlite.service.impl.SrvBusquedaNoxtrumServiceImpl
>; " scope=&quot;singleton">
> >   ; &nbsp; &nbsp;  <property name=";parserSAX&quot;>&lt;ref bean=";ParserSAX&quot;/>&lt;/property>
>; >   ; &nbsp; &nbsp;  <property name=";controlador"><ref bean=";Controller"/></property>
>  ;  </bean&gt;
> >
> >   ;  <bean id="yellProxy&quot;
> class=&quot;es.yell.frontlite.servlets.YellProxy"
> scope=&quot;singleton">
> >   ; &nbsp; &nbsp;  <property name=";servicio&quot;>
&gt; >   ; &nbsp; &nbsp; &nbsp; &nbsp;  <ref bean=";srvBusquedaNoxtrumService"/>
>  ; &nbsp; &nbsp;  </property>
>; >   ;  </bean&gt;
> > </beans>
> >
> > another question:
> >
> > why do i have to put the url http: // localhost:8084/index.faces i browser
> instead of
> > Http: // localhost:8084/index.jsp
> > Or
> > Http: // localhost:8084/index.jsf?
> >
> > pls help
> > --
> > Alonso Isidoro Roman.
>; >
>; >
> > ________________________________
>
> > Sé un Mejor Amante del Cine
> > ¿Quieres saber cómo? ¡Deja que otras personas te ayuden! .
> >
>
>
>
> --
> Alonso Isidoro Roman.


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



--
Alonso Isidoro Roman.
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )