• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

JSTL discrepancy?

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<c:set var="tooltip" value="${bean.notes}" />
<c:set var="showtext" value="${fn:substring(bean.notes, 0, 60)}..." />

It turns out that fn:substring(bean.notes, 0, 60) mutates the String bean.notes so tooltip also ends up being truncated.

This is different behaviour from scriptlet code..

<%
String tooltip = bean.getNotes();
String showtext = bean.getNotes().substring(0, 60);
%>

In above tooltip will not be truncated (which is the expected behaviour).

Has anyone else seen this or its just a bug in the app server (Resin)?
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It works for me running Tomcat 5.
This is the page I put together to test it.

 
Sheriff
Posts: 67641
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also do not observe this behavior either under Tomcat 5.0.25 or under Resin 3.0.14.

What version of Resin are you running?
reply
    Bookmark Topic Watch Topic
  • New Topic