How do I include static files within a JSP page?
How do I include static files within a JSP page? 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 also... 2013-07-17, 1602👍, 0💬
What are stored procedures? How is it useful?
What are stored procedures? How is it useful? 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 stored pro... 2013-07-17, 1567👍, 0💬
In the Servlet 2.4 specification SingleThreadModel has been deprecated, why?
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 ... 2013-07-16, 1597👍, 0💬
How many JSP scripting elements are there and what are they?
How many JSP scripting elements are there and what are they? There are three scripting language elements: declarations, scriptlets, expressions. 2013-07-16, 1731👍, 0💬
How to Retrieve Warnings?
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 ... 2013-07-15, 1441👍, 0💬
What Class.forName will do while loading drivers?
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. 2013-07-15, 1473👍, 0💬
What information is needed to create a TCP Socket?
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. 2013-07-12, 1461👍, 0💬
How many messaging models do JMS provide for and what are they?
How many messaging models do JMS provide for and what are they? JMS provide for two messaging models, publish-and-subscribe and point-to-point queuing. 2013-07-12, 1460👍, 0💬
The code in a finally clause will never fail to execute, right?
The code in a finally clause will never fail to execute, right? Using System.exit(1); in try block will not allow finally code to execute. 2013-07-11, 1464👍, 0💬
. How can a servlet refresh automatically if some new data has entered the database?
. How can a servlet refresh automatically if some new data has entered the database? You can use a client-side Refresh or Server Push. 2013-07-11, 6416👍, 0💬
Can we use the constructor, instead of init(), to initialize servlet?
Can we use the constructor, instead of init(), to initialize servlet? Yes , of course you can use the constructor instead of init(). There’s nothing to stop you. But you shouldn’t. The original reason for init() was that ancient versions of Java couldn’t dynamically invoke constructors with argumen... 2013-07-10, 1513👍, 0💬
What are the implicit objects?
What are the implicit objects? Implicit objects are objects that are created by the web container and contain information related to a particular request, page, or application. They are: --request --response --pageContext --session --application --out --config --page --exception 2013-07-08, 1503👍, 0💬
What is JSP page?
What is JSP page? A JSP page is a text-based document that contains two types of text: static template data, which can be expressed in any text-based format such as HTML, SVG, WML, and XML, and JSP elements, which construct dynamic content. 2013-07-08, 1478👍, 0💬
What is JSP technology?
What is JSP technology? Java Server Page is a standard Java extension that is defined on top of the servlet Extensions. The goal of JSP is the simplified creation and management of dynamic Web pages. JSPs are secure, platform-independent, and best of all, make use of Java as a server-side scripting ... 2013-07-05, 1468👍, 0💬
What are the two kinds of comments in JSP and what's the difference between them.
What are the two kinds of comments in JSP and what's the difference between them. <%-- JSP Comment --%> <!-- HTML Comment --> 2013-07-05, 1455👍, 0💬
What is difference between custom JSP tags and beans?
What is difference between custom JSP tags and beans? Custom JSP tag is a tag you defined. You define how a tag, its attributes and its body are interpreted, and then group your tags into collections called tag libraries that can be used in any number of JSP files. To use custom JSP tags, you need t... 2013-07-04, 1463👍, 0💬
What is a JSP and what is it used for?
What is a JSP and what is it used for? Java Server Pages (JSP) is a platform independent presentation layer technology that comes with SUN s J2EE platform. JSPs are normal HTML pages with Java code pieces embedded in them. JSP pages are saved to *.jsp files. A JSP compiler is used in the background ... 2013-07-04, 1500👍, 0💬
Deleting Cookies in JSP Pages
How do you delete a Cookie within a JSP? Cookie mycook = new Cookie("name","value"); response.addCookie(mycook); Cookie killmycook = new Cookie("mycook","value"); killmycook.setMaxAge(0); killmycook.setPath("/"); killmycook.addCookie(killmycoo k); 2007-04-03, 4681👍, 0💬
Using scriptlet to Initialize JavaBean
How do I use a scriptlet to initialize a newly instantiated bean? A jsp:useBean action may optionally have a body. If the body is specified, its contents will be automatically invoked when the specified bean is instantiated. Typically, the body will contain scriptlets or jsp:setProperty tags to init... 2007-04-03, 6052👍, 0💬
Preventing the Creation of Sessions in JSP Pages
How do you prevent the Creation of a Session in a JSP Page and why? By default, a JSP page will automatically create a session for the request if one does not exist. However, sessions consume resources and if it is not necessary to maintain a session, one should not be created. For example, a market... 2007-04-03, 4644👍, 0💬
include Directive vs. jsp:include Action
What is the difference between include directive & jsp:include action? Difference between include directive and jsp:include action: provides the benifits of automatic recompliation,smaller class size ,since the code corresponding to the included page is not present in the servlet for every inclu... 2007-04-03, 5853👍, 0💬
Missing JSP and SSI Includes
How do I mix JSP and SSI #include? If you're just including raw HTML, use the #include directive as usual inside your .jsp file. <!--#include file="data.inc"--> 2007-04-03, 4664👍, 0💬
Can a JSP page instantiate a serialized bean? No problem! The useBean action specifies the beanName attribute, which can be used for indicating a serialized bean. A couple of important points to note. Although you would have to name your serialized file like "filename.ser", you only indicate "filena... 2007-04-03, 4516👍, 0💬
How To Export Data to a CSV File? - Oracle DBA FAQ - Introduction to Oracle SQL Developer If you wan...
How To Get the Minimum or Maximum Value of an Array? - PHP Script Tips - PHP Built-in Functions for ...
How To Create an Array in PL/SQL? - Oracle DBA FAQ - Introduction to PL/SQL If you want create an ar...
Do You Know the Book "JUnit in Action"? You should know this book. It received some good reviews. Ti...
What are database triggers? How are the triggers fired? Read this collection of questions and answer...