Well you learn something new everyday, I wasn't aware that ${X} worked like <c:out value="${X}/>
Also you talk about the DATA_PHOTO_HEIGHT and DATA_PHOTO_WIDTH properties being static propertys of the AuthorController class. Why not create a Constant object called PHOTO or something. make the height and width proper static on that, then pass that into the model. Then you can use the following in your jsp page <img src="${imageUrl}" alt="Author photo" height="${PHOTO.HEIGHT}" width="${PHOTO.WIDTH}"/> Which doesn't seem that bad to me. With your spring setup you could also create an HandlerInterceptor [1] and add it to your url mapping, that adds the PHOTO object to the model after the controller has process the request, so as not to clutter up your controllers. [1] http://www.springframework.org/docs/api/org/springframework/web/servlet/HandlerInterceptor.html On 6/22/07, Hassan Schroeder <[EMAIL PROTECTED]> wrote:
On 6/22/07, Nikola Milutinovic <[EMAIL PROTECTED]> wrote: > > <img src="${imageUrl}" alt="Author photo" height="<c:out > > value="${DATA_PHOTO_HEIGHT}"/>" width="<c:out > > value="${DATA_PHOTO_WIDTH}"/>" /> > > (sigh) I feared as much. It is just that I hate JSTL tags inside another tag's attributes. Why would you use `src="${imageUrl}"` and then use the clumsy 'c:out' form? What's wrong with `height="${DATA_PHOTO_HEIGHT}"`? > Is there perhaps some useful function taglib? That said, writing your own tag libs is pretty easy, and worth while if it's something repetitious. YMMV, -- Hassan Schroeder ------------------------ [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]