struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarnot Voytek Contr AU HQ/SC <Voytek.Jar...@MAXWELL.AF.MIL>
Subject RE: [tiles] More help with tabbed tiles
Date Mon, 25 Nov 2002 20:16:51 GMT
I also have these lines in my struts-config.xml, and am using tiles-defs.xml
<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
<plug-in className="org.apache.struts.tiles.TilesPlugin">
  <set-property property="definitions-config"

-----Original Message-----
From: Wendy Smoak []
Sent: Monday, November 25, 2002 2:11 PM
To: 'Struts Users Mailing List'
Subject: [tiles] More help with tabbed tiles

On Cedric's advice, I decided to try the xml config file approach for tiles.
I've got classicLayout and vboxLayout working, and now I'm trying to get a
tabbed page to work.

Currently, I'm getting:
javax.servlet.ServletException: Can't get definitions factory from context.

Google turned up a post that said I ought to have 'ActionComponentServlet'
defined in web.xml but that is not how the tiles-definitions example is set
up.  The message is from August 2001 so I assume that advice is no longer

My web.xml, less the filters and security stuff:

  <!-- Standard Action Servlet Configuration (with debugging) -->

  <!-- Standard Action Servlet Mapping -->

The relevant bits of struts-config for '':


    <action    path="/testAction"
               scope="request" >
      <forward name="success"
path="/WEB-INF/jsp/tilesTest/tabsTest.jsp" />               
  <message-resources parameter="ApplicationResources"/>


tabsTest.jsp merely has:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles" %>

<tiles:insert definition="" flush="true" />

And what the heck, this is already really long, so here's tiles-defs.xml:

  <!-- Master layout and default tiles used by all pages -->
  <definition name="examples.masterPage"
	  <put name="title"  value="Tiles 1.1 Examples" />
	  <put name="header" value="/WEB-INF/tilesTest/header.jsp" />
	  <put name="menu"   value="/WEB-INF/tilesTest/menu.jsp" />
	  <put name="footer" value="/WEB-INF/tilesTest/footer.jsp" />
	  <put name="body"   value="/WEB-INF/tilesTest/body.jsp" />

  <!-- tabs page -->
  <definition name="" extends="examples.masterPage">
	  <put name="title"  value="Tiles 1.1 Tabs layout example" />
	  <put name="body"   value="examples.tabs.body" />

 <!-- body using tabs -->
  <definition name="examples.tabs.body"
path="/WEB-INF/tilesTest/tabsLayout.jsp" >
	<put name="selectedIndex"  value="0" />
	<put name="parameterName"  value="selected" />
    <putList name="tabList" >
      <item value="Doc Home"		   link="/WEB-INF/tilesTest/a.jsp"
      <item value="Quick overview"	   link="/WEB-INF/tilesTest/b.jsp"


As you can see, I've stolen most of this from tiles-docutmentation webapp.
Obviously I missed one or more things, becasue that webapp works and mine

Hopefully someone who has done this before will immediately see what I've
missed. :)


Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message