UNIT 6
-1-
J2EE ASSIGNMENTS QUESTIONS
SELECT typically returns a 1000 rows, how do first retrieve the 100
rows, then go back and retrieve the next 100 rows and so on ?
• What does ResultSet actually contain? Is it the actual data of the
result or some links to databases? If it is the actual data then why
can't we access it after connection is closed?
• What are SQL3 data types?
• How can I manage special characters (for example: " _ ' % ) when I
execute an INSERT query? If I don't filter the quoting marks or the
apostrophe, for example, the SQL string will cause an error.
• What is SQLJ and why would I want to use it instead of JDBC?
• How do I insert an image file (or other raw data) into a database?
• How can I pool my database connections so I don't have to keep
reconnecting to the database?
• Will a call to PreparedStatement.executeQuery() always close the
ResultSet from the previous executeQuery()?
• How do I upload SQL3 BLOB & CLOB data to a database?
• What is the difference between client and server database cursors?
• Are prepared statements faster because they are compiled? if so,
where and when are they compiled?
• Is it possible to connect to multiple databases simultaneously? Can
one extract/update data from multiple databases with a single
statement?
• Why do I get an UnsupportedOperationException?
• What advantage is there to using prepared statements if I am using
connection pooling or closing the connection frequently to avoid
resource/connection/cursor limitations?
• Can I reuse a Statement or must I create a new one for each
query? What is a three-tier architecture?
• What separates one tier from another in the context of n-tiered
architecture? What areas should I focus on for the best
performance in a JDBC application? How can I insert multiple rows
into a database in a single transaction?
• How do I convert a java.sql.Timestamp to a java.util.Date?
• What is SQL? Is Class.forName(Drivername) the only way to load a
driver? Can I instantiate the Driver and use the object of the
driver?
• What's new in JDBC 3.0? Why do I get the message "No Suitable
Driver"? When I create multiple Statements on my Connection, only
the current Statement appears to be executed. What's the problem?
• Can a single thread open up mutliple connections simultaneously
for the same database and for same table?
• Can I ensure that my app has the latest data?
• What does normalization mean for java.sql.Date and java.sql.Time?
-2-
J2EE ASSIGNMENTS QUESTIONS
-3-
J2EE ASSIGNMENTS QUESTIONS
UNIT 6
-4-
J2EE ASSIGNMENTS QUESTIONS
-5-
J2EE ASSIGNMENTS QUESTIONS
-6-
J2EE ASSIGNMENTS QUESTIONS
-7-
J2EE ASSIGNMENTS QUESTIONS
servlet at one time ? How can I measure the file downloading time
using servlets? How do I make servlet aliasing work with
Apache+Tomcat?
• Is there any way to determine the number of concurrent
connections my servlet engine can handle? What is a request
dispatcher and how does it work? What is a Servlet Context?
• Does the RequestDispatcher expect a relative URL to be relative to
the originally-called servlet or to the current servlet (if different)?
• What is the difference between in-process and out-of-process
servlet containers? How is SingleThreadModel implemented in
Tomcat? In other containers? [I would assume that Tomcat uses its
connection thread pool, and creates a new instance of the servlet
for each connection thread, instead of sharing one instance among
all threads. Is that true?]
• Which servlet containers have persistent session support?
Specifically, does Tomcat 3.1? Can I use JAAS as the
authentication technology for servlets ? How can I set a servlet to
load on startup of the container, rather than on the first request?
• Is it possible to write a servlet that acts as a FTP server?
• Is there a way to disable a user's ability to double-click a submit
image/button (and therefore submitting duplicate data -- multiple
submits)? Is there a way to do this with Javascript?
• What are the main differences between Servlets and ISAPI?
• Can I associate a servlet with a particular mime-type, so if the
client requests a file of that type, my servlet will be executed?
• What are the different cases for using sendRedirect() vs.
getRequestDispatcher()?
• How do I access the value of a cookie using JavaScript?
• How do I write to a log file using JSP under Tomcat? Can I make
use of the log() method for this? How can I use a servlet to print a
file on a printer attached to the client?
• How do you do servlet aliasing with Apache and Tomcat?
• I want my servlet page to redirect to a login page if the session has
timed out. How can I know if my session has timed out?
• Can Tomcat be configured to interpret all, or selected, .html files
within a given context as JSP? Or, do JSP files have to end with a
.jsp extension? What is the difference between request attributes,
session attributes, and ServletContext attributes?
• Are singleton/static objects shared between servlet contexts?
• When building web applications, what are some areas where
synchronization problems arrise?
• What is the difference between apache webserver, java webserver
and tomcat server?
-8-
J2EE ASSIGNMENTS QUESTIONS
UNIT 7
-9-
J2EE ASSIGNMENTS QUESTIONS
UNIT 8
- 10 -
J2EE ASSIGNMENTS QUESTIONS
- 11 -