Category Archives: Java Web Development Interview Questions

How can I implement a thread-safe JSP page? | Java Web development questions

You can make your JSPs thread-safe by having them implement the SingleThreadModel interface. This is done by adding the directive <%@ page isThreadSafe=”false” % > within your JSP page.

Posted in Java Web Development Interview Questions | Leave a comment

What are stored procedures? How is it useful? | Java Web development questions

A stored procedure is a set of statements/commands which reside in the database. The stored procedure is pre-compiled and saves the database the effort of parsing and compiling sql statements everytime a query is run. Each database has its own … Continue reading

Posted in Java Web Development Interview Questions | Leave a comment

How many JSP scripting elements are there and what are they? | Java Web development questions

There are three scripting language elements: declarations, scriptlets, expressions.

Posted in Java Web Development Interview Questions | Leave a comment

Why does JComponent have add() and remove() methods but Component does not? | Java Web development questions

because JComponent is a subclass of Container, and can contain other components and jcomponents.

Posted in Java Web Development Interview Questions | Leave a comment

How do I include static files within a JSP page? | Java Web development questions

Static resources should always be included using the JSP include directive. This way, the inclusion is performed just once during the translation phase. Do note that you should always supply a relative URL for the file attribute. Although you can … Continue reading

Posted in Java Web Development Interview Questions | Leave a comment

What are stored procedures? How is it useful? | Java Web development questions

A stored procedure is a set of statements/commands which reside in the database. The stored procedure is pre-compiled and saves the database the effort of parsing and compiling sql statements everytime a query is run. Each database has its own … Continue reading

Posted in Java Web Development Interview Questions | Leave a comment

In the Servlet 2.4 specification SingleThreadModel has been deprecated, why? | Java Web development questions

Because it is not practical to have such model. Whether you set isThreadSafe to true or false, you should take care of concurrent client requests to the JSP page by synchronizing access to any shared objects defined at the page … Continue reading

Posted in Java Web Development Interview Questions | Leave a comment

How many JSP scripting elements are there and what are they? | Java Web development questions

There are three scripting language elements: declarations, scriptlets, expressions.

Posted in Java Web Development Interview Questions | Leave a comment

How to Retrieve Warnings? | Java Web development questions

SQLWarning objects are a subclass of SQLException that deal with database access warnings. Warnings do not stop the execution of an application, as exceptions do; they simply alert the user that something did not happen as planned. A warning can … Continue reading

Posted in Java Web Development Interview Questions | Leave a comment

What Class.forName will do while loading drivers? | Java Web development questions

It is used to create an instance of a driver and register it with the DriverManager. When you have loaded a driver, it is available for making a connection with a DBMS.

Posted in Java Web Development Interview Questions | Leave a comment