ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories >> Software >> Java-Related
 
  J2ME (99)  Java-Related-AllOther (21)
 


 

Back to Questions Page
 
Question
How threads are implemented in servlets?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
internally the threads are implemented in servlets
 
0
Niranjanravi
 
 
Answer
During servicing any request the container will create a
thread or will get a thread from a thread pool.
 
0
Ravikiran(aptech Mumbai)
 
 
Question
How multiple simultaneous requests can be handled by 
servlets?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
using Threads
 
0
Niranjanravi
 
 
 
Answer
For every request servlet container will create a new 
thread and service method is called
 
0
Sudheer
 
 
Question
How servlets can be automatically reloaded?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
depends on the servlets reload properties.
 
0
Niranjanravi
 
 
Question
How to run a servlet program?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
We have to Make a WEB-INF folder and under it classes 
folder. In WEB-INF we have to write web.xml .

Our compled servelet class file should be stored in classes 
folder.

Make a war file using jar & deploy in Web.
 
0
Subrahmanyam
 
 
Answer
The structure of the web app. is
demo[root]
 - all jsps will go her
 - WEB-INF
   - web.xml
   - tld files
   - classes
     - all java class files will go here

Compile all the files and create a war file
copy the war file into Tomcat_root\webapps folder
if you use weblogic or webspehere the deployment will be 
different.
 
0
Anji
 
 
Question
Can threads be used in Servelet?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
yes
 
0
Niranjanravi
 
 
Question
What is the difference between doGet and doPost?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
1. doGet() method is used to get information ,while    
doPost() method is used for posting information.
2.doGet() requests can't send large amount of information 
and is limited to 24-255 characters.How ever doPost() 
requests passes all of it's data ,of unlimited length.
3. A doGet() request is appended to the request URL in a 
query string and this allows the exchange is visible to the 
client,where as a doPost() request passes directly over the 
socket connection as part of its HTTP Request body and the 
exchange are invisible to the client.
 
0
Janet
 
 
Answer
Actually wonderful answer thank you
 
0
Sfsf
 
 
Answer
do get() is used for passess the information limited amount 
of data.

do post() is used for passess the information.and it send 
unlimited data..it is providing more secure compare 2 do get
() method..
 
0
Ram
 
 
Question
What are the difference between HttpServlet and 
GenericServlets?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
The diff is that inGeneracicServlet we had to implement the 
service()method the GenericServlets service() method is 
declared as abstract.But the Generic Servlet is not 
implementing keeping the HttpSErvers in mind. Methods we 
have in this class are
init()
log()
service()
While implementing the HTTP Servlet the service() method is 
already implemented .service()method of HTTP sevlet is 
declared as protected.the HTTPServlet is  implementing 
keeping the HttpSErvers in mind. Methods we have in this 
class are
doGet(),doDelete(),doPost()
 
0
Niranjanravi
 
 
Question
Is it possible to send a mail from a servlet? Explain?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
yes we can a mail through mailAPI
 
0
Niranjanravi
 
 
Question
Can we use servlets in JavaScript?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
NO
 
0
Subrahmanyam
 
 
Answer
we cant use servlets in javascript but we can call a 
servlet by retrieving the form and setting the action as 
the url.
ex:if our html has a from named 'XXX'

 var formName = document.getElementById('XXX');
 var url = contextPath + '/desiredServlet';
 formName.action = url;
 formName.submit();
 
0
Balu
 
 
Question
Can we use javascript in Servlets?
Rank Answer Posted By  
 Question Submitted By :: Guest
This Interview Question Asked @   Wipro
I also faced this Question!!   © ALL Interview .com
Answer
Yes you can,
  In 
     PrintWriter out=response.getWriter();
     out.println("<script langauage='javaScript'>");
     out.println("your code here");
     out.println("</script>");
 
0
Gsrgsrgsr
 
 
Question
What is the use of JTree?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
JTree is one of component which is used to display the 
items in tree view.
 
4
Ashokmail.java@gmail.com
 
 
Answer
Jtree is a tree wich is used to disply the items in tree 
view.
 
0
Nagesh
 
 
Question
What is JTable and what is its purpose?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
JTable is a Swing Componenet which is used to show the datas
in table format. It contains many custom models
 
0
Sathiq
 
 
Answer
We can make it like spreadsheet and we can modify the
cells for JTextField, JCheckBox , JComboBox etc., by using
TableCellEditor.

To design an input dialog for Student database
we can make it by simple table by using JTable and
TableModel no need to design dialog with JButton and 
JLabels with Layout
 
0
P.sakthivel
 
 
Answer
With the JTable class you can display tables of data, 
optionally allowing the user to edit the data. JTable does 
not contain or cache data; it is simply a view of your data.
 
0
Shrikrishna Kashid
 
 
Question
Explain the differences between an applet and a Japplet?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
Components are basically of two types AWT(abstract window 
tool) components and swing components. The swing components 
provide better look and feel and they are light weight 
components compared to awt components. Swing components are 
derived from the javax.swing.* package and they are 
prefixed with 'J'(like JFrame,JButton,JApplet)....applet is 
derived from the package java.applet.*
 
0
Chandra Rekha
 
 
Question
Default layout for a ContentPane in JFC?
Rank Answer Posted By  
 Question Submitted By :: Guest
This Interview Question Asked @   HCL
I also faced this Question!!   © ALL Interview .com
Answer
Border Layout
 
0
Sathiq
 
 
Answer
BorderLayout is the default lay out of contentpane.
 
0
Guest
 
 
Answer
Border layout
 
0
Manikandan
 
 
Answer
borderlayout
 
0
Pavani
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com