| Back to Questions Page |
| |
| Question |
can someone tell me how does preparedstatement works? its
an interface and where is the implementation? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ Satyam |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | 1. Yes PreparedStatement is and interface. It was in
java.sql package.
2. PreparedStatement interface creates an object that
represents a precompiled SQL statement. By using this we
can protect from SQL Injection.  |
| Sreekanth Madamanchi |
| |
| |
| Answer | suppose if the string contains same select statement with
different set of values then fo for PreparedStatement..
ex:String str="select ename,eage from emp where ename=?";
yes it is interface provided by java soft people in their
api specification  |
| Krishna |
| |
| |
| Question |
Hi friends, can u explain Transparent Persistence in
hibernate with sample code. |
Rank |
Answer Posted By |
|
Question Submitted By :: Prakash |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Types of Hibernate instance states:-
Transient- The instance is not associated with any
persistence context.
persistence- The instance is associated with a persistence
context.
Detached-The instance is associated with a persistence
context which has been closed- currently not associated.  |
| Ram Nidadavolu |
| |
| |
|
|
| |
| Question |
How to achieve multiple inheretence in java.I need an
example. how we achieve. |
Rank |
Answer Posted By |
|
Question Submitted By :: Srinivasa |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | The mechanism of inheriting the features of more than one
base class into a single class is known as multiple
inheritance. Java does not support multiple inheritance but
the multiple inheritance can be achieved by using the
interface.In Java Multiple Inheritance can be achieved
through use of Interfaces by implementing more than one
interfaces in a class.  |
| Srikanth Jakka |
| |
| |
| Question |
what is defect. Is it runtime exception or comiletime
exception |
Rank |
Answer Posted By |
|
Question Submitted By :: Srinivasa |
| This Interview Question Asked @ L&T |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Defect is a flaw in any aspect of software or requirements
that may contribute to the occurrence of one or more
failures and it is a runtime exception in java.  |
| Srikanth Jakka |
| |
| |
| Question |
what is the purpose and activity of SessionFactory in
hibernate? |
Rank |
Answer Posted By |
|
Question Submitted By :: Chandranallam |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | To Create Session object to use hibernate in an
application SessionFactory is required.
When buildSessionFactory()method is called hibernate
decides about various sql statements,that has to be used to
access various tables and creates SeessionFactory object.
This operation is expensive and it should be used only once.  |
| Srikanth |
| |
| |
| Answer | Application obtains session instances from Session Factory.
Only single SessionFactory for the whole application.
SessionFactory caches generate SQL statements and other
mapping metadata that Hibernate uses at runtime.
Cached data that has been read in one unit of work and may
be reused in a future unit of work.
SessionFactory sessionFactory =
Configuration.buildSessionFactory();  |
| Ram Nidadavolu [Satyam Computer Services Limit] |
| |
| |
| Question |
how many external variables are there in jsp ? |
Rank |
Answer Posted By |
|
Question Submitted By :: Kiranksj |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | There are no external variables in jsp unless and until you
use scriplets(java snipets)  |
| Raza |
| |
| |
| Question |
what is external varibles in jsp? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ Verizon |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | you can use application.setAttribute("variablename", Object
value);
ie Integer globalVariable = new Integer(15);
application.setAttribute("global", globalVariable);
to retrieve it you would
Integer globalVariable =
(Integer)application.getAttribute("global");
etc.. this can be passed on between pages  |
| Ram Nidadavolu |
| |
| |
| Question |
why we are using XML?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
| This Interview Question Asked @ TCS |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | As XML stands for extensible markup language, the name
itself conveys the meaning that it's fleible, XML is same
regardless your implementation language (java or .Net).
As webservices considered, XML's application and advantages
can be experienced and understood vey easily.
in simple words
.Net<->Ser/Deser<->XML<->Ser/Deser<->Java  |
| Maheshbabu |
| |
| |
| Answer | xml,as we know extensible markup language is actually used as an interface between two different applications..something like a platform between them..and its much better than html...  |
| Manasa |
| |
| |
| Answer | XML = eXtensible Markup Language.XML is become an internet
standard for sharing data over internet.  |
| Rk |
| |
| |
| Answer | XML=eXtensible Markup Language.It is used to transfer data.  |
| Priya |
| |
| |
| Answer | XML (extensible markup language) serves as a common
platform for the transmission and sharing of data between
separate systems, allowing the rapid development of Web
services that query, retrieve and share data among many
sources.
XML is not just a universal data format; it is also a
universal library of technologies (including XSLT, XSL-FO,
XPath, XQuery, DOM) for transforming documents between
otherwise incompatible formats, presenting data in
particular styles and formats, querying data from data
sources, and manipulating data in a hierarchical, tree-like
form. XML standards have been implemented in every major
operating system and programming language, ensuring that
one of your most important assets - your data - will always
be accessible in the future.  |
| T |
| |
| |
| Answer | XML is a language to transfer the data over the internet
easy than others.......For instance if we r using the
database mean
the connection should open then only we can transfer the data  |
| Saravanan |
| |
| |
| Answer | !!! XML is a language to transfer the data over the internet
easy than others.......For instance if we r using the
database mean
the connection should open then only we can transfer the
data !!!  |
| Name |
| |
| |
| Answer | XML is meta data language , it can be used to describe data
about data and can be used to store data and also can be
used to transfer data over network  |
| Guest |
| |
| |
| Answer | we use XML for Cross Platform communication.
While coming to Web Applications ,XML file plays a key role
such as configuring the web components like
servlets,ActionForm and ACtion classes(Struts) etc.Entire
flow of Web application is stored in XML file.
The importance of XML file in various web components.
1.web.xml
2.struts-config.xml(Struts Framework)
3.hibernate-config.xml and mapping.xml (Hibernate)
4.beans.xml (Spring framew work)
5.applications.xml(EJB)  |
| Naveen Kumar Raavi |
| |
| |
| Answer | we use XML to focus on how data is,basically to synchronise
data we use XML  |
| M |
| |
| |
| Question |
what is the main use of the RequestDispatch object, how we
this in realtime project |
Rank |
Answer Posted By |
|
Question Submitted By :: Rpraveendsi |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | hi,
The main use of RequestDispatcher is when u want to transfer
control from one webapplication to another webapplication
deployed in same server(its web/ app server).
If you want to transfer control from one webapplication to
another webapplication those are deployed in different
servers( Ex one in Tomcat, another in Weblogic) use
response.sendRedirect("url"); method.
if u want any confirmation please call me.
my mobile no is 09096272808  |
| Gangadhar M |
| |
| |
| Answer | The main use of Request Dispatcher Objest is to share
request object between two servlets  |
| Chandra Sekar [DreamSoftwareIndia] |
| |
| |
| Answer | RequestDispatch is mainly used to shipping request
attributes from one servlet/jsp to another servlet/jsp.
While doing this we first create RequestDispatch instance
with string url as parameter to where request data to be
shipped. Then we cal reqDispatchReference.forward
(request,response) method. This is something like assigning
work to third party.
Ex:(to forward request data from Servlet1 to page2.jsp)
class Servlet1 extends HttpServlet{
public void service(... request,... response){
...........
RequestDispatcher rd=request.RequestDispatcher("page2.jsp");
try
{
rd.forward(request,response);
}
catch(Exception e)
{
}
}
}  |
| Sagar [DreamSoftwareIndia] |
| |
| |
| Question |
i developed a Stateless Session bean program.And created a
client by a common java class as
class m
{p s v m(String s[]){....}}
And i called the bean deployed in weblogic.from cmd prompt
And that run.
mind it i have to set setenv,seting classpath for that bean
jar file before compile and run it.
ok
when i do a servlet programme deployed in tomcat and call
that bean then it give classdefnotfoundException and
NoInitialContext like this.So how i sucessfully do this?
Ok
when i call that bean from java class from the console like
i previously told, if i don't set setenv i found the same
error on the cmd prompt.
pls help to get out of it |
Rank |
Answer Posted By |
|
Question Submitted By :: Laliasonu |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | tomcate is webserver..and ejb is distributed component we
cant deploy it in web server so we need app server just use
weblogic.  |
| Ashutosh |
| |
| |
|
| |
|
Back to Questions Page |