Hi All,
I am having 2 doubts.
1. Related to Anand Chawla 's Mock
Q 48 :-
If I am having two properties for a bean
say
int age ;
String name ;
If I am not setting these properties in
JSP page but I am trying to get these using getProperty
e.g.
<jsp:getProperty name="name1" property="age">
<jsp:getProperty name="name1" property="name">
I think the result for age and name should be 0 and null
But exam answer specifies it as
null and null
2.
Consider the following line in JSP page ....... assume body-content as EMPTY
<x:foo><%-- any comment --%></x:foo>
Tomcat does not permit it as Empty tag , whereas
I think as per JSP Spec it should be treated as empty tag.
Please refer JSP.2.3.4 Empty Elements of JSP Spec
which states that
"
As examples, the following are all empty tags:
<x:foo></x:foo>
<x:foo />
<x:foo/>
<x:foo><%-- any comment --%></x:foo>
"
Please advice where am I going wrong???
Thanks
Buggi.