I have misspell the Components Proposal URL ! try : http://gauss.ficsgrp.com/cdm/ Cedric Cedric Dumoulin wrote: > Hay, > > You can't use a java variable defined in a page inside included page. > You need to define your variable in a scope (here request, but can > also be session or application). > An alternative to your problem could also be : > <% String strToBeUsedByPageA = "Hello";%> <template:insert > template='aTemplate.jsp'> <template:put name=''myString" > value='<%=strToBeUsedByPageA%>' direct="true" ></template:insert> > > and use <template:get name="myString" /> > > You can also have a look to my "extended template proposal" at > http=//gauss.ficsgrp.com/cdm. You will find more solutions to pass > values to > an included template. > > Cedric > > As an example, another solution to your problem is (with extended > templates) : > <% String strToBeUsedByPageA = "Hello";%> <template:insert > template='aTemplate.jsp'> <template:put name=''myString" > value='<%=strToBeUsedByPageA%>' ></template:insert> > > and use > <template:useAttribute id="strToBeUsedByPageA" name="myString" /> > > value = <%="strToBeUsedByPageA" /> > > Hay Tran wrote: > > > Here is an example:// Here is the code segment for the enclosing tag, > > the template:insert ........<% String strToBeUsedByPageA = > > "Hello";%> <template:insert template='aTemplate.jsp'> <template:put > > name='PageA.jsp'></template:insert> // Here is the code segment for > > the enclosed file, PageA....The enclosing tag defined the > > strToBeUsedByPageA variable that is being displayed > > here:<%=strToBeUsedByPageA %>... // I get the error msg saying > > strToBeUsedByPageA is not define. Thanks for any help I can > > get. -Hay