First, I would suggest either using Struts 2 HEAD or wait until this
weekend when we roll 2.0.1.  Then, simply drop in the
struts2-tiles.jar plugin and use the latest Tiles 2.0-SNAPSHOT
release, and it should work.  The Struts 2.0.0 release had known
issues with Tiles, particularly newer snapshots.

Don

On 10/6/06, Dave Newton <[EMAIL PROTECTED]> wrote:
Howdy,



Hmmm, a new Struts project-but I get to use Struts2 this time. Digging
it.



Using Tiles is probably a requirement but I'm having problems figuring
out which builds I'm supposed to be using with Struts2 (and I'm only
assuming it's a versioning/snapshot issue). (I'm not supposed to use
anything new besides Struts2 for this-I didn't tell them it's using
Spring for its IoC ;)



I'm running under Tomcat 4.1.31 (eventually will be Weblogic 8.1) so I
don't have JSP 2.0.



Using dated snapshots (0930 thru 1006) I get NPEs when TilesResult tries
to get the config factory:



java.lang.NullPointerException

            at
org.apache.struts2.views.tiles.TilesResult.getComponentDefinition(TilesR
esult.java:158)

            at
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:11
2)

            at
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu
pport.java:152)

            at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:293)



Using the non-dated snapshot I get the following dump (only pasting root
cause):



java.lang.NoSuchMethodError:
org.apache.tiles.ComponentContext.getContext(Ljavax/servlet/ServletReque
st;)Lorg/apache/tiles/ComponentContext;

            at
org.apache.struts2.views.tiles.TilesResult.getComponentContext(TilesResu
lt.java:172)

            at
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:11
8)

            at
org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu
pport.java:152)



(I can supply the rest, but this seemed the important bit.)



I currently have the libs from the tiles-core test app plus the j4
versions of Struts2 (will deploy on 1.5 but can't get it installed on my
local machine yet) plus its supporting libs.



The definitions are loaded (at least w/ the non-dated SNAPSHOT) because
if I try to use a non-defined tile as the result in my struts-config it
complains about the missing tile.



I can provide any other info needed in excruciating detail, but I'm
hoping this would be enough to get someone started, and hopefully I'm
just doing something really dumb.



Dave






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

Reply via email to