Register / Login
Win a copy of
Java 9 Revealed
this week in the
Features new in Java 9
this forum made possible by our volunteer staff, including ...
Roel De Nijs
Stephan van Hulst
Values not getting set in bean
posted 6 years ago
What's the difference between:
<jsp:useBean id="orderBean" class="mybean.OrderBean" type="mybean.OrderBean" scope="session"/> <jsp:setProperty name="orderBean" property="*"/>
<jsp:useBean id="orderBean" class="mybean.OrderBean" type="mybean.OrderBean" scope="session"> <jsp:setProperty name="orderBean" property="*"/> </jsp:useBean>
Aren't they same?
When I try to set values in one of my sample application, it works when I use the first code snippet but doesn't work for the second one. No exception thrown, just the values are not getting set in the bean.
It is sorta covered in the
JavaRanch Style Guide
Boost this thread!
jsp:useBean and default scope (head first mock exam question)
how to access a bean that has bean created by <jsp:useBean> tag?
Creating a bean in session scope
how to re set a existing bean
how to get the values in a servlet? the values are set in a bean using jsp