You can use <tiles:getAsString name="arg3" ignore="true" />. This disable
exception throwing if attribute is not found.

  Otherwise, you can 'import' a tile attributes to a jsp context by using
<tiles:importAttribute ... />. Check tiles tag syntax
(http://www.lifl.fr/~dumoulin/tiles/doc/tilesTags.html) for more.

    Cedric

David Corbin wrote:

> I've begun using the tiles taglib to create a standard look and feel.
> Basically, in one page, I'll have:
>
> <tiles:insert template=".../standardPage.jsp">
>     <tiles:put name="arg1" value="2"/>
>     <tiles:put name="arg2" value="3/>
>     <tiles:put name="body" value="4>
>         .
>         .
>         .
>     </tiles:put>
> </tiles:insert>
>
> Then, in my ".../standardPage.jsp", I'll use <tiles:getAsString
> name="arg1">, etc.
>
> This works OK.
>
> But, it would be real nice if I could say <tiles:getAsString name="arg3">
> and it would blow up because arg3 wasn't defined.  Perhaps an
> 'required="false"' attribute.  Or, if the things were stored as beans or
> regular request attributes, I could use other standard (struts) tags to work
> around this.
>
> Thanks.
> David Corbin

Reply via email to