In the Servlet 2.4 Specification SingleThreadModel has been Deprecated, why

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 level. In the Servlet 2.4 specification, the SingleThreadModel interface was deprecated due to several reasons, … Read more

How Many JSP Scripting Elements are there and what are they

There are three scripting language elements: declarations, scriptlets, expressions. In advanced Java, specifically in JavaServer Pages (JSP), there are three types of scripting elements: Declarations: Declarations are used to declare variables or methods that can be used later in the JSP file. They are defined using the <%! %> syntax.Example: jsp <%! int myVariable = … Read more

How to Retrieve Warnings

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 be reported on a Connection object, a Statement object (including PreparedStatement and CallableStatement objects), or … Read more

What Class.forName will do while Loading Drivers

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. In Advanced Java, specifically when dealing with database connectivity, the Class.forName method is used to dynamically load the JDBC driver class. JDBC (Java … Read more

What Information is Needed to Create a TCP Socket

The Local Systems IP Address and Port Number. And the Remote System’s IPAddress and Port Number. To create a TCP socket in advanced Java programming, you need the following information: IP Address: The IP address of the server to which you want to establish a connection. This could be the IP address of a remote … Read more