| 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  |
| Niranjanravi |
| |
| |
| Answer | During servicing any request the container will create a
thread or will get a thread from a thread pool.  |
| 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  |
| Niranjanravi |
| |
| |
|
|
| |
| Answer | For every request servlet container will create a new
thread and service method is called  |
| 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.  |
| 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.  |
| 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.  |
| 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  |
| 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.  |
| Janet |
| |
| |
| Answer | Actually wonderful answer thank you  |
| 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..  |
| 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()
 |
| 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  |
| 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  |
| 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();  |
| 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>");  |
| 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.  |
| Ashokmail.java@gmail.com |
| |
| |
| Answer | Jtree is a tree wich is used to disply the items in tree
view.  |
| 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  |
| 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  |
| 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.  |
| 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.*  |
| 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  |
| Sathiq |
| |
| |
| Answer | BorderLayout is the default lay out of contentpane.  |
| Guest |
| |
| |
| Answer | Border layout  |
| Manikandan |
| |
| |
| Answer | borderlayout  |
| Pavani |
| |
| |
|
| |
|
Back to Questions Page |