JSTL <c:out value="${ -- defined as String but displaying boolean true  -- java 1.3 / 1.4 difference

Posted on 2005-03-28
Medium Priority
Last Modified: 2013-11-24
Ok, I doubt I'll give enough information the first time.  I have a VO that is being returned that is a String -- "Y" and/or "N" (coming out of a database)  -- when I use the tag to display it

<c:out value="${vo.flagIWant}"/>  it displays on the screen as true or false based on whether it was Y or N out of the VO.

This is on weblogic by the way and this did not happen on WLS 7 jdk 1.3..but is on WLS 8 jdk 1.4.

any thoughts?  
Question by:greedy1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 29

Accepted Solution

bloodredsun earned 600 total points
ID: 13646585
I think that this is JSTL performing value coercion. One of the things that JSTL tries to do is to make the values you pass it weakly typed and then convert automatically into the correct java type (String, boolean, int etc).

You could try adding an empty string to the expression to try and prevent this.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question