You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tomi21 <to...@gmail.com> on 2008/11/19 12:03:21 UTC

Struts2 2.0.11 problem with url and parameters

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-tp20577582p20577582.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Dirk Forchel <di...@exedio.com>.
Hallo Tomi,
this is obviously a getter and not a setter method.
try

public void setIndice(int indice) {
    this.indice = indice
}

Dirk

Tomi21 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
>>
>>
>>
>>     
>
>   


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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
Yeah, that's what I was thinking also, but from the struts.xml it
looks like it's not associated with the action in question.

Nils-H

On Tue, Nov 25, 2008 at 11:04 AM, Lukasz Lenart
<lu...@googlemail.com> wrote:
> I noticed two custom interceptors, maybe that's the source of problem
> existeUserName
> validadorFechas
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> 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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
If someone has experienced problems with struts2 applications running on oc4j
please
give a hand.
What tests can I do in order to identify de precise problem with oc4j?

Thanks!!


Tomi21 wrote:
> 
> OK, good news!!
> 
> I've installed a fresh apache tomcat 6.018 and everything is working now.
> The problem is that my app. must run on a 0c4j 10.1.3.1. 
> It seems that there is a problem with oc4j. 
> Does anyone know what problem can be?
> Can anyone tell me wich are the minimum .jar's needed in order for struts2
> to work.
> I'am not using spring. 
> 
> I really appreciate your help!!
> 
> Tomás 
> 
> 
> 
> Nils-Helge Garli wrote:
>> 
>> Maybe it's something wrong with your runtime environment. Try setting
>> your project up on a different fresh app server (or maybe try the
>> maven jetty plugin) and see if you get the same behaviour there.
>> 
>> Nils-H
>> 
>> On Thu, Nov 27, 2008 at 11:58 AM, Tomi21 <to...@gmail.com> wrote:
>>>
>>> I know, but I did it just in case I found something out.
>>> In my previous example the println it is being execute but the value of
>>> test
>>> is NULL.In other words, the action gets executed but the parameter is
>>> not
>>> set.
>>>
>>> Now, as you said in your post, I've changed the link to:
>>> http://localhost:8888/TestWeb/Test.action?test=something CLICK ON
>>> But I'm obtaining the same result: the actions gets executed but the
>>> parameters is not set.
>>> Of course I've configured again the default interceptors.
>>>
>>> I've also tried taking out .action extension but with the same result.
>>>
>>> Thanks!!.
>>>
>>>
>>> newton.dave wrote:
>>>>
>>>> --- On Wed, 11/26/08, Tomi21 <to...@gmail.com> wrote:
>>>>> What I've done next is changing 'struts.xml' so
>>>>> there are no interceptors configured.
>>>>> The packagedoes not extend struts-default anymore.
>>>>> The action is still being executed but the parameter is not
>>>>> being set anyway.:(
>>>>
>>>> Well that's hardly surprising, it's an interceptor that sets
>>>> parameters.
>>>>
>>>> On your previous example the test println isn't even being executed, so
>>>> there's something else wrong, no? What if you use the url tag's
>>>> "action"
>>>> attribute w/o the ".action" extension? Is the link rendering properly?
>>>>
>>>> In general we don't use the <s:a...> tag for non-Ajax URLs, too--what
>>>> if
>>>> you use a plain HTML <a...> tag with the generated URL?
>>>>
>>>> Dave
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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-tp20577582p20717192.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-tp20577582p20793209.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
OK, good news!!

I've installed a fresh apache tomcat 6.018 and everything is working now.
The problem is that my app. must run on a 0c4j 10.1.3.1. 
It seems that there is a problem with oc4j. 
Does anyone know what problem can be?
Can anyone tell me wich are the minimum .jar's needed in order for struts2
to work.
I'am not using spring. 

I really appreciate your help!!

Tomás 



Nils-Helge Garli wrote:
> 
> Maybe it's something wrong with your runtime environment. Try setting
> your project up on a different fresh app server (or maybe try the
> maven jetty plugin) and see if you get the same behaviour there.
> 
> Nils-H
> 
> On Thu, Nov 27, 2008 at 11:58 AM, Tomi21 <to...@gmail.com> wrote:
>>
>> I know, but I did it just in case I found something out.
>> In my previous example the println it is being execute but the value of
>> test
>> is NULL.In other words, the action gets executed but the parameter is not
>> set.
>>
>> Now, as you said in your post, I've changed the link to:
>> http://localhost:8888/TestWeb/Test.action?test=something CLICK ON
>> But I'm obtaining the same result: the actions gets executed but the
>> parameters is not set.
>> Of course I've configured again the default interceptors.
>>
>> I've also tried taking out .action extension but with the same result.
>>
>> Thanks!!.
>>
>>
>> newton.dave wrote:
>>>
>>> --- On Wed, 11/26/08, Tomi21 <to...@gmail.com> wrote:
>>>> What I've done next is changing 'struts.xml' so
>>>> there are no interceptors configured.
>>>> The packagedoes not extend struts-default anymore.
>>>> The action is still being executed but the parameter is not
>>>> being set anyway.:(
>>>
>>> Well that's hardly surprising, it's an interceptor that sets parameters.
>>>
>>> On your previous example the test println isn't even being executed, so
>>> there's something else wrong, no? What if you use the url tag's "action"
>>> attribute w/o the ".action" extension? Is the link rendering properly?
>>>
>>> In general we don't use the <s:a...> tag for non-Ajax URLs, too--what if
>>> you use a plain HTML <a...> tag with the generated URL?
>>>
>>> Dave
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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-tp20577582p20717192.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-tp20577582p20717983.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
Maybe it's something wrong with your runtime environment. Try setting
your project up on a different fresh app server (or maybe try the
maven jetty plugin) and see if you get the same behaviour there.

Nils-H

On Thu, Nov 27, 2008 at 11:58 AM, Tomi21 <to...@gmail.com> wrote:
>
> I know, but I did it just in case I found something out.
> In my previous example the println it is being execute but the value of test
> is NULL.In other words, the action gets executed but the parameter is not
> set.
>
> Now, as you said in your post, I've changed the link to:
> http://localhost:8888/TestWeb/Test.action?test=something CLICK ON
> But I'm obtaining the same result: the actions gets executed but the
> parameters is not set.
> Of course I've configured again the default interceptors.
>
> I've also tried taking out .action extension but with the same result.
>
> Thanks!!.
>
>
> newton.dave wrote:
>>
>> --- On Wed, 11/26/08, Tomi21 <to...@gmail.com> wrote:
>>> What I've done next is changing 'struts.xml' so
>>> there are no interceptors configured.
>>> The packagedoes not extend struts-default anymore.
>>> The action is still being executed but the parameter is not
>>> being set anyway.:(
>>
>> Well that's hardly surprising, it's an interceptor that sets parameters.
>>
>> On your previous example the test println isn't even being executed, so
>> there's something else wrong, no? What if you use the url tag's "action"
>> attribute w/o the ".action" extension? Is the link rendering properly?
>>
>> In general we don't use the <s:a...> tag for non-Ajax URLs, too--what if
>> you use a plain HTML <a...> tag with the generated URL?
>>
>> Dave
>>
>>
>> ---------------------------------------------------------------------
>> 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-tp20577582p20717192.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
I know, but I did it just in case I found something out.
In my previous example the println it is being execute but the value of test
is NULL.In other words, the action gets executed but the parameter is not
set.

Now, as you said in your post, I've changed the link to:
http://localhost:8888/TestWeb/Test.action?test=something CLICK ON 
But I'm obtaining the same result: the actions gets executed but the
parameters is not set.
Of course I've configured again the default interceptors.

I've also tried taking out .action extension but with the same result.

Thanks!!.


newton.dave wrote:
> 
> --- On Wed, 11/26/08, Tomi21 <to...@gmail.com> wrote:
>> What I've done next is changing 'struts.xml' so
>> there are no interceptors configured.
>> The packagedoes not extend struts-default anymore.
>> The action is still being executed but the parameter is not
>> being set anyway.:(
> 
> Well that's hardly surprising, it's an interceptor that sets parameters.
> 
> On your previous example the test println isn't even being executed, so
> there's something else wrong, no? What if you use the url tag's "action"
> attribute w/o the ".action" extension? Is the link rendering properly?
> 
> In general we don't use the <s:a...> tag for non-Ajax URLs, too--what if
> you use a plain HTML <a...> tag with the generated URL?
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> 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-tp20577582p20717192.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Dave Newton <ne...@yahoo.com>.
--- On Wed, 11/26/08, Tomi21 <to...@gmail.com> wrote:
> What I've done next is changing 'struts.xml' so
> there are no interceptors configured.
> The packagedoes not extend struts-default anymore.
> The action is still being executed but the parameter is not
> being set anyway.:(

Well that's hardly surprising, it's an interceptor that sets parameters.

On your previous example the test println isn't even being executed, so there's something else wrong, no? What if you use the url tag's "action" attribute w/o the ".action" extension? Is the link rendering properly?

In general we don't use the <s:a...> tag for non-Ajax URLs, too--what if you use a plain HTML <a...> tag with the generated URL?

Dave


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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
Hi,

I've try that but interceptors dont say anything.
What I've done next is changing 'struts.xml' so there are no interceptors
configured.
The packagedoes not extend struts-default anymore.
The action is still being executed but the parameter is not being set
anyway.:(

Any ideas from this point?

This the struts.xml as is now:

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

    <package name="default">    	
    	<result-types>
            <result-type name="chain"
class="com.opensymphony.xwork2.ActionChainResult"/>
            <result-type name="dispatcher"
class="org.apache.struts2.dispatcher.ServletDispatcherResult"
default="true"/>
            <result-type name="freemarker"
class="org.apache.struts2.views.freemarker.FreemarkerResult"/>
            <result-type name="httpheader"
class="org.apache.struts2.dispatcher.HttpHeaderResult"/>
            <result-type name="redirect"
class="org.apache.struts2.dispatcher.ServletRedirectResult"/>
            <result-type name="redirectAction"
class="org.apache.struts2.dispatcher.ServletActionRedirectResult"/>
            <result-type name="stream"
class="org.apache.struts2.dispatcher.StreamResult"/>
            <result-type name="velocity"
class="org.apache.struts2.dispatcher.VelocityResult"/>
            <result-type name="xslt"
class="org.apache.struts2.views.xslt.XSLTResult"/>
            <result-type name="plainText"
class="org.apache.struts2.dispatcher.PlainTextResult" />
            <!-- Deprecated name form scheduled for removal in Struts 2.1.0.
The camelCase versions are preferred. See ww-1707 -->
            <result-type name="redirect-action"
class="org.apache.struts2.dispatcher.ServletActionRedirectResult"/>
            <result-type name="plaintext"
class="org.apache.struts2.dispatcher.PlainTextResult" />
        </result-types>
    	    	
    	
        <action name="Test" class="testpackage.Test"> 	      	
            <result>index.jsp</result> 	      
        </action>	  		  
   </package>
</struts>

Thank you!!




Andras Balogh wrote:
> 
> Hi,
> Can you set the log level to DEBUG to see what the interceptors say?
> Something like:
> log4j.category.com.opensymphony=DEBUG
> 
> BR, Andras
> 
> 
> ---------------------------------------------------------------------
> 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-tp20577582p20703831.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Andras Balogh <an...@reea.net>.
Hi,
Can you set the log level to DEBUG to see what the interceptors say?
Something like:
log4j.category.com.opensymphony=DEBUG

BR, Andras


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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
I've create a sample application with only one jsp, one action and no
user-defined interceptors. Even in this case the parameter is not being set.

These are the application main file. Please help!!I don't know what more I
can try.

struts.xml
---------
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>	
    <package name="default" extends="struts-default">    	
 	      <action name="Test" class="testpackage.Test"> 	      	
 	      	<result>index.jsp</result>  	 	      	
	      </action>	  		  
   </package>
</struts>

index.jsp
---------
<%@ taglib prefix="str" uri="/struts-tags" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<str:url id="url" action="Test.action">
<str:param name="test">something</str:param>
</str:url>
<str:a href="%{url}">CLICK ON</str:a>
</body>
</html>

Test.java
---------
package testpackage;

import com.opensymphony.xwork2.ActionSupport;

public class Test extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String test;
	
	public String execute(){
		System.out.println("TEST: " + test);
		return ActionSupport.SUCCESS;
		
	}

	public void setTest(String test) {
		this.test = test;
	}

	public String getTest() {
		return test;
	}
	
	

}

Web.xml
--------
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="web-app_1" xmlns="http://java.sun.com/xml/ns/j2ee"
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">
 <display-name>TestWeb</display-name>
  <filter>
    <filter-name>struts2</filter-name>
   
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>   
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>

Trace
----- 
08/11/26 10:44:55 TEST: null
26-nov-2008 10:44:55 com.opensymphony.xwork2.util.profiling.UtilTimerStack
printTimes
INFO: [63ms] - FilterDispatcher_doFilter: 
  [47ms] - Handling request from Dispatcher
    [0ms] - create DefaultActionProxy: 
      [0ms] - create DefaultActionInvocation: 
        [0ms] - actionCreate: Test
    [47ms] - invoke: 
      [47ms] - interceptor: exception
        [47ms] - invoke: 
          [47ms] - interceptor: alias
            [47ms] - invoke: 
              [47ms] - interceptor: servletConfig
                [47ms] - invoke: 
                  [47ms] - interceptor: prepare
                    [47ms] - invoke: 
                      [47ms] - interceptor: i18n
                        [47ms] - invoke: 
                          [47ms] - interceptor: chain
                            [47ms] - invoke: 
                              [47ms] - interceptor: debugging
                                [47ms] - invoke: 
                                  [47ms] - interceptor: profiling
                                    [47ms] - invoke: 
                                      [47ms] - interceptor:
scopedModelDriven
                                        [47ms] - invoke: 
                                          [47ms] - interceptor: modelDriven
                                            [47ms] - invoke: 
                                              [47ms] - interceptor:
fileUpload
                                                [47ms] - invoke: 
                                                  [47ms] - interceptor:
checkbox
                                                    [47ms] - invoke: 
                                                      [47ms] - interceptor:
staticParams
                                                        [47ms] - invoke: 
                                                          [47ms] -
interceptor: params
                                                            [47ms] - invoke: 
                                                              [47ms] -
interceptor: conversionError
                                                                [47ms] -
invoke: 
                                                                  [47ms] -
interceptor: validation
                                                                    [47ms] -
invoke: 
                                                                      [47ms]
- interceptor: workflow
                                                                       
[47ms] - invoke: 
                                                                         
[0ms] - invokeAction: Test
                                                                         
[47ms] - executeResult: success

Best regards!!



Nils-Helge Garli wrote:
> 
> It's hard to tell. Everything looks correct. But there might be hidden
> a config error or something somewhere else in your application.
> Considering that it seems to work for everybody else, I suggest that
> you try to create a sample app from scratch with just one jsp and one
> action and see if you can reproduce the error somehow.
> 
> Nils-H
> 
> On Tue, Nov 25, 2008 at 11:41 AM, Tomi21 <to...@gmail.com> wrote:
>>
>> These interceptors are not configured for 'EliminarSuscripcion' action.
>> If interceptors have something to do with this issue only the ones
>> defined
>> in the default stack
>> are concerned.
>>
>> Thanks!!!
>>
>>
>> Lukasz Lenart wrote:
>>>
>>> I noticed two custom interceptors, maybe that's the source of problem
>>> existeUserName
>>> validadorFechas
>>>
>>>
>>> Regards
>>> --
>>> Lukasz
>>> http://www.lenart.org.pl/
>>>
>>> ---------------------------------------------------------------------
>>> 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-tp20577582p20678768.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-tp20577582p20697863.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
It's hard to tell. Everything looks correct. But there might be hidden
a config error or something somewhere else in your application.
Considering that it seems to work for everybody else, I suggest that
you try to create a sample app from scratch with just one jsp and one
action and see if you can reproduce the error somehow.

Nils-H

On Tue, Nov 25, 2008 at 11:41 AM, Tomi21 <to...@gmail.com> wrote:
>
> These interceptors are not configured for 'EliminarSuscripcion' action.
> If interceptors have something to do with this issue only the ones defined
> in the default stack
> are concerned.
>
> Thanks!!!
>
>
> Lukasz Lenart wrote:
>>
>> I noticed two custom interceptors, maybe that's the source of problem
>> existeUserName
>> validadorFechas
>>
>>
>> Regards
>> --
>> Lukasz
>> http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> 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-tp20577582p20678768.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
This is the code of one of my interceptors:

package es.uv.lisitt.dtx2.configuraciontool.web;

import java.util.Map;

import org.apache.log4j.Logger;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ValidationAware;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;



import es.uv.lisitt.dtx2.utilidades.Errores;

public class NuevaSuscripcionP1Interceptor extends AbstractInterceptor {

	
	private static final long serialVersionUID = 1L;
	
	/**
	 * Datos de Logger
	 */
	static Logger log = Logger.getLogger(NuevaSuscripcionP1Interceptor.class);	
	

	public String intercept(ActionInvocation invocation) throws Exception {
		
		String fechaInicio = null;
		String horaInicio = null;
		String fechaFin = null;
		String horaFin = null;		
		Map<String,String[]> parameters;
		
		try{			
			parameters = ActionContext.getContext().getParameters();
			
			fechaInicio = parameters.get("fechaInicio")[0];			
			if(fechaInicio.equalsIgnoreCase("")){
				 fechaInicio = null;
			}
			horaInicio = parameters.get("horaInicio")[0];
			if(horaInicio.equalsIgnoreCase("")){
				horaInicio = null;
			}
			fechaFin = parameters.get("fechaFin")[0];
			if(fechaFin.equalsIgnoreCase("")){
				fechaFin = null;
			}
			horaFin = parameters.get("horaFin")[0];
			if(horaFin.equalsIgnoreCase("")){
				horaFin = null;
			}
			
			if ((fechaInicio!=null) || (fechaFin!=null) || (horaInicio!=null) ||
(horaInicio!=null) ){
								
				if ((fechaInicio==null) || (fechaFin==null) || (horaInicio==null) ||
(fechaInicio==null) ){
								
					addActionError(invocation,"Para introducir las fechas debe rellenar
todos los campos obligatoriamente");
					
					if((fechaInicio==null)||(fechaInicio.equalsIgnoreCase(""))){
						addFieldError(invocation, "fechaInicio", "");
					}
					if((horaInicio==null)||(horaInicio.equalsIgnoreCase(""))){
						addFieldError(invocation, "horaInicio", "");
					}
					if((fechaFin==null)||(fechaFin.equalsIgnoreCase(""))){
						addFieldError(invocation, "fechaFin", "");
					}
					if((horaFin==null)||(horaFin.equalsIgnoreCase(""))){
						addFieldError(invocation, "horaFin", "");
					}					
					return Action.INPUT;
				}				
			}		
		}catch (Exception e) {
			log.error(e);
			log.error(Errores.formateaPila(e.getStackTrace()));
		}
		return invocation.invoke();
	}

	private void addActionError(ActionInvocation invocation, String message) {
		Object action = invocation.getAction();
		if(action instanceof ValidationAware) {
			((ValidationAware) action).addActionError(message);
		}
	}
	
	private void addFieldError(ActionInvocation invocation, String field,String
message) {
		Object action = invocation.getAction();
		if(action instanceof ValidationAware) {
			((ValidationAware) action).addFieldError(field, message);
		}
	}	
}



Lukasz Lenart wrote:
> 
> 2008/11/25 Tomi21 <to...@gmail.com>:
>> These interceptors are not configured for 'EliminarSuscripcion' action.
>> If interceptors have something to do with this issue only the ones
>> defined
>> in the default stack
>> are concerned.
> 
> Yes, but I must look in to the Struts2 source to check how the
> interceptors are created. Maybe that can be somehow related to your
> problem.
> 
> 
> Regards
> -- 
> Lukasz
> http://www.lenart.org.pl/
> 
> ---------------------------------------------------------------------
> 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-tp20577582p20680636.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Lukasz Lenart <lu...@googlemail.com>.
2008/11/25 Tomi21 <to...@gmail.com>:
> These interceptors are not configured for 'EliminarSuscripcion' action.
> If interceptors have something to do with this issue only the ones defined
> in the default stack
> are concerned.

Yes, but I must look in to the Struts2 source to check how the
interceptors are created. Maybe that can be somehow related to your
problem.


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
These interceptors are not configured for 'EliminarSuscripcion' action. 
If interceptors have something to do with this issue only the ones defined
in the default stack 
are concerned.

Thanks!!!


Lukasz Lenart wrote:
> 
> I noticed two custom interceptors, maybe that's the source of problem
> existeUserName
> validadorFechas
> 
> 
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
> 
> ---------------------------------------------------------------------
> 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-tp20577582p20678768.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Lukasz Lenart <lu...@googlemail.com>.
I noticed two custom interceptors, maybe that's the source of problem
existeUserName
validadorFechas


Regards
--
Lukasz
http://www.lenart.org.pl/

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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
This is my jsp code:

<str:url id="url_delete" action="EliminarSuscripcion.action">
    <str:param name="index" value="%{#stat.index}"></str:param>
</str:url>
<str:a href="%{url_delete}">Eliminar</str:a>

Once is rendered it looks like this:
/ConfiguracionDTX2Web/EliminarSuscripcion.action?index=0 Eliminar 

I've implemented the ParameterAware interface. The function "public void
setParameters(Map arg0)"
is being called but the Map 'arg0' is NULL.

Any ideas from this point?

Thanks in advance.


Nils-Helge Garli wrote:
> 
> What does your jsp look like? Have you tried implementing
> ParameterAware and see if any parameters are passed at all?
> 
> Nils-H
> 
> On Tue, Nov 25, 2008 at 10:04 AM, Tomi21 <to...@gmail.com> wrote:
>>
>> Can Someone give me a hand please?
>>
>> Thanks very much!!
>>
>> Tomi21 wrote:
>>>
>>> I've changed the type to Integer and is still not working. If I set the
>>> parameteres with a form and POST method everything works fine but if I
>>> use
>>> <url> tag (GET method) the setter is never called.
>>>
>>> Has it maybe something to do with interceptors?
>>>
>>> Thanks for helping. I'm going crazy with this issue!!.
>>>
>>>
>>> Andras Balogh wrote:
>>>>
>>>> Hi,
>>>>
>>>> Only in this case is not working with the parameter "indice" or none of
>>>> the parameters (in other actions) are set?
>>>> Can you try to use Integer instead of int? For me it works with
>>>> Integer.
>>>>
>>>> Best regards,
>>>> Andras.
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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-tp20577582p20677399.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-tp20577582p20678025.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
What does your jsp look like? Have you tried implementing
ParameterAware and see if any parameters are passed at all?

Nils-H

On Tue, Nov 25, 2008 at 10:04 AM, Tomi21 <to...@gmail.com> wrote:
>
> Can Someone give me a hand please?
>
> Thanks very much!!
>
> Tomi21 wrote:
>>
>> I've changed the type to Integer and is still not working. If I set the
>> parameteres with a form and POST method everything works fine but if I use
>> <url> tag (GET method) the setter is never called.
>>
>> Has it maybe something to do with interceptors?
>>
>> Thanks for helping. I'm going crazy with this issue!!.
>>
>>
>> Andras Balogh wrote:
>>>
>>> Hi,
>>>
>>> Only in this case is not working with the parameter "indice" or none of
>>> the parameters (in other actions) are set?
>>> Can you try to use Integer instead of int? For me it works with Integer.
>>>
>>> Best regards,
>>> Andras.
>>>
>>> ---------------------------------------------------------------------
>>> 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-tp20577582p20677399.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
Can Someone give me a hand please? 

Thanks very much!!

Tomi21 wrote:
> 
> I've changed the type to Integer and is still not working. If I set the
> parameteres with a form and POST method everything works fine but if I use
> <url> tag (GET method) the setter is never called.
> 
> Has it maybe something to do with interceptors?
> 
> Thanks for helping. I'm going crazy with this issue!!.
> 
> 
> Andras Balogh wrote:
>> 
>> Hi,
>> 
>> Only in this case is not working with the parameter "indice" or none of 
>> the parameters (in other actions) are set?
>> Can you try to use Integer instead of int? For me it works with Integer.
>> 
>> Best regards,
>> Andras.
>> 
>> ---------------------------------------------------------------------
>> 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-tp20577582p20677399.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
I've changed the type to Integer and is still not working. If I set the
parameteres with a form and POST method everything works fine but if I use
<url> tag (GET method) the setter is never called.

Has it maybe something to do with interceptors?

Thanks for helping. I'm going crazy with this issue!!.


Andras Balogh wrote:
> 
> Hi,
> 
> Only in this case is not working with the parameter "indice" or none of 
> the parameters (in other actions) are set?
> Can you try to use Integer instead of int? For me it works with Integer.
> 
> Best regards,
> Andras.
> 
> ---------------------------------------------------------------------
> 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-tp20577582p20599998.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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Andras Balogh <an...@reea.net>.
Hi,

Only in this case is not working with the parameter "indice" or none of 
the parameters (in other actions) are set?
Can you try to use Integer instead of int? For me it works with Integer.

Best regards,
Andras.

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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
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 <to...@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 <to...@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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
What does your struts.xml look like?

Nils-H

On Thu, Nov 20, 2008 at 10:01 AM, Tomi21 <to...@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 <to...@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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
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 <to...@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


Re: Struts2 2.0.11 problem with url and parameters

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
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 <to...@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


RE: Struts2 2.0.11 problem with url and parameters

Posted by Tomi21 <to...@gmail.com>.
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