Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 7 Aug 2008 22:00:01 -0000 Issue 8184

user-digest-help

2008-08-07


Author LoginPost Reply

user Digest 7 Aug 2008 22:00:01 -0000 Issue 8184

Topics (messages 189813 through 189827):

yikes! : net.sf.json.JSONException: There is a cycle in the hierarchy!
 189813 by: John Moose

PrincipalAware & PrincipalProxy, glue to provide my own Impl
 189814 by: Torsten Krah
 189816 by: Nils-Helge Garli Hegvik

append value inside <:iterator
 189815 by: holod

configuration doc for struts 1.3,tiles with Rad 7.5
 189817 by: sam thothi
 189818 by: Dave Newton
 189819 by: sam thothi
 189820 by: Dave Newton
 189827 by: sam thothi

More OGNL Woes
 189821 by: Zoran Avtarovski
 189824 by: Musachy Barroso
 189826 by: André Cedik | GDG

struts2 select onchange to trigger ajax call
 189822 by: Markus Doring
 189825 by: Dave Newton

<s:action/> redirect does not work with Tiles.
 189823 by: Griffith, Michael *

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_189813.ezm (zipped)
Anyone know what this means?? How can I change the pre-configured STRICT
strategy :
net.sf.json.util.CycleDetectionStrategy$StrictCycleDetectionStrategy to
LENIENT ?? and will that even help me here?
Using Hibernate 3.1 with Struts 2.1.3 and the REST plugin. XML serializaion
works fine after changing Hiberbate lazy loading to FALSE...

Stacktraces *net.sf.json.JSONException: There is a cycle in the hierarchy!*

  net.sf.json.util.CycleDetectionStrategy$StrictCycleDetectionStrategy.handleRepeatedReferenceAsObject(CycleDetectionStrategy.java:73)
  net.sf.json.JSONObject._fromBean(JSONObject.java:658)
  net.sf.json.JSONObject.fromObject(JSONObject.java:182)
  net.sf.json.JSONObject._processValue(JSONObject.java:2426)
  net.sf.json.JSONObject._setInternal(JSONObject.java:2447)
  net.sf.json.JSONObject.setValue(JSONObject.java:1189)
  net.sf.json.JSONObject._fromBean(JSONObject.java:725)
  net.sf.json.JSONObject.fromObject(JSONObject.java:182)
  net.sf.json.JSONArray._processValue(JSONArray.java:2294)
  net.sf.json.JSONArray.processValue(JSONArray.java:2325)
  net.sf.json.JSONArray.addValue(JSONArray.java:2312)
  net.sf.json.JSONArray._fromCollection(JSONArray.java:841)
  net.sf.json.JSONArray.fromObject(JSONArray.java:137)
  net.sf.json.JSONObject._processValue(JSONObject.java:2402)
  net.sf.json.JSONObject._setInternal(JSONObject.java:2447)
  net.sf.json.JSONObject.setValue(JSONObject.java:1189)
  net.sf.json.JSONObject._fromBean(JSONObject.java:725)
  net.sf.json.JSONObject.fromObject(JSONObject.java:182)
  net.sf.json.JSONObject._processValue(JSONObject.java:2426)
  net.sf.json.JSONObject._setInternal(JSONObject.java:2447)
  net.sf.json.JSONObject.setValue(JSONObject.java:1189)
  net.sf.json.JSONObject._fromBean(JSONObject.java:725)
  net.sf.json.JSONObject.fromObject(JSONObject.java:182)
  net.sf.json.JSONArray._processValue(JSONArray.java:2294)
  net.sf.json.JSONArray.processValue(JSONArray.java:2325)
  net.sf.json.JSONArray.addValue(JSONArray.java:2312)
  net.sf.json.JSONArray._fromCollection(JSONArray.java:841)
  net.sf.json.JSONArray.fromObject(JSONArray.java:137)
  net.sf.json.JSONArray.fromObject(JSONArray.java:120)
  org.apache.struts2.rest.handler.JsonLibHandler.fromObject(JsonLibHandler.java:62)
  org.apache.struts2.rest.ContentTypeHandlerManager.handleResult(ContentTypeHandlerManager.java:168)
  org.apache.struts2.rest.RestActionInvocation.processResult(RestActionInvocation.java:132)
  org.apache.struts2.rest.RestActionInvocation.invokeAction(RestActionInvocation.java:102)
  com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly (DefaultActionInvocation.java:272)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:235)
  com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:89)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:89)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (ConversionErrorInterceptor.java:122)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  org.apache.struts2.rest.ContentTypeInterceptor.intercept(ContentTypeInterceptor.java:67)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (ParametersInterceptor.java:179)
  com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:87)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (StaticParametersInterceptor.java:140)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  org.apache.struts2.interceptor.CheckboxInterceptor.intercept (CheckboxInterceptor.java:93)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  org.apache.struts2.interceptor.FileUploadInterceptor.intercept (FileUploadInterceptor.java:225)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept (ModelDrivenInterceptor.java:89)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept (ScopedModelDrivenInterceptor.java:128)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (ParametersInterceptor.java:179)
  com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:87)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept (ProfilingActivationInterceptor.java:104)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept (DebuggingInterceptor.java:267)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept (ChainingInterceptor.java:126)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept (I18nInterceptor.java:148)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept (PrepareInterceptor.java:138)
  com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (MethodFilterInterceptor.java:87)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  org.apache.struts2.interceptor.MessageStoreInterceptor.intercept (MessageStoreInterceptor.java:204)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  org.apache.struts2.interceptor.ServletConfigInterceptor.intercept (ServletConfigInterceptor.java:164)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept (AliasInterceptor.java:128)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept (ExceptionMappingInterceptor.java:176)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:229)
  com.opensymphony.xwork2.DefaultActionProxy.execute (DefaultActionProxy.java:129)
  org.apache.struts2.dispatcher.Dispatcher.serviceAction (Dispatcher.java:449)
  org.apache.struts2.dispatcher.FilterDispatcher.doFilter (FilterDispatcher.java:395)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:186)
  org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:157)
  org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:214)
  org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104)
  org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520)
  org.apache.catalina.core.StandardContextValve.invokeInternal (StandardContextValve.java:198)
  org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:152)
  org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104)
  org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520)
  org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:137)
  org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104)
  org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:118)
  org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:102)
  org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520)
  org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109)
  org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104)
  org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520)
  org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:929)
  org.apache.coyote.tomcat5.CoyoteAdapter.service (CoyoteAdapter.java:160)
  org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:799)
  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
  org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
  org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
  java.lang.Thread.run (Thread.java:595)

Attachment: user_189814.ezm (zipped)
Hi,

there are 2 known implemeting classes yet, one for Servlet and one for
Portlets.
I want to provide my own implementation of PricipalProxy.

Whats missing to me, where is the glue to my webapp, how do i announce my own
implemetation to be used?

thx

--
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html

Really, I'm not out to destroy Microsoft. That will just be a
completely unintentional side effect."
 -- Linus Torvalds

Attachment: smime.p7s (zipped)
Attachment: user_189816.ezm (zipped)
The "magic" happens in the ServletConfigInterceptor for a regular
webapp and the PortletAwareInterceptor for a portlet app. So basically
you should be able to do what you want by writing a custom interceptor
and use it in your stack.

Nils-H

On Thu, Aug 7, 2008 at 5:20 PM, Torsten Krah
<tkrah@(protected):
> Hi,
>
> there are 2 known implemeting classes yet, one for Servlet and one for
> Portlets.
> I want to provide my own implementation of PricipalProxy.
>
> Whats missing to me, where is the glue to my webapp, how do i announce my own
> implemetation to be used?
>
> thx
>
> --
> Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
> Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
>
> Really, I'm not out to destroy Microsoft. That will just be a
> completely unintentional side effect."
>     -- Linus Torvalds
>

Attachment: user_189815.ezm (zipped)

I use <s:iterator/>
inside this tag I want to compose a String.
I've tried this one:
     <s:set name="representativeIds" value="" scope="page"/>
       <s:iterator value="lawDraft.representatives">
         <s:if test="id != 0">
           <s:property value="'id=' + id"/>
           <s:set name="representativeIds" value="#representativeIds + id +
';'"/>
           <s:property value="'set=' + #representativeIds"/>
         </s:if>
       </s:iterator>

<s:property value="'id=' + id"/> shows me that my iterator works and I have
several id != 0
<s:property value="'set=' + #representativeIds"/> always shows set=null

seems like I'm on the wrong way. Is it possible to solve such task using
struts tags?
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189817.ezm (zipped)
Hi all,

Any one can provide me with the configuration docs for struts 1.3,tiles
with Rad 7.5.
Thanks in advance for your help.

thanks,
Sam

Attachment: user_189818.ezm (zipped)
--- On Thu, 8/7/08, sam thothi <samthothi@(protected):
> Any one can provide me with the configuration docs for
> struts 1.3,tiles with Rad 7.5.

Configuration docs? Like what? The app is configured like any other RAD app, and like any other Struts 1 app, AFAIK.

Dave


Attachment: user_189819.ezm (zipped)
I am getting two errors while configuring
when i change the class loader to multiple which is default , it's saying

The JSP container failed to load the TagExtraInfo class
[org.apache.struts.taglib.tiles.UseAttributeTei] from
/WEB-INF/struts-tiles.tld

[8/7/08 11:49:16:525 CDT] 0000000d FfdcProvider I
com.ibm.ws.ffdc.impl.FfdcProvider logIncident *FFDC1003I*: FFDC Incident
emitted on C:\Program
Files\IBM\SDP75Beta\runtimes\base_v7\profiles\was70profile1\logs\ffdc\server1_1dfd1dfd_08.08.07_11.49.16.50912499.txt
com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet 218

[8/7/08 11:49:16:525 CDT] 0000000d extension W
com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor
createServletWrapper Servlet action is currently unavailable: *SRVE0203E*:
Servlet [action]: org.apache.struts.action.ActionServlet was found, but is
missing another required class.

SRVE0206E: This error typically implies that the servlet was originally
compiled with classes which cannot be located by the server.
i change the class loader to single and it works fine. I want to know any
jars i am missing to include struts 1.3 to work . If i change to single, my
struts actions are working and tiles didn't work and throws class not found
exception.

would be great if you let me know anything i should add changing from struts
1.2 to struts 1.3.

Thanks in advance for you help


On 8/7/08, Dave Newton <newton.dave@(protected):
>
> --- On Thu, 8/7/08, sam thothi <samthothi@(protected):
> > Any one can provide me with the configuration docs for
> > struts 1.3,tiles with Rad 7.5.
>
> Configuration docs? Like what? The app is configured like any other RAD
> app, and like any other Struts 1 app, AFAIK.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_189820.ezm (zipped)
Have you turned up logging and checked the logs to see if it says what class you're missing? Do you have all the S1.3 dependencies?

Dave


--- On Thu, 8/7/08, sam thothi <samthothi@(protected):

> From: sam thothi <samthothi@(protected)>
> Subject: Re: configuration doc for struts 1.3,tiles with Rad 7.5
> To: "Struts Users Mailing List" <user@(protected)
> Date: Thursday, August 7, 2008, 2:13 PM
> I am getting two errors while configuring
> when i change the class loader to multiple which is
> default , it's saying
>
> The JSP container failed to load the TagExtraInfo class
> [org.apache.struts.taglib.tiles.UseAttributeTei] from
> /WEB-INF/struts-tiles.tld
>
> [8/7/08 11:49:16:525 CDT] 0000000d FfdcProvider I
> com.ibm.ws.ffdc.impl.FfdcProvider logIncident *FFDC1003I*:
> FFDC Incident
> emitted on C:\Program
> Files\IBM\SDP75Beta\runtimes\base_v7\profiles\was70profile1\logs\ffdc\server1_1dfd1dfd_08.08.07_11.49.16.50912499.txt
> com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet
> 218
>
> [8/7/08 11:49:16:525 CDT] 0000000d extension W
> com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor
> createServletWrapper Servlet action is currently
> unavailable: *SRVE0203E*:
> Servlet [action]: org.apache.struts.action.ActionServlet
> was found, but is
> missing another required class.
>
> SRVE0206E: This error typically implies that the servlet
> was originally
> compiled with classes which cannot be located by the
> server.
> i change the class loader to single and it works fine. I
> want to know any
> jars i am missing to include struts 1.3 to work . If i
> change to single, my
> struts actions are working and tiles didn't work and
> throws class not found
> exception.
>
> would be great if you let me know anything i should add
> changing from struts
> 1.2 to struts 1.3.
>
> Thanks in advance for you help
>
>
> On 8/7/08, Dave Newton <newton.dave@(protected):
> >
> > --- On Thu, 8/7/08, sam thothi
> <samthothi@(protected):
> > > Any one can provide me with the configuration
> docs for
> > > struts 1.3,tiles with Rad 7.5.
> >
> > Configuration docs? Like what? The app is configured
> like any other RAD
> > app, and like any other Struts 1 app, AFAIK.
> >
> > Dave
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@(protected)
> > For additional commands, e-mail:
> user-help@(protected)
> >
> >

Attachment: user_189827.ezm (zipped)
Dave,
i have all the s1.3 dependencies. i have a question in the doctypes for
the strutscofig.xml

Rightnow , i am running the application with the doctype in strutsconfig.xml
as
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 1.1//EN" "http://struts.apache.org/dtds/struts-config_1_1.dtd"
>

If i change it to 1.3 , then i get the following error in the tiles plugin


<plug-in className=*"org.apache.struts.tiles.TilesPlugin"*>

<set-property *property="definitions-config"* value=*
"/WEB-INF/tiles-defs.xml"* />

<set-property *property="definitions-parser-validate"* value=*"true"* />

<set-property property=*"moduleAware"* value=*"true"* />

</plug-in>

The error would be Attribute-property has a runtime value of
definitions-config. Property must reference a valid Java identifier.



I doubt it may be the reason .

Thanks in advance for the help.







On 8/7/08, Dave Newton <newton.dave@(protected):
>
> Have you turned up logging and checked the logs to see if it says what
> class you're missing? Do you have all the S1.3 dependencies?
>
> Dave
>
>
> --- On Thu, 8/7/08, sam thothi <samthothi@(protected):
>
> > From: sam thothi <samthothi@(protected)>
> > Subject: Re: configuration doc for struts 1.3,tiles with Rad 7.5
> > To: "Struts Users Mailing List" <user@(protected)>,
> newton.dave@(protected)
> > Date: Thursday, August 7, 2008, 2:13 PM
> > I am getting two errors while configuring
> > when i change the class loader to multiple which is
> > default , it's saying
> >
> > The JSP container failed to load the TagExtraInfo class
> > [org.apache.struts.taglib.tiles.UseAttributeTei] from
> > /WEB-INF/struts-tiles.tld
> >
> > [8/7/08 11:49:16:525 CDT] 0000000d FfdcProvider I
> > com.ibm.ws.ffdc.impl.FfdcProvider logIncident *FFDC1003I*:
> > FFDC Incident
> > emitted on C:\Program
> >
> Files\IBM\SDP75Beta\runtimes\base_v7\profiles\was70profile1\logs\ffdc\server1_1dfd1dfd_08.08.07_11.49.16.50912499.txt
> > com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet
> > 218
> >
> > [8/7/08 11:49:16:525 CDT] 0000000d extension W
> > com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor
> > createServletWrapper Servlet action is currently
> > unavailable: *SRVE0203E*:
> > Servlet [action]: org.apache.struts.action.ActionServlet
> > was found, but is
> > missing another required class.
> >
> > SRVE0206E: This error typically implies that the servlet
> > was originally
> > compiled with classes which cannot be located by the
> > server.
> > i change the class loader to single and it works fine. I
> > want to know any
> > jars i am missing to include struts 1.3 to work . If i
> > change to single, my
> > struts actions are working and tiles didn't work and
> > throws class not found
> > exception.
> >
> > would be great if you let me know anything i should add
> > changing from struts
> > 1.2 to struts 1.3.
> >
> > Thanks in advance for you help
> >
> >
> > On 8/7/08, Dave Newton <newton.dave@(protected):
> > >
> > > --- On Thu, 8/7/08, sam thothi
> > <samthothi@(protected):
> > > > Any one can provide me with the configuration
> > docs for
> > > > struts 1.3,tiles with Rad 7.5.
> > >
> > > Configuration docs? Like what? The app is configured
> > like any other RAD
> > > app, and like any other Struts 1 app, AFAIK.
> > >
> > > Dave
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > 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)
>
>

Attachment: user_189821.ezm (zipped)
I¹m really starting to develop a love-hate (and fear) relationship with
OGNL. Please bear with my long winded explanation, it' therapeutic (for me
at least). And, please, I really do need help.

I'm finding using OGNL like dating a supermodel, who also suffers from
multiple personality disorder and Turrets. At first it's hello OGNL, your
having breakfast at some uptown café, expensive glossy mags littered around
the place, ordering eggs on some exotic bread and coffee that monkeys
excrete. You know the feeling. You're interacting with stack, calling
methods, the odd lambda expression. Your on top of the world. It's a case of
JSP - who, expression language - what?

Next thing you know, BAM!! You're wearing your breakfast, feeling the pain
of 300 pages of last month's Italian Vogue across the back of your head and
longing for the security of a bagel and filtered coffee with JSP.


Take my current problem. A simple task of passing a parameter to an included
page.

<s:include value="myPage.jsp>
  <s:param name="myParam">2</s:param>
</s:include>

And in myPage.jsp I have

<s:property value="#parameters.myParam/>

BAM!! There's that Italian Vogue again.

So I try:

<s:property value="#parameters['myParam']/>

and

<s:property value="%{#parameters.myParam}/>

and

<s:property value="myParam/>

and

<s:property value=%{myParam}/>

Now I'm reaching for the Ibuprofen. You also see where the Turrets comes in.

If I now look at my once loved, then hated, now missed JSP:

<c:import url="myPage.jsp">
  <c:param name=myParam">2</c:param>
</c:import>

And in myPage.jsp I have ${params.myParam}. Bingo! Bagel and coffee.

Please somebody please point out my error as I know it must be MY ERROR, but
I just can't see it.

I've read the stuff on the struts wiki which indicates that my example
should be working. The OGNL site is too generic to be of much use here.

As an aside, if any budding author wants to produce an InfoQ style guide to
OGNL and struts I'd happily spring for it.

I'm not asking a lot. We all have flaws. I'd just like to settle into a
little monogamy for a while - until the next supermodel at least.

Z.



Attachment: user_189824.ezm (zipped)
First, that was funny. Second, and this is *annoying*, "parameters" is
not a named object when using the "component" tag, so I assume it is
the same for "include", so instead of using "#parameters", use
"parameters" which is the same as "top.parameters".

musachy

On Thu, Aug 7, 2008 at 3:28 PM, Zoran Avtarovski
<zoran@(protected):
> I¹m really starting to develop a love-hate (and fear) relationship with
> OGNL. Please bear with my long winded explanation, it' therapeutic (for me
> at least). And, please, I really do need help.
>
> I'm finding using OGNL like dating a supermodel, who also suffers from
> multiple personality disorder and Turrets. At first it's hello OGNL, your
> having breakfast at some uptown café, expensive glossy mags littered around
> the place, ordering eggs on some exotic bread and coffee that monkeys
> excrete. You know the feeling. You're interacting with stack, calling
> methods, the odd lambda expression. Your on top of the world. It's a case of
> JSP - who, expression language - what?
>
> Next thing you know, BAM!! You're wearing your breakfast, feeling the pain
> of 300 pages of last month's Italian Vogue across the back of your head and
> longing for the security of a bagel and filtered coffee with JSP.
>
>
> Take my current problem. A simple task of passing a parameter to an included
> page.
>
> <s:include value="myPage.jsp>
>   <s:param name="myParam">2</s:param>
> </s:include>
>
> And in myPage.jsp I have
>
> <s:property value="#parameters.myParam/>
>
> BAM!! There's that Italian Vogue again.
>
> So I try:
>
> <s:property value="#parameters['myParam']/>
>
> and
>
> <s:property value="%{#parameters.myParam}/>
>
> and
>
> <s:property value="myParam/>
>
> and
>
> <s:property value=%{myParam}/>
>
> Now I'm reaching for the Ibuprofen. You also see where the Turrets comes in.
>
> If I now look at my once loved, then hated, now missed JSP:
>
> <c:import url="myPage.jsp">
>   <c:param name=myParam">2</c:param>
> </c:import>
>
> And in myPage.jsp I have ${params.myParam}. Bingo! Bagel and coffee.
>
> Please somebody please point out my error as I know it must be MY ERROR, but
> I just can't see it.
>
> I've read the stuff on the struts wiki which indicates that my example
> should be working. The OGNL site is too generic to be of much use here.
>
> As an aside, if any budding author wants to produce an InfoQ style guide to
> OGNL and struts I'd happily spring for it.
>
> I'm not asking a lot. We all have flaws. I'd just like to settle into a
> little monogamy for a while - until the next supermodel at least.
>
> Z.
>
>
>
> ---------------------------------------------------------------------
> 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_189826.ezm (zipped)
You can also use a complete different approach.
I've done this recently and it worked fine for me.
On the jsp that has your <s:include> you do the
following:

<s:set name="myParam" value="2" />

And in your myPage.jsp you just read the value
from the stack like you'd normally do:

<s:property value="#myParam" />




Musachy Barroso wrote:
> First, that was funny. Second, and this is *annoying*, "parameters" is
> not a named object when using the "component" tag, so I assume it is
> the same for "include", so instead of using "#parameters", use
> "parameters" which is the same as "top.parameters".
>
> musachy
>
> On Thu, Aug 7, 2008 at 3:28 PM, Zoran Avtarovski
> <zoran@(protected):
>  
>> I¹m really starting to develop a love-hate (and fear) relationship with
>> OGNL. Please bear with my long winded explanation, it' therapeutic (for me
>> at least). And, please, I really do need help.
>>
>> I'm finding using OGNL like dating a supermodel, who also suffers from
>> multiple personality disorder and Turrets. At first it's hello OGNL, your
>> having breakfast at some uptown café, expensive glossy mags littered around
>> the place, ordering eggs on some exotic bread and coffee that monkeys
>> excrete. You know the feeling. You're interacting with stack, calling
>> methods, the odd lambda expression. Your on top of the world. It's a case of
>> JSP - who, expression language - what?
>>
>> Next thing you know, BAM!! You're wearing your breakfast, feeling the pain
>> of 300 pages of last month's Italian Vogue across the back of your head and
>> longing for the security of a bagel and filtered coffee with JSP.
>>
>>
>> Take my current problem. A simple task of passing a parameter to an included
>> page.
>>
>> <s:include value="myPage.jsp>
>>   <s:param name="myParam">2</s:param>
>> </s:include>
>>
>> And in myPage.jsp I have
>>
>> <s:property value="#parameters.myParam/>
>>
>> BAM!! There's that Italian Vogue again.
>>
>> So I try:
>>
>> <s:property value="#parameters['myParam']/>
>>
>> and
>>
>> <s:property value="%{#parameters.myParam}/>
>>
>> and
>>
>> <s:property value="myParam/>
>>
>> and
>>
>> <s:property value=%{myParam}/>
>>
>> Now I'm reaching for the Ibuprofen. You also see where the Turrets comes in.
>>
>> If I now look at my once loved, then hated, now missed JSP:
>>
>> <c:import url="myPage.jsp">
>>   <c:param name=myParam">2</c:param>
>> </c:import>
>>
>> And in myPage.jsp I have ${params.myParam}. Bingo! Bagel and coffee.
>>
>> Please somebody please point out my error as I know it must be MY ERROR, but
>> I just can't see it.
>>
>> I've read the stuff on the struts wiki which indicates that my example
>> should be working. The OGNL site is too generic to be of much use here.
>>
>> As an aside, if any budding author wants to produce an InfoQ style guide to
>> OGNL and struts I'd happily spring for it.
>>
>> I'm not asking a lot. We all have flaws. I'd just like to settle into a
>> little monogamy for a while - until the next supermodel at least.
>>
>> Z.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>  
>
>
>
>  


Attachment: user_189822.ezm (zipped)

I would like to have an onchange event from a select element to trigger an
AJAX call that replaces a div.

I was trying to use the struts 2.0.11 ajax theme, but I cant find a why to
bind the select element to my div. In struts 2.1 I should be able to use
sx:bind, but that is not available in 2.0.11 unfortunately.

If I use a simple s:a anchor to trigger the call all works well:

 <s:form id="regionClassForm" theme="ajax" action="statsByTaxon"
namespace="/ajax">
   <s:select id="rank" name="rank" list="ranks" value="rank" theme="ajax"/>
   <s:a id ="myBelovedAnchor" targets="imgByTaxon" theme="ajax"> </s:a>
 </s:form>
 <s:div id="imgByTaxon">
   <s:action name="statsByTaxon" namespace="/ajax" executeResult="true"/>
 </s:div>


Any ideas how I can bind the select onChange() event to... well, to what
really?
I also tried to use dojo.connect() to bind the onchange to the onclick of
the anchor like this without success:

   function init() {
     var sel = dojo.byId("rank");
     var anch = dojo.byId("myBelovedTrigger");
     dojo.event.connect(sel, "onChange", anch, "onClick");
   }


thanks,
Markus



--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189825.ezm (zipped)
Did you try publishing a topic onchange and having the div have that topic in its listenTopics?

Dave


--- On Thu, 8/7/08, Markus Doring <mdoering@(protected):

> From: Markus Doring <mdoering@(protected)>
> Subject: struts2 select onchange to trigger ajax call
> To: user@(protected)
> Date: Thursday, August 7, 2008, 3:37 PM
> I would like to have an onchange event from a select element
> to trigger an
> AJAX call that replaces a div.
>
> I was trying to use the struts 2.0.11 ajax theme, but I
> cant find a why to
> bind the select element to my div. In struts 2.1 I should
> be able to use
> sx:bind, but that is not available in 2.0.11 unfortunately.
>
> If I use a simple s:a anchor to trigger the call all works
> well:
>
>  <s:form id="regionClassForm"
> theme="ajax" action="statsByTaxon"
> namespace="/ajax">
>    <s:select id="rank" name="rank"
> list="ranks" value="rank"
> theme="ajax"/>
>    <s:a id ="myBelovedAnchor"
> targets="imgByTaxon" theme="ajax">
> </s:a>
>  </s:form>
>  <s:div id="imgByTaxon">
>    <s:action name="statsByTaxon"
> namespace="/ajax"
> executeResult="true"/>
>  </s:div>
>
>
> Any ideas how I can bind the select onChange() event to...
> well, to what
> really?
> I also tried to use dojo.connect() to bind the onchange to
> the onclick of
> the anchor like this without success:
>
>    function init() {
>      var sel = dojo.byId("rank");
>      var anch = dojo.byId("myBelovedTrigger");
>      dojo.event.connect(sel, "onChange", anch,
> "onClick");
>    }
>
>
> thanks,
> Markus
>
>
>
> --
> View this message in context:
> http://www.nabble.com/struts2-select-onchange-to-trigger-ajax-call-tp18878122p18878122.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_189823.ezm (zipped)
Hello All,



I cannot make <s:action/> result go to a new page. Chaining the result
does work, but the response shows my entire tile set showing up in the
inside tile, which is not what I want either.



Here is my scenario:



I have a JSP that includes a struts action as such...



]--- begin edit.jsp ---[



<s:action name="form" executeResult="true" flush="false"
ignoreContextParams="false"/>



]--- end edit.jsp ---[



This JSP is a tile, (using Tiles 2) and the action form maps to an
action like this:

...

<action name="form" class="....web.struts.action.ResponseForm">



       <result name="success" type="responseResult">

          <param name="exposedValue">document</param>

          <param
name="stylesheetLocation">/WEB-INF/xsl/question.xsl</param>

       </result>

       <result name="finish" type="redirect-action">

       <param name="actionName">list</param>

          <param name="namespace">/respond</param>

       </result>

        <!--

            This works, where as redirect-action does not.

        <result name="finish" type="chain">

               <param name="actionName">list</param>

               <param name="namespace">/respond</param>

        </result>

       -->

</action>



The form action renders an html fragment, using XML/XSL result type, but
it is nested inside of a tiled result. The form basically is like a
questionnaire wizard that presents an ordered list of questions and
allows a user to answer them, moving forward and back in the sequence.
In my ResponseForm action class I look for a parameter passed via the
http post, and if the parameter is "Quit" or "Finish" I want to execute
my finish result, and redirect to the list where I started.



ResponseForm.execute

...



} else if (method != null && (method.equalsIgnoreCase("Quit") ||

method.equalsIgnoreCase("Finish"))) {



return "finish";

}

...



This does not work - and it doesn't throw any exceptions. If I try to
use the result type chain instead of redirect-action, I am directed back
to the list, but the entire action (including the outermost tiles) show
up in the body tile - so it's like the website shows an entire HTML
response in the body tile, which is not correct either.



Any insight as to how to overcome this would be much appreciated...



Best regards,



Michael Griffith



©2008 gg3721.com - Jax Systems, LLC, U.S.A.