You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by tom tom <j_...@yahoo.com> on 2007/06/29 04:39:50 UTC

Has anyone tried this in S2

Hi,

I got three iterations which I tried as below in the
jsp, First two and Array of certain DTO and last
iterator is a String array. There is no jsp
compilation error, but the issue is it produced
misleading results.

Is there any limitation in S2 for the depth of the
iteration. Is this way of using recommended?

Sometimes where it is suppose to print empty value it
prints something else (looks like from the previous
iterator)

<s:iterator value="#session.ITER1" id="qnn">
....
....
<s:iterator value="#qnn.ITER2" id="qa">
....
....
 <s:iterator value="#qa.ITER3" id="test">
   <s:property value="#test" />
</s:iterator> 

</s:iterator> 

</s:iterator> 



      ____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

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


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by Musachy Barroso <mu...@gmail.com>.
I logged :

https://issues.apache.org/struts/browse/WW-2024

just to help my memory :)

musachy

On 7/2/07, Dave Newton <ne...@yahoo.com> wrote:
>
> --- Musachy Barroso <mu...@gmail.com> wrote:
> > Yeah, I was writing about that now, dumb me, I spent
> > half an hour when I noticed that :)
>
> The only reason I can say "I hate it when that
> happens" is 'cuz I always do stuff like that and I
> hate it when that happens.
>
> > I'm testing to see if nothing else breaks by
> > removing the currentValue != null condition
>
> It didn't seem like it did, but I was very groggy.
>
> d.
>
>
>
>
>
> ____________________________________________________________________________________
> Be a PS3 game guru.
> Get your game face on with the latest PS3 news and previews at Yahoo!
> Games.
> http://videogames.yahoo.com/platform?platform=120121
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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

Re: Configuring Tiles in S2

Posted by Dave Newton <ne...@yahoo.com>.
--- Antonio Petrelli wrote:
> And Tiles 2 is not sandboxed anymore. Dave, where
> have you been in the last year? :-)

Using Google to search for Tiles 2 ;)

d.



      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

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


Re: Configuring Tiles in S2

Posted by Antonio Petrelli <an...@gmail.com>.
2007/7/2, Dave Newton <ne...@yahoo.com>:
>
> The tiles plugin page [1] gives the basics. Tiles2 was
> in a bit of flux when I used it for a previous
> application so my code may not be up-to-date; I'd
> check the Tiles site [2, but I don't know if it's the
> right URL] for current DTD/tag docs.
>
> d.
>
> [1]
> http://struts.apache.org/2.x/docs/tiles-plugin.html
> [2]
> http://struts.apache.org/struts-sandbox/tiles/index.html



Mmm... the wiki contains some old references.
And Tiles 2 is not sandboxed anymore. Dave, where have you been in the last
year? :-)

Antonio

Re: Configuring Tiles in S2

Posted by Ma...@virginmoney.com.
Thanks Chris.
I think it moved one step further..

now my web.xml looks like
--------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

    <display-name>Mortgage Application</display-name>

    <filter>
        <filter-name>mortgage</filter-name>

<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>mortgage</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <servlet>
        <servlet-name>tiles</servlet-name>

<servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <context-param>
        <param-name>tiles-definitions</param-name>
        <param-value>/WEB-INF/tiles-config.xml</param-value>
    </context-param>
    <listener>

<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
    </listener>
</web-app>


tiles-config.xml
------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD
Tiles Configuration 2.0//EN"
        "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">

 <tiles-definitions>
    <definition  name="selectProd" path="/pages/selectproduct.jsp"/>
</tiles-definitions>


and struts.xml
---------------------------

    <result-types>
      <result-type name="tiles"
class="org.apache.struts2.views.tiles.TilesResult"/>
    </result-types>

    <action name="selectProduct">
        <result type="tiles">selectProd</result>
    </action>


when i try to try to load the page the following error occurs

08:57:36,479 INFO  [BasicTilesContainer] Initializing Tiles2 container. . .
08:57:36,479 WARN  [BasicTilesContainer] Unable to find configured
definition '/
WEB-INF/tiles.xml'
08:57:36,479 INFO  [BasicTilesContainer] Tiles2 container initialization
complet
e.
08:57:36,479 INFO  [TilesAccess] Publishing TilesContext for context:
org.apache
.tiles.servlet.ServletContextAdapter
08:57:39,932 WARN  [BasicTilesContainer] Unable to find the definition
'selectPr
od'
08:57:39,932 ERROR [[default]] Servlet.service() for servlet default threw
excep
tion
org.apache.tiles.definition.NoSuchDefinitionException: selectProd
        at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.
java:398)
        at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.
java:374)
        at
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java


I am not able to understand why is it try to look for tiles.xml in WEB-INF
directory and thus not finding the definition.
I tries renaming the file to tiles.xml but that also did not help(then the
NullPointer error re-appered)


Any help will be much appreciated.

Manoj.








                                                                           
             "Chris Pratt"                                                 
             <thechrispratt@gm                                             
             ail.com>                                                   To 
                                       "Struts Users Mailing List"         
             02/07/2007 19:35          <us...@struts.apache.org>            
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
               "Struts Users           Re: Configuring Tiles in S2         
               Mailing List"                                               
             <user@struts.apac                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           




You may need to include the context-param to define your
tiles-config.xmlfile for the listener.

  <context-param>
    <param-name>tiles-definitions</param-name>
    <param-value>/WEB-INF/tiles-config.xml</param-value>
  </context-param>


  (*Chris*)

On 7/2/07, Manoj.Gupta@virginmoney.com <Ma...@virginmoney.com> wrote:
>
> i have done the following configuration ----
>
> struts.xml
> ----------------------
> <result-types>
>       <result-type name="tiles"
> class="org.apache.struts2.views.tiles.TilesResult"/>
>     </result-types>
>
>
>     <action name="selectProduct">
>         <result type="tiles">selectProduct</result>
>     </action>
>
> web.xml
> --------------------
> <servlet>
>      <servlet-name>tiles</servlet-name>
>      <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class>
>      <init-param>
>          <param-name>definitions-config</param-name>
>          <param-value>/WEB-INF/tiles-config.xml</param-value>
>      </init-param>
>      <load-on-startup>1</load-on-startup>
> </servlet>
> <listener>
>
> <listener-class>org.apache.struts2.tiles.StrutsTilesListener
> </listener-class>
>     </listener>
>
> tiles-config.xml
> -------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD
> Tiles Configuration 2.0//EN"
>         "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
>
> <tiles-definitions>
>     <definition name="selectProduct" path="/pages/selectproduct.jsp">
>         <put-attribute name="selectProductContent"
> value="/pages/selectproduct.jsp" />
>     </definition>
> </tiles-definitions>
>
>
> when i try to  try to go to
> http://localhost:8080/mortgage/selectProduct.action  url it comes up with
> the following error
>
>
> 16:46:07,702 INFO  [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
> 16:46:07,718 INFO  [JkMain] Jk running ID=0 time=0/47  config=null
> 16:46:07,733 INFO  [Server] JBoss (MX MicroKernel) [4.0.5.GA (build:
> CVSTag=Bran
> ch_4_0 date=200610162339)] Started in 31s:500ms
> 16:46:16,796 INFO  [ActionValidatorManagerFactory] Detected
> AnnotationActionVali
> datorManager, initializing it...
> 16:46:17,171 ERROR [BasicTilesContainer] Error rendering tile
> java.lang.NullPointerException
>         at
> org.apache.tiles.context.servlet.ServletTilesRequestContext.forward(S
> ervletTilesRequestContext.java:196)
>         at
> org.apache.tiles.context.servlet.ServletTilesRequestContext.dispatch(
> ServletTilesRequestContext.java:183)
>         at
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.
> java:423)
>         at
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.
> java:374)
>         at
> org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java
> :104)
>
>
>
>
>
>
>              Dave Newton
>              <newton.dave@yaho
>              o.com>
To
>                                        Struts Users Mailing List
>              02/07/2007 17:15          <us...@struts.apache.org>
>
cc
>
>              Please respond to
Subject
>                "Struts Users           Re: Configuring Tiles in S2
>                Mailing List"
>              <user@struts.apac
>                   he.org>
>
>
>
>
>
>
>
> --- Manoj.Gupta@virginmoney.com wrote:
> > 16:46:17,171 ERROR [BasicTilesContainer] Error
> > rendering tile
> >
> > can anyone advise of what we're doing wrong?
>
> That's... perhaps not enough information to go on.
>
> d.
>
>
>
>
>
>
____________________________________________________________________________________

>
> Get your own web address.
> Have a HUGE year through Yahoo! Small Business.
> http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> This message has been checked for viruses and spam by the Virgin Money
> email scanning system powered by Messagelabs.
>
>
>
>
>
>
> This e-mail is intended to be confidential to the recipient. If you
> receive a copy in error, please inform the sender and then delete this
> message. Virgin Money do not accept responsibility for changes made to
any
> e-mail after sending. Virgin Money have swept, and believe this e-mail to
be
> free of viruses and profanity but make no guarantees to this effect.
>
> Virgin Money Personal Financial Service Ltd is authorised and regulated
by
> the Financial Services Authority. Registered in England no. 3072766.
Entered
> on the Financial Services Authority's Register
> http://www.fsa.gov.uk/register/. Register Number 179271. The Virgin
> Deposit Account is a personal bank account with The Royal Bank of
Scotland.
>
> Virgin Money Unit Trust Managers Ltd is authorised and regulated by the
> Financial Services Authority. Registered in England no. 3000482. Entered
on
> the Financial Services Authority's Register. Register Number 171748.
>
> Virgin Money Ltd. Registered in England no. 4232392. Introducer appointed
> representative only of Virgin Money Personal Financial Service Ltd.
>
> Virgin Money Management Services Ltd. Registered in England no.3072772.
>
> Virgin Money Group Ltd. Registered in England no.3087587.
>
> All the above companies have their Registered office at Discovery House,
> Whiting Road, Norwich NR4 6EJ.
>
> All products are open only to residents of the United Kingdom.
>
> This message has been checked for viruses and spam by the Virgin Money
> email scanning system powered by Messagelabs.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


This message has been checked for viruses and spam by the Virgin Money
email scanning system powered by Messagelabs.





This e-mail is intended to be confidential to the recipient. If you receive a copy in error, please inform the sender and then delete this message. Virgin Money do not accept responsibility for changes made to any e-mail after sending. Virgin Money have swept, and believe this e-mail to be free of viruses and profanity but make no guarantees to this effect.

Virgin Money Personal Financial Service Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3072766. Entered on the Financial Services Authority's Register http://www.fsa.gov.uk/register/. Register Number 179271. The Virgin Deposit Account is a personal bank account with The Royal Bank of Scotland.

Virgin Money Unit Trust Managers Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3000482. Entered on the Financial Services Authority's Register. Register Number 171748.

Virgin Money Ltd. Registered in England no. 4232392. Introducer appointed representative only of Virgin Money Personal Financial Service Ltd.

Virgin Money Management Services Ltd. Registered in England no.3072772.

Virgin Money Group Ltd. Registered in England no.3087587.

All the above companies have their Registered office at Discovery House, Whiting Road, Norwich NR4 6EJ. 

All products are open only to residents of the United Kingdom.

This message has been checked for viruses and spam by the Virgin Money email scanning system powered by Messagelabs.

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


答复: Struts 2 displaying message from resource bundle

Posted by chenshibing <ch...@lifeisgreat.com.cn>.
Actually, I didn't understand why you gave <s:actionmessage .../> a key attribute. Meanwhile, you should change <constant name="struts.custom.i18n.resources"
value="ApplicationResources.properties"/> to <constant name="struts.custom.i18n.resources"
value="ApplicationResources"/>

Crazyreal

-----邮件原件-----
发件人: Manoj.Gupta@virginmoney.com [mailto:Manoj.Gupta@virginmoney.com] 
发送时间: 2007年7月3日 18:01
收件人: Struts Users Mailing List
主题: Struts 2 displaying message from resource bundle

HI

Using Struts 2   I am trying to  display  message from a resource bundle

in the struts.xml

<constant name="struts.custom.i18n.resources"
value="ApplicationResources.properties"/>

jsp
------
<s:actionmessage key="test.error" />

I have copied the ApplicationResources.properties in the classpath

but it is not reading the message from the property file, it displays the
key.

Please let me know if iam doing something wrong...


This e-mail is intended to be confidential to the recipient. If you receive a copy in error, please inform the sender and then delete this message. Virgin Money do not accept responsibility for changes made to any e-mail after sending. Virgin Money have swept, and believe this e-mail to be free of viruses and profanity but make no guarantees to this effect.

Virgin Money Personal Financial Service Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3072766. Entered on the Financial Services Authority's Register http://www.fsa.gov.uk/register/. Register Number 179271. The Virgin Deposit Account is a personal bank account with The Royal Bank of Scotland.

Virgin Money Unit Trust Managers Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3000482. Entered on the Financial Services Authority's Register. Register Number 171748.

Virgin Money Ltd. Registered in England no. 4232392. Introducer appointed representative only of Virgin Money Personal Financial Service Ltd.

Virgin Money Management Services Ltd. Registered in England no.3072772.

Virgin Money Group Ltd. Registered in England no.3087587.

All the above companies have their Registered office at Discovery House, Whiting Road, Norwich NR4 6EJ. 

All products are open only to residents of the United Kingdom.

This message has been checked for viruses and spam by the Virgin Money email scanning system powered by Messagelabs.

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




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


Struts 2 displaying message from resource bundle

Posted by Ma...@virginmoney.com.
HI

Using Struts 2   I am trying to  display  message from a resource bundle

in the struts.xml

<constant name="struts.custom.i18n.resources"
value="ApplicationResources.properties"/>

jsp
------
<s:actionmessage key="test.error" />

I have copied the ApplicationResources.properties in the classpath

but it is not reading the message from the property file, it displays the
key.

Please let me know if iam doing something wrong...


This e-mail is intended to be confidential to the recipient. If you receive a copy in error, please inform the sender and then delete this message. Virgin Money do not accept responsibility for changes made to any e-mail after sending. Virgin Money have swept, and believe this e-mail to be free of viruses and profanity but make no guarantees to this effect.

Virgin Money Personal Financial Service Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3072766. Entered on the Financial Services Authority's Register http://www.fsa.gov.uk/register/. Register Number 179271. The Virgin Deposit Account is a personal bank account with The Royal Bank of Scotland.

Virgin Money Unit Trust Managers Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3000482. Entered on the Financial Services Authority's Register. Register Number 171748.

Virgin Money Ltd. Registered in England no. 4232392. Introducer appointed representative only of Virgin Money Personal Financial Service Ltd.

Virgin Money Management Services Ltd. Registered in England no.3072772.

Virgin Money Group Ltd. Registered in England no.3087587.

All the above companies have their Registered office at Discovery House, Whiting Road, Norwich NR4 6EJ. 

All products are open only to residents of the United Kingdom.

This message has been checked for viruses and spam by the Virgin Money email scanning system powered by Messagelabs.

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


Re: Configuring Tiles in S2 - solved

Posted by Ma...@virginmoney.com.
Thanks Antonio...
It worked.



                                                                           
             "Antonio                                                      
             Petrelli"                                                     
             <antonio.petrelli                                          To 
             @gmail.com>               "Struts Users Mailing List"         
                                       <us...@struts.apache.org>            
             03/07/2007 09:07                                           cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: Configuring Tiles in S2         
               "Struts Users                                               
               Mailing List"                                               
             <user@struts.apac                                             
                  he.org>                                                  
                                                                           
                                                                           




2007/7/2, Chris Pratt <th...@gmail.com>:
> You may need to include the context-param to define your
> tiles-config.xmlfile for the listener.
>
>   <context-param>
>     <param-name>tiles-definitions</param-name>
>     <param-value>/WEB-INF/tiles-config.xml</param-value>
>   </context-param>

It's wrong, the correct (deprecated but still working) parameter name
is "definitions-config".
Anyway, notice that Struts 2.0.8 uses Tiles 2.0.3. With Tiles 2.0.4
the configuration parameters changed the names, so the new name is:
http://tiles.apache.org/config-reference.html#org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG


Antonio

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


This message has been checked for viruses and spam by the Virgin Money
email scanning system powered by Messagelabs.






This e-mail is intended to be confidential to the recipient. If you receive a copy in error, please inform the sender and then delete this message. Virgin Money do not accept responsibility for changes made to any e-mail after sending. Virgin Money have swept, and believe this e-mail to be free of viruses and profanity but make no guarantees to this effect.

Virgin Money Personal Financial Service Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3072766. Entered on the Financial Services Authority's Register http://www.fsa.gov.uk/register/. Register Number 179271. The Virgin Deposit Account is a personal bank account with The Royal Bank of Scotland.

Virgin Money Unit Trust Managers Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3000482. Entered on the Financial Services Authority's Register. Register Number 171748.

Virgin Money Ltd. Registered in England no. 4232392. Introducer appointed representative only of Virgin Money Personal Financial Service Ltd.

Virgin Money Management Services Ltd. Registered in England no.3072772.

Virgin Money Group Ltd. Registered in England no.3087587.

All the above companies have their Registered office at Discovery House, Whiting Road, Norwich NR4 6EJ. 

All products are open only to residents of the United Kingdom.

This message has been checked for viruses and spam by the Virgin Money email scanning system powered by Messagelabs.

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


Re: Configuring Tiles in S2

Posted by Antonio Petrelli <an...@gmail.com>.
2007/7/2, Chris Pratt <th...@gmail.com>:
> You may need to include the context-param to define your
> tiles-config.xmlfile for the listener.
>
>   <context-param>
>     <param-name>tiles-definitions</param-name>
>     <param-value>/WEB-INF/tiles-config.xml</param-value>
>   </context-param>

It's wrong, the correct (deprecated but still working) parameter name
is "definitions-config".
Anyway, notice that Struts 2.0.8 uses Tiles 2.0.3. With Tiles 2.0.4
the configuration parameters changed the names, so the new name is:
http://tiles.apache.org/config-reference.html#org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG

Antonio

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


Re: Configuring Tiles in S2

Posted by Chris Pratt <th...@gmail.com>.
You may need to include the context-param to define your
tiles-config.xmlfile for the listener.

  <context-param>
    <param-name>tiles-definitions</param-name>
    <param-value>/WEB-INF/tiles-config.xml</param-value>
  </context-param>


  (*Chris*)

On 7/2/07, Manoj.Gupta@virginmoney.com <Ma...@virginmoney.com> wrote:
>
> i have done the following configuration ----
>
> struts.xml
> ----------------------
> <result-types>
>       <result-type name="tiles"
> class="org.apache.struts2.views.tiles.TilesResult"/>
>     </result-types>
>
>
>     <action name="selectProduct">
>         <result type="tiles">selectProduct</result>
>     </action>
>
> web.xml
> --------------------
> <servlet>
>      <servlet-name>tiles</servlet-name>
>      <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class>
>      <init-param>
>          <param-name>definitions-config</param-name>
>          <param-value>/WEB-INF/tiles-config.xml</param-value>
>      </init-param>
>      <load-on-startup>1</load-on-startup>
> </servlet>
> <listener>
>
> <listener-class>org.apache.struts2.tiles.StrutsTilesListener
> </listener-class>
>     </listener>
>
> tiles-config.xml
> -------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD
> Tiles Configuration 2.0//EN"
>         "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
>
> <tiles-definitions>
>     <definition name="selectProduct" path="/pages/selectproduct.jsp">
>         <put-attribute name="selectProductContent"
> value="/pages/selectproduct.jsp" />
>     </definition>
> </tiles-definitions>
>
>
> when i try to  try to go to
> http://localhost:8080/mortgage/selectProduct.action  url it comes up with
> the following error
>
>
> 16:46:07,702 INFO  [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
> 16:46:07,718 INFO  [JkMain] Jk running ID=0 time=0/47  config=null
> 16:46:07,733 INFO  [Server] JBoss (MX MicroKernel) [4.0.5.GA (build:
> CVSTag=Bran
> ch_4_0 date=200610162339)] Started in 31s:500ms
> 16:46:16,796 INFO  [ActionValidatorManagerFactory] Detected
> AnnotationActionVali
> datorManager, initializing it...
> 16:46:17,171 ERROR [BasicTilesContainer] Error rendering tile
> java.lang.NullPointerException
>         at
> org.apache.tiles.context.servlet.ServletTilesRequestContext.forward(S
> ervletTilesRequestContext.java:196)
>         at
> org.apache.tiles.context.servlet.ServletTilesRequestContext.dispatch(
> ServletTilesRequestContext.java:183)
>         at
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.
> java:423)
>         at
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.
> java:374)
>         at
> org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java
> :104)
>
>
>
>
>
>
>              Dave Newton
>              <newton.dave@yaho
>              o.com>                                                     To
>                                        Struts Users Mailing List
>              02/07/2007 17:15          <us...@struts.apache.org>
>                                                                         cc
>
>              Please respond to                                     Subject
>                "Struts Users           Re: Configuring Tiles in S2
>                Mailing List"
>              <user@struts.apac
>                   he.org>
>
>
>
>
>
>
>
> --- Manoj.Gupta@virginmoney.com wrote:
> > 16:46:17,171 ERROR [BasicTilesContainer] Error
> > rendering tile
> >
> > can anyone advise of what we're doing wrong?
>
> That's... perhaps not enough information to go on.
>
> d.
>
>
>
>
>
> ____________________________________________________________________________________
>
> Get your own web address.
> Have a HUGE year through Yahoo! Small Business.
> http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> This message has been checked for viruses and spam by the Virgin Money
> email scanning system powered by Messagelabs.
>
>
>
>
>
>
> This e-mail is intended to be confidential to the recipient. If you
> receive a copy in error, please inform the sender and then delete this
> message. Virgin Money do not accept responsibility for changes made to any
> e-mail after sending. Virgin Money have swept, and believe this e-mail to be
> free of viruses and profanity but make no guarantees to this effect.
>
> Virgin Money Personal Financial Service Ltd is authorised and regulated by
> the Financial Services Authority. Registered in England no. 3072766. Entered
> on the Financial Services Authority's Register
> http://www.fsa.gov.uk/register/. Register Number 179271. The Virgin
> Deposit Account is a personal bank account with The Royal Bank of Scotland.
>
> Virgin Money Unit Trust Managers Ltd is authorised and regulated by the
> Financial Services Authority. Registered in England no. 3000482. Entered on
> the Financial Services Authority's Register. Register Number 171748.
>
> Virgin Money Ltd. Registered in England no. 4232392. Introducer appointed
> representative only of Virgin Money Personal Financial Service Ltd.
>
> Virgin Money Management Services Ltd. Registered in England no.3072772.
>
> Virgin Money Group Ltd. Registered in England no.3087587.
>
> All the above companies have their Registered office at Discovery House,
> Whiting Road, Norwich NR4 6EJ.
>
> All products are open only to residents of the United Kingdom.
>
> This message has been checked for viruses and spam by the Virgin Money
> email scanning system powered by Messagelabs.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Configuring Tiles in S2

Posted by Ma...@virginmoney.com.
i have done the following configuration ----

struts.xml
----------------------
 <result-types>
      <result-type name="tiles"
class="org.apache.struts2.views.tiles.TilesResult"/>
    </result-types>


    <action name="selectProduct">
        <result type="tiles">selectProduct</result>
    </action>

web.xml
--------------------
 <servlet>
     <servlet-name>tiles</servlet-name>
     <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class>
     <init-param>
         <param-name>definitions-config</param-name>
         <param-value>/WEB-INF/tiles-config.xml</param-value>
     </init-param>
     <load-on-startup>1</load-on-startup>
</servlet>
 <listener>

<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
    </listener>

tiles-config.xml
-------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD
Tiles Configuration 2.0//EN"
        "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">

 <tiles-definitions>
    <definition name="selectProduct" path="/pages/selectproduct.jsp">
        <put-attribute name="selectProductContent"
value="/pages/selectproduct.jsp" />
    </definition>
</tiles-definitions>


when i try to  try to go to
http://localhost:8080/mortgage/selectProduct.action  url it comes up with
the following error


16:46:07,702 INFO  [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
16:46:07,718 INFO  [JkMain] Jk running ID=0 time=0/47  config=null
16:46:07,733 INFO  [Server] JBoss (MX MicroKernel) [4.0.5.GA (build:
CVSTag=Bran
ch_4_0 date=200610162339)] Started in 31s:500ms
16:46:16,796 INFO  [ActionValidatorManagerFactory] Detected
AnnotationActionVali
datorManager, initializing it...
16:46:17,171 ERROR [BasicTilesContainer] Error rendering tile
java.lang.NullPointerException
        at
org.apache.tiles.context.servlet.ServletTilesRequestContext.forward(S
ervletTilesRequestContext.java:196)
        at
org.apache.tiles.context.servlet.ServletTilesRequestContext.dispatch(
ServletTilesRequestContext.java:183)
        at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.
java:423)
        at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.
java:374)
        at
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java
:104)





                                                                           
             Dave Newton                                                   
             <newton.dave@yaho                                             
             o.com>                                                     To 
                                       Struts Users Mailing List           
             02/07/2007 17:15          <us...@struts.apache.org>            
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
               "Struts Users           Re: Configuring Tiles in S2         
               Mailing List"                                               
             <user@struts.apac                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           




--- Manoj.Gupta@virginmoney.com wrote:
> 16:46:17,171 ERROR [BasicTilesContainer] Error
> rendering tile
>
> can anyone advise of what we're doing wrong?

That's... perhaps not enough information to go on.

d.




____________________________________________________________________________________

Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

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


This message has been checked for viruses and spam by the Virgin Money
email scanning system powered by Messagelabs.






This e-mail is intended to be confidential to the recipient. If you receive a copy in error, please inform the sender and then delete this message. Virgin Money do not accept responsibility for changes made to any e-mail after sending. Virgin Money have swept, and believe this e-mail to be free of viruses and profanity but make no guarantees to this effect.

Virgin Money Personal Financial Service Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3072766. Entered on the Financial Services Authority's Register http://www.fsa.gov.uk/register/. Register Number 179271. The Virgin Deposit Account is a personal bank account with The Royal Bank of Scotland.

Virgin Money Unit Trust Managers Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3000482. Entered on the Financial Services Authority's Register. Register Number 171748.

Virgin Money Ltd. Registered in England no. 4232392. Introducer appointed representative only of Virgin Money Personal Financial Service Ltd.

Virgin Money Management Services Ltd. Registered in England no.3072772.

Virgin Money Group Ltd. Registered in England no.3087587.

All the above companies have their Registered office at Discovery House, Whiting Road, Norwich NR4 6EJ. 

All products are open only to residents of the United Kingdom.

This message has been checked for viruses and spam by the Virgin Money email scanning system powered by Messagelabs.

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


Re: Configuring Tiles in S2

Posted by Dave Newton <ne...@yahoo.com>.
--- Manoj.Gupta@virginmoney.com wrote:
> 16:46:17,171 ERROR [BasicTilesContainer] Error
> rendering tile
> 
> can anyone advise of what we're doing wrong?

That's... perhaps not enough information to go on.

d.



 
____________________________________________________________________________________
Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

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


Re: Configuring Tiles in S2

Posted by Ma...@virginmoney.com.
We've done as the tiles plugin page describes but are getting a null
pointer

16:46:16,796 INFO  [ActionValidatorManagerFactory] Detected
AnnotationActionVali
datorManager, initializing it...
16:46:17,171 ERROR [BasicTilesContainer] Error rendering tile

can anyone advise of what we're doing wrong?
Thanks



                                                                           
             Dave Newton                                                   
             <newton.dave@yaho                                             
             o.com>                                                     To 
                                       Struts Users Mailing List           
             02/07/2007 17:05          <us...@struts.apache.org>            
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
               "Struts Users           Re: Configuring Tiles in S2         
               Mailing List"                                               
             <user@struts.apac                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           




--- Manoj.Gupta@virginmoney.com wrote:
> Has anyone tried plugging in tiles in Struts 2
> application. Sample configuration code can be of
> great help.

The tiles plugin page [1] gives the basics. Tiles2 was
in a bit of flux when I used it for a previous
application so my code may not be up-to-date; I'd
check the Tiles site [2, but I don't know if it's the
right URL] for current DTD/tag docs.

d.

[1]
http://struts.apache.org/2.x/docs/tiles-plugin.html
[2]
http://struts.apache.org/struts-sandbox/tiles/index.html




____________________________________________________________________________________

Looking for a deal? Find great prices on flights and hotels with Yahoo!
FareChase.
http://farechase.yahoo.com/

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


This message has been checked for viruses and spam by the Virgin Money
email scanning system powered by Messagelabs.






This e-mail is intended to be confidential to the recipient. If you receive a copy in error, please inform the sender and then delete this message. Virgin Money do not accept responsibility for changes made to any e-mail after sending. Virgin Money have swept, and believe this e-mail to be free of viruses and profanity but make no guarantees to this effect.

Virgin Money Personal Financial Service Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3072766. Entered on the Financial Services Authority's Register http://www.fsa.gov.uk/register/. Register Number 179271. The Virgin Deposit Account is a personal bank account with The Royal Bank of Scotland.

Virgin Money Unit Trust Managers Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3000482. Entered on the Financial Services Authority's Register. Register Number 171748.

Virgin Money Ltd. Registered in England no. 4232392. Introducer appointed representative only of Virgin Money Personal Financial Service Ltd.

Virgin Money Management Services Ltd. Registered in England no.3072772.

Virgin Money Group Ltd. Registered in England no.3087587.

All the above companies have their Registered office at Discovery House, Whiting Road, Norwich NR4 6EJ. 

All products are open only to residents of the United Kingdom.

This message has been checked for viruses and spam by the Virgin Money email scanning system powered by Messagelabs.

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


Re: Configuring Tiles in S2

Posted by Dave Newton <ne...@yahoo.com>.
--- Manoj.Gupta@virginmoney.com wrote:
> Has anyone tried plugging in tiles in Struts 2
> application. Sample configuration code can be of 
> great help.

The tiles plugin page [1] gives the basics. Tiles2 was
in a bit of flux when I used it for a previous
application so my code may not be up-to-date; I'd
check the Tiles site [2, but I don't know if it's the
right URL] for current DTD/tag docs.

d.

[1]
http://struts.apache.org/2.x/docs/tiles-plugin.html
[2]
http://struts.apache.org/struts-sandbox/tiles/index.html



       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/

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


Configuring Tiles in S2

Posted by Ma...@virginmoney.com.
Hi,

Has anyone tried plugging in tiles in Struts 2 application. Sample
configuration code can be of great help.

Thanks.
Manoj.


This e-mail is intended to be confidential to the recipient. If you receive a copy in error, please inform the sender and then delete this message. Virgin Money do not accept responsibility for changes made to any e-mail after sending. Virgin Money have swept, and believe this e-mail to be free of viruses and profanity but make no guarantees to this effect.

Virgin Money Personal Financial Service Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3072766. Entered on the Financial Services Authority's Register http://www.fsa.gov.uk/register/. Register Number 179271. The Virgin Deposit Account is a personal bank account with The Royal Bank of Scotland.

Virgin Money Unit Trust Managers Ltd is authorised and regulated by the Financial Services Authority. Registered in England no. 3000482. Entered on the Financial Services Authority's Register. Register Number 171748.

Virgin Money Ltd. Registered in England no. 4232392. Introducer appointed representative only of Virgin Money Personal Financial Service Ltd.

Virgin Money Management Services Ltd. Registered in England no.3072772.

Virgin Money Group Ltd. Registered in England no.3087587.

All the above companies have their Registered office at Discovery House, Whiting Road, Norwich NR4 6EJ. 

All products are open only to residents of the United Kingdom.

This message has been checked for viruses and spam by the Virgin Money email scanning system powered by Messagelabs.

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


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by Dave Newton <ne...@yahoo.com>.
--- Musachy Barroso <mu...@gmail.com> wrote:
> Yeah, I was writing about that now, dumb me, I spent
> half an hour when I noticed that :)

The only reason I can say "I hate it when that
happens" is 'cuz I always do stuff like that and I
hate it when that happens.

> I'm testing to see if nothing else breaks by
> removing the currentValue != null condition

It didn't seem like it did, but I was very groggy.

d.



 
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

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


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by Musachy Barroso <mu...@gmail.com>.
Yeah, I was writing about that now, dumb me, I spent half an hour when I
noticed that :)

if ((id != null) && (currentValue != null)) {
  //pageContext.setAttribute(id, currentValue);
  //pageContext.setAttribute(id, currentValue, PageContext.REQUEST_SCOPE);
  stack.getContext().put(id, currentValue);
}

I'm testing to see if nothing else breaks by removing the currentValue !=
null condition

musachy

On 7/2/07, Dave Newton <ne...@yahoo.com> wrote:
>
> --- Musachy Barroso <mu...@gmail.com> wrote:
> > findValue is returning an Array with an extra
> > element at the end, null, which is causing the extra
>
> > iteration, I think. I'm not really sure why OGNL
> > is doing that. To be continued ...
>
> It's not returning an extra element, the element is
> there--it's just a null. The issue is because the
> stack element at the "id" key is only being set if the
> value isn't null, meaning (I guess) that the previous
> value will remain (which also explains what the OP is
> seeing).
>
> d.
>
>
>
>
>
> ____________________________________________________________________________________
> Yahoo! oneSearch: Finally, mobile search
> that gives answers, not web links.
> http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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

Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by Dave Newton <ne...@yahoo.com>.
--- Musachy Barroso <mu...@gmail.com> wrote:
> findValue is returning an Array with an extra
> element at the end, null, which is causing the extra

> iteration, I think. I'm not really sure why OGNL
> is doing that. To be continued ...

It's not returning an extra element, the element is
there--it's just a null. The issue is because the
stack element at the "id" key is only being set if the
value isn't null, meaning (I guess) that the previous
value will remain (which also explains what the OP is
seeing).

d.



       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

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


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by Musachy Barroso <mu...@gmail.com>.
I was digging into this, and the problem doesn't seem to be on the iterator
tag itself, when this line is executed (on IteratorComponent):

iterator = MakeIterator.convert(findValue(value));

findValue is returning an Array with an extra element at the end, null,
which is causing the extra iteration, I think. I'm not really sure why OGNL
is doing that. To be continued ...

musachy

On 7/2/07, tom tom <j_...@yahoo.com> wrote:
>
> Thanks,
>
> As I mentioned earlier, I need to have id,
>
> because I got if statements and logic inside, it is
> not  merely diplaying the value.
>
> This bug needs to be fixed.
>
> Till then be carefull
>
>
>
> --- Adam Ruggles <a....@gmail.com> wrote:
>
> > Have you tried this?
> >
> > <s:iterator value="#session.testArray">
> >   Value of the arry is
> >   <s:property />
> >   <br>
> > </s:iterator>
> >
> >
> >
> > tom tom wrote:
> > > I did further investigation,
> > > I think this is a bug, I think this is a very
> > scary
> > > bug.
> > >
> > > You dont need three iterators, I could reproduce
> > this
> > > very easily,
> > >
> > > In your action class have the following,
> > >
> > >  String[] testArray = new String[5];
> > >
> > >              testArray[0]="test0";
> > >              testArray[1]="test1";
> > >              testArray[2]="test2";
> > >              testArray[3]="test";
> > >
> > >
> > > session.setAttribute("testArray",testArray);
> > >
> > >
> > >  In your jsp have the following
> > >
> > >
> > > <s:iterator value="#session.testArray"
> > id="testarr">
> > >   Value of the arry is
> > >   <s:property value="#testarr"/>
> > >   <br>
> > >  </s:iterator>
> > >
> > >
> > > WHAT it prints is following Issue is for the 4th
> > index
> > > also it prints test, it should print empty
> > >
> > > Value of the arry is test0
> > > Value of the arry is test1
> > > Value of the arry is test2
> > > Value of the arry is test
> > > Value of the arry is test
> > >
> > >
> > > This is a scary behaviour for me,
> > >
> > > Has anyone reported this bug, Any JIRA issue
> > raised.
> > >
> > > Thanks
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --- Ian Roughley <ia...@fdar.com> wrote:
> > >
> > >
> > >> Take a look at the value stack via the debug tag.
> >
> > >>
> > >> Usually the property tag will keep stepping
> > through
> > >> the value stack
> > >> until a getter for the property is found (the
> > object
> > >> for the current
> > >> iteration is placed on the top of the value
> > stack).
> > >> Although, if you
> > >> are explicitly defining the object (via id and
> > >> #test) there shouldn't be
> > >> a problem.
> > >>
> > >> /Ian
> > >>
> > >> tom tom wrote:
> > >>
> > >>
> > >>> Hi,
> > >>>
> > >>> I got three iterations which I tried as below in
> > >>>
> > >> the
> > >>
> > >>> jsp, First two and Array of certain DTO and last
> > >>> iterator is a String array. There is no jsp
> > >>> compilation error, but the issue is it produced
> > >>> misleading results.
> > >>>
> > >>> Is there any limitation in S2 for the depth of
> > the
> > >>> iteration. Is this way of using recommended?
> > >>>
> > >>> Sometimes where it is suppose to print empty
> > value
> > >>>
> > >> it
> > >>
> > >>> prints something else (looks like from the
> > previous
> > >>> iterator)
> > >>>
> > >>> <s:iterator value="#session.ITER1" id="qnn">
> > >>> ....
> > >>> ....
> > >>> <s:iterator value="#qnn.ITER2" id="qa">
> > >>> ....
> > >>> ....
> > >>> <s:iterator value="#qa.ITER3" id="test">
> > >>>   <s:property value="#test" />
> > >>> </s:iterator>
> > >>>
> > >>> </s:iterator>
> > >>>
> > >>> </s:iterator>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >
> >
>
> ____________________________________________________________________________________
> > >
> > >>> Park yourself in front of a world of choices in
> > >>>
> > >> alternative vehicles. Visit the Yahoo! Auto Green
> > >> Center.
> > >>
> > >>> http://autos.yahoo.com/green_center/
> > >>>
> > >>>
> > >>
> >
> ---------------------------------------------------------------------
> > >>
> > >>> To unsubscribe, e-mail:
> > >>>
> > >> user-unsubscribe@struts.apache.org
> > >>
> > >>> For additional commands, e-mail:
> > >>>
> > >> user-help@struts.apache.org
> > >>
> > >>>
> > >>>
> > >>>
> > >>
> > >
> >
> ---------------------------------------------------------------------
> > >
> > >> To unsubscribe, e-mail:
> > >> user-unsubscribe@struts.apache.org
> > >> For additional commands, e-mail:
> > >> user-help@struts.apache.org
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> > >
> >
>
> ____________________________________________________________________________________
> > > Sucker-punch spam with award-winning protection.
> > > Try the free Yahoo! Mail Beta.
> > >
> >
> http://advision.webevents.yahoo.com/mailbeta/features_spam.html
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > >
> > >
> >
> >
>
>
>
>
>       ____________________________________________________________________________________
> Luggage? GPS? Comic books?
> Check out fitting gifts for grads at Yahoo! Search
> http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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

Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by Dale Newfield <Da...@Newfield.org>.
tom tom wrote:
> because I got if statements and logic inside, it is
> not  merely diplaying the value.

You can always refer to the current iteration value as "top"

-Dale

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


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by tom tom <j_...@yahoo.com>.
Thanks,

As I mentioned earlier, I need to have id,

because I got if statements and logic inside, it is
not  merely diplaying the value.

This bug needs to be fixed.

Till then be carefull 



--- Adam Ruggles <a....@gmail.com> wrote:

> Have you tried this?
> 
> <s:iterator value="#session.testArray">
>   Value of the arry is
>   <s:property />
>   <br> 
> </s:iterator>
> 
> 
> 
> tom tom wrote:
> > I did further investigation,
> > I think this is a bug, I think this is a very
> scary
> > bug.
> >
> > You dont need three iterators, I could reproduce
> this
> > very easily,
> >
> > In your action class have the following,
> >
> >  String[] testArray = new String[5];
> >              
> >              testArray[0]="test0";
> >              testArray[1]="test1";
> >              testArray[2]="test2";
> >              testArray[3]="test";
> >             
> >              
> > session.setAttribute("testArray",testArray);
> >
> >
> >  In your jsp have the following
> >
> >
> > <s:iterator value="#session.testArray"
> id="testarr">
> >   Value of the arry is
> >   <s:property value="#testarr"/>
> >   <br> 
> >  </s:iterator>
> >
> >
> > WHAT it prints is following Issue is for the 4th
> index
> > also it prints test, it should print empty
> >
> > Value of the arry is test0
> > Value of the arry is test1
> > Value of the arry is test2
> > Value of the arry is test
> > Value of the arry is test 
> >
> >
> > This is a scary behaviour for me,
> >
> > Has anyone reported this bug, Any JIRA issue
> raised.
> >
> > Thanks
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --- Ian Roughley <ia...@fdar.com> wrote:
> >
> >   
> >> Take a look at the value stack via the debug tag.
> 
> >>
> >> Usually the property tag will keep stepping
> through
> >> the value stack 
> >> until a getter for the property is found (the
> object
> >> for the current 
> >> iteration is placed on the top of the value
> stack). 
> >> Although, if you 
> >> are explicitly defining the object (via id and
> >> #test) there shouldn't be 
> >> a problem. 
> >>
> >> /Ian
> >>
> >> tom tom wrote:
> >>
> >>     
> >>> Hi,
> >>>
> >>> I got three iterations which I tried as below in
> >>>       
> >> the
> >>     
> >>> jsp, First two and Array of certain DTO and last
> >>> iterator is a String array. There is no jsp
> >>> compilation error, but the issue is it produced
> >>> misleading results.
> >>>
> >>> Is there any limitation in S2 for the depth of
> the
> >>> iteration. Is this way of using recommended?
> >>>
> >>> Sometimes where it is suppose to print empty
> value
> >>>       
> >> it
> >>     
> >>> prints something else (looks like from the
> previous
> >>> iterator)
> >>>
> >>> <s:iterator value="#session.ITER1" id="qnn">
> >>> ....
> >>> ....
> >>> <s:iterator value="#qnn.ITER2" id="qa">
> >>> ....
> >>> ....
> >>> <s:iterator value="#qa.ITER3" id="test">
> >>>   <s:property value="#test" />
> >>> </s:iterator> 
> >>>
> >>> </s:iterator> 
> >>>
> >>> </s:iterator> 
> >>>
> >>>
> >>>
> >>>     
> >>>       
> >
>
____________________________________________________________________________________
> >   
> >>> Park yourself in front of a world of choices in
> >>>       
> >> alternative vehicles. Visit the Yahoo! Auto Green
> >> Center.
> >>     
> >>> http://autos.yahoo.com/green_center/ 
> >>>
> >>>       
> >>
>
---------------------------------------------------------------------
> >>     
> >>> To unsubscribe, e-mail:
> >>>       
> >> user-unsubscribe@struts.apache.org
> >>     
> >>> For additional commands, e-mail:
> >>>       
> >> user-help@struts.apache.org
> >>     
> >>>  
> >>>
> >>>       
> >>     
> >
>
---------------------------------------------------------------------
> >   
> >> To unsubscribe, e-mail:
> >> user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail:
> >> user-help@struts.apache.org
> >>
> >>
> >>     
> >
> >
> >
> >  
> >
>
____________________________________________________________________________________
> > Sucker-punch spam with award-winning protection. 
> > Try the free Yahoo! Mail Beta.
> >
>
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >   
> 
> 



      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

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


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by Adam Ruggles <a....@gmail.com>.
Have you tried this?

<s:iterator value="#session.testArray">
  Value of the arry is
  <s:property />
  <br> 
</s:iterator>



tom tom wrote:
> I did further investigation,
> I think this is a bug, I think this is a very scary
> bug.
>
> You dont need three iterators, I could reproduce this
> very easily,
>
> In your action class have the following,
>
>  String[] testArray = new String[5];
>              
>              testArray[0]="test0";
>              testArray[1]="test1";
>              testArray[2]="test2";
>              testArray[3]="test";
>             
>              
> session.setAttribute("testArray",testArray);
>
>
>  In your jsp have the following
>
>
> <s:iterator value="#session.testArray" id="testarr">
>   Value of the arry is
>   <s:property value="#testarr"/>
>   <br> 
>  </s:iterator>
>
>
> WHAT it prints is following Issue is for the 4th index
> also it prints test, it should print empty
>
> Value of the arry is test0
> Value of the arry is test1
> Value of the arry is test2
> Value of the arry is test
> Value of the arry is test 
>
>
> This is a scary behaviour for me,
>
> Has anyone reported this bug, Any JIRA issue raised.
>
> Thanks
>
>
>
>
>
>
>
>
>
>
>
>
> --- Ian Roughley <ia...@fdar.com> wrote:
>
>   
>> Take a look at the value stack via the debug tag. 
>>
>> Usually the property tag will keep stepping through
>> the value stack 
>> until a getter for the property is found (the object
>> for the current 
>> iteration is placed on the top of the value stack). 
>> Although, if you 
>> are explicitly defining the object (via id and
>> #test) there shouldn't be 
>> a problem. 
>>
>> /Ian
>>
>> tom tom wrote:
>>
>>     
>>> Hi,
>>>
>>> I got three iterations which I tried as below in
>>>       
>> the
>>     
>>> jsp, First two and Array of certain DTO and last
>>> iterator is a String array. There is no jsp
>>> compilation error, but the issue is it produced
>>> misleading results.
>>>
>>> Is there any limitation in S2 for the depth of the
>>> iteration. Is this way of using recommended?
>>>
>>> Sometimes where it is suppose to print empty value
>>>       
>> it
>>     
>>> prints something else (looks like from the previous
>>> iterator)
>>>
>>> <s:iterator value="#session.ITER1" id="qnn">
>>> ....
>>> ....
>>> <s:iterator value="#qnn.ITER2" id="qa">
>>> ....
>>> ....
>>> <s:iterator value="#qa.ITER3" id="test">
>>>   <s:property value="#test" />
>>> </s:iterator> 
>>>
>>> </s:iterator> 
>>>
>>> </s:iterator> 
>>>
>>>
>>>
>>>     
>>>       
> ____________________________________________________________________________________
>   
>>> Park yourself in front of a world of choices in
>>>       
>> alternative vehicles. Visit the Yahoo! Auto Green
>> Center.
>>     
>>> http://autos.yahoo.com/green_center/ 
>>>
>>>       
>> ---------------------------------------------------------------------
>>     
>>> To unsubscribe, e-mail:
>>>       
>> user-unsubscribe@struts.apache.org
>>     
>>> For additional commands, e-mail:
>>>       
>> user-help@struts.apache.org
>>     
>>>  
>>>
>>>       
>>     
> ---------------------------------------------------------------------
>   
>> To unsubscribe, e-mail:
>> user-unsubscribe@struts.apache.org
>> For additional commands, e-mail:
>> user-help@struts.apache.org
>>
>>
>>     
>
>
>
>  
> ____________________________________________________________________________________
> Sucker-punch spam with award-winning protection. 
> Try the free Yahoo! Mail Beta.
> http://advision.webevents.yahoo.com/mailbeta/features_spam.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by Dave Newton <ne...@yahoo.com>.
What?

[n] accessing the stack at the given level: [0] is the
root, [1] is the previously-pushed item, etc.

<s:iterator...>
  <s:iterator...>
    <s:property value="[0]"/> <%-- inner it. value
--%>
    <s:property vlaue="[1]"/> <%-- outer it. value
--%>
</...>

(AFAIK, anyway; can't test at the moment.)

d.

--- tom tom <j_...@yahoo.com> wrote:

> index is variable, without introducting a scriptlet
> with int i=0 and the have i++, Is there any other
> inbuild way?
> 
> Thanks
> 
> --- Dave Newton <ne...@yahoo.com> wrote:
> 
> > --- tom tom <j_...@yahoo.com> wrote:
> > > What did you mean by
> > > 
> > > "is an issue iff you're using an id"
> > > 
> > > What else  can I use to get the value inside an
> > > Iterator?
> > 
> > Stack notation, like [0].foo etc. It's a kludgy
> > workaround for this situation but it should work.
> > 
> > d.
> > 
> > 
> > 
> >      
> >
>
____________________________________________________________________________________
> > Fussy? Opinionated? Impossible to please? Perfect.
> 
> > Join Yahoo!'s user panel and lay it on us.
> >
>
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
> > 
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> > user-help@struts.apache.org
> > 
> > 
> 
> 
> 
>  
>
____________________________________________________________________________________
> We won't tell. Get more on shows you hate to love 
> (and love to hate): Yahoo! TV's Guilty Pleasures
> list.
> http://tv.yahoo.com/collections/265 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



      ____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

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


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by tom tom <j_...@yahoo.com>.
index is variable, without introducting a scriptlet
with int i=0 and the have i++, Is there any other
inbuild way?

Thanks

--- Dave Newton <ne...@yahoo.com> wrote:

> --- tom tom <j_...@yahoo.com> wrote:
> > What did you mean by
> > 
> > "is an issue iff you're using an id"
> > 
> > What else  can I use to get the value inside an
> > Iterator?
> 
> Stack notation, like [0].foo etc. It's a kludgy
> workaround for this situation but it should work.
> 
> d.
> 
> 
> 
>      
>
____________________________________________________________________________________
> Fussy? Opinionated? Impossible to please? Perfect. 
> Join Yahoo!'s user panel and lay it on us.
>
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



 
____________________________________________________________________________________
We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 

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


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by Dave Newton <ne...@yahoo.com>.
--- tom tom <j_...@yahoo.com> wrote:
> What did you mean by
> 
> "is an issue iff you're using an id"
> 
> What else  can I use to get the value inside an
> Iterator?

Stack notation, like [0].foo etc. It's a kludgy
workaround for this situation but it should work.

d.



      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


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


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by tom tom <j_...@yahoo.com>.
Hi,

What did you mean by

"is an issue iff you're
using an id"

What else  can I use to get the value inside an
Iterator?

Thanks

--- Dave Newton <ne...@yahoo.com> wrote:

> --- tom tom <j_...@yahoo.com> wrote:
> > WHAT it prints is following Issue is for the 4th
> > index also it prints test, it should print empty
> > 
> > Value of the arry is test0
> > Value of the arry is test1
> > Value of the arry is test2
> > Value of the arry is test
> > Value of the arry is test 
> 
> I agree; this looks like a bug. The suspect code is
> in
> IteratorComponent (twice) and is an issue iff you're
> using an id (i.e., the proper value, null or not, is
> pushed onto the context stack):
> 
> if ((id != null) && (currentValue != null)) {
>     stack.getContext().put(id, currentValue);
> }
> 
> Personally, I'd file a JIRA against this if there
> isn't one already there.
> 
> d.
> 
> 
> 
>  
>
____________________________________________________________________________________
> Don't get soaked.  Take a quick peak at the forecast
> with the Yahoo! Search weather shortcut.
> http://tools.search.yahoo.com/shortcuts/#loc_weather
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

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


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by tom tom <j_...@yahoo.com>.
Yes this definitely is a bug to me,

How can I make a JIRA issue for this, what is the URL,


I Dont think we can go to production with this issue,

Is there a way to get a patch for this,

Should we have to wait for the next release ?

Thanks,



--- Dave Newton <ne...@yahoo.com> wrote:

> --- tom tom <j_...@yahoo.com> wrote:
> > WHAT it prints is following Issue is for the 4th
> > index also it prints test, it should print empty
> > 
> > Value of the arry is test0
> > Value of the arry is test1
> > Value of the arry is test2
> > Value of the arry is test
> > Value of the arry is test 
> 
> I agree; this looks like a bug. The suspect code is
> in
> IteratorComponent (twice) and is an issue iff you're
> using an id (i.e., the proper value, null or not, is
> pushed onto the context stack):
> 
> if ((id != null) && (currentValue != null)) {
>     stack.getContext().put(id, currentValue);
> }
> 
> Personally, I'd file a JIRA against this if there
> isn't one already there.
> 
> d.
> 
> 
> 
>  
>
____________________________________________________________________________________
> Don't get soaked.  Take a quick peak at the forecast
> with the Yahoo! Search weather shortcut.
> http://tools.search.yahoo.com/shortcuts/#loc_weather
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  

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


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by Dave Newton <ne...@yahoo.com>.
--- tom tom <j_...@yahoo.com> wrote:
> WHAT it prints is following Issue is for the 4th
> index also it prints test, it should print empty
> 
> Value of the arry is test0
> Value of the arry is test1
> Value of the arry is test2
> Value of the arry is test
> Value of the arry is test 

I agree; this looks like a bug. The suspect code is in
IteratorComponent (twice) and is an issue iff you're
using an id (i.e., the proper value, null or not, is
pushed onto the context stack):

if ((id != null) && (currentValue != null)) {
    stack.getContext().put(id, currentValue);
}

Personally, I'd file a JIRA against this if there
isn't one already there.

d.



 
____________________________________________________________________________________
Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

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


Re: Has anyone tried this in S2 - THIS LOOKS A BUG

Posted by tom tom <j_...@yahoo.com>.
I did further investigation,
I think this is a bug, I think this is a very scary
bug.

You dont need three iterators, I could reproduce this
very easily,

In your action class have the following,

 String[] testArray = new String[5];
             
             testArray[0]="test0";
             testArray[1]="test1";
             testArray[2]="test2";
             testArray[3]="test";
            
             
session.setAttribute("testArray",testArray);


 In your jsp have the following


<s:iterator value="#session.testArray" id="testarr">
  Value of the arry is
  <s:property value="#testarr"/>
  <br> 
 </s:iterator>


WHAT it prints is following Issue is for the 4th index
also it prints test, it should print empty

Value of the arry is test0
Value of the arry is test1
Value of the arry is test2
Value of the arry is test
Value of the arry is test 


This is a scary behaviour for me,

Has anyone reported this bug, Any JIRA issue raised.

Thanks












--- Ian Roughley <ia...@fdar.com> wrote:

> Take a look at the value stack via the debug tag. 
> 
> Usually the property tag will keep stepping through
> the value stack 
> until a getter for the property is found (the object
> for the current 
> iteration is placed on the top of the value stack). 
> Although, if you 
> are explicitly defining the object (via id and
> #test) there shouldn't be 
> a problem. 
> 
> /Ian
> 
> tom tom wrote:
> 
> >Hi,
> >
> >I got three iterations which I tried as below in
> the
> >jsp, First two and Array of certain DTO and last
> >iterator is a String array. There is no jsp
> >compilation error, but the issue is it produced
> >misleading results.
> >
> >Is there any limitation in S2 for the depth of the
> >iteration. Is this way of using recommended?
> >
> >Sometimes where it is suppose to print empty value
> it
> >prints something else (looks like from the previous
> >iterator)
> >
> ><s:iterator value="#session.ITER1" id="qnn">
> >....
> >....
> ><s:iterator value="#qnn.ITER2" id="qa">
> >....
> >....
> > <s:iterator value="#qa.ITER3" id="test">
> >   <s:property value="#test" />
> ></s:iterator> 
> >
> ></s:iterator> 
> >
> ></s:iterator> 
> >
> >
> >
> >     
>
____________________________________________________________________________________
> >Park yourself in front of a world of choices in
> alternative vehicles. Visit the Yahoo! Auto Green
> Center.
> >http://autos.yahoo.com/green_center/ 
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> >For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >  
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 



 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

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


Re: Has anyone tried this in S2

Posted by Ian Roughley <ia...@fdar.com>.
Take a look at the value stack via the debug tag. 

Usually the property tag will keep stepping through the value stack 
until a getter for the property is found (the object for the current 
iteration is placed on the top of the value stack).  Although, if you 
are explicitly defining the object (via id and #test) there shouldn't be 
a problem. 

/Ian

tom tom wrote:

>Hi,
>
>I got three iterations which I tried as below in the
>jsp, First two and Array of certain DTO and last
>iterator is a String array. There is no jsp
>compilation error, but the issue is it produced
>misleading results.
>
>Is there any limitation in S2 for the depth of the
>iteration. Is this way of using recommended?
>
>Sometimes where it is suppose to print empty value it
>prints something else (looks like from the previous
>iterator)
>
><s:iterator value="#session.ITER1" id="qnn">
>....
>....
><s:iterator value="#qnn.ITER2" id="qa">
>....
>....
> <s:iterator value="#qa.ITER3" id="test">
>   <s:property value="#test" />
></s:iterator> 
>
></s:iterator> 
>
></s:iterator> 
>
>
>
>      ____________________________________________________________________________________
>Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
>http://autos.yahoo.com/green_center/ 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>  
>

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