Skip to main content

Posts

Showing posts from September, 2014

Java JDBC Connection and JSP

Today we will create JSP page which will show records in table fetched from MySQL database using JDBC Connection.
It is not best practice to do coding in scriptlet.Major disadvantages of coding in scriptlet are
Reusability: you can't reuse scriptlets.
Replaceability: you can't make scriptlets abstract.
OO-ability: you can't make use of inheritance/composition.
Debuggability: if scriptlet throws an exception halfway, all you get is a blank page.
Testability: scriptlets are not unit-testable.
Maintainability: more time is needed to maintain mingled/cluttered/duplicated code logic.

     TRY TO AVOID CODING IN SCRIPTLET. USE JSTL OR EXPRESSION LANGUAGE.

But we will do it here just for demo purpose and to built up coding confidence.
We will not waste time and let's start coding part.

Step 1 : create Dynamic Web Project in Eclipse
New --->  Dynamic Web Project
Create web.xml file and add it  in WEB-INF folder of project.
   WebContent ---> WEB-INF  ---> web.xml
It will …

Pipe Dream

When you demarcate the territory blindly to unknown people without understanding their history and society ,then you must have to face consequences and that territory will become Pipe Dream to all of them.

What British had done with their Asian colonies in 1947,till date India, Pakistan and china are facing territorial disputes.Each one claims their territory without consent with others.

Here we are speaking the Pipe dreams of territories which also known as Jammu Kashmir and Arunachal Pradesh regions


This Map present the Current Boundaries for understanding. If we are sitting in country which is not India, Pakistan or China,this image will not beset us.Not at all.

This Map present the China's 
 Official claim.So what ?If you are Indian and residing in Arunachal Pradesh, then may not know this at all. You don't need passport to travel China.Because Chinese official will understand that you are Chinese citizen and from South Tibet part. Oops, Oh my God,I don't know this…

Things You Should Know About Israel

Things You should know about Israel, the 100th smallest country, with less than 1/1000th of the world's population, can lay claim to the following:

1. The cell phone was developed in Israel by Israelis working in the Israeli branch of Motorola, which has its largest development center in Israel.
2. Most of the Windows NT and XP operating systems were developed by Microsoft-Israel.
3. Both the Pentium-4 microprocessor and the Centrino processor were entirely designed, developed and produced in Israel.
4. Voice mail technology was developed in Israel.
5. Both Microsoft and Cisco built their only R&D facilities outside the US in Israel.
6. Israel has the fourth largest air force in the world (after the U.S., Russia and China).
7. Israel has the highest percentage in the world of home computers per capita.
9. Israel produces more scientific papers per capita than any other nation as well as one of the highest per capita rates of patents filed.
9. Israel has the largest num…

What is object-oriented programming (OOP) ?

This is exerts from Steve Jobs interview,who explains what object-oriented programming is?

Interviewer :
Would you explain, in simple terms, exactly what object-oriented software is ?

Jobs : 
Objects are like people. They're living, breathing things that have knowledge inside them about how to do things and have memory inside them so they can remember things. And rather than interacting with them at a very low level, you interact with them at a very high level of abstraction, like we're doing right here.

Here's an example: If I'm your laundry object, you can give me your dirty clothes and send me a message that says, "Can you get my clothes laundered, please." I happen to know where the best laundry place in San Francisco is. And I speak English, and I have dollars in my pockets. So I go out and hail a taxicab and tell the driver to take me to this place in San Francisco. I go get your clothes laundered, I jump back in the cab, I get back here. I give you your c…