explanation says :
To pass the Student object, you should write:
<mytaglib:studentTag student='<%=student%>' />
but whatever is in the jsp expression goes to out.println(). so <%=student%> will evaluate to whatever the toString method of Student class returns . right ? shouldnt we have used
<mytaglib:studentTag student='${student}' />
About Question enthuware.jwpv6.2.1169 :
Moderator: admin
Online
-
- Site Admin
- Posts: 10386
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.1169 :
As per Section JSP.1.14.1 (Request Time Attribute Values):
An attribute value of the form “<%= scriptlet_expr %>” or
‘<%= scriptlet_expr %>’ denotes a request-time attribute value. The value denoted is that of the scriptlet expression involved.
student='${student}' is valid as well if EL is activated.
HTH,
Paul.
An attribute value of the form “<%= scriptlet_expr %>” or
‘<%= scriptlet_expr %>’ denotes a request-time attribute value. The value denoted is that of the scriptlet expression involved.
student='${student}' is valid as well if EL is activated.
HTH,
Paul.
-
- Posts: 9
- Joined: Wed Jul 31, 2013 1:57 pm
- Contact:
Re: About Question enthuware.jwpv6.2.1169 :
Hi,
I actually picked "None of these" because I thought that there is a name conflict between bean name "student" and attribute name "student" in the mytaglib. So, is it OK to have same names for a bean name and attribute?
Thanks,
Victor.
I actually picked "None of these" because I thought that there is a name conflict between bean name "student" and attribute name "student" in the mytaglib. So, is it OK to have same names for a bean name and attribute?
Thanks,
Victor.
Who is online
Users browsing this forum: No registered users and 5 guests