tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aditya Saraf <adi.sa...@gmail.com>
Subject Re: Null Container returned by getContainer
Date Fri, 12 Aug 2011 14:22:17 GMT
I also suspect that the JspContext returned for the folders might be invalid
or null.

Thanks,
Adi Saraf

On Fri, Aug 12, 2011 at 9:41 AM, Aditya Saraf <adi.saraf@gmail.com> wrote:

> I thought I did, but was looking in the wrong spot. Sorry :(
>
> Thanks,
> Adi Saraf
>
>   On Fri, Aug 12, 2011 at 9:36 AM, Antonio Petrelli <
> antonio.petrelli@gmail.com> wrote:
>
>> Uh didn't you solve the problem?
>>
>> 2011/8/12 Aditya Saraf <adi.saraf@gmail.com>
>>
>> > Hi,
>> >
>> > I am trying to get the tiles definitions to work within folder. They
>> seem
>> > to
>> > be working on all root level files, but not inside folders. I am using
>> the
>> > BasicTilesContainer configuration with a tiles.xml file in the WEB-INF
>> > folder. My error is as follows.
>> >
>> > java.lang.NullPointerException
>> >
>> >
>> org.apache.tiles.template.InsertDefinitionModel.start(InsertDefinitionModel.java:74)
>> >
>> >
>> org.apache.tiles.jsp.taglib.InsertDefinitionTag.doTag(InsertDefinitionTag.java:276)
>> >
>> > After attaching the source, I see that the line 217 in
>> > org.apache.tiles.jsp.context.JspUtil.java calls getContainer(). Which in
>> > turn calls an overloaded method of getContainer() on line 127 in the
>> same
>> > class. On line 127, I notice the following.
>> >
>> > (TilesContainer)
>> context.getAttribute(key,PageContext.*APPLICATION_SCOPE*);
>> >
>> > I am suspecting that key is not being set or the attribute cannot be
>> > retrieved given the appropriate key. They key should be set to
>> > TilesAccess.CONTAINER_ATTRIBUTE. I guess someting in my Tomcat context
>> is
>> > not configured properly for this to not return the proper Tiles
>> Container.
>> > My web.xml looks like this
>> >
>> > <servlet-name>tiles</servlet-name>
>> >
>>  <servlet-class>org.apache.tiles.web.startup.TilesServlet</servlet-class>
>> >     <init-param>
>> >         <param-name>
>> >           org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
>> >         </param-name>
>> >         <param-value>
>> >           /WEB-INF/tiles.xml
>> >         </param-value>
>> >     </init-param>
>> >     <load-on-startup>2</load-on-startup>
>> >  </servlet>
>> >
>> > Do I need to specify some sort of a context param for the container to
>> be
>> > initialized and returned correctly? Please let me know.
>> >
>> >
>> > Thanks,
>> > Adi Saraf
>> >
>>
>
>
>
> --
> Adi Saraf
>



-- 
Adi Saraf

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message