You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sébastien LABEY <se...@gmail.com> on 2006/11/19 23:14:32 UTC

[S2] configuring Tiles with Struts 2

Hi all,

I've been trying for the past 2 days to configure Struts2 to work with
tiles. In the Struts 2.0.1 release, I found the jar to deal with tiles that
was not included in the Struts2.0.0-SNAPSHOT release (
struts2-tiles-plugin-2.0.1.jar), but in the end I can't resolve this error
that is launched when I try to access a link with result of type "tiles" :
*
java.lang.NullPointerException*

    org.apache.struts2.views.tiles.TilesResult.getComponentDefinition(TilesResult.java:162)
    org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:116)
    org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:175)
    com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:309)
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:218)
    com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:177)
...


Could someone tell me what jars I exactly need to use tiles with struts 2
and the files that I need to configure and how?
Thanks very much in advance.

Sebastien

Re: [S2] configuring Tiles with Struts 2

Posted by quinmeda1 <qu...@yahoo.com>.

David H. DeWolf wrote:
> 
> If you can add a ticket to jira and post a small, simple, webapp that 
> details the problem, that would help immensely.
> 
> 


Done:  https://bugzilla.spamassassin.org/struts/browse/SB-96

A small war is attached to the issue.  Use
http://localhost:8080/struts2tiles/searchByZip.do

Thanks
-- 
View this message in context: http://www.nabble.com/-S2--configuring-Tiles-with-Struts-2-tf2665690.html#a7585531
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: [S2] configuring Tiles with Struts 2

Posted by Craig McClanahan <cr...@apache.org>.
On 11/28/06, quinmeda1 <qu...@yahoo.com> wrote:
>
>
> A little more info....
>
> The following exception is thrown when trying to start the app with the
> listener:
> 2006-11-28 10:44:15 StandardContext[/myapp]Exception sending context
> initialized event to listener instance of class
> org.apache.struts2.tiles.StrutsTilesListener
> java.lang.NoClassDefFoundError: org/apache/tiles/TilesContainer


Just as a historical note, I've been misled by NoClassDefFoundError before.
It is not necessarily talking about this class itself (TilesContainer) --
that would normally give you ClassNotFoundException instead.  It is more
likely to be a missing class that is *imported* by TilesContainer.

Craig

Re: [S2] configuring Tiles with Struts 2

Posted by quinmeda1 <qu...@yahoo.com>.

David H. DeWolf wrote:
> 
> Can you find the entire stack trace?
> 

Sure: 


exception

javax.servlet.ServletException: Filter execution threw an exception

root cause

java.lang.NoClassDefFoundError: org/apache/tiles/TilesContext
	java.lang.Class.getDeclaredConstructors0(Native Method)
	java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
	java.lang.Class.getConstructor0(Class.java:2640)
	java.lang.Class.newInstance0(Class.java:321)
	java.lang.Class.newInstance(Class.java:303)
	com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:136)
	com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:148)

org.apache.struts2.impl.StrutsObjectFactory.buildResult(StrutsObjectFactory.java:73)

com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:179)

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:303)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:218)

com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:177)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(ParametersInterceptor.java:147)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:80)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:204)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:120)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:59)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:174)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

com.opensymphony.xwork2.interceptor.PrepareInterceptor.intercept(PrepareInterceptor.java:115)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:156)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:124)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)

com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:180)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	org.apache.struts2.impl.StrutsActionProxy$1.call(StrutsActionProxy.java:27)
	org.apache.struts2.impl.StrutsActionProxy$1.call(StrutsActionProxy.java:26)

org.apache.struts2.impl.RequestContextImpl.callInContext(RequestContextImpl.java:152)

org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:25)
	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:330)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:256)


-- 
View this message in context: http://www.nabble.com/-S2--configuring-Tiles-with-Struts-2-tf2665690.html#a7584320
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: [S2] configuring Tiles with Struts 2

Posted by "David H. DeWolf" <dd...@apache.org>.
Can you find the entire stack trace?

quinmeda1 wrote:
> I'm definitely using 2.0.1.  Found I had some extra tiles-core* JARs lying
> around in lib.  I cleared those out.  Now the listener is working, but I'm
> back to getting java.lang.NoClassDefFoundError:
> org/apache/tiles/TilesContext when it tries to render the result.  I'll keep
> digging.  
> 
> 

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


Re: [S2] configuring Tiles with Struts 2

Posted by quinmeda1 <qu...@yahoo.com>.
I'm definitely using 2.0.1.  Found I had some extra tiles-core* JARs lying
around in lib.  I cleared those out.  Now the listener is working, but I'm
back to getting java.lang.NoClassDefFoundError:
org/apache/tiles/TilesContext when it tries to render the result.  I'll keep
digging.  


-- 
View this message in context: http://www.nabble.com/-S2--configuring-Tiles-with-Struts-2-tf2665690.html#a7584075
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: [S2] configuring Tiles with Struts 2

Posted by "David H. DeWolf" <dd...@apache.org>.
Very odd, the 2.0.1 tag 
(http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_0_1/plugins/tiles/) 
has no reference to the TilesContainer, and I thought it was 
released/tagged before it was introduced.  Are you sure you're using 
struts 2.0.1 and not struts 2.0.2-SNAPSHOT?

David

quinmeda1 wrote:
> A little more info....
> 
> The following exception is thrown when trying to start the app with the
> listener:  
> 2006-11-28 10:44:15 StandardContext[/myapp]Exception sending context
> initialized event to listener instance of class
> org.apache.struts2.tiles.StrutsTilesListener
> java.lang.NoClassDefFoundError: org/apache/tiles/TilesContainer
> 
> If I turn off the listener, the app will start up but I get an NPE in
> TilesResult.getComponentDefinition, likely because the Listener didn't get
> to do its thing.  
> 
> I am currently using struts2-tiles-plugin-2.0.1.jar and
> tiles-core-2.0-r468346-SNAPSHOT.jar.  
> 
> Going to try hunting down TilesContainer in other JARs.  If I get stuck,
> I'll try to throw together a sample app today to demonstrate the issue.  
> 
> 
> 

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


RE: [S2] configuring Tiles with Struts 2

Posted by quinmeda1 <qu...@yahoo.com>.
A little more info....

The following exception is thrown when trying to start the app with the
listener:  
2006-11-28 10:44:15 StandardContext[/myapp]Exception sending context
initialized event to listener instance of class
org.apache.struts2.tiles.StrutsTilesListener
java.lang.NoClassDefFoundError: org/apache/tiles/TilesContainer

If I turn off the listener, the app will start up but I get an NPE in
TilesResult.getComponentDefinition, likely because the Listener didn't get
to do its thing.  

I am currently using struts2-tiles-plugin-2.0.1.jar and
tiles-core-2.0-r468346-SNAPSHOT.jar.  

Going to try hunting down TilesContainer in other JARs.  If I get stuck,
I'll try to throw together a sample app today to demonstrate the issue.  



-- 
View this message in context: http://www.nabble.com/-S2--configuring-Tiles-with-Struts-2-tf2665690.html#a7582882
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: [S2] configuring Tiles with Struts 2

Posted by "David H. DeWolf" <dd...@apache.org>.
Sorry guys, I've been traveling with the family for thanksgiving. . .

I'm going to have to do some digging around to see if I can replicate 
your problem. I don't currently have an app using 2.0.1 (using the trunk 
revision until 2.0.2 is released - this week I hope)

If you can add a ticket to jira and post a small, simple, webapp that 
details the problem, that would help immensely.

I'll get you some info asap

David

Sébastien LABEY wrote:
> Hi Kim,
> 
> No, sorry, no resolution to this :-(
> I'm waiting for an answer. I hope David will have a solution soon...
> If ever you find something to help, could you post it?
> Thanks.
> 
> Sebastien
> 
> On 11/27/06, Kim <qu...@yahoo.com> wrote:
>>
>> >
>> > On 11/22/06, Sébastien LABEY <sebastien.labey <at> gmail.com> wrote:
>> > >
>> > > If I don't register the Tiles listener in the web.xml, Tomcat starts,
>> my
>> > > webapp works, but when I ask for a page build with tiles, I have a
>> > > ClassDefNotFoundException on the TilesContext class...
>> > >
>> > > Maybe this can help you to help me
>> > >
>> > > Sebastien
>>
>>
>> Any resolution to this?  I am seeing the same problem and the fixes
>> suggested
>> here have made no difference.
>>
>> Thanks,
>> Kim
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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


Re: [S2] configuring Tiles with Struts 2

Posted by Sébastien LABEY <se...@gmail.com>.
Hi Kim,

No, sorry, no resolution to this :-(
I'm waiting for an answer. I hope David will have a solution soon...
If ever you find something to help, could you post it?
Thanks.

Sebastien

On 11/27/06, Kim <qu...@yahoo.com> wrote:
>
> >
> > On 11/22/06, Sébastien LABEY <sebastien.labey <at> gmail.com> wrote:
> > >
> > > If I don't register the Tiles listener in the web.xml, Tomcat starts,
> my
> > > webapp works, but when I ask for a page build with tiles, I have a
> > > ClassDefNotFoundException on the TilesContext class...
> > >
> > > Maybe this can help you to help me
> > >
> > > Sebastien
>
>
> Any resolution to this?  I am seeing the same problem and the fixes
> suggested
> here have made no difference.
>
> Thanks,
> Kim
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: [S2] configuring Tiles with Struts 2

Posted by Kim <qu...@yahoo.com>.
> 
> On 11/22/06, Sébastien LABEY <sebastien.labey <at> gmail.com> wrote:
> >
> > If I don't register the Tiles listener in the web.xml, Tomcat starts, my
> > webapp works, but when I ask for a page build with tiles, I have a
> > ClassDefNotFoundException on the TilesContext class...
> >
> > Maybe this can help you to help me 
> >
> > Sebastien


Any resolution to this?  I am seeing the same problem and the fixes suggested
here have made no difference. 

Thanks,
Kim







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


Re: [S2] configuring Tiles with Struts 2

Posted by Sébastien LABEY <se...@gmail.com>.
Sorry :

java.lang.NoClassDefFoundError: org/apache/tiles/TilesContext...


On 11/22/06, Sébastien LABEY <se...@gmail.com> wrote:
>
> David,
>
> I downloaded the struts2-core-2.0.2-SNAPSHOT-20061122.jar and the
> tiles-core-2.0-SNAPSHOT-20061122.jar as you told me in your previous mail,
> but it doesn't work too. I have exactly the same problem while starting
> Tomcat and initializing the Tiles listener.
> If I don't register the Tiles listener in the web.xml, Tomcat starts, my
> webapp works, but when I ask for a page build with tiles, I have a
> ClassDefNotFoundException on the TilesContext class...
>
> Maybe this can help you to help me ;-)
>
> Sebastien
>
>
>
> On 11/22/06, Sébastien LABEY <se...@gmail.com> wrote:
> >
> > Hi David,
> >
> > Thank you for your answer. I did not had enough time to try it until
> > now, but it doesn't work. I'm quite sure I'm doing something wrong, in
> > particular I think I did not have the right jars. Depending on the jars
> > included in my /lib directory, I always have ClassNotFoundExcpetions...
> > As mentioned in the Tiles Plugin page, I've added in the web.xml :
> >
> > <listener>
> >     <listener-class>org.apache.struts2.tiles.StrutsTilesListener
> > </listener-class>
> > </listener>
> >
> > and starting from the jars included in the struts-blank app, I added :
> > - tiles-core-2.0-r468346-SNAPSHOT.jar
> > - struts2-tiles-plugin-2.0.1.jar
> >
> > The tiles definition file is tiles.xml in the /WEB-INF/ directory.
> >
> > With this configuration, my Tomcat 5.5 doesn't start correctly and my
> > webapp is not available. In the Tomcat log, I can see that the listener had
> > errors while starting :
> >
> > 22 nov. 2006 23:15:04 org.apache.tiles.listener.TilesListenercontextInitialized
> > INFO: Initializing TilesListener
> > 22 nov. 2006 23:15:05 org.apache.tiles.listener.TilesListenerreadFactoryConfig
> > INFO: CONFIG FILES WERE NOT DEFINED IN WEB.XML, LOOKING FOR
> > /WEB-INF/tiles.xml
> > 22 nov. 2006 23:15:05 org.apache.tiles.listener.TilesListenerinitDefinitionsFactory
> > INFO: initializing definitions factory...
> > 22 nov. 2006 23:15:05 org.apache.catalina.core.StandardContext start
> > GRAVE: Error listenerStart
> >
> > So, please, could you tell me what I basicaly may configure and what
> > jars I should have (and maybe not have). If the solution is getting the
> > Struts2.0.2 version, where can I find it?
> >
> > Thank you in advance for your precious help.
> >
> > Sebastien
> >
> >
> >
> >
> >
> > On 11/20/06, David H. DeWolf < ddewolf@apache.org> wrote:
> > >
> > > Sure. . .have you looked at:
> > >
> > > http://cwiki.apache.org/WW/tiles-plugin.html
> > >
> > > I'll be updating it shortly to take into account some of the recent
> > > changes in the plugin, but this should work in 2.0.1.  There are a
> > > couple of different options if your using the snapshot.
> > >
> > >
> > > Also, depending on which tiles-plugin jar you "found", you may be
> > > depending on the tiles snapshot.  There's been a lot of work on this
> > > since the release, and I'm wondering if you're using a snapshot
> > > version
> > > that is out of sync.  I think that if you're using struts 2.0.1,
> > > you'll
> > > want the tiles 2.0-r468346-SNAPSHOT jar.  If you're using struts 2.0.2
> > > or later, you'll want the current tiles snapshot.  Both are available
> > > here:
> > > http://people.apache.org/repo/m2-snapshot-repository/org/apache/struts/tiles/tiles-core/
> > >
> > >
> > > Let me know if you need more info.
> > >
> > >
> > > David
> > >
> > > Sébastien LABEY wrote:
> > > > Hi all,
> > > >
> > > > I've been trying for the past 2 days to configure Struts2 to work
> > > with
> > > > tiles. In the Struts 2.0.1 release, I found the jar to deal with
> > > tiles that
> > > > was not included in the Struts2.0.0-SNAPSHOT release (
> > > > struts2-tiles-plugin-2.0.1.jar), but in the end I can't resolve this
> > > error
> > > > that is launched when I try to access a link with result of type
> > > "tiles" :
> > > > *
> > > > java.lang.NullPointerException*
> > > >
> > > >
> > > > org.apache.struts2.views.tiles.TilesResult.getComponentDefinition(
> > > TilesResult.java:162)
> > > >
> > > >
> > > > org.apache.struts2.views.tiles.TilesResult.doExecute (
> > > TilesResult.java:116)
> > > >
> > > > org.apache.struts2.dispatcher.StrutsResultSupport.execute(
> > > StrutsResultSupport.java:175)
> > > >
> > > >
> > > > com.opensymphony.xwork2.DefaultActionInvocation.executeResult(
> > > DefaultActionInvocation.java :309)
> > > >
> > > >
> > > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(
> > > DefaultActionInvocation.java:218)
> > > >
> > > >
> > > >
> > > com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept
> > > (DefaultWorkflowInterceptor.java :177)
> > > >
> > > > ...
> > > >
> > > >
> > > > Could someone tell me what jars I exactly need to use tiles with
> > > struts 2
> > > > and the files that I need to configure and how?
> > > > Thanks very much in advance.
> > > >
> > > > Sebastien
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
>

Re: [S2] configuring Tiles with Struts 2

Posted by Sébastien LABEY <se...@gmail.com>.
David,

I downloaded the struts2-core-2.0.2-SNAPSHOT-20061122.jar and the
tiles-core-2.0-SNAPSHOT-20061122.jar as you told me in your previous mail,
but it doesn't work too. I have exactly the same problem while starting
Tomcat and initializing the Tiles listener.
If I don't register the Tiles listener in the web.xml, Tomcat starts, my
webapp works, but when I ask for a page build with tiles, I have a
ClassDefNotFoundException on the TilesContext class...

Maybe this can help you to help me ;-)

Sebastien



On 11/22/06, Sébastien LABEY <se...@gmail.com> wrote:
>
> Hi David,
>
> Thank you for your answer. I did not had enough time to try it until now,
> but it doesn't work. I'm quite sure I'm doing something wrong, in particular
> I think I did not have the right jars. Depending on the jars included in my
> /lib directory, I always have ClassNotFoundExcpetions...
> As mentioned in the Tiles Plugin page, I've added in the web.xml :
>
> <listener>
>     <listener-class>org.apache.struts2.tiles.StrutsTilesListener
> </listener-class>
> </listener>
>
> and starting from the jars included in the struts-blank app, I added :
> - tiles-core-2.0-r468346-SNAPSHOT.jar
> - struts2-tiles-plugin-2.0.1.jar
>
> The tiles definition file is tiles.xml in the /WEB-INF/ directory.
>
> With this configuration, my Tomcat 5.5 doesn't start correctly and my
> webapp is not available. In the Tomcat log, I can see that the listener had
> errors while starting :
>
> 22 nov. 2006 23:15:04 org.apache.tiles.listener.TilesListenercontextInitialized
> INFO: Initializing TilesListener
> 22 nov. 2006 23:15:05 org.apache.tiles.listener.TilesListenerreadFactoryConfig
> INFO: CONFIG FILES WERE NOT DEFINED IN WEB.XML, LOOKING FOR
> /WEB-INF/tiles.xml
> 22 nov. 2006 23:15:05 org.apache.tiles.listener.TilesListenerinitDefinitionsFactory
> INFO: initializing definitions factory...
> 22 nov. 2006 23:15:05 org.apache.catalina.core.StandardContext start
> GRAVE: Error listenerStart
>
> So, please, could you tell me what I basicaly may configure and what jars
> I should have (and maybe not have). If the solution is getting the
> Struts2.0.2 version, where can I find it?
>
> Thank you in advance for your precious help.
>
> Sebastien
>
>
>
>
>
> On 11/20/06, David H. DeWolf < ddewolf@apache.org> wrote:
> >
> > Sure. . .have you looked at:
> >
> > http://cwiki.apache.org/WW/tiles-plugin.html
> >
> > I'll be updating it shortly to take into account some of the recent
> > changes in the plugin, but this should work in 2.0.1.  There are a
> > couple of different options if your using the snapshot.
> >
> >
> > Also, depending on which tiles-plugin jar you "found", you may be
> > depending on the tiles snapshot.  There's been a lot of work on this
> > since the release, and I'm wondering if you're using a snapshot version
> > that is out of sync.  I think that if you're using struts 2.0.1, you'll
> > want the tiles 2.0-r468346-SNAPSHOT jar.  If you're using struts 2.0.2
> > or later, you'll want the current tiles snapshot.  Both are available
> > here:
> >
> > http://people.apache.org/repo/m2-snapshot-repository/org/apache/struts/tiles/tiles-core/
> >
> > Let me know if you need more info.
> >
> >
> > David
> >
> > Sébastien LABEY wrote:
> > > Hi all,
> > >
> > > I've been trying for the past 2 days to configure Struts2 to work with
> > > tiles. In the Struts 2.0.1 release, I found the jar to deal with tiles
> > that
> > > was not included in the Struts2.0.0-SNAPSHOT release (
> > > struts2-tiles-plugin-2.0.1.jar), but in the end I can't resolve this
> > error
> > > that is launched when I try to access a link with result of type
> > "tiles" :
> > > *
> > > java.lang.NullPointerException*
> > >
> > >
> > > org.apache.struts2.views.tiles.TilesResult.getComponentDefinition(
> > TilesResult.java:162)
> > >
> > >
> > > org.apache.struts2.views.tiles.TilesResult.doExecute (TilesResult.java
> > :116)
> > >
> > > org.apache.struts2.dispatcher.StrutsResultSupport.execute(
> > StrutsResultSupport.java:175)
> > >
> > >
> > > com.opensymphony.xwork2.DefaultActionInvocation.executeResult(
> > DefaultActionInvocation.java :309)
> > >
> > >
> > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(
> > DefaultActionInvocation.java:218)
> > >
> > >
> > >
> > com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept
> > (DefaultWorkflowInterceptor.java :177)
> > >
> > > ...
> > >
> > >
> > > Could someone tell me what jars I exactly need to use tiles with
> > struts 2
> > > and the files that I need to configure and how?
> > > Thanks very much in advance.
> > >
> > > Sebastien
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Re: [S2] configuring Tiles with Struts 2

Posted by Sébastien LABEY <se...@gmail.com>.
Hi David,

Thank you for your answer. I did not had enough time to try it until now,
but it doesn't work. I'm quite sure I'm doing something wrong, in particular
I think I did not have the right jars. Depending on the jars included in my
/lib directory, I always have ClassNotFoundExcpetions...
As mentioned in the Tiles Plugin page, I've added in the web.xml :

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

and starting from the jars included in the struts-blank app, I added :
- tiles-core-2.0-r468346-SNAPSHOT.jar
- struts2-tiles-plugin-2.0.1.jar

The tiles definition file is tiles.xml in the /WEB-INF/ directory.

With this configuration, my Tomcat 5.5 doesn't start correctly and my webapp
is not available. In the Tomcat log, I can see that the listener had errors
while starting :

22 nov. 2006 23:15:04 org.apache.tiles.listener.TilesListenercontextInitialized
INFO: Initializing TilesListener
22 nov. 2006 23:15:05 org.apache.tiles.listener.TilesListenerreadFactoryConfig
INFO: CONFIG FILES WERE NOT DEFINED IN WEB.XML, LOOKING FOR
/WEB-INF/tiles.xml
22 nov. 2006 23:15:05
org.apache.tiles.listener.TilesListenerinitDefinitionsFactory
INFO: initializing definitions factory...
22 nov. 2006 23:15:05 org.apache.catalina.core.StandardContext start
GRAVE: Error listenerStart

So, please, could you tell me what I basicaly may configure and what jars I
should have (and maybe not have). If the solution is getting the
Struts2.0.2version, where can I find it?

Thank you in advance for your precious help.

Sebastien





On 11/20/06, David H. DeWolf <dd...@apache.org> wrote:
>
> Sure. . .have you looked at:
>
> http://cwiki.apache.org/WW/tiles-plugin.html
>
> I'll be updating it shortly to take into account some of the recent
> changes in the plugin, but this should work in 2.0.1.  There are a
> couple of different options if your using the snapshot.
>
>
> Also, depending on which tiles-plugin jar you "found", you may be
> depending on the tiles snapshot.  There's been a lot of work on this
> since the release, and I'm wondering if you're using a snapshot version
> that is out of sync.  I think that if you're using struts 2.0.1, you'll
> want the tiles 2.0-r468346-SNAPSHOT jar.  If you're using struts 2.0.2
> or later, you'll want the current tiles snapshot.  Both are available
> here:
>
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/struts/tiles/tiles-core/
>
> Let me know if you need more info.
>
>
> David
>
> Sébastien LABEY wrote:
> > Hi all,
> >
> > I've been trying for the past 2 days to configure Struts2 to work with
> > tiles. In the Struts 2.0.1 release, I found the jar to deal with tiles
> that
> > was not included in the Struts2.0.0-SNAPSHOT release (
> > struts2-tiles-plugin-2.0.1.jar), but in the end I can't resolve this
> error
> > that is launched when I try to access a link with result of type "tiles"
> :
> > *
> > java.lang.NullPointerException*
> >
> >
> > org.apache.struts2.views.tiles.TilesResult.getComponentDefinition(
> TilesResult.java:162)
> >
> >
> > org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java
> :116)
> >
> > org.apache.struts2.dispatcher.StrutsResultSupport.execute(
> StrutsResultSupport.java:175)
> >
> >
> > com.opensymphony.xwork2.DefaultActionInvocation.executeResult(
> DefaultActionInvocation.java:309)
> >
> >
> > com.opensymphony.xwork2.DefaultActionInvocation.invoke(
> DefaultActionInvocation.java:218)
> >
> >
> >
> com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept
> (DefaultWorkflowInterceptor.java:177)
> >
> > ...
> >
> >
> > Could someone tell me what jars I exactly need to use tiles with struts
> 2
> > and the files that I need to configure and how?
> > Thanks very much in advance.
> >
> > Sebastien
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: [S2] configuring Tiles with Struts 2

Posted by "David H. DeWolf" <dd...@apache.org>.
Sure. . .have you looked at:

http://cwiki.apache.org/WW/tiles-plugin.html

I'll be updating it shortly to take into account some of the recent 
changes in the plugin, but this should work in 2.0.1.  There are a 
couple of different options if your using the snapshot.


Also, depending on which tiles-plugin jar you "found", you may be 
depending on the tiles snapshot.  There's been a lot of work on this 
since the release, and I'm wondering if you're using a snapshot version 
that is out of sync.  I think that if you're using struts 2.0.1, you'll 
want the tiles 2.0-r468346-SNAPSHOT jar.  If you're using struts 2.0.2 
or later, you'll want the current tiles snapshot.  Both are available 
here: 
http://people.apache.org/repo/m2-snapshot-repository/org/apache/struts/tiles/tiles-core/

Let me know if you need more info.


David

Sébastien LABEY wrote:
> Hi all,
> 
> I've been trying for the past 2 days to configure Struts2 to work with
> tiles. In the Struts 2.0.1 release, I found the jar to deal with tiles that
> was not included in the Struts2.0.0-SNAPSHOT release (
> struts2-tiles-plugin-2.0.1.jar), but in the end I can't resolve this error
> that is launched when I try to access a link with result of type "tiles" :
> *
> java.lang.NullPointerException*
> 
>    
> org.apache.struts2.views.tiles.TilesResult.getComponentDefinition(TilesResult.java:162) 
> 
>    
> org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:116)
>    
> org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:175) 
> 
>    
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:309) 
> 
>    
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:218) 
> 
>    
> com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:177) 
> 
> ...
> 
> 
> Could someone tell me what jars I exactly need to use tiles with struts 2
> and the files that I need to configure and how?
> Thanks very much in advance.
> 
> Sebastien
> 

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