gayatri ganesh

Greenhorn
+ Follow
since Jan 18, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
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 gayatri ganesh

In HFSJ book page 447, they have some key points for <c:set> . In the last comment they say

"If the targetexpression is a bean,but the bean does not have a property that matches "property" the container throws an exception. But be careful because the EL expression by itself will NOT cuase an exception if the preoperty does not exist. So even though ${fooBean.notAProperty} won't cause an exception by itself(it justt returns null),if that same notAProperty is the value of a "target" attribute the Container throws an exception."


According to this line, if I have something like ${person.empID} and empID is not a property of that bean,I should not get an exception.

But I get the follwing exception when I print ${person.empID}

javax.servlet.ServletException: Unable to find a value for "empID" in object of class "com.example.Person" using operator "."org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.customtag_jsp._jspService(org.apache.jsp.customtag_jsp:150)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.example.ListenerTester.doGet(ListenerTester.java:64)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Please clarify

Thanks
Congrats Ravi

Gayatri

18 years ago
Hi Ravi,
I gave the exam last week. I felt K&B book was enough and I got 100% in collections. I studied collections only from the K&B book.

Gayatri
All the mock exams are available in this web site

http://www.javaranch.com/mock.jsp

This is Corey's tipline

http://radio.javaranch.com/channel/corey/2004/05/05/1083766724000.html



By writing code i meant both. You can use a mock exam as a learning process. Just cut paste the code and view the results. You can also write simple code and work it out.

This helps a lot

Gayatri
18 years ago
Hi amit,
I would have prepared for SCJP for 2 months. I used K&B book for preparation. I think that book is sufficient for the exam. I first read the whole K&B book once and solved all the self-test. I was not confident at that time. SO I revised the book again until I understood the concepts.
Corey's SCJP tipline is a good reference material for many concepts. I worked out lot of code. Then I started taking mock exam from Dan chisolm. Since I didn't have enough time I took only the comprehensive tests.

Other than that some of the mocks that are very helpful are

Master Exam (This i took one day before the exam. It helped me a lot)
Marcus green - 3 mock exam
Tests from Javaprepare web site
Poddar's Questions (for equals)
Sreenivasa Kumar Majji's Questions

I feel the first two mock exams I mentioned are good enough. But solving others will give you some confidence.
Before the exam I went through the two minute drill and the exam watch in K&B.

Work out lots of code. Take mock exams constantly. If you understand the concepts you are ready to take the exam.

I feel the exam was not very tough.It is easier than Dan's and comparable to Marcus green's exams.


Hope this helps

Good luck

gayatri
18 years ago
Hi,
I just passed SCJP exam. I would like to prepare for SCWCD. I have no experience in JSP or servlets. Can someone guide me how to prepare for SCWCD ?

I see that HFS is the popular book for the exam. Can I use that for my exam and for learning basics of JSP and servlets ? I would greatly appreciate if anyone can answer my queries ?

Thank you
gayatri
Hi,
I cleared SCJP today with 98%. Feeling very excited about it. I made one mistake in Threads.

Thanks to javaranch, K&B book , marcus green mock exams and Dan Chisolm exams.

I feel K&B and marcus green mock exams are more than enough for getting a good score.



Gayatri

18 years ago
Hi,
This is a line from K&B book

"About the only thing you can guarantee is that if you
are running very low on memory, the garbage collector will run before it throws an OutOfMemoryException."

So a java program never throws an OutOfMemoryException. Is this correct ?

Thanks

Gayatri
So when a thread is executing the run method in ThreadB (Line 19) the main thread will be blocked and it will not enter the synchronized block in ThreadA (line 6) . Am i correct ?

Thanks
gayatri
Hi,
I have a basic doubt in Threads. I understood that each object has only one lock.

1. class ThreadA {
2. public static void main(String [] args) {
3. ThreadB b = new ThreadB();
4. b.start();
5.
6. synchronized(b) {
7. try {
8. System.out.println("Waiting for b to complete...");
9. b.wait();
10. } catch (InterruptedException e) {}
11. }
12. System.out.println("Total is: " + b.total);
13. }
14. }
15.
16. class ThreadB extends Thread {
17. int total;
18.
19. public void run() {
20. synchronized(this) {
21. for(int i=0;i<100;i++) {
22. total += i;
23. }
24. notify();
25. }
26. }
27. }

So does it mean that the run method in ThreadB class will not be executed until the wait() is executed in ThreadA. Hope I was clear.

Thank you
gayatri
Thanks Mike. I will keep that in mind

Gayatri
18 years ago
Hi Razvan ,

The questions collections are good.

Thanks

Gayatri
Congrats Vivek

I am taking my scjp in two days. I have taken Marcus exam and most of Dans.
Can u give me some final preparation tips and topics to concentrate

Thanks

Gayatri
18 years ago
Hi Ramya,
Its becuase you have declared vector inside a block. So the vector v is visible only inside that block. It is not visible in another method.

Try this

import java.util.*;
public class A
{
final Vector v;
{

v = new Vector();
}
public A()
{

}
public static void main(String[]arf)
{
A a = new A();

}
public void some()
{
System.out.println(v.isEmpty());

}
}

you also have to import java.util.*

Hope this helps

gayatri
Congrats Shandilya .

I am planning to take SCJP on feb 14th. Are some topics like Threads more difficult than the mock exams. Is the exam standard closer to Marcus or Dan Chisolm

Thanks .

Gayatri
18 years ago