> My questions are :
> 
> 1. Does the nested tag lib require struts to be used ?
>  I have nested-tag.jar and struts.jar in the
> WEB-INF/lib but the application is not based on struts
> framework. It is an MVC  app but with our own
> controller servlet and mapping(like struts-config). 
> When I tried, I got this dreaded error :
> 
> Cannot find message resources under key
> org.apache.struts.action.MESSAGE'
> javax.servlet.ServletException: Cannot find message
> resources under key org.apache.struts.action.MESSAGE
>         at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494)
> 
> This makes  me wonder if struts framework is actually
> needed for nested tags. Any help would be
> appreciated..


They extend the Struts tags, so to that end they need the struts library on
hand to even run. As for a set-up and running Struts app, it would depend on
what tag you're using. The above seems a little fuzzy and trying to get a hold
of the ApplicationResources.properties messages, which does need the Struts
Servlet fired up.

While the theory is sound about using beans and properties etc etc, The Struts
tags were geared for nothing but Struts apps, so you could be in for anything
with regards to implementation problems.

It would be easy to get the nested paradigm working without the Struts tags,
but they do all the grunt work with regard to making Html etc.


> 
> 2. I can't do a  <nested:define> in my included JSP as
> I get a null pointer exception. 
> 
> Main jsp :
> <nested:root name="docs">
>     <nested:nest property="treeNode">
>          <nested:iterate property="childCollection">
>                     <jsp:include page="docnode.jsp" />
>          </nested:iterate>
>     </nested:nest>
> </nested:root>
> 
> docnode.jsp (this recurses):
> 
> <nested:root>
>         <nested:equal property="showChildren"
> value="true">
>          <nested:define id="imgState"
> value="open18x16.gif" />
>         </nested:equal>
>         <!-- restof html code-->
>        
>       <nested:iterate property="childCollection">
>             <jsp:include page="docnode.jsp" />
>        </nested:iterate>
> 
>     </nested:equal>
> </nested:root>
> 
> What am i doing wrong?

The nested:define in this case doesn't seem to be related to a bean property.
nested:define is about making a variable out of a property which is relative
to the current nested object. Struts' original bean:define may be the answer,
as the nested tags only care about one thing... nesting (and can't forgive
them for that :P  ). You may even want to consider a... *cough*... scriptlet
to get at the string value.


Arron.


> 
> thanks
> arvind
> 
> --- Jeff Kyser <[EMAIL PROTECTED]> wrote:
> > Nested tags rock whereas logic tags, while perhaps
> > doing
> > the same thing are more cumbersome.
> > 
> > Scoping is much more intuitive - instead of having
> > to talk
> > about 'myForm.myContainer.myObject, you can just
> > use nested:iterate and nested:nest to make your code
> > much easier to read. And, since you can write
> > snippets
> > to the more localized scope, they can be reused on
> > multiple
> > pages.
> > 
> > And, if that wasn't enough, you can do recursion
> > with nested.
> > 
> > See the www.keyboardmonkey.com site for examples,
> > etc.
> > 
> > -jeff
> > 
> > On Monday, June 9, 2003, at 08:56  PM, Frances Aleah
> > Z. de Guzman wrote:
> > 
> > > what is the difference between nested tags and
> > html tags?
> > > -- 
> > > Frances Aleah Z. De Guzman
> > > SA/Programmer
> > > Ingenium Technology, Inc.
> > > http://www.ingenium.com.ph
> > >
> > > Disclaimer :
> > > This message is intended only for the named
> > recipient. If you are not 
> > > the
> > > intended recipient you are notified that
> > disclosing, copying, 
> > > distributing
> > > or taking any action in reliance on the contents
> > of this information is
> > > strictly prohibited.
> > >
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to