Rahul Jadaun

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

Recent posts by Rahul Jadaun

I'll put in my 2 cents :
I won't call it multiple inheritance. Multiple behaviour is more apt. Its like you can inherit from only one class(like 'Car' inherits from 'Vehicle') but can implement different behaviours (like Sporty, Spacious, Economical).
Yes, an interface is a contract. Its a blueprint of what the implementing class should do. The implementing class has to have the same methods as described in the blueprint and must return the same objects as the methods declare.

Its like the called class sits down with the calling class and says - 'We have had enough fights before. From now on, lets just decide on the behaviour you need from me. I'll implement it any which way I want but I am not letting you see how I do it!'
And the calling class says - 'Yeah.. who cares how you do it as long as you exactly do whatever behaviour we agree upon'

Benefits and Uses are :
1. Loose coupling : The code that calls an interface method, does not need to know anything about the implementation.
2. Runtime polymorphism : You can decide at runtime which implementation you want to send. Its all the same to the calling code.
3. Interfaces are also used as markers to denote certain type of behaviour.
14 years ago
I was just browsing to through the site and fell upon this post. Its informative and might be of help in my project.
Thanks everyone.
Hi,

We have a clustered application that sits on 2 weblogic servers. We are facing a problem with the application context attributes which, when saved on one server, do not reflect back on the other server.
We are having some values set as ServletContext.setAttribute(). When some user is forwarded to the other server by the load balancer, he/she does not see the updated values in the servlet Context.
I thought J2EE spec requires servers to keep application and session info in sync on clustered apps. Any ideas why this is happening and how this can be resolved?

Regards,
Rahul.
17 years ago
Hi,

I am trying to build a war for my application using Ant. I am getting a compilation error in a few jsps -

cannot resolve symbol
symbol : method getTotalSalesCerdit ()
location: class com.bofa.csar.dsowebplan.vo.ReportHeader
out.print(String.valueOf(rh.getTotalSalesCerdit())); //[ /DailyFinalRecap.jsp; Line: 375]

rh here is a bean class ReportHeader. The method above that cant be found is present there in this class(I have checked spelling and all).
Can someone help me out on this? What could be the reason for this error?

Thanks and Regards,
Rahul.
17 years ago
Hello People,

This is something that gives mixed response on the internet.
Is Struts MVC or Front Controller?

Please share your views.

Regards,
Rahul.
17 years ago
Hi,

If anybody is working on Dojo, please let me know.
We need to build a tree structure on our page. We will allow for drag and drop of nodes, which in turn will fire queries on the database.
I am totally new to Dojo/Ajax and so is my team, any help will be great.

Regards,
Rahul.
Hello people,

What do I have to do to make eclipse prompt for command line parameters.

Regards,
Rahul.
Hello All,

I have a regular struts application that I am refactoring. I am setting a few attributes into session in an action class.

objHttpRequest.getSession().setAttribute("reportsDate", strWebReportDate);

The control than flows to the business classes, hits the DB and returns back to load a jsp. In the jsp when I try to read those variables, I get a null pointer exception.

String strReportDate = (String)session.getAttribute("reportsDate");

Does any body have any idea, what could be the possible reasons. I have checked that the values are not being reset nor is their any session.invalidate() call.
17 years ago
Hello people,

I have this problem.
I have to show over 20000 records from the DB(database) in a jsp. I get 300 records at a time in the jsp and have a button to display the next 300 records.
On clicking this button, the form is submitted and the next set of 300 is fetched from the DB
To keep track of the set to be shown currently, I set an attribute in the session and increment it by one after every fetch.
The problem is, if a user is on the 6th set and goes to the first one by pressing the browser back button, then, on clicking fetch more, he will get the 7th set rather than the 2nd one. If the user is using browser's back button, how would I track which set of record is he currently seeing?

Regards,
Rahul.
17 years ago
Well done Chethan..

Good score..!
Thanks to all of you...!

Siddharth, to manage between work and the exam, you will need to firstly make sure you dont get way too much work, atleast during the last month of your prep. This may need some diplomacy. My senior were very understanding and gave only enough work to last about 8 hrs.
After that, I had made it a point to study 2 hrs in the office library itself. Then I would go back home and study another 2-3 hrs. On weekends, I put in 6 hrs per day.
Max, my score in jDiscuss varied between 74 and 92. In HFSJ final mock, I scored 78. In Whizlabs, my score was between 71 and 82.

Hope that is of use to some...
Hi guys,

Finally I cleared too. I have been waiting for 2 months to write this here in the forum, like I have seen many others.
Am a bit disaapointed with the score, was expecting upwards of 90%, but I know what the spec has to say in this case - 'A PASS IS A PASS...!'.
Here is what I did -
1. Total time - 2.5 months
2. HFSJ - 3 readings
3. Whizlabs and Jdiscuss papers
Didnt read the specs which cost me about 4 questions. But I am not repentant, cant read all those epics.I did SCJP(95%) and this back to back in 6 months along with a lot of office work too. I am feeling a bit tired and will take some rest before I decide on the next goal.
Best of Luck to all of you... I am going to have a big party tonight...!
Congrats Sharad

Good score...
My prep is also somewhat similar. 3 months, 3 readings, Whizlabs... Hope I am able to score equally well.. You people keep inspiring me.

Man I am really getting bored and want to get over with it. That smiling girl on the HFSJ cover page really irritates me now. Earlier she used to look so pretty, I completed my first reading in 25 days flat..
Anyways..congrats again, go have a big party...
Thanks Manikandan..!
That was a silly mistake on my part. I think I have been reading too much.


But here is some addition to the same problem.
Suppose class X implements the binding listener and in a servlet we have
req.getSession().setAttribute("key", new X());
req.getSession().setAttribute("key", new X());
req.getSession().setAttribute("key", "x");
req.getSession().removeAttribute("key");


Now, as far as I get it, when the 2nd object is added, the 1st one will be removed and its valueUnbound() will be called before the valueBound() of the 2nd element. So the order of listener method calls will be -
valueBound(), valueUnbound(), valueBound(), valueUnbound()
But the answer in the book doesn't confirm to this.
Tell me where am I going wrong.
/foo/bar is an exact match, and it can be only that. It cannot act as a directory match. For ..../foo/bar/.... to match, the url-pattern has to be a directory match like /foo/bar/* or /foo/*(a directory match is one that always starts with / and ends in /*)