Forums Register Login

Bug Interpreting HTML Tag in Java Bean using c:forEach

+Pie Number of slices to send: Send
CategoryModel.java


CategoryAction.java


category.jsp


The thing is everything ok, and the array of bean is generated correctly and with forEach item i can iterate through the array, and show them. But the ${item.subcategoryDescr} is written exactly as the code above on the screen. The <A> Tag is not interpreted into the Html, in order to show the result. the page is like this:



which should be like :


I put some html tag in bean object, and try to show them on the page, which it worked correctly. but for the Array Object, and forEach tag, it's not work correctly?

Could you see where I was doing something wrong?
[ November 28, 2008: Message edited by: Khosrow Moossavi ]
+Pie Number of slices to send: Send
Refer to the JSTL Specification for the behavior of <c:out>. You should easily see what is happening and how to prevent it.
+Pie Number of slices to send: Send
Thanks a lot Mr. Sheriff!
I really didn't expect that would be the source of my problem.
+Pie Number of slices to send: Send
That's the default behavior of <c:out> in order to help prevent cross-site scripting security issues.
A berm makes a great wind break. And we all like to break wind once in a while. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1227 times.
Similar Threads
unable to display bean property using ArrayList
How to display arraylist value in jsp, using JSTL tags?
Display using DataTable
Beans and c:forEach
How to use for loop inside of dropdownlist at jsp?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:57:04.