set the value of a object in request scope
I have the object in my req scope. I need to set value to one of the object attributes if that attribute is blank. How can I set its value.
<c:set var="benefitVO" value="${requestScope.BenefitVO}" />
I need to set the following Object attribute value, if it is blank.
something like > benefitVO.setBnftCd("asdf");
How can I set it using JSTL tags?
any ideas
Thanks
[468 byte] By [
sai_suna] at [2007-11-26 20:16:58]

# 2
> I need to set value to one of the object attributes if that attribute is blank.
This is some kind of a default value that you want, then? If so then just take care of that when you output it. Use <c:if>, and if the attribute is blank then output the default value, otherwise output the attribute.
Or have the servlet that created that request attribute take care of that requirement.