Re: SEVERE: Servlet.service() for servlet default threw exception, java.lang.IllegalStateException

2011-07-26 Thread Łukasz Lenart
2011/7/26 Emi Lu :
>> Did you try to call check_search_oprProcessAction.action directly ?
>> And maybe it's better to JSON plugin instead of home made protocol ?

I was thinking about JSON result plus jQuery.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

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



Re: Submit image button sends coordinates

2011-07-26 Thread Maurizio Cucchiara
@Christian
I don't know if it does or not, IMHO there is something that is not proper
consistent  between the nested property and the plain property (looking at
the code, I realize that theoretically only when the user runs s2 in dev
mode, this kind of exception should be throwned). My guess is that is an
issue.

On 26 July 2011 17:37, Christian Grobmeier  wrote:

> I see, I am one of those who always want to see whats going on
>
> Interesting read. Might be worth to compile a wiki entry?
>
> On Tue, Jul 26, 2011 at 3:46 PM, Maurizio Cucchiara
>  wrote:
> > There are different schools of thought, this is kind of question that has
> > multiple answers: please, take a look at
> >
> http://struts.1045723.n5.nabble.com/S2-OgnlValueStack-Error-setting-expression-warnings-after-upgrade-from-struts-2-to-struts-2-1-7-td3495667.html
> >
> > On 26 July 2011 14:58, Christian Grobmeier  wrote:
> >
> >> > @Christian
> >> > Good workaround,
> >> > in my defence I can say that I have no problem to change the log
> level,
> >> > thank to maven I can have different profile with different log level.
> >>
> >> hehe yes I have a similar setup I guess. But "expected exceptions"
> >> make me always nervous, even in development mode ,-)
> >>
> >> >
> >> > Maurizio Cucchiara
> >> >
> >> > Il giorno 26/lug/2011 12.26, "Christian Grobmeier" <
> grobme...@gmail.com>
> >> ha
> >> > scritto:
> >> >> Thanks Maurizio.
> >> >>
> >> >> I don't want to reduce my error level, now I created something weird.
> >> >> Not nice, but it works:
> >> >>
> >> >> private Submit submitCoord = null;
> >> >>
> >> >> public Submit getSubmit() {
> >> >> return submitCoord;
> >> >> }
> >> >>
> >> >> public void setSubmit(String submit) {
> >> >> this.submitCoord = new Submit(submit);
> >> >> }
> >> >>
> >> >> class Submit {
> >> >> private int x = 0;
> >> >> private int y = 0;
> >> >> private String name = "";
> >> >>
> >> >> private Submit(String name) {
> >> >> super();
> >> >> this.name = name;
> >> >> }
> >> >>
> >> >> public String getName() {
> >> >> return name;
> >> >> }
> >> >>
> >> >> public int getX() {
> >> >> return x;
> >> >> }
> >> >> public void setX(int x) {
> >> >> this.x = x;
> >> >> }
> >> >> public int getY() {
> >> >> return y;
> >> >> }
> >> >> public void setY(int y) {
> >> >> this.y = y;
> >> >> }
> >> >>
> >> >> }
> >> >>
> >> >> Cheers
> >> >> Christian
> >> >>
> >> >> On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara
> >> >>  wrote:
> >> >>> Hi Christian,
> >> >>> unfortunately IIRC there is no way to avoid that OGNL tries to find
> the
> >> >>> property accessor.
> >> >>>
> >> >>> Adding this row in your log4j.xml (properties) should mute this log
> >> > message
> >> >>> (which it should not be a warning message)
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> On 26 July 2011 11:27, Christian Grobmeier 
> >> wrote:
> >> >>>
> >>  Hi,
> >> 
> >>  using:
> >>   >>  name="submit" />
> >> 
> >>  Sends the following to my action:
> >>  submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
> >> 
> >>  x / y are coordinates of my click, defined by w3c. Now they are
> sent
> >>  to my action, and OGNL tries to set it. Which leads to:
> >> 
> >>  > Error setting expression 'submit.x' with value
> >>  '[Ljava.lang.String;@a53ed8f'
> >>  > ognl.NoSuchPropertyException: java.lang.String.x
> >> 
> >>  Of course, ognl, sets a string "submit", then tries to find the
> getX
> >>  method on my string which does not exist.
> >> 
> >>  How can I deal with that?
> >> 
> >>  Cheers
> >>  Christian
> >> 
> >> 
> -
> >>  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >>  For additional commands, e-mail: user-h...@struts.apache.org
> >> 
> >> 
> >> >>>
> >> >>>
> >> >>> --
> >> >>> Maurizio Cucchiara
> >> >>>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> http://www.grobmeier.de
> >> >>
> >> >> -
> >> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> >> For additional commands, e-mail: user-h...@struts.apache.org
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >> http://www.grobmeier.de
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >>
> >
> >
> > --
> > Maurizio Cucchiara
> >
>
>
>
> --
> http://www.grobmeier.de
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Maurizio Cucchiara


Re: Submit image button sends coordinates

2011-07-26 Thread Maurizio Cucchiara
>
> I think you're thinking about it backwards.  It doesn't start with the
> bean, inspect every property, attempt to find data and convert that data to
> the proper format, then inject it into the bean.


Chris is right: take a look at row 292 of [1]
[1]
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java?view=markup


-- 
Maurizio Cucchiara


Re: Submit image button sends coordinates

2011-07-26 Thread Maurizio Cucchiara
Hi Paul,
you hit the nail on the head: if you try to get
http://localhost:8080/struts.action?whatever=whaever_value you won't see any
exception (in no-dev mode). On the contrary, when you use a nested property,
ognl change the target object.
For example if you use a "a" property, Ognl uses as a target the compound
root (the arraylist which contains every action). When you use a nested
property, Ognl changes the target, so in case of "a.b", the target will be
the "a" (in place of the compound root). Obviously the target will be always
null and the exception will take place.

I don't know yet if is a Ognl o Struts issue.

I hope my attempt to explain is comprehensible.


On 26 July 2011 17:42, Paul Benedict  wrote:

> I don't understand that. Perhaps I haven't programmed Struts 2 enough,
> but I thought Struts (1 or 2) only captured what's defined in the
> model and ignores the other request parameters. Is it acting
> differently because of nested properties?
>
> On Tue, Jul 26, 2011 at 9:54 AM, Chris Pratt 
> wrote:
> > That's exactly what's happening, but it's also warning (in devmode only)
> > when it can't set one so that you, the developer, can make the right
> > decision for your program.
> >  (*Chris*)
> >
> > On Tue, Jul 26, 2011 at 6:50 AM, Paul Benedict 
> wrote:
> >
> >> Just a question, if I may :-) Doesn't Struts 2 have the ability to
> >> only set the properties that are defined on the bean?
> >>
> >> On Tue, Jul 26, 2011 at 8:46 AM, Maurizio Cucchiara
> >>  wrote:
> >> > There are different schools of thought, this is kind of question that
> has
> >> > multiple answers: please, take a look at
> >> >
> >>
> http://struts.1045723.n5.nabble.com/S2-OgnlValueStack-Error-setting-expression-warnings-after-upgrade-from-struts-2-to-struts-2-1-7-td3495667.html
> >> >
> >> > On 26 July 2011 14:58, Christian Grobmeier 
> wrote:
> >> >
> >> >> > @Christian
> >> >> > Good workaround,
> >> >> > in my defence I can say that I have no problem to change the log
> >> level,
> >> >> > thank to maven I can have different profile with different log
> level.
> >> >>
> >> >> hehe yes I have a similar setup I guess. But "expected exceptions"
> >> >> make me always nervous, even in development mode ,-)
> >> >>
> >> >> >
> >> >> > Maurizio Cucchiara
> >> >> >
> >> >> > Il giorno 26/lug/2011 12.26, "Christian Grobmeier" <
> >> grobme...@gmail.com>
> >> >> ha
> >> >> > scritto:
> >> >> >> Thanks Maurizio.
> >> >> >>
> >> >> >> I don't want to reduce my error level, now I created something
> weird.
> >> >> >> Not nice, but it works:
> >> >> >>
> >> >> >> private Submit submitCoord = null;
> >> >> >>
> >> >> >> public Submit getSubmit() {
> >> >> >> return submitCoord;
> >> >> >> }
> >> >> >>
> >> >> >> public void setSubmit(String submit) {
> >> >> >> this.submitCoord = new Submit(submit);
> >> >> >> }
> >> >> >>
> >> >> >> class Submit {
> >> >> >> private int x = 0;
> >> >> >> private int y = 0;
> >> >> >> private String name = "";
> >> >> >>
> >> >> >> private Submit(String name) {
> >> >> >> super();
> >> >> >> this.name = name;
> >> >> >> }
> >> >> >>
> >> >> >> public String getName() {
> >> >> >> return name;
> >> >> >> }
> >> >> >>
> >> >> >> public int getX() {
> >> >> >> return x;
> >> >> >> }
> >> >> >> public void setX(int x) {
> >> >> >> this.x = x;
> >> >> >> }
> >> >> >> public int getY() {
> >> >> >> return y;
> >> >> >> }
> >> >> >> public void setY(int y) {
> >> >> >> this.y = y;
> >> >> >> }
> >> >> >>
> >> >> >> }
> >> >> >>
> >> >> >> Cheers
> >> >> >> Christian
> >> >> >>
> >> >> >> On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara
> >> >> >>  wrote:
> >> >> >>> Hi Christian,
> >> >> >>> unfortunately IIRC there is no way to avoid that OGNL tries to
> find
> >> the
> >> >> >>> property accessor.
> >> >> >>>
> >> >> >>> Adding this row in your log4j.xml (properties) should mute this
> log
> >> >> > message
> >> >> >>> (which it should not be a warning message)
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>> On 26 July 2011 11:27, Christian Grobmeier 
> >> >> wrote:
> >> >> >>>
> >> >>  Hi,
> >> >> 
> >> >>  using:
> >> >>   >> >>  name="submit" />
> >> >> 
> >> >>  Sends the following to my action:
> >> >>  submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
> >> >> 
> >> >>  x / y are coordinates of my click, defined by w3c. Now they are
> >> sent
> >> >>  to my action, and OGNL tries to set it. Which leads to:
> >> >> 
> >> >>  > Error setting expression 'submit.x' with value
> >> >>  '[Ljava.lang.String;@a53ed8f'
> >> >>  > ognl.NoSuchPropertyException: java.lang.String.x
> >> >> 
> >> >>  Of course, ognl, sets a string "submit", then tries to find the
> >> getX
> >> >>  method on my string which does not exist.
> >> >> 
> >> >>  How can I deal with that?
> >> >> 
> >> >>  Cheers
> >> >>  Christian
> >> >> 
> >> >> 
> >> 

Re: Submit image button sends coordinates

2011-07-26 Thread Chris Pratt
I think you're thinking about it backwards.  It doesn't start with the bean,
inspect every property, attempt to find data and convert that data to the
proper format, then inject it into the bean.

It starts with the data on hand (in this case all the GET/POST parameters)
and attempts to find a home for them.  If there is a piece of data without a
home, it gives the developer a warning (in devmode only) to make him/her
aware.  It may be a perfectly acceptable thing to the developer.  There are
definitely cases where data is stored in hidden parameters just for the use
in JavaScript or for other reasons (I tend to avoid these situations, but
they're out there).
  (*Chris*)

On Tue, Jul 26, 2011 at 8:42 AM, Paul Benedict  wrote:

> I don't understand that. Perhaps I haven't programmed Struts 2 enough,
> but I thought Struts (1 or 2) only captured what's defined in the
> model and ignores the other request parameters. Is it acting
> differently because of nested properties?
>
> On Tue, Jul 26, 2011 at 9:54 AM, Chris Pratt 
> wrote:
> > That's exactly what's happening, but it's also warning (in devmode only)
> > when it can't set one so that you, the developer, can make the right
> > decision for your program.
> >  (*Chris*)
> >
> > On Tue, Jul 26, 2011 at 6:50 AM, Paul Benedict 
> wrote:
> >
> >> Just a question, if I may :-) Doesn't Struts 2 have the ability to
> >> only set the properties that are defined on the bean?
> >>
> >> On Tue, Jul 26, 2011 at 8:46 AM, Maurizio Cucchiara
> >>  wrote:
> >> > There are different schools of thought, this is kind of question that
> has
> >> > multiple answers: please, take a look at
> >> >
> >>
> http://struts.1045723.n5.nabble.com/S2-OgnlValueStack-Error-setting-expression-warnings-after-upgrade-from-struts-2-to-struts-2-1-7-td3495667.html
> >> >
> >> > On 26 July 2011 14:58, Christian Grobmeier 
> wrote:
> >> >
> >> >> > @Christian
> >> >> > Good workaround,
> >> >> > in my defence I can say that I have no problem to change the log
> >> level,
> >> >> > thank to maven I can have different profile with different log
> level.
> >> >>
> >> >> hehe yes I have a similar setup I guess. But "expected exceptions"
> >> >> make me always nervous, even in development mode ,-)
> >> >>
> >> >> >
> >> >> > Maurizio Cucchiara
> >> >> >
> >> >> > Il giorno 26/lug/2011 12.26, "Christian Grobmeier" <
> >> grobme...@gmail.com>
> >> >> ha
> >> >> > scritto:
> >> >> >> Thanks Maurizio.
> >> >> >>
> >> >> >> I don't want to reduce my error level, now I created something
> weird.
> >> >> >> Not nice, but it works:
> >> >> >>
> >> >> >> private Submit submitCoord = null;
> >> >> >>
> >> >> >> public Submit getSubmit() {
> >> >> >> return submitCoord;
> >> >> >> }
> >> >> >>
> >> >> >> public void setSubmit(String submit) {
> >> >> >> this.submitCoord = new Submit(submit);
> >> >> >> }
> >> >> >>
> >> >> >> class Submit {
> >> >> >> private int x = 0;
> >> >> >> private int y = 0;
> >> >> >> private String name = "";
> >> >> >>
> >> >> >> private Submit(String name) {
> >> >> >> super();
> >> >> >> this.name = name;
> >> >> >> }
> >> >> >>
> >> >> >> public String getName() {
> >> >> >> return name;
> >> >> >> }
> >> >> >>
> >> >> >> public int getX() {
> >> >> >> return x;
> >> >> >> }
> >> >> >> public void setX(int x) {
> >> >> >> this.x = x;
> >> >> >> }
> >> >> >> public int getY() {
> >> >> >> return y;
> >> >> >> }
> >> >> >> public void setY(int y) {
> >> >> >> this.y = y;
> >> >> >> }
> >> >> >>
> >> >> >> }
> >> >> >>
> >> >> >> Cheers
> >> >> >> Christian
> >> >> >>
> >> >> >> On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara
> >> >> >>  wrote:
> >> >> >>> Hi Christian,
> >> >> >>> unfortunately IIRC there is no way to avoid that OGNL tries to
> find
> >> the
> >> >> >>> property accessor.
> >> >> >>>
> >> >> >>> Adding this row in your log4j.xml (properties) should mute this
> log
> >> >> > message
> >> >> >>> (which it should not be a warning message)
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>> On 26 July 2011 11:27, Christian Grobmeier 
> >> >> wrote:
> >> >> >>>
> >> >>  Hi,
> >> >> 
> >> >>  using:
> >> >>   >> >>  name="submit" />
> >> >> 
> >> >>  Sends the following to my action:
> >> >>  submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
> >> >> 
> >> >>  x / y are coordinates of my click, defined by w3c. Now they are
> >> sent
> >> >>  to my action, and OGNL tries to set it. Which leads to:
> >> >> 
> >> >>  > Error setting expression 'submit.x' with value
> >> >>  '[Ljava.lang.String;@a53ed8f'
> >> >>  > ognl.NoSuchPropertyException: java.lang.String.x
> >> >> 
> >> >>  Of course, ognl, sets a string "submit", then tries to find the
> >> getX
> >> >>  method on my string which does not exist.
> >> >> 
> >> >>  How can I deal with that?
> >> >> 
> >> >>  Cheers
> >> >>  Christian
> >> >> 
> >> >> 
> >> ---

Re: Submit image button sends coordinates

2011-07-26 Thread Christian Grobmeier
I see, I am one of those who always want to see whats going on

Interesting read. Might be worth to compile a wiki entry?

On Tue, Jul 26, 2011 at 3:46 PM, Maurizio Cucchiara
 wrote:
> There are different schools of thought, this is kind of question that has
> multiple answers: please, take a look at
> http://struts.1045723.n5.nabble.com/S2-OgnlValueStack-Error-setting-expression-warnings-after-upgrade-from-struts-2-to-struts-2-1-7-td3495667.html
>
> On 26 July 2011 14:58, Christian Grobmeier  wrote:
>
>> > @Christian
>> > Good workaround,
>> > in my defence I can say that I have no problem to change the log level,
>> > thank to maven I can have different profile with different log level.
>>
>> hehe yes I have a similar setup I guess. But "expected exceptions"
>> make me always nervous, even in development mode ,-)
>>
>> >
>> > Maurizio Cucchiara
>> >
>> > Il giorno 26/lug/2011 12.26, "Christian Grobmeier" 
>> ha
>> > scritto:
>> >> Thanks Maurizio.
>> >>
>> >> I don't want to reduce my error level, now I created something weird.
>> >> Not nice, but it works:
>> >>
>> >> private Submit submitCoord = null;
>> >>
>> >> public Submit getSubmit() {
>> >> return submitCoord;
>> >> }
>> >>
>> >> public void setSubmit(String submit) {
>> >> this.submitCoord = new Submit(submit);
>> >> }
>> >>
>> >> class Submit {
>> >> private int x = 0;
>> >> private int y = 0;
>> >> private String name = "";
>> >>
>> >> private Submit(String name) {
>> >> super();
>> >> this.name = name;
>> >> }
>> >>
>> >> public String getName() {
>> >> return name;
>> >> }
>> >>
>> >> public int getX() {
>> >> return x;
>> >> }
>> >> public void setX(int x) {
>> >> this.x = x;
>> >> }
>> >> public int getY() {
>> >> return y;
>> >> }
>> >> public void setY(int y) {
>> >> this.y = y;
>> >> }
>> >>
>> >> }
>> >>
>> >> Cheers
>> >> Christian
>> >>
>> >> On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara
>> >>  wrote:
>> >>> Hi Christian,
>> >>> unfortunately IIRC there is no way to avoid that OGNL tries to find the
>> >>> property accessor.
>> >>>
>> >>> Adding this row in your log4j.xml (properties) should mute this log
>> > message
>> >>> (which it should not be a warning message)
>> >>>
>> >>>    
>> >>>        
>> >>>    
>> >>>
>> >>>
>> >>> On 26 July 2011 11:27, Christian Grobmeier 
>> wrote:
>> >>>
>>  Hi,
>> 
>>  using:
>>  >  name="submit" />
>> 
>>  Sends the following to my action:
>>  submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
>> 
>>  x / y are coordinates of my click, defined by w3c. Now they are sent
>>  to my action, and OGNL tries to set it. Which leads to:
>> 
>>  > Error setting expression 'submit.x' with value
>>  '[Ljava.lang.String;@a53ed8f'
>>  > ognl.NoSuchPropertyException: java.lang.String.x
>> 
>>  Of course, ognl, sets a string "submit", then tries to find the getX
>>  method on my string which does not exist.
>> 
>>  How can I deal with that?
>> 
>>  Cheers
>>  Christian
>> 
>>  -
>>  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>  For additional commands, e-mail: user-h...@struts.apache.org
>> 
>> 
>> >>>
>> >>>
>> >>> --
>> >>> Maurizio Cucchiara
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> http://www.grobmeier.de
>> >>
>> >> -
>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> For additional commands, e-mail: user-h...@struts.apache.org
>> >>
>> >
>>
>>
>>
>> --
>> http://www.grobmeier.de
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
> --
> Maurizio Cucchiara
>



-- 
http://www.grobmeier.de

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



Re: Submit image button sends coordinates

2011-07-26 Thread Paul Benedict
I don't understand that. Perhaps I haven't programmed Struts 2 enough,
but I thought Struts (1 or 2) only captured what's defined in the
model and ignores the other request parameters. Is it acting
differently because of nested properties?

On Tue, Jul 26, 2011 at 9:54 AM, Chris Pratt  wrote:
> That's exactly what's happening, but it's also warning (in devmode only)
> when it can't set one so that you, the developer, can make the right
> decision for your program.
>  (*Chris*)
>
> On Tue, Jul 26, 2011 at 6:50 AM, Paul Benedict  wrote:
>
>> Just a question, if I may :-) Doesn't Struts 2 have the ability to
>> only set the properties that are defined on the bean?
>>
>> On Tue, Jul 26, 2011 at 8:46 AM, Maurizio Cucchiara
>>  wrote:
>> > There are different schools of thought, this is kind of question that has
>> > multiple answers: please, take a look at
>> >
>> http://struts.1045723.n5.nabble.com/S2-OgnlValueStack-Error-setting-expression-warnings-after-upgrade-from-struts-2-to-struts-2-1-7-td3495667.html
>> >
>> > On 26 July 2011 14:58, Christian Grobmeier  wrote:
>> >
>> >> > @Christian
>> >> > Good workaround,
>> >> > in my defence I can say that I have no problem to change the log
>> level,
>> >> > thank to maven I can have different profile with different log level.
>> >>
>> >> hehe yes I have a similar setup I guess. But "expected exceptions"
>> >> make me always nervous, even in development mode ,-)
>> >>
>> >> >
>> >> > Maurizio Cucchiara
>> >> >
>> >> > Il giorno 26/lug/2011 12.26, "Christian Grobmeier" <
>> grobme...@gmail.com>
>> >> ha
>> >> > scritto:
>> >> >> Thanks Maurizio.
>> >> >>
>> >> >> I don't want to reduce my error level, now I created something weird.
>> >> >> Not nice, but it works:
>> >> >>
>> >> >> private Submit submitCoord = null;
>> >> >>
>> >> >> public Submit getSubmit() {
>> >> >> return submitCoord;
>> >> >> }
>> >> >>
>> >> >> public void setSubmit(String submit) {
>> >> >> this.submitCoord = new Submit(submit);
>> >> >> }
>> >> >>
>> >> >> class Submit {
>> >> >> private int x = 0;
>> >> >> private int y = 0;
>> >> >> private String name = "";
>> >> >>
>> >> >> private Submit(String name) {
>> >> >> super();
>> >> >> this.name = name;
>> >> >> }
>> >> >>
>> >> >> public String getName() {
>> >> >> return name;
>> >> >> }
>> >> >>
>> >> >> public int getX() {
>> >> >> return x;
>> >> >> }
>> >> >> public void setX(int x) {
>> >> >> this.x = x;
>> >> >> }
>> >> >> public int getY() {
>> >> >> return y;
>> >> >> }
>> >> >> public void setY(int y) {
>> >> >> this.y = y;
>> >> >> }
>> >> >>
>> >> >> }
>> >> >>
>> >> >> Cheers
>> >> >> Christian
>> >> >>
>> >> >> On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara
>> >> >>  wrote:
>> >> >>> Hi Christian,
>> >> >>> unfortunately IIRC there is no way to avoid that OGNL tries to find
>> the
>> >> >>> property accessor.
>> >> >>>
>> >> >>> Adding this row in your log4j.xml (properties) should mute this log
>> >> > message
>> >> >>> (which it should not be a warning message)
>> >> >>>
>> >> >>>    
>> >> >>>        
>> >> >>>    
>> >> >>>
>> >> >>>
>> >> >>> On 26 July 2011 11:27, Christian Grobmeier 
>> >> wrote:
>> >> >>>
>> >>  Hi,
>> >> 
>> >>  using:
>> >>  > >>  name="submit" />
>> >> 
>> >>  Sends the following to my action:
>> >>  submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
>> >> 
>> >>  x / y are coordinates of my click, defined by w3c. Now they are
>> sent
>> >>  to my action, and OGNL tries to set it. Which leads to:
>> >> 
>> >>  > Error setting expression 'submit.x' with value
>> >>  '[Ljava.lang.String;@a53ed8f'
>> >>  > ognl.NoSuchPropertyException: java.lang.String.x
>> >> 
>> >>  Of course, ognl, sets a string "submit", then tries to find the
>> getX
>> >>  method on my string which does not exist.
>> >> 
>> >>  How can I deal with that?
>> >> 
>> >>  Cheers
>> >>  Christian
>> >> 
>> >> 
>> -
>> >>  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >>  For additional commands, e-mail: user-h...@struts.apache.org
>> >> 
>> >> 
>> >> >>>
>> >> >>>
>> >> >>> --
>> >> >>> Maurizio Cucchiara
>> >> >>>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> http://www.grobmeier.de
>> >> >>
>> >> >> -
>> >> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> >> For additional commands, e-mail: user-h...@struts.apache.org
>> >> >>
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> http://www.grobmeier.de
>> >>
>> >> -
>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> For additional commands, e-mail: user-h...@struts.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > Maurizio Cucchiara
>> >
>>
>> -
>> T

Re: SEVERE: Servlet.service() for servlet default threw exception, java.lang.IllegalStateException

2011-07-26 Thread Emi Lu

Hello,


W dniu 26 lipca 2011 16:13 użytkownik Emi Lu  napisał:

It seems that I found the problem. When I commented out ajax section
"onclick="return ajax_check_search_table('check_search_opr')"", the error is
gone. But I need ajax check support.


Did you try to call check_search_oprProcessAction.action directly ?
And maybe it's better to JSON plugin instead of home made protocol ?


Situation is:
=
(1) a.jsp
 part1 -> search form
 part2 => huge calculation in ActionClass.java;
  results are shown by using displaytag


(2) Checks are needed in part1, but I need avoid calculation in part2.

   Moreover, a.jsp only part1 will be reloaded, but not the whole page.

   pa...@a.jsp calls method1 in ActionClass.java


(3) JSON/jquery sj:submit seems does not support "action" parameter, it 
could not dispatch to another method, isn't ?


  action="method1ProcessActionClass" //does not dispatch! while 
s:submit works

/>



Could you suggest a good way?

(1) Do not reload whole jsp
(2) Calculation must be done through ActionClass.java (extends 
ActionSupport)
   The calculation is through database queries, so have to be done 
through action class.


   According to the check results, display error message to users 
through pa...@a.jsp


 Only if no error return, part2 will be calculated and reloaded.

Thanks alot!
Emi





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



Re: Submit image button sends coordinates

2011-07-26 Thread Chris Pratt
That's exactly what's happening, but it's also warning (in devmode only)
when it can't set one so that you, the developer, can make the right
decision for your program.
  (*Chris*)

On Tue, Jul 26, 2011 at 6:50 AM, Paul Benedict  wrote:

> Just a question, if I may :-) Doesn't Struts 2 have the ability to
> only set the properties that are defined on the bean?
>
> On Tue, Jul 26, 2011 at 8:46 AM, Maurizio Cucchiara
>  wrote:
> > There are different schools of thought, this is kind of question that has
> > multiple answers: please, take a look at
> >
> http://struts.1045723.n5.nabble.com/S2-OgnlValueStack-Error-setting-expression-warnings-after-upgrade-from-struts-2-to-struts-2-1-7-td3495667.html
> >
> > On 26 July 2011 14:58, Christian Grobmeier  wrote:
> >
> >> > @Christian
> >> > Good workaround,
> >> > in my defence I can say that I have no problem to change the log
> level,
> >> > thank to maven I can have different profile with different log level.
> >>
> >> hehe yes I have a similar setup I guess. But "expected exceptions"
> >> make me always nervous, even in development mode ,-)
> >>
> >> >
> >> > Maurizio Cucchiara
> >> >
> >> > Il giorno 26/lug/2011 12.26, "Christian Grobmeier" <
> grobme...@gmail.com>
> >> ha
> >> > scritto:
> >> >> Thanks Maurizio.
> >> >>
> >> >> I don't want to reduce my error level, now I created something weird.
> >> >> Not nice, but it works:
> >> >>
> >> >> private Submit submitCoord = null;
> >> >>
> >> >> public Submit getSubmit() {
> >> >> return submitCoord;
> >> >> }
> >> >>
> >> >> public void setSubmit(String submit) {
> >> >> this.submitCoord = new Submit(submit);
> >> >> }
> >> >>
> >> >> class Submit {
> >> >> private int x = 0;
> >> >> private int y = 0;
> >> >> private String name = "";
> >> >>
> >> >> private Submit(String name) {
> >> >> super();
> >> >> this.name = name;
> >> >> }
> >> >>
> >> >> public String getName() {
> >> >> return name;
> >> >> }
> >> >>
> >> >> public int getX() {
> >> >> return x;
> >> >> }
> >> >> public void setX(int x) {
> >> >> this.x = x;
> >> >> }
> >> >> public int getY() {
> >> >> return y;
> >> >> }
> >> >> public void setY(int y) {
> >> >> this.y = y;
> >> >> }
> >> >>
> >> >> }
> >> >>
> >> >> Cheers
> >> >> Christian
> >> >>
> >> >> On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara
> >> >>  wrote:
> >> >>> Hi Christian,
> >> >>> unfortunately IIRC there is no way to avoid that OGNL tries to find
> the
> >> >>> property accessor.
> >> >>>
> >> >>> Adding this row in your log4j.xml (properties) should mute this log
> >> > message
> >> >>> (which it should not be a warning message)
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> On 26 July 2011 11:27, Christian Grobmeier 
> >> wrote:
> >> >>>
> >>  Hi,
> >> 
> >>  using:
> >>   >>  name="submit" />
> >> 
> >>  Sends the following to my action:
> >>  submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
> >> 
> >>  x / y are coordinates of my click, defined by w3c. Now they are
> sent
> >>  to my action, and OGNL tries to set it. Which leads to:
> >> 
> >>  > Error setting expression 'submit.x' with value
> >>  '[Ljava.lang.String;@a53ed8f'
> >>  > ognl.NoSuchPropertyException: java.lang.String.x
> >> 
> >>  Of course, ognl, sets a string "submit", then tries to find the
> getX
> >>  method on my string which does not exist.
> >> 
> >>  How can I deal with that?
> >> 
> >>  Cheers
> >>  Christian
> >> 
> >> 
> -
> >>  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >>  For additional commands, e-mail: user-h...@struts.apache.org
> >> 
> >> 
> >> >>>
> >> >>>
> >> >>> --
> >> >>> Maurizio Cucchiara
> >> >>>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> http://www.grobmeier.de
> >> >>
> >> >> -
> >> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> >> For additional commands, e-mail: user-h...@struts.apache.org
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >> http://www.grobmeier.de
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >>
> >
> >
> > --
> > Maurizio Cucchiara
> >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: SEVERE: Servlet.service() for servlet default threw exception, java.lang.IllegalStateException

2011-07-26 Thread Łukasz Lenart
W dniu 26 lipca 2011 16:13 użytkownik Emi Lu  napisał:
> It seems that I found the problem. When I commented out ajax section
> "onclick="return ajax_check_search_table('check_search_opr')"", the error is
> gone. But I need ajax check support.

Did you try to call check_search_oprProcessAction.action directly ?

And maybe it's better to JSON plugin instead of home made protocol ?


Kind regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

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



Re: Submit image button sends coordinates

2011-07-26 Thread Paul Benedict
Just a question, if I may :-) Doesn't Struts 2 have the ability to
only set the properties that are defined on the bean?

On Tue, Jul 26, 2011 at 8:46 AM, Maurizio Cucchiara
 wrote:
> There are different schools of thought, this is kind of question that has
> multiple answers: please, take a look at
> http://struts.1045723.n5.nabble.com/S2-OgnlValueStack-Error-setting-expression-warnings-after-upgrade-from-struts-2-to-struts-2-1-7-td3495667.html
>
> On 26 July 2011 14:58, Christian Grobmeier  wrote:
>
>> > @Christian
>> > Good workaround,
>> > in my defence I can say that I have no problem to change the log level,
>> > thank to maven I can have different profile with different log level.
>>
>> hehe yes I have a similar setup I guess. But "expected exceptions"
>> make me always nervous, even in development mode ,-)
>>
>> >
>> > Maurizio Cucchiara
>> >
>> > Il giorno 26/lug/2011 12.26, "Christian Grobmeier" 
>> ha
>> > scritto:
>> >> Thanks Maurizio.
>> >>
>> >> I don't want to reduce my error level, now I created something weird.
>> >> Not nice, but it works:
>> >>
>> >> private Submit submitCoord = null;
>> >>
>> >> public Submit getSubmit() {
>> >> return submitCoord;
>> >> }
>> >>
>> >> public void setSubmit(String submit) {
>> >> this.submitCoord = new Submit(submit);
>> >> }
>> >>
>> >> class Submit {
>> >> private int x = 0;
>> >> private int y = 0;
>> >> private String name = "";
>> >>
>> >> private Submit(String name) {
>> >> super();
>> >> this.name = name;
>> >> }
>> >>
>> >> public String getName() {
>> >> return name;
>> >> }
>> >>
>> >> public int getX() {
>> >> return x;
>> >> }
>> >> public void setX(int x) {
>> >> this.x = x;
>> >> }
>> >> public int getY() {
>> >> return y;
>> >> }
>> >> public void setY(int y) {
>> >> this.y = y;
>> >> }
>> >>
>> >> }
>> >>
>> >> Cheers
>> >> Christian
>> >>
>> >> On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara
>> >>  wrote:
>> >>> Hi Christian,
>> >>> unfortunately IIRC there is no way to avoid that OGNL tries to find the
>> >>> property accessor.
>> >>>
>> >>> Adding this row in your log4j.xml (properties) should mute this log
>> > message
>> >>> (which it should not be a warning message)
>> >>>
>> >>>    
>> >>>        
>> >>>    
>> >>>
>> >>>
>> >>> On 26 July 2011 11:27, Christian Grobmeier 
>> wrote:
>> >>>
>>  Hi,
>> 
>>  using:
>>  >  name="submit" />
>> 
>>  Sends the following to my action:
>>  submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
>> 
>>  x / y are coordinates of my click, defined by w3c. Now they are sent
>>  to my action, and OGNL tries to set it. Which leads to:
>> 
>>  > Error setting expression 'submit.x' with value
>>  '[Ljava.lang.String;@a53ed8f'
>>  > ognl.NoSuchPropertyException: java.lang.String.x
>> 
>>  Of course, ognl, sets a string "submit", then tries to find the getX
>>  method on my string which does not exist.
>> 
>>  How can I deal with that?
>> 
>>  Cheers
>>  Christian
>> 
>>  -
>>  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>  For additional commands, e-mail: user-h...@struts.apache.org
>> 
>> 
>> >>>
>> >>>
>> >>> --
>> >>> Maurizio Cucchiara
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> http://www.grobmeier.de
>> >>
>> >> -
>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> For additional commands, e-mail: user-h...@struts.apache.org
>> >>
>> >
>>
>>
>>
>> --
>> http://www.grobmeier.de
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
> --
> Maurizio Cucchiara
>

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



Re: Submit image button sends coordinates

2011-07-26 Thread Maurizio Cucchiara
There are different schools of thought, this is kind of question that has
multiple answers: please, take a look at
http://struts.1045723.n5.nabble.com/S2-OgnlValueStack-Error-setting-expression-warnings-after-upgrade-from-struts-2-to-struts-2-1-7-td3495667.html

On 26 July 2011 14:58, Christian Grobmeier  wrote:

> > @Christian
> > Good workaround,
> > in my defence I can say that I have no problem to change the log level,
> > thank to maven I can have different profile with different log level.
>
> hehe yes I have a similar setup I guess. But "expected exceptions"
> make me always nervous, even in development mode ,-)
>
> >
> > Maurizio Cucchiara
> >
> > Il giorno 26/lug/2011 12.26, "Christian Grobmeier" 
> ha
> > scritto:
> >> Thanks Maurizio.
> >>
> >> I don't want to reduce my error level, now I created something weird.
> >> Not nice, but it works:
> >>
> >> private Submit submitCoord = null;
> >>
> >> public Submit getSubmit() {
> >> return submitCoord;
> >> }
> >>
> >> public void setSubmit(String submit) {
> >> this.submitCoord = new Submit(submit);
> >> }
> >>
> >> class Submit {
> >> private int x = 0;
> >> private int y = 0;
> >> private String name = "";
> >>
> >> private Submit(String name) {
> >> super();
> >> this.name = name;
> >> }
> >>
> >> public String getName() {
> >> return name;
> >> }
> >>
> >> public int getX() {
> >> return x;
> >> }
> >> public void setX(int x) {
> >> this.x = x;
> >> }
> >> public int getY() {
> >> return y;
> >> }
> >> public void setY(int y) {
> >> this.y = y;
> >> }
> >>
> >> }
> >>
> >> Cheers
> >> Christian
> >>
> >> On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara
> >>  wrote:
> >>> Hi Christian,
> >>> unfortunately IIRC there is no way to avoid that OGNL tries to find the
> >>> property accessor.
> >>>
> >>> Adding this row in your log4j.xml (properties) should mute this log
> > message
> >>> (which it should not be a warning message)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On 26 July 2011 11:27, Christian Grobmeier 
> wrote:
> >>>
>  Hi,
> 
>  using:
>    name="submit" />
> 
>  Sends the following to my action:
>  submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
> 
>  x / y are coordinates of my click, defined by w3c. Now they are sent
>  to my action, and OGNL tries to set it. Which leads to:
> 
>  > Error setting expression 'submit.x' with value
>  '[Ljava.lang.String;@a53ed8f'
>  > ognl.NoSuchPropertyException: java.lang.String.x
> 
>  Of course, ognl, sets a string "submit", then tries to find the getX
>  method on my string which does not exist.
> 
>  How can I deal with that?
> 
>  Cheers
>  Christian
> 
>  -
>  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>  For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> >>>
> >>>
> >>> --
> >>> Maurizio Cucchiara
> >>>
> >>
> >>
> >>
> >> --
> >> http://www.grobmeier.de
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >
>
>
>
> --
> http://www.grobmeier.de
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Maurizio Cucchiara


Re: SEVERE: Servlet.service() for servlet default threw exception, java.lang.IllegalStateException

2011-07-26 Thread Łukasz Lenart
W dniu 26 lipca 2011 15:11 użytkownik Emi Lu  napisał:
> tomcat6 + struts2.2.3 + tiles2.2.2 + springframework3.05 + displaytag 1.2.

Could you list the jars in WEB-INF/lib ? It looks like you're mixing
different version of jars.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

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



Re: SEVERE: Servlet.service() for servlet default threw exception, java.lang.IllegalStateException

2011-07-26 Thread Emi Lu

  
  struts
  /*
  REQUEST
  INCLUDE
   


Did you try to remove these dispatcher params ? Or add FORWARD ?


I tried as well, but still got the following exceptions. The server did 
not die and it seems work fine. But each action returns such SEVERE 
exception. Why???


tomcat6 + struts2.2.3 + tiles2.2.2 + springframework3.05 + displaytag 1.2.

I do need help what may cause this exception. From the outputs, I cannot 
see any hint!


---
SEVERE: Servlet.service() for servlet default threw exception
java.lang.IllegalStateException
at 
org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:407)

at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:819)
at 
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:519)
at 
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
---
Thanks a lot!
Emi

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



Re: Submit image button sends coordinates

2011-07-26 Thread Christian Grobmeier
> @Christian
> Good workaround,
> in my defence I can say that I have no problem to change the log level,
> thank to maven I can have different profile with different log level.

hehe yes I have a similar setup I guess. But "expected exceptions"
make me always nervous, even in development mode ,-)

>
> Maurizio Cucchiara
>
> Il giorno 26/lug/2011 12.26, "Christian Grobmeier"  ha
> scritto:
>> Thanks Maurizio.
>>
>> I don't want to reduce my error level, now I created something weird.
>> Not nice, but it works:
>>
>> private Submit submitCoord = null;
>>
>> public Submit getSubmit() {
>> return submitCoord;
>> }
>>
>> public void setSubmit(String submit) {
>> this.submitCoord = new Submit(submit);
>> }
>>
>> class Submit {
>> private int x = 0;
>> private int y = 0;
>> private String name = "";
>>
>> private Submit(String name) {
>> super();
>> this.name = name;
>> }
>>
>> public String getName() {
>> return name;
>> }
>>
>> public int getX() {
>> return x;
>> }
>> public void setX(int x) {
>> this.x = x;
>> }
>> public int getY() {
>> return y;
>> }
>> public void setY(int y) {
>> this.y = y;
>> }
>>
>> }
>>
>> Cheers
>> Christian
>>
>> On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara
>>  wrote:
>>> Hi Christian,
>>> unfortunately IIRC there is no way to avoid that OGNL tries to find the
>>> property accessor.
>>>
>>> Adding this row in your log4j.xml (properties) should mute this log
> message
>>> (which it should not be a warning message)
>>>
>>>    
>>>        
>>>    
>>>
>>>
>>> On 26 July 2011 11:27, Christian Grobmeier  wrote:
>>>
 Hi,

 using:
 >>> name="submit" />

 Sends the following to my action:
 submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]

 x / y are coordinates of my click, defined by w3c. Now they are sent
 to my action, and OGNL tries to set it. Which leads to:

 > Error setting expression 'submit.x' with value
 '[Ljava.lang.String;@a53ed8f'
 > ognl.NoSuchPropertyException: java.lang.String.x

 Of course, ognl, sets a string "submit", then tries to find the getX
 method on my string which does not exist.

 How can I deal with that?

 Cheers
 Christian

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


>>>
>>>
>>> --
>>> Maurizio Cucchiara
>>>
>>
>>
>>
>> --
>> http://www.grobmeier.de
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>



-- 
http://www.grobmeier.de

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



Re: Submit image button sends coordinates

2011-07-26 Thread Maurizio Cucchiara
Aaron's advice suggested me another way to obtain what you are looking for:
you could simple blacklist x & y parameters through the parameters
interceptor.

Maurizio Cucchiara

Il giorno 26/lug/2011 12.30, "Aaron Brown"  ha
scritto:
> You may be able to write an interceptor that strips X and Y from your cgi
> parameters. You would need to set the interceptor prior to the default
> interceptor that assigns params to your action set methods.
> On Jul 26, 2011 5:50 AM, "Maurizio Cucchiara" <
maurizio.cucchi...@gmail.com>
> wrote:
>> Hi Christian,
>> unfortunately IIRC there is no way to avoid that OGNL tries to find the
>> property accessor.
>>
>> Adding this row in your log4j.xml (properties) should mute this log
> message
>> (which it should not be a warning message)
>>
>> 
>> 
>> 
>>
>>
>> On 26 July 2011 11:27, Christian Grobmeier  wrote:
>>
>>> Hi,
>>>
>>> using:
>>> >> name="submit" />
>>>
>>> Sends the following to my action:
>>> submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
>>>
>>> x / y are coordinates of my click, defined by w3c. Now they are sent
>>> to my action, and OGNL tries to set it. Which leads to:
>>>
>>> > Error setting expression 'submit.x' with value
>>> '[Ljava.lang.String;@a53ed8f'
>>> > ognl.NoSuchPropertyException: java.lang.String.x
>>>
>>> Of course, ognl, sets a string "submit", then tries to find the getX
>>> method on my string which does not exist.
>>>
>>> How can I deal with that?
>>>
>>> Cheers
>>> Christian
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>>
>> --
>> Maurizio Cucchiara


Re: Submit image button sends coordinates

2011-07-26 Thread Maurizio Cucchiara
@Christian
Good workaround,
in my defence I can say that I have no problem to change the log level,
thank to maven I can have different profile with different log level.

Maurizio Cucchiara

Il giorno 26/lug/2011 12.26, "Christian Grobmeier"  ha
scritto:
> Thanks Maurizio.
>
> I don't want to reduce my error level, now I created something weird.
> Not nice, but it works:
>
> private Submit submitCoord = null;
>
> public Submit getSubmit() {
> return submitCoord;
> }
>
> public void setSubmit(String submit) {
> this.submitCoord = new Submit(submit);
> }
>
> class Submit {
> private int x = 0;
> private int y = 0;
> private String name = "";
>
> private Submit(String name) {
> super();
> this.name = name;
> }
>
> public String getName() {
> return name;
> }
>
> public int getX() {
> return x;
> }
> public void setX(int x) {
> this.x = x;
> }
> public int getY() {
> return y;
> }
> public void setY(int y) {
> this.y = y;
> }
>
> }
>
> Cheers
> Christian
>
> On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara
>  wrote:
>> Hi Christian,
>> unfortunately IIRC there is no way to avoid that OGNL tries to find the
>> property accessor.
>>
>> Adding this row in your log4j.xml (properties) should mute this log
message
>> (which it should not be a warning message)
>>
>>
>>
>>
>>
>>
>> On 26 July 2011 11:27, Christian Grobmeier  wrote:
>>
>>> Hi,
>>>
>>> using:
>>> >> name="submit" />
>>>
>>> Sends the following to my action:
>>> submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
>>>
>>> x / y are coordinates of my click, defined by w3c. Now they are sent
>>> to my action, and OGNL tries to set it. Which leads to:
>>>
>>> > Error setting expression 'submit.x' with value
>>> '[Ljava.lang.String;@a53ed8f'
>>> > ognl.NoSuchPropertyException: java.lang.String.x
>>>
>>> Of course, ognl, sets a string "submit", then tries to find the getX
>>> method on my string which does not exist.
>>>
>>> How can I deal with that?
>>>
>>> Cheers
>>> Christian
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>
>>
>> --
>> Maurizio Cucchiara
>>
>
>
>
> --
> http://www.grobmeier.de
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>


Re: Submit image button sends coordinates

2011-07-26 Thread Aaron Brown
You may be able to write an interceptor that strips X and Y from your cgi
parameters. You would need to set the interceptor prior to the default
interceptor that assigns params to your action set methods.
 On Jul 26, 2011 5:50 AM, "Maurizio Cucchiara" 
wrote:
> Hi Christian,
> unfortunately IIRC there is no way to avoid that OGNL tries to find the
> property accessor.
>
> Adding this row in your log4j.xml (properties) should mute this log
message
> (which it should not be a warning message)
>
> 
> 
> 
>
>
> On 26 July 2011 11:27, Christian Grobmeier  wrote:
>
>> Hi,
>>
>> using:
>> > name="submit" />
>>
>> Sends the following to my action:
>> submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
>>
>> x / y are coordinates of my click, defined by w3c. Now they are sent
>> to my action, and OGNL tries to set it. Which leads to:
>>
>> > Error setting expression 'submit.x' with value
>> '[Ljava.lang.String;@a53ed8f'
>> > ognl.NoSuchPropertyException: java.lang.String.x
>>
>> Of course, ognl, sets a string "submit", then tries to find the getX
>> method on my string which does not exist.
>>
>> How can I deal with that?
>>
>> Cheers
>> Christian
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
> --
> Maurizio Cucchiara


Re: Submit image button sends coordinates

2011-07-26 Thread Christian Grobmeier
Thanks Maurizio.

I don't want to reduce my error level, now I created something weird.
Not nice, but it works:

private Submit submitCoord = null;

public Submit getSubmit() {
return submitCoord;
}

public void setSubmit(String submit) {
this.submitCoord = new Submit(submit);
}

class Submit {
private int x = 0;
private int y = 0;
private String name = "";

private Submit(String name) {
super();
this.name = name;
}

public String getName() {
return name;
}

public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}

}

Cheers
Christian

On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara
 wrote:
> Hi Christian,
> unfortunately IIRC there is no way to avoid that OGNL tries to find the
> property accessor.
>
> Adding this row in your log4j.xml (properties) should mute this log message
> (which it should not be a warning message)
>
>    
>        
>    
>
>
> On 26 July 2011 11:27, Christian Grobmeier  wrote:
>
>> Hi,
>>
>> using:
>> > name="submit" />
>>
>> Sends the following to my action:
>> submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
>>
>> x / y are coordinates of my click, defined by w3c. Now they are sent
>> to my action, and OGNL tries to set it. Which leads to:
>>
>> > Error setting expression 'submit.x' with value
>> '[Ljava.lang.String;@a53ed8f'
>> > ognl.NoSuchPropertyException: java.lang.String.x
>>
>> Of course, ognl, sets a string "submit", then tries to find the getX
>> method on my string which does not exist.
>>
>> How can I deal with that?
>>
>> Cheers
>> Christian
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
> --
> Maurizio Cucchiara
>



-- 
http://www.grobmeier.de

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



Re: Submit image button sends coordinates

2011-07-26 Thread Maurizio Cucchiara
Hi Christian,
unfortunately IIRC there is no way to avoid that OGNL tries to find the
property accessor.

Adding this row in your log4j.xml (properties) should mute this log message
(which it should not be a warning message)






On 26 July 2011 11:27, Christian Grobmeier  wrote:

> Hi,
>
> using:
>  name="submit" />
>
> Sends the following to my action:
> submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]
>
> x / y are coordinates of my click, defined by w3c. Now they are sent
> to my action, and OGNL tries to set it. Which leads to:
>
> > Error setting expression 'submit.x' with value
> '[Ljava.lang.String;@a53ed8f'
> > ognl.NoSuchPropertyException: java.lang.String.x
>
> Of course, ognl, sets a string "submit", then tries to find the getX
> method on my string which does not exist.
>
> How can I deal with that?
>
> Cheers
> Christian
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Maurizio Cucchiara


Submit image button sends coordinates

2011-07-26 Thread Christian Grobmeier
Hi,

using:


Sends the following to my action:
submit => [ Submit ] submit.x => [ 40 ] submit.y => [ 7 ]

x / y are coordinates of my click, defined by w3c. Now they are sent
to my action, and OGNL tries to set it. Which leads to:

> Error setting expression 'submit.x' with value '[Ljava.lang.String;@a53ed8f'
> ognl.NoSuchPropertyException: java.lang.String.x

Of course, ognl, sets a string "submit", then tries to find the getX
method on my string which does not exist.

How can I deal with that?

Cheers
Christian

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