-
Sub Class of Action Class
class A extends ActionSupport{ }class B extends A{}Is B also acts as an action class or not? Explain
-
ODBC & JDBC
What is the purpose of creating ODBC data source in establishing a connection between Java application & database?
-
JDBC-ODBC Bridge
When would you use a JDBC-ODBC Bridge?
-
JDBC Isolation Level
Name the method that gives the existing isolation level in JDBC.
-
Session and Cookie
What is the different between session and cookies? Where is the session information stored? In RAM of the Client or Disk of the Client or it is stored on the server?
-
Struts Framework
Why we use Struts framework in project?
-
Struts ActionServlet
why do we have only one ActionServlet in Struts?(Asked in Polaris Interview for Java Experienced people , on April 11, Chennai)
-
wasNull() method to handle null database fields
which of the following methods eliminates the need to call wasNull() method to handle null database fields?a)getObject()b)getInt()c)getString()d)getFloat()e)getNull()
-
A user leaves an online shopping cart without checking out.Which of the following interfaces will notify to rollback the transaction?
A user leaves an online shopping cart without checking out.Which of the following interfaces will notify to rollback the transaction?a)HttpSessionb)HttpSessionBindingListenerc)HttpServletd)SingleThreadModele)FtpSession
-
-
-
-
-
-
How will you determine which driver is connected to the database
can u give correct answer for this....!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
//this.disp();
}
void t3()
{
System.out.println("Enter to t3 void");
}
}
On what situation void type constructors are used?">class t3{ int i; static public void main( String a[]) { int j=8; t3 t= new t3(); new t3().disp(j); } //constructor overloading t3() { System.out.println("Enter to t3"); //this.disp(); } void t3() { System.out.println("Enter to t3 void"); }}On what situation void type constructors are used?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
3.which one is better to create a thread by implementing Runnable or By Extending Thread in java?">
1.why constructor does not have return type in java?2.why static does not support " this" and "super" keyword in java ?3.which one is better to create a thread by implementing Runnable or By Extending Thread in java?
-
type="com.test.LoginForm"/>
path="/login"
type="com.test.user.login.LoginAction"
name="loginForm"
validate="false">
Question: Assuming the class LoginForm contains a String property named "password", how does the LoginAction class access the attribute called "password" in the above request? Explain why.
Choice 1
String password = request.getParameter("password");
Choice 2
String password = request.getAttribute("password");
Choice 3
request.getParameterNames().getParameter("password");
Choice 4
String password = ((LoginForm) form).getPassword();
Choice 5
String password = form.getPassword();
">Question: Assuming the class LoginForm contains a String property named "password", how does the LoginAction class access the attribute called "password" in the above request? Explain why.Choice 1 String password = request.getParameter("password"); Choice 2 String password = request.getAttribute("password"); Choice 3 request.getParameterNames().getParameter("password"); Choice 4 String password = ((LoginForm) form).getPassword(); Choice 5 String password = form.getPassword();
-
-
-
-
-
-
-
-
-
-
-
State true or falseCan we retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column ?
A) TrueB) FalseExplanation: The ResultSet.getXXX methods are the only way to retrieve data from a ResultSet object, which means that you have to make a method call for each column of a row. It is unlikely that this is the cause of a performance problem, however, because it is difficult to see how a column could be fetched without at least the cost of a function call in any scenario.
-
Which of the following statements is true regarding the failing of the class.forName in jdk 1.1.x.
A) A workaround is to explicitly call the method DriverManager.registerDriver(new YourDriverClass).B) The problem is due to race condition in the class loader.C) The race condition prevents the static section of code in the driver class from executing and registering the driver with the DriverManager.D) All the above.
-
Which of the following is true regarding not finding the java.sql.DriverManager class.
A) This problem can be caused by running a JDBC applet in a browser that supports the JDK 1.0.2, such as Netscape Navigator 3.0. The JDK 1.0.2 does not contain the JDBC API, so the DriverManager class typically isn't found by the Java virtual machine runningB) Most of the browsers cannot download java.* because of security reasons. Hence many vendors of all-Java JDBC drivers supply versions of the...
-
What’s the difference between TYPE_SCROLL_INSENSITIVE , and TYPE_SCROLL_SENSITIVE?
A) A result set that is TYPE_SCROLL_INSENSITIVE does not reflect changes made while it is still open and one that is TYPE_SCROLL_SENSITIVE does.B) Both types of result sets will make changes visible if they are closed and then reopened.C) You will get a scrollable ResultSet object if you specify one of these ResultSet constants.D) A result set that is TYPE_SCROLL_INSENSITIVE makes the result set read...
-
Which of the following statement is false regarding the use of setAutoCommit() in JDBC
A) When a connection is created, it is in auto-commit mode.B) If the value is true each individual SQL statement is treated as a transaction and will be automatically committed right after it is executed.C) once auto-commit mode is disabled, no SQL statements will be committed until you call the method commit explicitlyD) By default the JDBC call is in auto-commit mode.Explanation: by default the JDBC...
-
-
-
Can we use any other technology than JSP to construct a view ?
Yes, other than JSP we can use Swing, JSF, Cocoon etc as a front end for our struts application. Here is a link to the article for using struts with swing as front end
-
-
-
-
-
-
-
-
-
What is the difference between ServletContext and ServletConfig?
Both are interfaces. The servlet engine implements the ServletConfig interface in order to pass configuration information to a servlet. The server passes an object that implements the ServletConfig interface to the servlet's init() method.The ServletContext interface provides information to servlets regarding the environment in which they are running. It also provides standard way for servlets to write...
-
What is the difference between GenericServlet and HttpServlet?
GenericServlet is for servlets that might not use HTTP, like for instance FTP service.As of only Http is implemented completely in HttpServlet. The GenericServlet has a service() method that gets called when a client request is made. This means that it gets called by both incoming requests and the HTTP requests are given to the servlet as they are.
-
-
What are the three statements in JDBC & differences between them
Answered by Jey on 2005-05-10 05:53:50: 1.Statement which is used to run simple sql statements like select and update 2. PrepareStatment is used to run Pre compiled sql. 3. CallableStatement is used to execute the stored procedures.