Hi, Thank you Felix for showing me the correct way to use replaceSuffix. It works fine :-). I've also managed to use the resulting output as suggested by Bertrand.
Janandith On Mon, Aug 11, 2008 at 1:12 PM, Bertrand Delacretaz <[EMAIL PROTECTED] > wrote: > On Mon, Aug 11, 2008 at 9:33 AM, Felix Meschberger <[EMAIL PROTECTED]> > wrote: > > ...Create a new script, say suffixtest.jsp which contains the test code: > > > > String suffixTest = req.getRequestPathInfo().getSuffix() ; > > if(suffixTest==null){ > > suffixTest = "Suffix Not Successful"; > > } > > else{ > > suffixTest = "Suffix Successful"; > > } > > > > and which is included by suffix.jsp as > > > > <sling:include replaceSelectors="suffixtest" reaplceSuffix="/a.b" />... > > Having the included script do > > ... > %> > The suffix in suffixtest.jsp is '<%= > req.getRequestPathInfo().getSuffix() %>' > > And testing the resulting output in the junit testing code sounds more > flexible - that would allow suffixtest.jsp to be reused for various > tests. > > -Bertrand >