| Back to Questions Page |
| |
| Question |
to update a batch in a table in jdbc which method of
statement object is used. |
Rank |
Answer Posted By |
|
Question Submitted By :: Shabbir |
| This Interview Question Asked @ Polaris , Tcs |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | to update a batch in a table Prepared Statement is used and
the method executeUpdate(), is used  |
| Chandran |
| |
| |
| Answer | we will call updateBatch on statement  |
| Prasad |
| |
| |
| Question |
to update a batch in a table in jdbc which method of
statement object is used |
Rank |
Answer Posted By |
|
Question Submitted By :: Shabb] |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | executeBatch();  |
| Smruti |
| |
| |
|
|
| |
| Question |
difference between sendredirect,forward and url rewritting |
Rank |
Answer Posted By |
|
Question Submitted By :: Mathi |
| This Interview Question Asked @ TCS , Tcs, Patni |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Both SendRedirect and forward is used to forward the
request to another resource. In case of forward() container
does not report to the browser,it is happend within the
container..so objects which are stored in request is not
lost..bt in sendredirect coantainer report to browser and a
new url is displayed..so objects which are stored in
request is lost..
URL rewriting is technique of session tracking.  |
| Md. Abid Hossain |
| |
| |
| Answer | forward is a teqnique used to delegate the response to a new
resource and happens on the server side.And we cann't
forward a response to a resource residing on different machine.
Sendrediredt is the techinque used to delegate the response to
other webapplication,which may reside on different machine
as well.
Url rewriting is a technique used for session tracking when
the cookies are disabled,to transfer the session id back and
forth between the clent and the server  |
| Ravikiran |
| |
| |
| Answer | SendRedirect():
1.
this is used to transform the request from one
container to another or from one web-application to another
or with in the web-application also
This happens at client side. this will applicable in
the same container as well as different container which are
located in different places.
2.
when ever browser sending the request to the
server. but that server is responsible to provide the
response for that request then that server delegates that
reuest(re-direct) to the same client with status code:302
and location of other server in which where we can get the
actual response fot that request.
3.
By seeing that status code:302, the browser creates
another request object and send to the another
servlet(anothere servlet) which is by seeing in location
header that was send by the first server.
4.
then the second server will responsible to generate the
actual response fot that request.
5.
here the request comes back to the cleint foa making
another request to another server right? so, there may be
chanse of traffic problems in the transimittin the request
or response.
6.
performance will automaticall reduce.
7.
after commiting the response to the client, we are
not allowed to use response.sendRedirect() method. if we are
use that, we will get RuntimeException saying
illegalStateException.
we can see on browser addressbar with new address of the
second server (servlet)
now.... forward():
1.
this is also used forward the request from one place
to another but it should be in the same web-container.
2.
it will happens at server side.
performance will increase compared to sendRedirect()
3.
after committing the response we are not forward the
request to another like sendRedirect()..  |
| Chandra Kunchala |
| |
| |
| Question |
advantages& 5 disadvantages of MVC architecture |
Rank |
Answer Posted By |
|
Question Submitted By :: Venkat |
| This Interview Question Asked @ Satyam |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | 1.modifieng in on logic dont distrube other lojics
2.clean separation of roles
3.easy to maintain and future enhancements
4.parallel devolopment
5.gives the good productivity
dis advantages
1.For parallel development there is a needed multiple programers
2.Kmowledge on multiple techmologies are required  |
| Vijay |
| |
| |
| Question |
what are the disadvantages of MVC architecture |
Rank |
Answer Posted By |
|
Question Submitted By :: M.venkatesh |
| This Interview Question Asked @ INDUS |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | that the old-scool programmers loose their job.
All in all it could make things harder if your application
is small, recomend you google to find something about it.  |
| Sdf |
| |
| |
| Question |
What is Struts Flow? |
Rank |
Answer Posted By |
|
Question Submitted By :: Balakrishna |
| This Interview Question Asked @ CTS , Rsystems |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | the flow execution of struts.
The browser makes a request to the Struts application that
is processed by ActionServlet (Controller).
ActionServlet (Controller) populates the ActionForm (View)
object with HTML form data and invokes its validate( )
method.
ActionServlet (Controller) executes the Action object
(Controller).
Action (Controller) interfaces with model components and
prepares data for view.
Action (Controller) forwards control to the JSP (View).
JSP (View) uses model data to generate a response to the
browser.  |
| Pradeep C |
| |
| |
| Answer | ActionServlet acts as a back bone to all the Struts
applications.
Flow:
-->First the request is handled by the either doGet()/doPost
() method of the Action Servlet and it calls the process()
mthod of its own.This method gets the Current Request
Processor associated with the request.
-->Then this request preocessor calls its preocess() method.
(Note:RequestProcessor also one type of Servlet).
This is the actaul place where the request is handled.
-->This method reads the struts-config.xml file and find
outs the Action class by seeing the request url path.
for ex:
incoming request trl path is:/login
struts-config.xml:
<action path="/login" type="Test.LoginClass">
<forward name="Succes" path="/Welcome.jsp"/>
<forward name="failure" path="/Login.jsp"/>
</action>
-->After identifying the Actio class it checks the whether
the request is associtaed with any form bean.This can be
checked by usin the name attribute of athe action element
from the struts-config.xml.
Ex:<form-beans>
<form name="loginForm" type="Test.LoginForm"/>
</form-beans>
<action-mappings>
<action path="/login"type="Test.LoginClass"
name="loginForm">
....
....
</action-mappings>
-->Then it creates the instance of ActionForm and calls the
corresponding getter and setter methods for the incoming
request parameters.Optionally we can validate the request
parameter by calling the validate()method in ActionForm.For
this we need to specify validate="true" and
input="/Login.jsp" in struts-config.xml file.
-->Now the actual request is handled by the Action class by
calling the execute() method.Output of this method
indicates the response of the request.The return type of
this request is ActionMappings ....  |
| Rajkumar |
| |
| |
| Answer | The Apache Struts development team has announced the
creation of a new sub-project: Struts Flow. "Struts Flow
originated at the struts.sf.net project and has been
formally adopted now as a Struts subproject. Struts Flow is
a port of Apache Cocoon's Control Flow to Struts to allow
complex workflow, like multi-form wizards, to be easily
implemented using continuations-capable Javascript and
eventually Java."  |
| Rajashree |
| |
| |
| Answer | ActionServlet acts as a back bone to all the Struts
applications.
Flow:
-->First the request is handled by the either doGet()/doPost
() method of the Action Servlet and it calls the process()
mthod of its own.This method gets the Current Request
Processor associated with the request.
-->Then this request preocessor calls its preocess() method.
(Note:RequestProcessor also one type of Servlet).
This is the actaul place where the request is handled.
-->This method reads the struts-config.xml file and find
outs the Action class by seeing the request url path.
for ex:
incoming request trl path is:/login
struts-config.xml:
<action path="/login" type="Test.LoginClass">
<forward name="Succes" path="/Welcome.jsp"/>
<forward name="failure" path="/Login.jsp"/>
</action>
-->After identifying the Actio class it checks the whether
the request is associtaed with any form bean.This can be
checked by usin the name attribute of athe action element
from the struts-config.xml.
Ex:<form-beans>
<form name="loginForm" type="Test.LoginForm"/>
</form-beans>
<action-mappings>
<action path="/login"type="Test.LoginClass"
name="loginForm">
....
....
</action-mappings>
-->Then it creates the instance of ActionForm and calls the
corresponding getter and setter methods for the incoming
request parameters.Optionally we can validate the request
parameter by calling the validate()method in ActionForm.For
this we need to specify validate="true" and
input="/Login.jsp" in struts-config.xml file.
-->Now the actual request is handled by the Action class by
calling the execute() method.Output of this method
indicates the response of the request.The return type of
this request is ActionMappings ....  |
| Sandeep Garg |
| |
| |
| Question |
what is project architecture?give brief explanation about
project architecture? |
Rank |
Answer Posted By |
|
Question Submitted By :: Balakrishna |
| This Interview Question Asked @ CTS |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Project acchitcture represents no of components we are
using as part of our poject and the flow of request
processing. i.e what components involves in procession the
request and in which order.
For example if u take MVC archicture when u send a request
Controller receives the request and it decides which
business logic has be executed and after executing Model
component ,controller passes the request to JSP (View) to
display the state of the data u user.  |
| Ramakrishna |
| |
| |
| Answer | Project Architecture means like take the below example.
There are like 2-Tier,3-Tier and so on n-Tier architecture.
So generally for 3-Tier Architecture 1.Client(Browser),
2.Server (Tomcat) 3.Back end Database(Oracle).
So explain like Requests will be taken from the Client and
it will be process in Tomcat server the server will contact
the database and process the request.The request will be get
back to the service method and inturn it will send to the
client nothing but browser.
so in this way you have to tell about your project.
May be it will help you.  |
| Chaitu.riims |
| |
| |
| Question |
In a multitiered application which tier is the browser in? |
Rank |
Answer Posted By |
|
Question Submitted By :: Raviraja N |
| This Interview Question Asked @ Adobe |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Fist tier  |
| Gopid123 |
| |
| |
| Answer | first tier  |
| Shubhangi |
| |
| |
| Answer | Presentation Tier  |
| Sepsun |
| |
| |
| Answer | Browser isn't really part of any tier... Its even separate from the Presentation Tier. And just interacts with it!!  |
| Abhishek |
| |
| |
| Answer | presentation tire , this for user intraction .  |
| Mkj |
| |
| |
| Question |
In a multitiered application which tier is the browser in? |
Rank |
Answer Posted By |
|
Question Submitted By :: Raviraja N |
| This Interview Question Asked @ Adobe |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | The Browser is in the Client Tier  |
| Nancy |
| |
| |
| Answer | Business. becz in case any modification we cant do na in
client level  |
| Gopid123 |
| |
| |
| Answer | Browser and enhancements(applets,applictions) are in the
client tier  |
| Ajish |
| |
| |
| Question |
Why would you desing a J2EE application so user data is
entered by way of a JSP page and managed by an underlying
Java Beans class? |
Rank |
Answer Posted By |
|
Question Submitted By :: Raviraja N |
| This Interview Question Asked @ Adobe , Adobe |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | you can use mvc1 to implement the such requirement.  |
| Sandeep |
| |
| |
| Answer | As per my understanding, Java Bean exposes the properties
of the JSP page in a consistent way.
Also it represents the jsp page as a simple java object
(POJO) which is having certain state. and it is easy to
handle java beans.  |
| Rajesh |
| |
| |
| Question |
What advantage does an entity bean have over a sessin bean? |
Rank |
Answer Posted By |
|
Question Submitted By :: Raviraja N |
| This Interview Question Asked @ Adobe |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Entity Bean is a Java class which implements an Enterprise
Bean interface and provides the implementation of the
business methods. There are two types: Container Managed
Persistence (CMP) and Bean-Managed Persistence (BMP).
Session Bean is used to represent a workflow on behalf of a
client. There are two types: Stateless and Stateful.
Stateless bean is the simplest bean. It doesn't maintain any
conversational state with clients between method
invocations. Stateful bean maintains state between invocations.  |
| Uppi |
| |
| |
| Question |
What is a J2EE component? List out all the component? |
Rank |
Answer Posted By |
|
Question Submitted By :: Raviraja N |
| This Interview Question Asked @ Adobe |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | J2EE Application Components
J2EE applications are made up of components. A J2EE
component is a self-contained functional software unit that
is assembled into a J2EE application with its related
classes and files and communicates with other components.
The J2EE specification defines the following J2EE components:
* Application clients and applets are client components.
* Java Servlet and JavaServer Pages (JSP) technology
components are web components.
* Enterprise JavaBeans (EJB) components (enterprise
beans) are business components.
J2EE components are written in the Java programming language
and compiled in the same way as any Java programming
language program. The difference when you work with the J2EE
platform, is J2EE components are assembled into a J2EE
application, verified that they are well-formed and in
compliance with the J2EE specification, and deployed to
production where they are run and managed by the J2EE server.
Client Components
A J2EE application can be web-based or non-web-based. An
application client executes on the client machine for a
non-web-based J2EE application, and a web browser downloads
web pages and applets to the client machine for a web-based
J2EE application.
Application Clients
An application client runs on a client machine and provides
a way for users to handle tasks such as J2EE system or
application administration. It typically has a graphical
user interface created from Project Swing or Abstract Window
Toolkit (AWT) APIs, but a command-line interface is
certainly possible.
Application clients directly access enterprise beans running
in the business tier. However, if the J2EE application
client requirements warrant it, an application client can
open an HTTP connection to establish communication with a
servlet running in the web tier.
Web Browsers
The user's web browser downloads static or dynamic Hypertext
Markup Language (HTML), Wireless Markup Language (WML), or
Extensible Markup Language (XML) web pages from the web
tier. Dynamic web pages are generated by servlets or JSP
pages running in the web tier.  |
| Rani |
| |
| |
| Answer | There are four types of J2EE component:
Enterprise Applications:-
These components provide a top-level
structure which contains any number of other J2EE
components (except other J2EE Enterprise Applications). The
JAR file holding an enterprise application has the
suffix .ear, so Enterprise Applications are frequently
referred to as EARs.
Web Applications:-
These J2EE components may contain Servlets,
Java ServerPages, Tag Library Definitions and plain Java
classes or resources as required for proper operation. The
documents and Java classes of Web Applications frequently
create markup language (HTML, WML, XML, etc.) responses to
requests from web browsers or business applications. The
JAR file holding a Web application has the suffix .war, so
WebApps are frequently referred to as WARs.
Enterprise JavaBean Applications:-
These components hold server-side business
logic packaged within Enterprise JavaBeans.
Resource Applications:-
These J2EE components hold Java classes that
act as drivers or communication gateways to Enterprise
Information Systems (EISs). It is highly likely that the
manufacturer of an EIS packages its driver into a J2EE
resource archive (RAR).  |
| Rajashree |
| |
| |
| Question |
What is a thin-client application? |
Rank |
Answer Posted By |
|
Question Submitted By :: Raviraja N |
| This Interview Question Asked @ Adobe , Adobe |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | A web client is sometimes called a thin client. Thin
clients usually do not query databases, execute complex
business rules, or connect to legacy applications. When you
use a thin client, such heavyweight operations are off-
loaded to enterprise beans executing on the J2EE server,
where they can leverage the security, speed, services, and
reliability of J2EE server-side technologies.  |
| Rajan |
| |
| |
| Answer | A thin client application is the one where in the business
logic is not included in the client code. The client code
only contains the presentation logic.  |
| Nancy |
| |
| |
| Answer | The Thin application client provides a lightweight,
downloadable Java application run time capable of
interacting with enterprise beans.
The Thin application client is designed to support those
users who want a lightweight Java client application
programming environment, without the overhead of the J2EE
platform on the client machine. The programming model for
this client is heavily influenced by the CORBA programming
model, but supports access to enterprise beans.  |
| Rajashree |
| |
| |
| Question |
After creating conntinpool in weblogic
how to write the code in programe where i can use that pool
object in the programe connecting to the database
and how to debug programe withou eclipse |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ Wipro |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | import java.sql.*;
import java.util.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
class WLConnection
{
public static void main(String arg[]){
Context ctx = null;
java.util.Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
Connection conn = null;
try {
ctx = new InitialContext(ht);
javax.sql.DataSource ds = (javax.sql.DataSource)
ctx.lookup ("jdbc/sample");
conn = ds.getConnection();
}
catch (Exception e) {
// a failure occurred
}
}
}  |
| Penchala |
| |
| |
|
| |
|
Back to Questions Page |