Rhea Karnam

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

Recent posts by Rhea Karnam

I had the same problem too. In my case, my ActionForm had a couple of ImageButtonBeans (ofcourse, not intialized). I had overriden the action form's reset() method to reset the X and Y coordinates of the ImageButtonBeans. I was clueless why the exception was thrown. Initializing the ImageButtonBeans to new ImageButtonBean(), in the ActionForm's constructor solved the problem.
18 years ago
I had this replied in another forum. Looks like i need to check the "publish certificate" link in the certificate site. Let me try that and confirm if it works!
Thanks Bing, I'll try that tonight and let you know.
Thanks everyone for your wishes!
18 years ago
I cleared SCJP 3 weekends back (The score was 93%). I received the certificate in mail last week. But, i had assumed that I would get an ID or something (pretty much like how MS certified people get).
Also, does SUN give any url that you can pass on to potential employers to verify your certification status?
Not sure if this is the right forum to ask, though.
Cleared the exam 3 weekends back with an overall score of 93%.
Messed up with Threads... got only 75% in that area.
I am glad that I used the HeadFirst book by Kathy Sierra and Bert Bates.

I received my certificate last week. But, I am surprised Sun does not give any candidate id/number or any url that you can pass on to potential employers to verify your certification status.
Any one aware of anything like that?

Thanks!
18 years ago
Ok ...
I think i got the difference now...
I tried playing around a bit with some base and sub classes and here's what i inferred:
1. i dunno if the quoted stmt has anything do with the eligibility of a static method to be passed down to a sub class.
2. but, you can use the static method defined in the base class, in the sub class, with essentially the same results
3. when u "override" (or u think thats what u do) a static method, in the sub class, what you are essentially doing is hiding the Base.staticMethod's impl and giving an entire new implementation for the Sub.staticMethod() instead.
So, Base.staticMethod() is still very much different from Sub.staticMethod(), except for the fact that you can no longer say Sub.staticMethod() to call the Base's impl (by virtue of inheritence). That previlege is erased off because u now have your own method in its place.

I doubt if i make much sense here. But try writing a small pgm, and u will understand what i understood!

Thanks folks for the replies.
-Rhea
P.S. this reply is for ppl who had/have the same doubt that i had.
19 years ago
I thot i got it all correct, until i tried this out:

public class Base
{
public static int tryIt()
{
return 1;
}
}

public class Sub extends Base
{
public static void main(String args[])
{
System.out.println(Sub.tryIt());
}

--------------
and guess what??? it worked! I got the output as 1, and obviously no compilation errors. So, why is the static method not hidden? (Thats what i understood... that static methods are _not_ available for sub classes)...
19 years ago
Hi,
can someone help me make sense of this line (i am sure this is meaningful, only i can't understand what it means...)
"
Also, a subclass cannot override methods that are declared static in the superclass. In other words, a subclass cannot override a class method. A subclass can hide a static method in the superclass by declaring a static method in the subclass with the same signature as the static method in the superclass.
"
taken from: http://java.sun.com/docs/books/tutorial/java/javaOO/override.html
19 years ago
Hi,
I need to call a java class's main method from my program, with certain parameters. Also, i need to get back the exit value/ status of this called java class.
How do I do this from within my JAva program? Any pointers? I tried using the Runtim.exec() method, but that doesn't recognize my parameters. I tried calling the JavaClass.main(Args), but I don't know how to check for the exit value, this way...
Help pls!
Rhea
19 years ago
Hi,
Has anyone had any trouble with logging on to _only_ https sites? Like the java.sun's download pages...
Beats me why i can't, and I have tried my BellSouth DSL connection and my AOL dialup... both fail to let me get to any of the https sites (even msn's hotmail is a no-no for me now)...
And the cust support of both BellSouth and my Comp (Dell, BTW) are unable to fix the prob...
Anybody has any suggestions on how to solve this prob?
20 years ago
I obtain a Connection object to my Database thru JDBC, where the connection properties come from an external prop file.
I also have to call another java program within my code, passing in the connection details (like dbname, username, password etc.).
I figured out that i can get the user name, dbname, etc from the connection's meta data. But, what I can't manage is to find a way to extract the password detail from the Connection object.

My Questions are:
1. Am I doing the right thing in trying to extract the password details from the Connection object?
2.Is there some other way I can get the password info, in my code (other than accessing the props file)?
Can somebody help me out?
Hi,
I read that an abstract method cannot be final, static, native or synchronized.
Can anyone help me in understanding why an abstract method cannot be declared as synchronized?
In the following snippet, declaring the method as synchronized in class A turned out to be illegal. But, when I qualify the same method as synchronized in the child class, I don't get any compile time errors:
abstract class A
{
abstract void method1();
}
class B extends A
{
public synchronized void method1()
{
}
}
I expected an error because I thought that I can't alter the signature of an abstract method, while implementing it. Can somebody throw light on this?
Regards,
Rhea
21 years ago
Hi All,
I have two applications that are supposed to interact with each other.
So, when servlet1 of Application1 redirects a request to servlet2 (of Application 2), servlet2 parses the request url and behaves as expected. But, when servlet2 2 redirects back to servlet1 subsequently, I expect servlet1 to continue from where it was (before the request was redirected to servlet2). For this, I can guess that I need to save the details in the session. But, as I am navigating between Applciations, the values in the session are lost when I get back to Applciation 1.
Here are my doubts:
1. is my approach of saving details in the session and expecting to retrieve them back, ok?
2. to keep the session intact, what should I do?
3. is this where Serializing comes in?
Also, the requirement is that I can't encode the url to provide me these values, instead of using the session.
Can someone help me with this problem or guide me to some websites or books that can clear my doubts? Even help with keywords for google would be appreciated (The keyword combinations that I cud think of didn't help me)
Rhea.
21 years ago
hi, thanks for the info. Following this, if I return back to servlet 1 from servlet 2, will the values that I had stored in the session (before redirecting to servlet2) still be intact?
The scenrio is like this:
1. I store some values in the session , before redirecting to servlet2 from servlet1.
2. when servlet2 redirects back to servlet1, i want servlet1 to pick up the previously stored values and continue.
As it might be obvious, I am a beginner in this and not sure of my approach.
Rhea
21 years ago
Hi,
I understand that on saying response.sendRedirect(), a new request would be created (effectively, the previously existing request would be lost). But, will the existing session be still available thru request.getSession(false)?
The problem I am facing is:
1. I have two servlets running in my system, one for each application.
2. I want the values stored in the session to be shared between the two servlets (like When servlet1 redirects a particular request to servlet2).
3. Apart from composing a url with all the details needed by servlet2, I need certain other data to be taken from the session.
Is it possible?
21 years ago