Help coderanch get a
new server
by contributing to the fundraiser

Kezia Matthews

Ranch Hand
+ Follow
since May 19, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Kezia Matthews

Hi All,
Can anybody help me in regard to my question? I think, I am missing out some setting that has to be done to get the jsp running. Unless I track down the problem, I won't be able to proceed any further....Could any of the JSP experts out there kindly help me out?
Thanks,
Kezia.
[ December 08, 2003: Message edited by: Kezia Matthews ]
Hi All,
I am new to JSP. Was trying out an example with java expression. I am not getting the evaluated expression in the output.
As preliminary steps, I have done the following.
- I have installed jdk; set the PATH variable to contain the bin sub directory, also set the CLASSPATH to point to the current directory.
- I have installed a Blazix web server and made it ruuning before executing my code.
The code is as follows being stored in the 'webfiles' directory under Blazix directory. The name of the file given is jsptest.jsp.
<HTML>
<BODY>
The time is now <%= new java.util.Date() %>
</BODY>
</HTML>
The jsp file when run displays only the text and not the evaluated expression.
Can anybody tell me whether I am missing out anything??
Thanks.
Kezia.
Hi,
I have given the extension .jsp
Can anybody help me on this?
Regards.
Kezia.
Hi All,
I am new to JSP. Was trying out an example with java expression. I am not getting the evaluated expression in the output.
As preliminary steps, I have done the following.
- I have installed jdk; set the PATH variable to contain the bin sub directory, also set the CLASSPATH to point to the current directory.
- I have installed a Blazix web server and made it ruuning before executing my code.
The code is as follows being stored in the 'webfiles' directory under Blazix directory. The name of the file given is jsptest.jsp.
<HTML>
<BODY>
The time is now <%= new java.util.Date() %>
</BODY>
</HTML>
The jsp file when run displays only the text and not the evaluated expression.
Can anybody tell me whether I am missing out anything??
Thanks.
Kezia.
Hi all,
I did not check my mails for quite sometime now. Hence a delay in reply.


very good question. From where did you get this question. which book or mock test ? can you share with us ?


The question was from Khalid A. Mughal's book on Programmer certification study.
Thanks to Rob for a very good explanation.
Regards.
Kezia.
Just wondered if Java provided an easier way out.
No more explanations required. I understood it. Thanks a lot.
Kezia.
Hi all,
Is the following statement true?
"Adding more classes via import statements will cause a performance overhead, only import classes you actually use"
Kezia.
Thanks for correcting me.
In the code above which I posted, both classes 'A' and 'B' belong to the same package.
I still don't understand as to why the compiler gives an error when I try to compile the finalize() method with the default (package) modifier. If the finalize() method is made public, the compiler does not flag the error.
I don't agree with you


default (friendly) is more restrictive than protected and that's why the compiler complains


I can prove my point.
If in the same package, I have 2 separate (independent) classes (say class A and class B), I can access the protected member of one class (say 'A') from another ('B'), even though, I do not extend from A in B.
If I have 2 packages and have class A in one and class B in the other, I would not be able to access the protected member of A from B, if I do not extend A in B.
This shows that default is less restricted than protected. Feel free to correct me, if I am wrong.
If this is true, then why does the compiler flag an error when I tried to override the method finalize() with the default access modifier?
Thanks.
Kezia.
Hi all,
I read in one of the books that, it is not possible to overload the finalize() method. Also that, in the case of overriding the finalize() method, the access modifier of the overriding method should not be more restricted than the 'protected' access modifier.
In the following example, I tried overloading the finalize() method. Compiler does not complain
I also tried to override the finalize() method, the overriding method having the default(friendly) access modifier, which is not less restricted than the protected modifier. In this case the compiler flags an error.

Can anybody please explain as to why the compiler 1. is allowing overloading of finalize() method?
2. flags an error if the access modifier is less restrictive than the protected access modifier?
Thanks a lot.
Kezia.
Yes, Simon. This is what I want.
But, I did not want to use a loop. I guess that it is not possible without a loop.
Thanks anyway.
Kezia.
What is the accessibility of such an inner class from the main function, if the class which defines main is a diferent class and not the outer class?