Dok I am confused here: do you use Struts 1 or 2? If it is another question, please create a new thread. And if it is a Struts 2/Tiles 2 plugin issue, please ask the Struts Users Mailing List: http://struts.apache.org/mail.html
Antonio 2007/11/18, doktora v <[EMAIL PROTECTED]>: > > I have tried this now with struts2 and tiles2 and it doesn't seem to > work either. > See the attached war. Take a look at /s2t2/test.action > > The success of test.action maps to tile test.layout: > > <definition name="test.layout" template="/testlayout.jsp"> > <put-attribute name="menuclass" value="leftmenu"/> > <put-attribute name="bottom" value="/bottom.jsp"/> > </definition> > > Here is testlayout.jsp: > --------------------- > <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> > <tiles:importAttribute name="menuclass"/> > <html> > <body> > test layout > <hr/> > <tiles:insertAttribute name="menuclass"/> > <hr/> > <tiles:insertTemplate template="/bottom.jsp"> > <tiles:putAttribute name="menuclass" value="${menuclass}"/> > </tiles:insertTemplate> > </body> > </html> > > An now here is what bottom.jsp does, inserting an action as a template: > ----------------- > <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> > <tiles:importAttribute name="menuclass" ignore="true"/> > > bottom jsp page > <br/> > menuclass: <tiles:insertAttribute name="menuclass"/> > <hr/> > <tiles:insertTemplate template="/test2.action"> > </tiles:insertTemplate> > ---------- > > test2.action works, /s2t2/test2.action produces the text "test2layout jsp > page". > > However, what bottom.jsp renders is > "The requested resource (/s2t2/test2.action) is not available" > in place of where the action's result should be inserted. > > Any thoughts? (Sorry for the complicated jsp/tiles, I was testing out > a few other things as well.) > > The war file is available here: > http://www.speedyshare.com/399123758.html > > Dok > > > > On 11/18/07, doktora v <[EMAIL PROTECTED]> wrote: > > On 11/18/07, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > > > 2007/11/18, doktora v <[EMAIL PROTECTED]>: > > > > You mean struts1 and tiles2 w/o plugin? How? If I specify the tiles > > > > listener in web.xml and don't specify the plugin in > struts-config.xml, > > > > the tiles are not recognized (I get errors of the sort "path does > not > > > > begin with /"). > > > > > > You can use it without a plugin: > > > 1) by rendering using the Tiles container. See: > > > http://tiles.apache.org/tutorial/basic/pages.html > > > 2) by using the Tiles dispatcher servlet. See: > > > http://tiles.apache.org/tutorial/advanced/utils.html > > > > > > The drawback is that you cannot use a Tiles definition as a Struts > forward. > > > > Hmm... that doesn't fit my specs unfortunately. Thanks though. > > > > > > > > Antonio > > > > > >
