Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 5 Feb 2008 23:01:00 -0000 Issue 7850

user-digest-help

2008-02-05


Author LoginPost Reply

user Digest 5 Feb 2008 23:01:00 -0000 Issue 7850

Topics (messages 182280 through 182295):

Re: Custom OGNL PropertyAccessor
 182280 by: Tommy Becker
 182281 by: Dave Newton
 182282 by: Tommy Becker
 182284 by: mgainty.hotmail.com
 182285 by: Dave Newton
 182286 by: Randy Burgess
 182287 by: Dave Newton
 182290 by: Randy Burgess

Losing Session Attributes
 182283 by: daveck
 182293 by: Laurie Harper
 182294 by: mgainty.hotmail.com

chaining validation errors
 182288 by: chubi
 182289 by: Dave Newton

Re: AjaxTag 1.3 support?
 182291 by: Musachy Barroso

Database resources
 182292 by: Zhang, Larry \(L.\)

Re: Struts 2 and Weblogic 9.2 - java.net.ConnectException
 182295 by: Randy Burgess

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------

Attachment: user_182280.ezm (zipped)
If there were a better description, I'd be happy to give it. As far as
I can tell, our custom PropertyAccessor is not being used. What we want
is to be able to say "property" in an OGNL expression and have it call
getPropertyValue("property"), not getProperty(). It seems it's
continuing to try getProperty() despite our attempt at registering a
custom PropertyAccessor.


Laurie Harper wrote:
> Tommy Becker wrote:
>> I have a question about using OGNL PropertyAccessors. We have an
>> object on the value stack that we expose to JSP pages that does not
>> have standard JavaBeans getter/setter methods. From what I can tell,
>> this leaves us 2 options. We can either call the getter methods
>> explicitly via OGNL method calls in the pages, or we can wrap the
>> object in a JavaBean-like object. The second option is unworkable in
>> all but the simplest of cases when you realize that the method calls
>> can themselves return another object that needs to be wrapped, or
>> even a collection of them. So we've been using method calls in the
>> pages (yeah I know).
>>
>> Reading through the OGNL docs, it seems that what we need is a
>> PropertyAccessor that knows how to operate on our object. So we
>> implemented one, and attempted to register it by placing this in our
>> struts.xml:
>>
>> <bean type="ognl.PropertyAccessor" name="class.we.need.access.to"
>> class="our.property.accessor.PropertyAccessor"/>
>>
>> Unfortunately it doesn't work. Can someone tell me what we're doing
>> wrong, or even if what we're trying to do is possible? Thanks!
>
> I don't know anything about OGNL's PropertyAccessor, but I doubt
> anyone can offer much help without seeing the code and a better
> description of the failure than "it doesn't work."
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information of Motricity. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

Attachment: user_182281.ezm (zipped)
--- Tommy Becker <tommy.becker@(protected):
> If there were a better description, I'd be happy to give it. As far as
> I can tell, our custom PropertyAccessor is not being used. What we want
> is to be able to say "property" in an OGNL expression and have it call
> getPropertyValue("property"), not getProperty(). It seems it's
> continuing to try getProperty() despite our attempt at registering a
> custom PropertyAccessor.

Have you turned up OGNL and XWork logging?

Dave

> Laurie Harper wrote:
> > Tommy Becker wrote:
> >> I have a question about using OGNL PropertyAccessors. We have an
> >> object on the value stack that we expose to JSP pages that does not
> >> have standard JavaBeans getter/setter methods. From what I can tell,
> >> this leaves us 2 options. We can either call the getter methods
> >> explicitly via OGNL method calls in the pages, or we can wrap the
> >> object in a JavaBean-like object. The second option is unworkable in
> >> all but the simplest of cases when you realize that the method calls
> >> can themselves return another object that needs to be wrapped, or
> >> even a collection of them. So we've been using method calls in the
> >> pages (yeah I know).
> >>
> >> Reading through the OGNL docs, it seems that what we need is a
> >> PropertyAccessor that knows how to operate on our object. So we
> >> implemented one, and attempted to register it by placing this in our
> >> struts.xml:
> >>
> >> <bean type="ognl.PropertyAccessor" name="class.we.need.access.to"
> >> class="our.property.accessor.PropertyAccessor"/>
> >>
> >> Unfortunately it doesn't work. Can someone tell me what we're doing
> >> wrong, or even if what we're trying to do is possible? Thanks!
> >
> > I don't know anything about OGNL's PropertyAccessor, but I doubt
> > anyone can offer much help without seeing the code and a better
> > description of the failure than "it doesn't work."
> >
> > L.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
>
> NOTICE: This e-mail message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information of
> Motricity. Any unauthorized review, use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please contact the
> sender by reply e-mail and destroy all copies of the original message.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_182282.ezm (zipped)
No I haven't. How do I go about doing that?

Dave Newton wrote:
> --- Tommy Becker <tommy.becker@(protected):
>  
>> If there were a better description, I'd be happy to give it. As far as
>> I can tell, our custom PropertyAccessor is not being used. What we want
>> is to be able to say "property" in an OGNL expression and have it call
>> getPropertyValue("property"), not getProperty(). It seems it's
>> continuing to try getProperty() despite our attempt at registering a
>> custom PropertyAccessor.
>>  
>
> Have you turned up OGNL and XWork logging?
>
> Dave
>
>  
>> Laurie Harper wrote:
>>  
>>> Tommy Becker wrote:
>>>    
>>>> I have a question about using OGNL PropertyAccessors. We have an
>>>> object on the value stack that we expose to JSP pages that does not
>>>> have standard JavaBeans getter/setter methods. From what I can tell,
>>>> this leaves us 2 options. We can either call the getter methods
>>>> explicitly via OGNL method calls in the pages, or we can wrap the
>>>> object in a JavaBean-like object. The second option is unworkable in
>>>> all but the simplest of cases when you realize that the method calls
>>>> can themselves return another object that needs to be wrapped, or
>>>> even a collection of them. So we've been using method calls in the
>>>> pages (yeah I know).
>>>>
>>>> Reading through the OGNL docs, it seems that what we need is a
>>>> PropertyAccessor that knows how to operate on our object. So we
>>>> implemented one, and attempted to register it by placing this in our
>>>> struts.xml:
>>>>
>>>> <bean type="ognl.PropertyAccessor" name="class.we.need.access.to"
>>>> class="our.property.accessor.PropertyAccessor"/>
>>>>
>>>> Unfortunately it doesn't work. Can someone tell me what we're doing
>>>> wrong, or even if what we're trying to do is possible? Thanks!
>>>>      
>>> I don't know anything about OGNL's PropertyAccessor, but I doubt
>>> anyone can offer much help without seeing the code and a better
>>> description of the failure than "it doesn't work."
>>>
>>> L.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>    
>> NOTICE: This e-mail message is for the sole use of the intended
>> recipient(s) and may contain confidential and privileged information of
>> Motricity. Any unauthorized review, use, disclosure or distribution is
>> prohibited. If you are not the intended recipient, please contact the
>> sender by reply e-mail and destroy all copies of the original message.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>  
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>  

NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information of Motricity. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

Attachment: user_182284.ezm (zipped)
you can configure the xwork LoggingInterceptor into your <default> stack..
<interceptor name="logger"
class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>

looking for clues on OGNL logging???
Anyone?

HTH
Martin
----- Original Message -----
Wrom: QBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCA
To: "Struts Users Mailing List" <user@(protected)>
Sent: Tuesday, February 05, 2008 3:05 PM
Subject: Re: Custom OGNL PropertyAccessor


> No I haven't. How do I go about doing that?
>
> Dave Newton wrote:
> > --- Tommy Becker <tommy.becker@(protected):
> >
> >> If there were a better description, I'd be happy to give it. As far as
> >> I can tell, our custom PropertyAccessor is not being used. What we
want
> >> is to be able to say "property" in an OGNL expression and have it call
> >> getPropertyValue("property"), not getProperty(). It seems it's
> >> continuing to try getProperty() despite our attempt at registering a
> >> custom PropertyAccessor.
> >>
> >
> > Have you turned up OGNL and XWork logging?
> >
> > Dave
> >
> >
> >> Laurie Harper wrote:
> >>
> >>> Tommy Becker wrote:
> >>>
> >>>> I have a question about using OGNL PropertyAccessors. We have an
> >>>> object on the value stack that we expose to JSP pages that does not
> >>>> have standard JavaBeans getter/setter methods. From what I can tell,
> >>>> this leaves us 2 options. We can either call the getter methods
> >>>> explicitly via OGNL method calls in the pages, or we can wrap the
> >>>> object in a JavaBean-like object. The second option is unworkable in
> >>>> all but the simplest of cases when you realize that the method calls
> >>>> can themselves return another object that needs to be wrapped, or
> >>>> even a collection of them. So we've been using method calls in the
> >>>> pages (yeah I know).
> >>>>
> >>>> Reading through the OGNL docs, it seems that what we need is a
> >>>> PropertyAccessor that knows how to operate on our object. So we
> >>>> implemented one, and attempted to register it by placing this in our
> >>>> struts.xml:
> >>>>
> >>>> <bean type="ognl.PropertyAccessor" name="class.we.need.access.to"
> >>>> class="our.property.accessor.PropertyAccessor"/>
> >>>>
> >>>> Unfortunately it doesn't work. Can someone tell me what we're doing
> >>>> wrong, or even if what we're trying to do is possible? Thanks!
> >>>>
> >>> I don't know anything about OGNL's PropertyAccessor, but I doubt
> >>> anyone can offer much help without seeing the code and a better
> >>> description of the failure than "it doesn't work."
> >>>
> >>> L.
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >>> For additional commands, e-mail: user-help@(protected)
> >>>
> >>>
> >> NOTICE: This e-mail message is for the sole use of the intended
> >> recipient(s) and may contain confidential and privileged information of
> >> Motricity. Any unauthorized review, use, disclosure or distribution is
> >> prohibited. If you are not the intended recipient, please contact the
> >> sender by reply e-mail and destroy all copies of the original message.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
> NOTICE: This e-mail message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information of
Motricity. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the
sender by reply e-mail and destroy all copies of the original message.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_182285.ezm (zipped)
--- mgainty@(protected):
> you can configure the xwork LoggingInterceptor into your <default> stack..
> <interceptor name="logger"
> class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
>
> looking for clues on OGNL logging???

Set the level on the OGNL classes to DEBUG via whatever mechanism is being
used underneath commons-logging.

Dave


Attachment: user_182286.ezm (zipped)
I use standard log4J settings. This example is from a log4j.properties file
but log4j.xml will work as well. This outputs to the console and since I
usually use Eclipse it is very convenient as the output goes right to the
console view. The ConversionPattern is usually on one line but it wrapped
when I pasted it into this message.

log4j.appender.stdout=org.apache.log4j.ConsoleAppender

log4j.appender.stdout.Target=System.out

log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

log4j.appender.stdout.layout.ConversionPattern=%d{<MMM d, yyyy h:mm:s a z>}
[%x] %5p %c{2}:%L - %m%n

log4j.logger.com.opensymphony=debug, stdout

This will give you quite a bit more than just OGNL. You could change the
above line to this

log4j.logger.com.opensymphony.xwork2.util=debug, stdout

To narrow it down.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: <mgainty@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 5 Feb 2008 15:38:12 -0500
> To: Struts Users Mailing List <user@(protected)>
> Subject: Re: Custom OGNL PropertyAccessor
>
> you can configure the xwork LoggingInterceptor into your <default> stack..
> <interceptor name="logger"
> class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
>
> looking for clues on OGNL logging???
> Anyone?
>
> HTH
> Martin
> ----- Original Message -----
> Wrom: QBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCA
> To: "Struts Users Mailing List" <user@(protected)>
> Sent: Tuesday, February 05, 2008 3:05 PM
> Subject: Re: Custom OGNL PropertyAccessor
>
>
>> No I haven't. How do I go about doing that?
>>
>> Dave Newton wrote:
>>> --- Tommy Becker <tommy.becker@(protected):
>>>
>>>> If there were a better description, I'd be happy to give it. As far as
>>>> I can tell, our custom PropertyAccessor is not being used. What we
> want
>>>> is to be able to say "property" in an OGNL expression and have it call
>>>> getPropertyValue("property"), not getProperty(). It seems it's
>>>> continuing to try getProperty() despite our attempt at registering a
>>>> custom PropertyAccessor.
>>>>
>>>
>>> Have you turned up OGNL and XWork logging?
>>>
>>> Dave
>>>
>>>
>>>> Laurie Harper wrote:
>>>>
>>>>> Tommy Becker wrote:
>>>>>
>>>>>> I have a question about using OGNL PropertyAccessors. We have an
>>>>>> object on the value stack that we expose to JSP pages that does not
>>>>>> have standard JavaBeans getter/setter methods. From what I can tell,
>>>>>> this leaves us 2 options. We can either call the getter methods
>>>>>> explicitly via OGNL method calls in the pages, or we can wrap the
>>>>>> object in a JavaBean-like object. The second option is unworkable in
>>>>>> all but the simplest of cases when you realize that the method calls
>>>>>> can themselves return another object that needs to be wrapped, or
>>>>>> even a collection of them. So we've been using method calls in the
>>>>>> pages (yeah I know).
>>>>>>
>>>>>> Reading through the OGNL docs, it seems that what we need is a
>>>>>> PropertyAccessor that knows how to operate on our object. So we
>>>>>> implemented one, and attempted to register it by placing this in our
>>>>>> struts.xml:
>>>>>>
>>>>>> <bean type="ognl.PropertyAccessor" name="class.we.need.access.to"
>>>>>> class="our.property.accessor.PropertyAccessor"/>
>>>>>>
>>>>>> Unfortunately it doesn't work. Can someone tell me what we're doing
>>>>>> wrong, or even if what we're trying to do is possible? Thanks!
>>>>>>
>>>>> I don't know anything about OGNL's PropertyAccessor, but I doubt
>>>>> anyone can offer much help without seeing the code and a better
>>>>> description of the failure than "it doesn't work."
>>>>>
>>>>> L.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>
>>>>>
>>>> NOTICE: This e-mail message is for the sole use of the intended
>>>> recipient(s) and may contain confidential and privileged information of
>>>> Motricity. Any unauthorized review, use, disclosure or distribution is
>>>> prohibited. If you are not the intended recipient, please contact the
>>>> sender by reply e-mail and destroy all copies of the original message.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>
>> NOTICE: This e-mail message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information of
> Motricity. Any unauthorized review, use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please contact the
> sender by reply e-mail and destroy all copies of the original message.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>



This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment: user_182287.ezm (zipped)
FWIW, OGNL itself is in the ognl.* package.

Dave

--- Randy Burgess <RBurgess@(protected):

> I use standard log4J settings. This example is from a log4j.properties file
> but log4j.xml will work as well. This outputs to the console and since I
> usually use Eclipse it is very convenient as the output goes right to the
> console view. The ConversionPattern is usually on one line but it wrapped
> when I pasted it into this message.
>
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>
> log4j.appender.stdout.Target=System.out
>
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>
> log4j.appender.stdout.layout.ConversionPattern=%d{<MMM d, yyyy h:mm:s a z>}
> [%x] %5p %c{2}:%L - %m%n
>
> log4j.logger.com.opensymphony=debug, stdout
>
> This will give you quite a bit more than just OGNL. You could change the
> above line to this
>
> log4j.logger.com.opensymphony.xwork2.util=debug, stdout
>
> To narrow it down.
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: <mgainty@(protected)>
> > Reply-To: Struts Users Mailing List <user@(protected)>
> > Date: Tue, 5 Feb 2008 15:38:12 -0500
> > To: Struts Users Mailing List <user@(protected)>
> > Subject: Re: Custom OGNL PropertyAccessor
> >
> > you can configure the xwork LoggingInterceptor into your <default>
> stack..
> > <interceptor name="logger"
> > class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
> >
> > looking for clues on OGNL logging???
> > Anyone?
> >
> > HTH
> > Martin
> > ----- Original Message -----
> > Wrom: QBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCA
> > To: "Struts Users Mailing List" <user@(protected)>
> > Sent: Tuesday, February 05, 2008 3:05 PM
> > Subject: Re: Custom OGNL PropertyAccessor
> >
> >
> >> No I haven't. How do I go about doing that?
> >>
> >> Dave Newton wrote:
> >>> --- Tommy Becker <tommy.becker@(protected):
> >>>
> >>>> If there were a better description, I'd be happy to give it. As far
> as
> >>>> I can tell, our custom PropertyAccessor is not being used. What we
> > want
> >>>> is to be able to say "property" in an OGNL expression and have it call
> >>>> getPropertyValue("property"), not getProperty(). It seems it's
> >>>> continuing to try getProperty() despite our attempt at registering a
> >>>> custom PropertyAccessor.
> >>>>
> >>>
> >>> Have you turned up OGNL and XWork logging?
> >>>
> >>> Dave
> >>>
> >>>
> >>>> Laurie Harper wrote:
> >>>>
> >>>>> Tommy Becker wrote:
> >>>>>
> >>>>>> I have a question about using OGNL PropertyAccessors. We have an
> >>>>>> object on the value stack that we expose to JSP pages that does not
> >>>>>> have standard JavaBeans getter/setter methods. From what I can
> tell,
> >>>>>> this leaves us 2 options. We can either call the getter methods
> >>>>>> explicitly via OGNL method calls in the pages, or we can wrap the
> >>>>>> object in a JavaBean-like object. The second option is unworkable
> in
> >>>>>> all but the simplest of cases when you realize that the method calls
> >>>>>> can themselves return another object that needs to be wrapped, or
> >>>>>> even a collection of them. So we've been using method calls in the
> >>>>>> pages (yeah I know).
> >>>>>>
> >>>>>> Reading through the OGNL docs, it seems that what we need is a
> >>>>>> PropertyAccessor that knows how to operate on our object. So we
> >>>>>> implemented one, and attempted to register it by placing this in our
> >>>>>> struts.xml:
> >>>>>>
> >>>>>> <bean type="ognl.PropertyAccessor" name="class.we.need.access.to"
> >>>>>> class="our.property.accessor.PropertyAccessor"/>
> >>>>>>
> >>>>>> Unfortunately it doesn't work. Can someone tell me what we're doing
> >>>>>> wrong, or even if what we're trying to do is possible? Thanks!
> >>>>>>
> >>>>> I don't know anything about OGNL's PropertyAccessor, but I doubt
> >>>>> anyone can offer much help without seeing the code and a better
> >>>>> description of the failure than "it doesn't work."
> >>>>>
> >>>>> L.
> >>>>>
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >>>>> For additional commands, e-mail: user-help@(protected)
> >>>>>
> >>>>>
> >>>> NOTICE: This e-mail message is for the sole use of the intended
> >>>> recipient(s) and may contain confidential and privileged information
> of
> >>>> Motricity. Any unauthorized review, use, disclosure or distribution
> is
> >>>> prohibited. If you are not the intended recipient, please contact the
> >>>> sender by reply e-mail and destroy all copies of the original message.
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >>>> For additional commands, e-mail: user-help@(protected)
> >>>>
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >>> For additional commands, e-mail: user-help@(protected)
> >>>
> >>>
> >>
> >> NOTICE: This e-mail message is for the sole use of the intended
> > recipient(s) and may contain confidential and privileged information of
> > Motricity. Any unauthorized review, use, disclosure or distribution is
> > prohibited. If you are not the intended recipient, please contact the
> > sender by reply e-mail and destroy all copies of the original message.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
>
>
>
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information. If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email. Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a
> waiver of confidentiality and/or a privilege.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_182290.ezm (zipped)
My bad. I just did a search for ognl and came up with that real quickly. I
didn't go through my search results very thoroughly. :)

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Dave Newton <newton.dave@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 5 Feb 2008 13:11:57 -0800 (PST)
> To: Struts Users Mailing List <user@(protected)>
> Subject: Re: Custom OGNL PropertyAccessor
>
> FWIW, OGNL itself is in the ognl.* package.
>
> Dave
>
> --- Randy Burgess <RBurgess@(protected):
>
>> I use standard log4J settings. This example is from a log4j.properties file
>> but log4j.xml will work as well. This outputs to the console and since I
>> usually use Eclipse it is very convenient as the output goes right to the
>> console view. The ConversionPattern is usually on one line but it wrapped
>> when I pasted it into this message.
>>
>> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>>
>> log4j.appender.stdout.Target=System.out
>>
>> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>>
>> log4j.appender.stdout.layout.ConversionPattern=%d{<MMM d, yyyy h:mm:s a z>}
>> [%x] %5p %c{2}:%L - %m%n
>>
>> log4j.logger.com.opensymphony=debug, stdout
>>
>> This will give you quite a bit more than just OGNL. You could change the
>> above line to this
>>
>> log4j.logger.com.opensymphony.xwork2.util=debug, stdout
>>
>> To narrow it down.
>>
>> Regards,
>> Randy Burgess
>> Sr. Web Applications Developer
>> Nuvox Communications
>>
>>
>>
>>> From: <mgainty@(protected)>
>>> Reply-To: Struts Users Mailing List <user@(protected)>
>>> Date: Tue, 5 Feb 2008 15:38:12 -0500
>>> To: Struts Users Mailing List <user@(protected)>
>>> Subject: Re: Custom OGNL PropertyAccessor
>>>
>>> you can configure the xwork LoggingInterceptor into your <default>
>> stack..
>>> <interceptor name="logger"
>>> class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
>>>
>>> looking for clues on OGNL logging???
>>> Anyone?
>>>
>>> HTH
>>> Martin
>>> ----- Original Message -----
>>> Wrom: QBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCA
>>> To: "Struts Users Mailing List" <user@(protected)>
>>> Sent: Tuesday, February 05, 2008 3:05 PM
>>> Subject: Re: Custom OGNL PropertyAccessor
>>>
>>>
>>>> No I haven't. How do I go about doing that?
>>>>
>>>> Dave Newton wrote:
>>>>> --- Tommy Becker <tommy.becker@(protected):
>>>>>
>>>>>> If there were a better description, I'd be happy to give it. As far
>> as
>>>>>> I can tell, our custom PropertyAccessor is not being used. What we
>>> want
>>>>>> is to be able to say "property" in an OGNL expression and have it call
>>>>>> getPropertyValue("property"), not getProperty(). It seems it's
>>>>>> continuing to try getProperty() despite our attempt at registering a
>>>>>> custom PropertyAccessor.
>>>>>>
>>>>>
>>>>> Have you turned up OGNL and XWork logging?
>>>>>
>>>>> Dave
>>>>>
>>>>>
>>>>>> Laurie Harper wrote:
>>>>>>
>>>>>>> Tommy Becker wrote:
>>>>>>>
>>>>>>>> I have a question about using OGNL PropertyAccessors. We have an
>>>>>>>> object on the value stack that we expose to JSP pages that does not
>>>>>>>> have standard JavaBeans getter/setter methods. From what I can
>> tell,
>>>>>>>> this leaves us 2 options. We can either call the getter methods
>>>>>>>> explicitly via OGNL method calls in the pages, or we can wrap the
>>>>>>>> object in a JavaBean-like object. The second option is unworkable
>> in
>>>>>>>> all but the simplest of cases when you realize that the method calls
>>>>>>>> can themselves return another object that needs to be wrapped, or
>>>>>>>> even a collection of them. So we've been using method calls in the
>>>>>>>> pages (yeah I know).
>>>>>>>>
>>>>>>>> Reading through the OGNL docs, it seems that what we need is a
>>>>>>>> PropertyAccessor that knows how to operate on our object. So we
>>>>>>>> implemented one, and attempted to register it by placing this in our
>>>>>>>> struts.xml:
>>>>>>>>
>>>>>>>> <bean type="ognl.PropertyAccessor" name="class.we.need.access.to"
>>>>>>>> class="our.property.accessor.PropertyAccessor"/>
>>>>>>>>
>>>>>>>> Unfortunately it doesn't work. Can someone tell me what we're doing
>>>>>>>> wrong, or even if what we're trying to do is possible? Thanks!
>>>>>>>>
>>>>>>> I don't know anything about OGNL's PropertyAccessor, but I doubt
>>>>>>> anyone can offer much help without seeing the code and a better
>>>>>>> description of the failure than "it doesn't work."
>>>>>>>
>>>>>>> L.
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>>>
>>>>>>>
>>>>>> NOTICE: This e-mail message is for the sole use of the intended
>>>>>> recipient(s) and may contain confidential and privileged information
>> of
>>>>>> Motricity. Any unauthorized review, use, disclosure or distribution
>> is
>>>>>> prohibited. If you are not the intended recipient, please contact the
>>>>>> sender by reply e-mail and destroy all copies of the original message.
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>
>>>>>
>>>>
>>>> NOTICE: This e-mail message is for the sole use of the intended
>>> recipient(s) and may contain confidential and privileged information of
>>> Motricity. Any unauthorized review, use, disclosure or distribution is
>>> prohibited. If you are not the intended recipient, please contact the
>>> sender by reply e-mail and destroy all copies of the original message.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>
>>
>>
>> This email and any attachments ("Message") may contain legally privileged
>> and/or confidential information. If you are not the addressee, or if this
>> Message has been addressed to you in error, you are not authorized to read,
>> copy, or distribute it, and we ask that you please delete it (including all
>> copies) and notify the sender by return email. Delivery of this Message to
>> any person other than the intended recipient(s) shall not be deemed a
>> waiver of confidentiality and/or a privilege.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>



This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment: user_182283.ezm (zipped)

Hi,
I'm looking for some help, or some input on why I might be losing session
attributes (Not the session itself).

Processing Flow:
quest.action --> quest-input.jsp -> quest.action --> MyInterceptor ->
              confirm.jsp -> question.action --> quest-success.jsp

I am setting session attributes in my interceptor to have available
following the confirm.jsp.

Sometimes the attributes are there and sometimes they're not. There doesn't
seem to be any rhyme or reason.

Probably something simple I'm overlooking, but if so, I've been overlooking
it for two days!

Thanks!
David


MyInterceptor.java:

  public String intercept (ActionInvocation invocation) throws Exception {

    final ActionContext context = invocation.getInvocationContext();
    HttpServletRequest request = (HttpServletRequest)
context.get(HTTP_REQUEST);
    HttpSession session = request.getSession(true);

    // check if request is coming form the Confirmation Screen
    if ((request.getParameter("CONFIRM_SCREEN") != null) &&
          (request.getParameter("CONFIRM_SCREEN").equals("TRUE"))) {

       String urlGoingTo = invocation.getProxy().getNamespace() +
       invocation.getProxy().getActionName()+".action";

       // save input form attributes to session
       session.setAttribute("PARMS", request.getParameterMap());

       // save the forwarding url for the Confirmation Screen
       session.setAttribute(URL_GOING_TO, urlGoingTo);

       return "confirm";
    } else {
       return invocation.invoke();
    }
  }


Quest.java:

  public String execute() throws Exception {

    if (this.getSession().containsKey("PARMS")) {
       BeanUtils.populate(this, (Map)this.getSession().get("PARMS"));

       return SUCCESS;

    } else {

       return INPUT;
    }
  }


quest-input.jsp

  <%@(protected)" %>
  <s:head theme="ajax" />
  <link href="<s:url value="/html/body.css"/>" rel="stylesheet"
type="text/css" />

  <s:div id="reg" label="Registration Number" theme="ajax"
       labelposition="top" >

  <s:form action="cowQuest" method="Post" validate="true">
     <s:select
          name="nation"
          label="Nation"
          headerKey="0"
          list="nationList" />
     <s:textfield name="registrationNumber" label="Registration Number"
size="10"/>
     <s:hidden name="CONFIRM_SCREEN" value="TRUE"/>
     <s:submit value="Click Here to Run" id="submit"/>
  </s:form>

  </s:div>


confirm.jsp
  <%@(protected)"%>
  <link href="<s:url value="/html/body.css"/>" rel="stylesheet"
type="text/css" />

  <h2>Please confirm your request.</h2>
  <br>
  <p>This could take several minutes depending on the request.</p>

  <s:form method="post">
    <s:param name="action" value="quest.action"/>
    <s:submit value="Confirm" align="center">
      <s:param name="colspan" value="%{2}" />
      <s:param name="align" value="%{'center'}" />
    </s:submit>
  </s:form>


struts.xml

  <action name="quest" class="com.helpme.struts.actions.Quest">
     <interceptor-ref name="myInterceptor"/>
     <result name="input">/quest-input.jsp</result>
     <result name="confirm">/confirm.jsp</result>
     <result name="success">/quest-success.jsp</result>
     <result name="error">/quest-error.jsp</result>
  </action>
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_182293.ezm (zipped)
daveck wrote:
> Hi,
> I'm looking for some help, or some input on why I might be losing session
> attributes (Not the session itself).

Are you sure? Have you confirmed that the session is the same in both
requests?

> [...]
>
> I am setting session attributes in my interceptor to have available
> following the confirm.jsp.
>
> [...]
>
>     HttpSession session = request.getSession(true);

getSession(true) will create a session if one doesn't exist on the
request. If the session got lost somehow, this will mask that fault. You
might want to use getSession(false) and add a guard to ensure the
session is really there.

> [...]
>
>         // save input form attributes to session
>         session.setAttribute("PARMS", request.getParameterMap());

Assuming the session really is the same, I'm guessing this is the
problem. You're saving a reference to a map owned by the current
request. There's no guarantee the underlying HttpServletRequest instance
wont have been reused by the time you try to access the map.

Try making a copy of the request parameter map and storing that instead.

Also, you don't show any code that's removing the data you placed in the
session. Do you have clean-up code you didn't show and, if so, could it
be getting called out of sequence?

L.


Attachment: user_182294.ezm (zipped)
you'll definitely need configure in session attributes as in
    <interceptor name="sessionAutowiring"

class="org.apache.struts2.spring.interceptor.SessionContextAutowiringInterce
ptor"/>

which session attributes are you losing?
M--
----- Original Message -----
Wrom: MYXOEAIJJPHSCRTNHGSWZIDREXCA
To: <user@(protected)>
Sent: Tuesday, February 05, 2008 3:24 PM
Subject: Losing Session Attributes


>
> Hi,
> I'm looking for some help, or some input on why I might be losing session
> attributes (Not the session itself).
>
> Processing Flow:
> quest.action --> quest-input.jsp -> quest.action --> MyInterceptor ->
>               confirm.jsp -> question.action --> quest-success.jsp
>
> I am setting session attributes in my interceptor to have available
> following the confirm.jsp.
>
> Sometimes the attributes are there and sometimes they're not. There
doesn't
> seem to be any rhyme or reason.
>
> Probably something simple I'm overlooking, but if so, I've been
overlooking
> it for two days!
>
> Thanks!
> David
>
>
> MyInterceptor.java:
>
>   public String intercept (ActionInvocation invocation) throws Exception
{
>
>      final ActionContext context = invocation.getInvocationContext();
>   HttpServletRequest request = (HttpServletRequest)
> context.get(HTTP_REQUEST);
>   HttpSession session = request.getSession(true);
>
>      // check if request is coming form the Confirmation Screen
>      if ((request.getParameter("CONFIRM_SCREEN") != null) &&
>           (request.getParameter("CONFIRM_SCREEN").equals("TRUE"))) {
>
>         String urlGoingTo = invocation.getProxy().getNamespace() +
>         invocation.getProxy().getActionName()+".action";
>
>         // save input form attributes to session
>         session.setAttribute("PARMS", request.getParameterMap());
>
>         // save the forwarding url for the Confirmation Screen
>         session.setAttribute(URL_GOING_TO, urlGoingTo);
>
>         return "confirm";
>   } else {
>         return invocation.invoke();
>      }
>    }
>
>
> Quest.java:
>
>   public String execute() throws Exception {
>
>      if (this.getSession().containsKey("PARMS")) {
>         BeanUtils.populate(this, (Map)this.getSession().get("PARMS"));
>
>         return SUCCESS;
>
>      } else {
>
>         return INPUT;
>      }
>   }
>
>
> quest-input.jsp
>
>   <%@(protected)" %>
>   <s:head theme="ajax" />
>   <link href="<s:url value="/html/body.css"/>" rel="stylesheet"
> type="text/css" />
>
>   <s:div id="reg" label="Registration Number" theme="ajax"
>         labelposition="top" >
>
>    <s:form action="cowQuest" method="Post" validate="true">
>       <s:select
>            name="nation"
>            label="Nation"
>            headerKey="0"
>            list="nationList" />
>       <s:textfield name="registrationNumber" label="Registration
Number"
> size="10"/>
>       <s:hidden name="CONFIRM_SCREEN" value="TRUE"/>
>       <s:submit value="Click Here to Run" id="submit"/>
>    </s:form>
>
>    </s:div>
>
>
> confirm.jsp
>   <%@(protected)"%>
>   <link href="<s:url value="/html/body.css"/>" rel="stylesheet"
> type="text/css" />
>
>   <h2>Please confirm your request.</h2>
>   <br>
>   <p>This could take several minutes depending on the request.</p>
>
>   <s:form method="post">
>      <s:param name="action" value="quest.action"/>
>      <s:submit value="Confirm" align="center">
>   <s:param name="colspan" value="%{2}" />
>   <s:param name="align" value="%{'center'}" />
>   </s:submit>
>   </s:form>
>
>
> struts.xml
>
>    <action name="quest" class="com.helpme.struts.actions.Quest">
>       <interceptor-ref name="myInterceptor"/>
>       <result name="input">/quest-input.jsp</result>
>       <result name="confirm">/confirm.jsp</result>
>       <result name="success">/quest-success.jsp</result>
>       <result name="error">/quest-error.jsp</result>
>    </action>
> --
> View this message in context:
http://www.nabble.com/Losing-Session-Attributes-tp15298791p15298791.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_182288.ezm (zipped)

Hello,

After submitting editAction to SaveAction, I want to redirect again to
EditAction.
So SaveAction is totally transparent.
But I get lost all fieldErrors if validation return false.
How can I chain validation errors?
I tried the use of several interceptors like: validaiton, chain and params;
didn't success.

Thank you for the support
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_182289.ezm (zipped)
--- chubi <chubi-shuki@(protected):
> After submitting editAction to SaveAction, I want to redirect again to
> EditAction.
> So SaveAction is totally transparent.
> But I get lost all fieldErrors if validation return false.
> How can I chain validation errors?
> I tried the use of several interceptors like: validaiton, chain and params;
> didn't success.

If you're already using action chaining is to expose the error message
properties in your ActionSupport/DefaultActionSupport sublass via getters.

Dave


Attachment: user_182291.ezm (zipped)
I see, but why are you doing that? If you are going to build the json
string by yourself, then you don't need to use the json plugin at all,
just write it to the outputstream and return null on your action. The
whole point behind using the json plugin is that it will serialize
your object model to json for you.

musachy

On Feb 5, 2008 2:36 PM, Griffith, Michael *
<Michael.Griffith@(protected):
> Musachy,
>
> This is the actual response from the action when I invoke it from the
> browser:
>
> "{\"questions\":{\"420\":\"Is your Java Application a ME, SE or EE
> application?\",\"440\":\"If your Java Application is an SE application
> does it use Java Web Start?\",\"450\":\"If your Java Application is a
> Java Web Application, list the application server used for
> production\",\"490\":\"List any Java Web Services Technologies
> Used\",\"500\":\"List any Java Web Application Technologies Used for
> presentation\",\"510\":\"List any Java EE Technologies used in your
> application\"}}"
>
> I am building the JSON string and returning it from the action...
>      private static final Character QUOTE= '"';
>      private static final String DELIM= ":";
>      private static final String COMMA=",";
>      private static final String OPEN_BRACE="{";
>      private static final String CLOSE_BRACE="}";
>
>      StrinBuffer sb= new StringBuffer();
>           StringBuffer sb= new StringBuffer();
>
> sb.append(OPEN_BRACE).append(QUOTE).append("questions").append(QUOTE);
>           sb.append(DELIM).append(OPEN_BRACE);
>           for (Question question : list) {
>
> sb.append(QUOTE).append(question.getId().toString()).append(QUOTE).appen
> d(DELIM).append(QUOTE).append(question.getText()).append(QUOTE).append(C
> OMMA);
>
> }
> ...
>
> The String actually looks like this before its serialized by the json
> result:
>
> {"questions":{"420":"Is your Java Application a ME, SE or EE
> application?","440":"If your Java Application is an SE application does
> it use Java Web Start?","450":"If your Java Application is a Java Web
> Application, list the application server used for
> production","490":"List any Java Web Services Technologies
> Used","500":"List any Java Web Application Technologies Used for
> presentation","510":"List any Java EE Technologies used in your
> application"}}
>
> -----Original Message-----
> From: Musachy Barroso [mailto:musachy@(protected)]
>
> Sent: Tuesday, February 05, 2008 1:20 PM
> To: Struts Users Mailing List
> Subject: Re: AjaxTag 1.3 support?
>
> Oh I am sorry about that! (doh) Do you see the quoutes escaped in
> firebug or something? As far as I remember the plugin doesnt escape
> the quoutes. If you put the url in your browser you should see the
> generated json as it actually is.
>
> musachy
>
> On Feb 5, 2008 2:12 PM, Griffith, Michael *
> <Michael.Griffith@(protected):
> > Musachy,
> >
> > Huh? That can't be right...
> >
> > First of all, the document says it wraps the JSON result in /* ... */
> > comments, it doesn't say anything about escaping quotes.
> >
> > Second, the default value is false ;-) Adding this to the result
> > configuration did nothing to my result. This seems like a bug.
> >
> > MG
> >
> > -----Original Message-----
> > From: Musachy Barroso [mailto:musachy@(protected)]
> >
> > Sent: Tuesday, February 05, 2008 12:14 PM
> > To: Struts Users Mailing List
> > Subject: Re: AjaxTag 1.3 support?
> >
> > add:
> >
> > <param name="wrapWithComments">false</param>
> >
> > to the result. See the section "Wrap with Comments" here:
> >
> > http://cwiki.apache.org/S2PLUGINS/json-plugin.html
> >
> > musachy
> >
> > On Feb 5, 2008 12:58 PM, Griffith, Michael *
> > <Michael.Griffith@(protected):
> > > Musachy,
> > >
> > > I've looked over the documentation, and looked in the JSONWriter
> class
> > > -- and it is not obvious to me how to configure this plugin setting.
> > > How is it done?
> > >
> > > MG
> > >
> > > -----Original Message-----
> > > From: Musachy Barroso [mailto:musachy@(protected)]
> > > Sent: Tuesday, February 05, 2008 11:23 AM
> > > To: Struts Users Mailing List
> > >
> > > Subject: Re: AjaxTag 1.3 support?
> > >
> > > Don't give up so easily :). That is just a setting on the json
> plugin
> > > to prevent cross site scripting, and can be disabled.
> > >
> > > musachy
> > >
> > > On Feb 5, 2008 11:27 AM, Griffith, Michael *
> > > <Michael.Griffith@(protected):
> > > > Well, to answer my own question -- the answer is no. The JSON
> result
> > > > serialization process escapes quotation marks, so my response that
> > > > looked like this before serialization:
> > > >
> > > > {"questions":{"420":"Is your Java Application a ME, SE or EE
> > > > application?","440":"If your Java Application is an SE application
> > > does
> > > > it use Java Web Start?","450":"If your Java Application is a Java
> > Web
> > > > Application, list the application server used for
> > > > production","490":"List any Java Web Services Technologies
> > > > Used","500":"List any Java Web Application Technologies Used for
> > > > presentation","510":"List any Java EE Technologies used in your
> > > > application"}}
> > > >
> > > > Looks like this after serialization:
> > > >
> > > > "{\"questions\":{\"420\":\"Is your Java Application a ME, SE or EE
> > > > application?\",\"440\":\"If your Java Application is an SE
> > application
> > > > does it use Java Web Start?\",\"450\":\"If your Java Application
> is
> > a
> > > > Java Web Application, list the application server used for
> > > > production\",\"490\":\"List any Java Web Services Technologies
> > > > Used\",\"500\":\"List any Java Web Application Technologies Used
> for
> > > > presentation\",\"510\":\"List any Java EE Technologies used in
> your
> > > > application\"}}"
> > > >
> > > > Making it unrecognizable to the autocompleter. This is pretty
> > > > frustrating to me. Maybe I am expecting this to do something that
> it
> > > was
> > > > never designed to do. My end goal was to be able to evaluate the
> ID
> > of
> > > > the question that the user selected from the autocompleter.
> > > >
> > > > I'm giving up this path and looking elsewhere. Thanks to everyone
> > > that
> > > > replied to my question and tried to help me.
> > > >
> > > > MG
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Griffith, Michael * [mailto:Michael.Griffith@(protected)]
> > > > Sent: Tuesday, February 05, 2008 8:32 AM
> > > > To: Struts Users Mailing List
> > > > Subject: RE: AjaxTag 1.3 support?
> > > >
> > > > Musachy,
> > > >
> > > > I can't seem to create the right blend of Entity objects/list/maps
> > to
> > > > allow the JSON plug in to serialize this response for me. If I
> > create
> > > > the string below using a loop, can I return it from the JSON plug
> in
> > > > without the plug in doing anything further to it?
> > > >
> > > > In other words, does the plug in look at what it is trying to
> > > serialize
> > > > and say, "Hey this is already valid JSON, I don't need to do
> > anything
> > > to
> > > > it..." or will it try to add additional info to the string
> returned?
> > > >
> > > > I'm guessing the shortest path for me is to just create the string
> > in
> > > my
> > > > own serialization loop, but I don't want to confuse the plug in --
> > if
> > > > that makes any sense.
> > > >
> > > > MG
> > > >
> > > > -----Original Message-----
> > > > From: Musachy Barroso [mailto:musachy@(protected)]
> > > > Sent: Monday, February 04, 2008 6:30 PM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: AjaxTag 1.3 support?
> > > >
> > > > Right on.
> > > >
> > > > On Feb 4, 2008 6:45 PM, Griffith, Michael *
> > > > <Michael.Griffith@(protected):
> > > > > Dave,
> > > > >
> > > > > I think the bigger problem is the JSON that is returned, while
> it
> > > may
> > > > be
> > > > > valid, it not in the right structure expected. I should be
> > > generating
> > > > > JSON like this:
> > > > >
> > > > > {"questions":{"420":"Is your Java Application a ME, SE or EE
> > > > > application?","440":"If your Java Application is an SE
> application
> > > > does
> > > > > it use Java Web Start?"}}
> > > > >
> > > > > The [] brackets seem to be ignored by the parser.
> > > > >
> > > > > -----Original Message-----
> > > > > From: Dave Newton [mailto:newton.dave@(protected)]
> > > > > Sent: Monday, February 04, 2008 5:34 PM
> > > > > To: Struts Users Mailing List
> > > > > Subject: RE: AjaxTag 1.3 support?
> > > > >
> > > > > ...
> > > > >
> > > > >
> > > > > That's probably an issue.
> > > > >
> > > > > --- "Griffith, Michael *" <Michael.Griffith@(protected):
> > > > > > Yea, I think so -- I copied and pasted this from the log
> > > > > file/console...
> > > > > >
> > > > > > From: Dave Newton [mailto:newton.dave@(protected)]
> > > > > >
> > > > > > Is it generating those brackets around your JSON?
> > > > > >
> > > > > > --- "Griffith, Michael *" <Michael.Griffith@(protected)>
> wrote:
> > > > > >
> > > > > > > Musachy,
> > > > > > >
> > > > > > > Thanks for your many replies... Does this JSON look like the
> > > right
> > > > > > > format? As far as I can tell, it matches your snippet below
> --
> > > but
> > > > I
> > > > > > get
> > > > > > > the same dojo parting error.
> > > > > > >
> > > > > > > [{"questions":{"420":"Is your Java Application a ME, SE or
> EE
> > > > > > > application?"}},{"questions":{"440":"If your Java
> Application
> > is
> > > > an
> > > > > SE
> > > > > > > application does it use Java Web
> > > Start?"}},{"questions":{"450":"If
> > > > > > your
> > > > > > > Java Application is a Java Web Application, list the
> > application
> > > > > > server
> > > > > > > used for production"}}]
> > > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Musachy Barroso [mailto:musachy@(protected)]
> > > > > > > Sent: Monday, February 04, 2008 3:52 PM
> > > > > > > To: Struts Users Mailing List
> > > > > > > Subject: Re: AjaxTag 1.3 support?
> > > > > > >
> > > > > > > The rule to use a map (simplest one) was added on 2.1, on
> > 2.0.x
> > > > the
> > > > > > > easiest way to generate the json is to have an object with a
> > map
> > > > > field
> > > > > > > that matches the name of "dataFieldName" in the
> autocompleter
> > > tag:
> > > > > > >
> > > > > > > class QuestionJson {
> > > > > > >  private Map questions;
> > > > > > >  ....
> > > > > > > }
> > > > > > >
> > > > > > > public QuestionJson getQuestionJson() {
> > > > > > >  Question q= ... [from my list]
> > > > > > >   Map m = new HaswhMap();
> > > > > > >   m.put("Key1", q.getQuestion1());
> > > > > > >   m.put("Key2", q.getQuestion2());
> > > > > > >   return new QuestionJson(m);
> > > > > > > }
> > > > > > >
> > > > > > > <s:autocompleter ... dataFieldName="questions" ../>
> > > > > > >
> > > > > > > that will generate something like:
> > > > > > >
> > > > > > > {
> > > > > > >  "questions": {
> > > > > > >    "Key1" : "Question 1",
> > > > > > >    "Key2" : "Question 2",
> > > > > > >  }
> > > > > > > }
> > > > > > >
> > > > > > > //that's the idea, but I typed out of what I remember which
> is
> > > > often
> > > > > > not
> > > > > > > good :)
> > > > > > >
> > > > > > > musachy
> > > > > > >
> > > > > > > On Feb 4, 2008 4:34 PM, Griffith, Michael *
> > > > > > > <Michael.Griffith@(protected):
> > > > > > > > Musachy,
> > > > > > > >
> > > > > > > > I'm still not getting it...
> > > > > > > > I am now serializing a list of maps with the entity id and
> > > text
> > > > I
> > > > > > > > want...
> > > > > > > >
> > > > > > > > Map<String,String> m= new HashMap<String,String>();
> > > > > > > > Question q= ... [from my list]
> > > > > > > > m.put("id", q.getId().toString());
> > > > > > > > m.put("text", q.getText());
> > > > > > > > newList.add(m);
> > > > > > > >
> > > > > > > > And my JSON result looks:
> > > > > > > >
> > > > > > > > [JSON][{"text":"Is your Java Application a ME, SE or EE
> > > > > > > > application?","id":"420"},{"text":"If your Java
> Application
> > is
> > > > an
> > > > > SE
> > > > > > > > application does it use Java Web
> > > Start?","id":"440"},{"text":"If
> > > > > > your
> > > > > > > > Java Application is a Java Web Application, list the
> > > application
> > > > > > > server
> > > > > > > > used for production","id":"450"},{"text":"List any Java
> Web
> > > > > Services
> > > > > > > > Technologies Used","id":"490"},{"text":"List any Java Web
> > > > > > Application
> > > > > > > > Technologies Used for
> > presentation","id":"500"},{"text":"List
> > > > any
> > > > > > Java
> > > > > > > > EE Technologies used in your application","id":"510"}]
> > > > > > > >
> > > > > > > > I added the @JSON annotation as such:
> > > > > > > >
> > > > > > > >      @JSON(name="question")
> > > > > > > >      public List<Map<String,String>> getNewList(){
> > > > > > > >           return newList;
> > > > > > > >      }
> > > > > > > >
> > > > > > > > But it appears to be ignored.
> > > > > > > >
> > > > > > > > MG
> > > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Musachy Barroso [mailto:musachy@(protected)]
> > > > > > > >
> > > > > > > > Sent: Monday, February 04, 2008 2:53 PM
> > > > > > > > To: Struts Users Mailing List
> > > > > > > > Subject: Re: AjaxTag 1.3 support?
> > > > > > > >
> > > > > > > > Take a look here:
> > > > > > > >
> > > > > > > > http://cwiki.apache.org/S2PLUGINS/json-plugin.html
> > > > > > > >
> > > > > > > > musachy
> > > > > > > >
> > > > > > > > On Feb 4, 2008 3:43 PM, Griffith, Michael *
> > > > > > > > <Michael.Griffith@(protected):
> > > > > > > > > So, if you have an array of Entity objects, in my case
> > > > question:
> > > > > > > > >
> > > > > > > > > How can I produce?
> > > > > > > > > {
> > > > > > > > >    "question" : [
> > > > > > > > >       ["1","question 1 text..."],
> > > > > > > > >       ["2","question 2 text..."]
> > > > > > > > >
> > > > > > > > >    ]
> > > > > > > > > }
> > > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Musachy Barroso [mailto:musachy@(protected)]
> > > > > > > > > Sent: Monday, February 04, 2008 2:37 PM
> > > > > > > > > To: Struts Users Mailing List
> > > > > > > > > Subject: Re: AjaxTag 1.3 support?
> > > > > > > > >
> > > > > > > > > yes, but the output will depend on what you feed the
> JSON
> > > > > result.
> > > > > > > > >
> > > > > > > > > musachy
> > > > > > > > >
> > > > > > > > > On Feb 4, 2008 3:20 PM, Griffith, Michael *
> > > > > > > > > <Michael.Griffith@(protected):
> > > > > > > > > > Musachy,
> > > > > > > > > >
> > > > > > > > > > I must have missed your point. Isn't the idea of using
> > the
> > > > > JSON
> > > > > > > > > plug-in
> > > > > > > > > > so you don't have to iterate and create the list? If I
> > > have
> > > > an
> > > > > > > array
> > > > > > > > > or
> > > > > > > > > > Entity objects or maps, isn't there a way that the
> > plug-in
> > > > > will
> > > > > > > > create
> > > > > > > > > > the JSON specified below?
> > > > > > > > > >
> > > > > > > > > > MG
> > > > > > > > > >
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Musachy Barroso [mailto:musachy@(protected)]
> > > > > > > > > > Sent: Monday, February 04, 2008 1:56 PM
> > > > > > > > > > To: Struts Users Mailing List
> > > > > > > > > > Subject: Re: AjaxTag 1.3 support?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > to use the dataFIeldName, you have to return something
> > > like:
> > > > > > > > > >
> > > > > > > > > > {
> > > > > > > > > >   "state" : [
> > > > > > > > > >      ["Alabama","AL"],
> > > > > > > > > >      ["Alaska","AK"]
> > > > > > > > > >   ]
> > > > > > > > > > }
> > > > > > > > > >
> > > > > > > > > > if you are using 2.1 check this link:
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://cwiki.apache.org/WW/ajax-and-javascript-recipes.html#AjaxandJavaS
> > > > > > > > > > criptRecipes-Autocompleter
> > > > > > > > > >
> > > > > > > > > > otherwise just an array of arrays should do:
> > > > > > > > > >
> > > > > > > > > > [
> > > > > > > > > >   ["Alabama", "AL"],
> > > > > > > > > >   ["Alaska", "AK"]
> > > > > > > > > > ]
> > > > > > > > > >
> > > > > > > > > > musachy
> > > > > > > > > >
> > > > > > > > > > On Feb 4, 2008 2:46 PM, Griffith, Michael *
> > > > > > > > > > <Michael.Griffith@(protected):
> > > > > > > > > > > Musachy
> > > > > > > > > > >
> > > > > > > > > > > Here is the autocompleter tag and the JSON
> returned...
> > > > > > > > > > >
> > > > > >
> > > > > === message truncated ===
> > > > >
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > > For additional commands, e-mail: user-help@(protected)
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > > For additional commands, e-mail: user-help@(protected)
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment: user_182292.ezm (zipped)

In struts-fonfig.xml I configured as following to get the messages from
DB instead of MessageResource.properties. I have wrote a method to
getMessage(Locale loc, String key) to get the message from db. This
works for en_US locale, Now my question is how can I pass the locale so
that I get the locale specific messages?

Thanks.



<message-resources factory="com.ford....MyDbResourceBundleFactory"
         parameter="" null="false" />

Attachment: user_182295.ezm (zipped)
We need to see your web.xml. I'm running Struts 2 projects on WebLogic 9.2
without any problems.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Vigneswar Nagarathinam <vigneswardn@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 5 Feb 2008 17:09:23 +0530
> To: <user@(protected)>
> Subject: Struts 2 and Weblogic 9.2 - java.net.ConnectException
>
> Hi All,
>      I'm trying to implement Struts2 with Weblogic 9.2. I'm getting the
> following error while running the Weblogic server. Can you please help me by
> providing a solution:
>
> stack trace:
> -------------------
> <Feb 5, 2008 3:51:35 PM GMT+05:30> <Error> <HTTP> <BEA-101165> <Could not
> load user defined filter in web.xml:
> org.apache.struts2.dispatcher.FilterDispatcher.
> Class: weblogic.net.http.HttpClient
> File: HttpClient.java
> Method: openServer
> Line: 320 - weblogic/net/http/HttpClient.java:320:-1
>      at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigur
> ationFiles
> (XmlConfigurationProvider.java:835)
>      at
>
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocument>
s
> (XmlConfigurationProvider.java:131)
>      at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
> XmlConfigurationProvider.java:100)
>      at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
> DefaultConfiguration.java:130)
>      at
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
> ConfigurationManager.java:52)
>      Truncated. see log file for complete stacktrace
> Tried all: '1' addresses, but could not connect over HTTP to server: '
> struts.apache.org', port: '80' - Class: weblogic.net.http.HttpClient
> File: HttpClient.java
> Method: openServer
> Line: 320 - weblogic/net/http/HttpClient.java:320:-1
>      at com.opensymphony.xwork2.util.DomHelper.parse (DomHelper.java:123)
>      at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigur
> ationFiles
> (XmlConfigurationProvider.java:830)
>      at
>
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocument>
s
> (XmlConfigurationProvider.java:131)
>      at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
> XmlConfigurationProvider.java:100)
>      at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
> DefaultConfiguration.java:130)
>      Truncated. see log file for complete stacktrace
> java.net.ConnectException: Tried all: '1' addresses, but could not connect
> over HTTP to server: 'struts.apache.org', port: '80'
>      at weblogic.net.http.HttpClient.openServer(HttpClient.java:320)
>      at weblogic.net.http.HttpClient.openServer(HttpClient.java:375)
>      at weblogic.net.http.HttpClient.<init>(HttpClient.java:149)
>      at weblogic.net.http.HttpClient.New(HttpClient.java:245)
>      at weblogic.net.http.HttpURLConnection.connect(
> HttpURLConnection.java:160)
>      Truncated. see log file for complete stacktrace>
>
> Thanks in advance,
> Vigneswar Nagarathinam



This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.
©2008 gg3721.com - Jax Systems, LLC, U.S.A.