• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts1 tiles

 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
I have a properly configured tiles-defs.xml, have the tiles plugin configure in struts-config.xml and when I try a findForward([namedTilesDef]), it says ...not prefaced with /. What is the nomenclature to be able to forward to a tiles definition?
 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chris,

Can you put your code here?
 
Chris Pat
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks
Below is the tiles-defs.xml and the template. All that I am doing in my action is a simple mapping.findForward("defaultReport); and it is reporting unable to find forward "defaultReport". If I define a global forward it states defaultReport does not begin with /. How do I "hook" the forward designation into the tiles-defs? A catch-22. Can you help?
tiles-defs.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.3//EN"
"http://struts.apache.org/dtds/tiles-config_1_3.dtd"><tiles-definitions>
<definition name="defaultReport" path="/ccAuth15_template00.jsp" >
<put name="title" value="defaultReport"/>
<put name="report" value="/ccAuth15_PO_all.jsp"/>
<put name="applet" value="/ccAuth13_applet.jsp"/>
</definition>
<definition name="posSO" extends="defaultReport" >
<put name="title" value="defaultReport"/>
<put name="report" value="/ccAuth15_soDetail.jsp"/>
</definition>
<definition name="posPO" extends="defaultReport" >
<put name="title" value="defaultReport"/>
<put name="report" value="/ccAuth15_poDetail.jsp"/>
</definition>
</tiles-definitions>

ccAuth15_template00.jsp
<%@ page errorPage="ccAuth15_template00_error.jsp" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ taglib uri="http://struts.apache.org/tags-nested" prefix="nested" %>
<html>
<head>
<title><tiles:getAsString name="title" ignore="true"/></title>
</head>
<body bgcolor="#ffffff">
<tiles:insert attribute="banner"></tiles:insert>
<tiles:insert attribute="report"></tiles:insert>
<tiles:insert attribute="applet"></tiles:insert>

</body>
</html>
 
Chris Pat
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
What was needed to stop the error was below. Still a problem in that even though I can, the first time, process and forward to my tiles-defs on the second time I forward and NOTHING happens. No error, no re-processing of the page. The page as an applet in the footer and I am changing the report body depending on the state. How can it be a successful, forward does not change, force the reprocessing of the report body.
<init-param>
<param-name>chainConfig</param-name>
<param-value>org/apache/struts/tiles/chain-config.xml</param-value>
</init-param>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic