This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes JSP and the fly likes simple JSTL question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "simple JSTL question" Watch "simple JSTL question" New topic
Author

simple JSTL question

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
If I could output the value using
<cut value="${myClass.name}"/>

1. how to use scriptlet <% %> using System.out.println to outpput ?

2. how to trim that value using JSTL , like
<cut value="${ myClass.name.trim() }"/> , but this way doesn't work.

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61762
    
  67

As per forum instructions, please indicate what versions of JSP and JSTL you are using.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
JSTL 1.0 and JSP 2.0

Thanks
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

2. how to trim that value using JSTL

There is a fn:trim(string) function in JSTL, but I don't know if it is in 1.0. Check it.


[My Blog]
All roads lead to JavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61762
    
  67

Originally posted by Edward Chen:
JSTL 1.0 and JSP 2.0

Thanks


Not compatible. You should be using JSTL 1.1.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: simple JSTL question