<< < 1 2 3 4 5 > >>   Sort: Rank

Why does JComponent have add() and remove() methods but Component does not?
Why does JComponent have add() and remove() methods but Component does not? because JComponent is a subclass of Container, and can contain other components and jcomponents. How can I implement a thread-safe JSP page? - You can make your JSPs thread-safe by having them implement the SingleThreadModel...
2013-07-20, 2186👍, 0💬

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, 2134👍, 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, 2071👍, 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, 2084👍, 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, 2252👍, 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, 2017👍, 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, 2056👍, 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, 2054👍, 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, 1930👍, 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, 2154👍, 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, 7625👍, 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 wit...
2013-07-10, 2267👍, 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, 2171👍, 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, 2137👍, 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, 2101👍, 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. &lt%-- JSP Comment --%&gt &lt!-- HTML Comment --&gt
2013-07-05, 2039👍, 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, 1920👍, 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, 2149👍, 0💬

Java Bean Class with 100 Fields
How to write a bean class, when you have 100 fields and each have three sub fields.
2007-04-26, 5260👍, 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, 5380👍, 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, 7006👍, 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, 5299👍, 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, 6733👍, 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. &lt;!--#include file="data.inc"--&gt;
2007-04-03, 5317👍, 0💬

<< < 1 2 3 4 5 > >>   Sort: Rank