Abhijeet Dalal

Greenhorn
+ Follow
since Dec 24, 2009
Abhijeet likes ...
Eclipse IDE Java
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 Abhijeet Dalal

Hello gudim,
I need to see you console in following 2 cases, please do provide me the entire console:
1. Add your project in the server and clear the console. Now restart your server. Once the server is restarted go to console and copy all the stuff.
2. Now clear the console and run your app, once you get the blank page send me the console output.
14 years ago
JSF
Hello gudim,

Your code seems right. Could you just do following in index.jsp (if your jsp file is HelloWorld.jsp and not helloworld.jsp)

Replace:




With:

14 years ago
JSF
I would agree with Ulf and put my view or rather what I understand,
A web server would just serve the files those form Web Pages to the Users.. Its just like answering queries to the questions(asked by people simultaneously) by the person on the inquiry counter of an bank.
And for executing applications containing EJB's (which need EJB container) and other such modules which form a full fledged enterprise applications we need an Application Server.
An application server can play the role of a web server.
14 years ago
My understanding of a final method is that a method is made final when we know what exactly is expected out of it and the behaviour is common to all subclasses. And one should be very careful in making a method final, thats the part of the designer who would design the classes. It's better to be very clear to why the method should be final.

Now the part for unit testing a final method. Suppose we have a final method myFinalMethod(parameters) in the class MyClass. This method has a very strict behaviour and returns a object of say a String. This string is a known string to the business/designer/developers i.e. a particular pattern. You use Junit for unit testing, which has a method called assertEquals(). This method has 2 parameters one is the expected output and the other is the output from the method.

In our example the code snippet would look like:



This is just a small example and we can think of different ways to handle final methods. I am not sure whether you are looking for something like this and I don't see any need to override a final method if we have clear understanding about why we need a final method.
14 years ago
Hey Venkata,
I found below link that may answer your question.

http://www.jroller.com/mert/entry/state_saving_method_client_side
14 years ago
JSF
Hello Marco,
I thought of putting some comments here as I have been thinking a bit on this lately. I would rather think of future maintainance of a project. And this would probably say that it's better to have final methods in your classes, since the project may land in the hands of a new coder rather an inexperienced person. In this case and at such experience the coder would try changing the overridden method (which typically should not have been overridden) unknowingly and create a huge impact on the overall flow. Such things are little bit difficult to track and waste unnecessary time.
That was one point for the final methods, the other point would be knowing whether in future you are going to extend the class method or not. This depends entirely on the designer that how he/she designs the project and while in the process of designing he/she should know what methods should be overridden and what methods should not. I don't remember any scenario where one would change the design to overridde a method which is declared as final.
14 years ago