struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomi21 <tomitre...@gmail.com>
Subject Re: Struts2 2.0.11 problem with url and parameters
Date Thu, 20 Nov 2008 09:47:59 GMT

This is my struts.xml:

<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>

<constant name="struts.enable.DynamicMethodInvocation" value="true" />
<constant name="struts.devMode" value="true" />
    <package name="default" extends="struts-default">
    	<!-- INTERCEPTORS -->
    	<interceptors>    		
    		<interceptor name="existeUserName"
class="es.uv.lisitt.dtx2.configuraciontool.web.NuevoUsuarioInterceptor"></interceptor>
   		
    		<interceptor name="validadorFechas"
class="es.uv.lisitt.dtx2.configuraciontool.web.NuevaSuscripcionP1Interceptor"></interceptor>
    	</interceptors>
    	
    	<!-- ACTIONS -->
 	      <action name="Logon"
class="es.uv.lisitt.dtx2.configuraciontool.web.Logon">
 	      	<result name="error">error.jsp</result>
 	      	<result name="input">index.jsp</result>
  			<result>main.jsp</result>  			
		  </action>		  
		  <action name="EliminarParametro"
class="es.uv.lisitt.dtx2.configuraciontool.web.EliminarParametro">
		  <result>lista_parametros.jsp</result>
		  </action>
		  <action name="EditarParametro"
class="es.uv.lisitt.dtx2.configuraciontool.web.EditarParametro">
		  <result>lista_parametros.jsp</result>
		  </action>
		  <action name="NuevoParametro"
class="es.uv.lisitt.dtx2.configuraciontool.web.NuevoParametro">
		  	<result name="input">nuevo_parametro.jsp</result>	
		  	<result name="success">lista_parametros.jsp</result>
		  </action>
		  <action name="inicio">
		  <result>index.jsp </result>
		   </action>
		  <action name="salir"
class="es.uv.lisitt.dtx2.configuraciontool.web.Logon" method="logout">
		  <result>index.jsp </result>
		  </action>
		  <action name="estado"
class="es.uv.lisitt.dtx2.configuraciontool.web.Estado">
		  <result>estado.jsp</result>
		  </action>		  
		  <action name="NuevoUsuario"
class="es.uv.lisitt.dtx2.configuraciontool.web.NuevoUsuario">
		  	<result name="error">error.jsp</result>
		  	<result name="input">nuevo_usuario.jsp</result>		  	
		  	<result name="success">lista_usuarios.jsp</result>
		  	<interceptor-ref name="defaultStack"></interceptor-ref>
		  	<interceptor-ref name="existeUserName"></interceptor-ref>			  	 
		  </action>		  
		  <action name="EditarUsuario"
class="es.uv.lisitt.dtx2.configuraciontool.web.EditarUsuario">
		  	<result name="error">error.jsp</result>
		  	<result name="input">editar_usuario.jsp</result>		  	
		  	<result name="success">lista_usuarios.jsp</result>		  	  	 
		  </action>	
		  <action name="EliminarUsuario"
class="es.uv.lisitt.dtx2.configuraciontool.web.EliminarUsuario">
		  <result>lista_usuarios.jsp</result>
		  </action>			
		  <action name="NuevaSuscripcionP1"
class="es.uv.lisitt.dtx2.configuraciontool.web.NuevaSuscripcionP1">
		  	<result name="error">error.jsp</result>
		  	<result name="input">nueva_suscripcion_p1.jsp</result>		  	
		  	<result name="success">nueva_suscripcion_p2.jsp</result>	
		  	<interceptor-ref name="defaultStack"></interceptor-ref>
		  	<interceptor-ref name="validadorFechas"></interceptor-ref>		  			  	 
		  </action>	
		  <action name="NuevaSuscripcionP2"
class="es.uv.lisitt.dtx2.configuraciontool.web.NuevaSuscripcionP2">
		  	<result name="error">error.jsp</result>
		  	<result name="input">nueva_suscripcion_p2.jsp</result>		  	
		  	<result name="success">nueva_suscripcion_p3.jsp</result>		  			  	 
		  </action>	
		  <action name="NuevaSuscripcionP3"
class="es.uv.lisitt.dtx2.configuraciontool.web.NuevaSuscripcionP3">
		  	<result name="error">error.jsp</result>		  			  	
		  	<result name="success">main.jsp</result>		  			  	 
		  </action>		  
		  <action name="Atras"
class="es.uv.lisitt.dtx2.configuraciontool.web.Atras">
		  	<result name="error">error.jsp</result>		  			  	
		  	<result name="success">nueva_suscripcion_p1.jsp</result>		  			  			  	 
		  </action>	
		   <action name="Atras2"
class="es.uv.lisitt.dtx2.configuraciontool.web.Atras2">
		  	<result name="error">error.jsp</result>		  			  	
		  	<result name="success">nueva_suscripcion_p2.jsp</result>		  			  			  	 
		  </action>		  
		  <action name="EliminarSuscripcion"
class="es.uv.lisitt.dtx2.configuraciontool.web.EliminarSuscripcion">
		  	<result name="success">lista_suscripcionesP.jsp</result>
		  	<result name="error">error.jsp</result>
		  	<result name="input">main.jsp</result>
		  </action>	
		  <action name="EditarSuscripcionP"
class="es.uv.lisitt.dtx2.configuraciontool.web.EditarSuscripcionP">
		  	<result name="success">obtener_tipos.jsp</result>
		  	<result name="error">error.jsp</result>		  	
		  </action>		  
		  <action name="ObtenerTipos"
class="es.uv.lisitt.dtx2.configuraciontool.web.ObtenerTipos">
		  	<result name="error">error.jsp</result>			
		  	<result name="input">nueva_suscripcion_p1.jsp</result>
		  	<result>nueva_suscripcion_p1.jsp</result>
		  </action>				    
   </package>
</struts>


Nils-Helge Garli wrote:
> 
> What does your struts.xml look like?
> 
> Nils-H
> 
> On Thu, Nov 20, 2008 at 10:01 AM, Tomi21 <tomitrenor@gmail.com> wrote:
>>
>> I'm sorry!!it seems to be too early for me.
>> I have both getter and setter of course:
>>
>>
>>            public int getIndice() {
>>                return indice;
>>        }
>>
>>        public void setIndice(int indice) {
>>                this.indice = indice;
>>        }
>>
>> The setIndice method is not being called.
>>
>> Thanks for the help.
>>
>>
>> Nils-Helge Garli wrote:
>>>
>>> That's not a setter but a getter. Unless you have a setIndice method
>>> in your action it won't be set.
>>>
>>> Nils-H
>>>
>>> On Thu, Nov 20, 2008 at 9:32 AM, Tomi21 <tomitrenor@gmail.com> wrote:
>>>>
>>>> This is my complete URL:
>>>> http://localhost:8888/ConfiguracionDTX2Web/EliminarSuscripcion.action?indice=4
>>>>
>>>> And this this is my setter:
>>>>
>>>> public int getIndice() {
>>>>                return indice;
>>>>        }
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks!!.
>>>>
>>>>
>>>> Volker Karlmeier wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> what does your parameter look like ?
>>>>> Is it ?parameter=value   ??
>>>>>
>>>>> Try using
>>>>>  <s:url action="editGadget">
>>>>>      <s:param name="id" value="%{selected}" />
>>>>>  </s:url>
>>>>> where name is the name of your setter-method. (In this case setId)
>>>>>
>>>>> Regards
>>>>>
>>>>>   Volker
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I have a url with a parameter. This parameter is sent to the action
>>>>> via
>>>>> HTTP
>>>>> Get Method(i.e appended at the end of the url --> ?parameter_value).
>>>>> My
>>>>> problem is that I can't reach the parameter value in the action
>>>>> because
>>>>> the
>>>>> setter method is not being called. I can't get the value throught
>>>>>
>>>>> 'ActionContext.getContext().getParameters();' neither.
>>>>>
>>>>> This is my code. What I'm doing wrong?.
>>>>>
>>>>> <str:url id="url_delete" action="EliminarSuscripcion">
>>>>>     <str:param name="indice" value="%{#stat.index}"></str:param>
>>>>> </str:url>
>>>>> <str:a href="%{url_delete}">Eliminar</str:a>
>>>>>
>>>>> Thanks in advance.
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Struts2-2.0.11-problem-with-url-and-parameters-tp20577582p
>>>>> 20577582.html
>>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Struts2-2.0.11-problem-with-url-and-parameters-tp20577582p20596942.html
>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Struts2-2.0.11-problem-with-url-and-parameters-tp20577582p20597308.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts2-2.0.11-problem-with-url-and-parameters-tp20577582p20597914.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message