Nitin Kumar

Greenhorn
+ Follow
since Apr 18, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Nitin Kumar

Hi Frits,

Frits Walraven wrote: go for SCBCD: it is very interesting!



Thanks for the suggestion. I will definitely think about it.

Regards,
Nitin
14 years ago
Thanks everybody !!!
14 years ago
Hi Everybody,

Yesterday I took the test and passed with 85% score.

It took me around two and half months to prepare for the exam and I followed these materials during the preparation

a) HFSJ: Gone trough the book two times completely and one quick revision before the exam. I would like to thank the authors for providing this wonderful book and would recommend it to everybody who wants to take SCWCD. This is a must read book.

b) Practiced questions from other books for SCWCD like Hanumanth Deshmukh and David Bridgewater. After the exam I feel that one can skip them if they have a time crunch. But , yes, they do help in learning (memorizing) small details.

b) summary provided by Frits Walraven under SCWCD Links

Mock test taken :
Niko's SCWCD exams, Marcus Green Mock Exams (only topic quizes) and finally HFSJ mock test in which I scored 65%.

I would to like to thank all the ranchers for their help and I take this opportunity to specially thank Frits and Ankit for their prompt replies to my queries.

I would like to thank Javaranch for providing such a valuable platform where everybody is willing to help.

I have observed that most of the doubts that come up while preparing for the exam have already been answered in this forum and a little search saves lots of time for us as well as for others.

What next? ... Still thinking .. may be SCBCD !!!

Regards,
Nitin
14 years ago
Hi Frits,

Thanks for the confirmation and yes your notes are really helpful.

Regards,
Nitin

Conclusion: no mistake in the the book.



That means bar["foo"] will throw an exception but NOT bar[foo] is this particular case ?

Regards,
Nitin

Are you sure order is relevant?
Because on Hanumant Deshmukh Book, SCWCD EXAM STUDY KIT SECOND EDITION
chapter 17, question 3, page 467 I read this:



In fact, I tested above JSP, while going through one of the questions of same book ( Chapter 17, Question 3). I was not very convinced with the explanation given and hence tried to test it my self.
Hi Frits,

Thanks for your reply. So it means we can put these attributes in any order.

Regards,
Nitin
Hi,

I want to know if the order of static and dynamic attributes matters or not, when we implement DynamicAttributes interface?

I have tested this feature with this jsp and found that order doesn't matter.



In this JSP subject is a static attribute and size a dynamic one.The second call ( line 05) to myTags is not throwing any error and the JSP is accessed successfully. Is it specific to the container that I am using or a general rule that static and dynamic attribute can appear in any order.

I have gone through the specs also , but couldn't find anything related to the order. Did I miss something?

Thanks
Nitin
Hi Christophe,

Thank you for the explaination. It means we should try to avoid using same attributes in different scopes.

Nitin
Hi,

I have this servlet : UseBeanTest.java



and this JSp : result.jsp



Person is a simle Java Bean having property "name".

When I access the Servlet, the output is

Person from getProperty: TestUser
Person from session:


I am not able to understand why "TestUser" is not shown in second line, since a session scoped attribute is successfully set, as verified by first line,

it works fine and TestUser is shown in both lines in these two cases

a) If I comment out the line 1) in servlet
b) Reverse the attribute scopes in Servlet and Jsp, i.e uncomment the lines 2) and 3) in Servlet and use scope = "request" in jsp

Please help me understanding the logic behind these observations

Regards.
Nitin
Hi Abimaran,

EL can have arithmetic expression like ${7-foo}

suppose, we have expression like ${first.second-third} , what will we interprate from it? Is it "third" sustracted from first.second or is it "second-third" property of "first" attribute.

To avoid such situation, I think, value after "." has to follow jave naming convention.

So, with naming convention the EL ${first.second-third} means "third" sustracted from first.second.

Regards,
Nitin
Hi Ankit & Parth,

After adding <security-constraint> and its sub-elements, it is indeed working. Thank you for your replies.

P.S: With firefox, I have to clear the cache after each successful login, otherwise it doesn't ask for the password. With IE it works fine.

Nitin
Hi,

I am reading Head First book and in the chapter of authentication. I want to test authentication for my already working application that I had developed while reading earlier chapters. I modified tomcat-users.xml and web.xml and used the same link to access the application that I used earlier. After making changes in those two xml files, according to the book, I should get the login page asking me for the user name and password. But I am directly going the application like before and tomcat doesn't ask for the password.
Please help me in identifying, where I am wrong or do I need to make more changes somewhere.

my tomcat-users.xml is


and web.xml is



Link to access the application is : http://localhost:8080/Beer-v1/form.html
and form.html is under webapps\Beer-v1

Nitin
Hi Ankit,

Thanks for the confirmation ...
In the chapter 'Collection's in K&B book, it is written many a times that

statement 1 " if x.equals(y) is true, then x.hashCode() == y.hashCode() "

and

Statement 2 "If you override equals() then override hashCode() ;

But the following code, which is also from K&B book, page 546, runs fine even though hashCode() method doesn't return same value and is not overwritten




this code gives output of " One and two are equal ". Two things that are confusing for me are :
a) Even if the hashCode() is not overwritten then how come two instances ( one and two) are equal ( seems to violate statement 2 )
b) Two instances are equal but one.hashCode() and two.hashCode() are not equal. ( seems to violate statement 1 )

After doing some more search I came to the conclusion that the above statements, are ONLY valid if the concerned classes are used in Collection Framework, i,e in Maps,Sets, Lists and Queues.

Could you please let me know if the above conclusion is correct or I am missing something.

Thanks