File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes jstl and tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jstl and tiles" Watch "jstl and tiles" New topic

jstl and tiles

Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102

Can I check the value of a tile:getAsString from a jstl tag. I have tried the following c:if however it is giving me a servlet exception

The exception thrown is as follows:

Basically I am using tiles to determine if a page should have a banner or not. I want that if in tiles-defs.xml the user does not set the tile element for the banner, then on the jsp page it does not try to load the image for it.

I do not know if there a simpler way to do this.

Thanks and Regards,
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

You cannot use a custom action as the attribute of another custom action, or as an EL expression.

[Asking smart questions] [About Bear] [Books by Bear]
Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
So is there a way how I can solve this?

Like putting the value of the tile expression inside a varialble that can be handled inside the jstl tag?

I agree. Here's the link:
subject: jstl and tiles
It's not a secret anymore!