Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

java query

  Asked By: Joel    Date: Sep 04    Category: Java    Views: 656
  

1.kindly let me how u display 10 data in Jsp where i have 1000
employee details in employee list. it should b scrollable (next,
prvious)
2. why servlet called as controller why not JSP.
3. what is diffrence between doGET(), doPOST()
4. why they use do before GET & POST methods
5.what is exact diffrence between pageContext & page

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Roosevelt Jenkins     Answered On: Sep 04

> 1. diffrences between interface & absrtact class?
An abstract class is one that is partially defined and requires that
another class extend it to complete all of the method implementations.
An interface is like a class skeleton or blueprint. Any classes that
implement an interface must implement all of the methods described by
the interface.

> 2.diffrences between servlets & jsp?
jsp  page is just an HTML page  with embedded java  code that tomcat
will compile into a servlet  before sending the page to the client. So
in effect a servlet is just a compiled JSP page. JSP just gives a
development team the ability to separate the HTML coding from the Java
coding.

> 3. if ten threads r of same priority which will run first?
I believe either the system kernel or the JVM would pick any one of
them since they are all the same priority. Depends on the way threads
are scheduled.

> 4.is there data  base pool in tomcat ?
yes. go to the apache site and look at the tomcat JDNI pages.

 
Answer #2    Answered By: Rosie Hughes     Answered On: Sep 04

> I believe either the system kernel or the JVM would pick any one of
> them since they are all the same priority. Depends on the way threads
> are scheduled.

My understanding is that any one of the threads could fire first.

 
Answer #3    Answered By: Freya Brown     Answered On: Sep 04

1. Differences between interface & absrtact class?
a)Interface:-
They contain the method declarations and you need to implement them
compulsorily.
Abstact classes:-
In abstract class both method declarations and definitions are also
allowed.
You need not implement all the methods in the sublass as in interface.

You cannot create an object for abstract class.

2.diffrences between servlets & jsp?

Servlets are html within java  code
Jsp are java within html code.If we strictly observe the life cycle of jsp  ,a
jsp program will be converted to a servlet  program in runtime.nothing but a jsp
is a servlet program in disguise.

Servlets are used when data  is imp.
Jsp are used when Presentation is imp.


3. if ten threads r of same priority which will run first?
Thread concepts in theory wise is ok.when comes to practical wise,
we cannot predict which thread will come first .

 
Answer #4    Answered By: Dep Tran     Answered On: Sep 04

interface is only blue print of class.
no implementation is made in the interface level.
abstract class is class that cannot be instantiated.

the operating system and compiler will take care of
the prioriting of the thread. So, do not worry about
it. Mostly, thread initated in the same order is
called

servlet is full program enable to running the program
through internet explorer and web server.
whereas in JSP, it is the characteristics of the JSP
JSP is shortened way of calling the function.

 
Didn't find what you were looking for? Find more on java query Or get search suggestion and latest updates.




Tagged: