This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I used <jsp:useBean id="operson" class="Person" scope="request" > <jsp:setProperty name="operson" property="name" value="hi" Scope="request" /> <jsp:getProperty name="operson" property="name" Scope="request" /> </jsp:useBean>
But Tomcat throws up an Jsp Compile Time Error saying invalid attribute Scope in jsp:get and jsp:set tags that means we cant specify the Scope Attribute for these tags.
But in HFSJ page number 355 it is stated that the default scope for <jsp:useBean> and <jsp:getProperty> is Page scope I checked Errata nothing is specified about this.
I think we cant have scope attribute specified in the <jsp:setProperty> and <jsp:getProperty> tags.
Thanks
Musab Al-Rawi
Ranch Hand
Joined: Aug 06, 2007
Posts: 231
posted
0
There is scope attribute for the setProperty nor getProperty. you introduce the bean using useBean and there you specify the scope. Now whenever you se/get a property, you will be working on a bean that you have introduced using the useBean. i.e there is no point in having the scope again for get/set properties.
HINT specs.
SCBCD - SCWCD - SCJD - SCJP - OCA
dhwani mathur
Ranch Hand
Joined: May 08, 2007
Posts: 621
posted
0
Hi raja ram
i think in your code as per you have shown just note overhere:
May be this is leading to compiler error see below:>
and not
and what Musab Al-Rawi said is absolutely correct there is no point in giving scope while setting and getting properties,since we already decide the Bean scope in UseBean Tag.
I hope it help you to some extent.
SCJP(1.5),SCWCD(On the Way...) Dhwani:>Winning is not important but it is the only thing. [ May 06, 2008: Message edited by: dhwani mathur ]
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.