Nabila Mohammad

Ranch Hand
+ Follow
since Nov 05, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nabila Mohammad

Thanks Tsang. That helps alot ! Now i need to decide what i need to study for
Java Ranch has given me the best experiences for understanding Java . Love being a part of it .. and Big Cheers to all those who make it successful!!
Can some one please help me with this...
HI ,

Just wanted to check if i will be eligible to give OCEJWCD
I have SCJP 1.4 certification in 2008 but some how never got around to give SCWCD Exam.
I was hoping to give it now but now i am not sure of my Eligibility .Is it mandatory to give upgrade exam?
Please let me know what options I have and what books i can use for the exam
Also what would be a better option Web component or Web services that is more sought in the market. Your inputs would really help me. feeling clueless!!


Thanks,
Nabila
Hi
I am trying to run a simple program to test cookies .
I have a form.html in which takes user input ( via CookieTest.java) and passes it on to a jsp (cookieresult.jsp ) which inturn passes on to another servlet (CheckCookie.java) .

The problem is it's not giving me the value of the parameters which were inserted in the form .html , even though it works fine till the jsp. I just get null values in the last servlet.

I am not very clear with concept to know if I am doing it right , or how it should be done to get the output.

Here's the code.

Form.html




CookieTest.java




cookieresult.jsp




And finally CheckCookie.java





Thankyou.
Now i get it !
Thanks a ton !
Thanks for all the time you have spent on the explanation . it helped !

I do have a question , regarding "customer"

So Customer is an instance of a Person.

${sessionScope.customer.address}

Which address is being mentioned here , is the Java Bean Address -OR- Person property address?
And if it's the Person property address , how is it accessing "city" which is a property of the Java Bean Address?

I hope I framed the question correctly. I guess I am missing the link between the Java Bean Person and the Java Bean Address .
This is one of the questions in HFSj (pg492)

A JavaBean Person has a property called address.The value of this is property is another Java Bean Address with the following string properties : street1, street2, city, stateCode and zipeCode.
A Controller servlet creates a session-scoped attribute called customer that is an instance of the Person bean.

Which Jsp Code structures will set the city property of the customer attribute to the city request parameter?

A. ${sessionScope.customer.address.city = param.city}

B. <c:set target="${sessionScope.customer.address)" property="city" value="${param.city"} />

C. <c:set scope=session var="${customer.address}" property="city" value="${param.city"} />

D.<c:set target="${sessionScope.customer.address}" property="city"> ${param.city"} </c:set>

Ans. B,D

I am getting confused with the terms Property and Attribute of JavaBean.
I did figure out the right answer (only one) by the method of elimination rather then understanding


So a Java Bean Person has a property address would mean it has a getAddress() and setAddress() methods.
The value of this property Java Bean Address with the string properties..........................


I am losing it from here .. Can some one explain this programatically and how we arrived the answer?

Thanks!
Thanks Ashok! That answered all my questions for now.
Great explanation by the way
Sorry for the long delay in response...

Does that mean I have to configure/create a Realm to test any part of Security?

Thanks alot. That did make it a little clearer.

So since browsers maintain session , new window of the same browser will also share the same session . However , a different browser altogether will create a new session... Right?

(Still trying to settle it in my head !)

Could you explain (preferably with examples) how Request Attribute and Local variables are Thread Safe ?
I am getting confused with Servlets and Multi Thread (Synchronization and Locks)

"Synchronizing the service method will stop other threads from the same Servlet from accessing the Context attributes but it won't protect the access from a completely different Servlet or JSP"

From my understanding, I thought , after Synchronizing the Service() or doGet()/doPost() method, all thread would access the service method one at a time whether it's from the same or different Servlet.

How can other Servlet have free access to it ?
Can some one explain how exactly this works? or give me a link for a better understanding of Multi thread.

Couldn't find anything which was easy to understand the working ...

Always had problem understanding Synchronization and Multi Thread


Hi there!

I was going through the security chapter and wanted to see how it works . But i am not sure what files it requires,and it's location and how to invoke it. So um.. can some one give me a rough idea on this, so i can work on it ....

Thanks!
I personally believe it depends on your confidence and not just the scores you are getting.
You are the best judge of yourself.

Good Luck for your exam!