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

How do I use a scriptlet to initialize a newly instantiated bean?
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...
2013-08-07, 2009👍, 0💬

How do you pass control from one JSP page to another?
How do you pass control from one JSP page to another? Use the following ways to pass control of a request from one servlet to another or one jsp to another. The RequestDispatcher object ‘s forward method to pass the control. The response.sendRedirect method
2013-07-31, 2006👍, 0💬

What is the difference in using request.getRequestDispatcher() and context.getRequestDispatcher()?
What is the difference in using request.getRequestDispatcher() and context.getRequestDispatcher() ?request.getRequestDispatcher(p ath):In order to create it we need to give the relative path of the resource context.getRequestDispatcher(p ath):In order to create it we need to give the absolute path o...
2013-08-12, 2005👍, 0💬

How do I mix JSP and SSI #include?
How do I mix JSP and SSI #include? Answer 1 If you're just including raw HTML, use the #include directive as usual inside your .jsp file. But it's a little trickier if you want the server to evaluate any JSP code that's inside the included file. If your data.inc file contains jsp code you will have ...
2013-08-05, 2004👍, 0💬

Can a JSP page process HTML FORM data?
Can a JSP page process HTML FORM data? Yes. However, unlike servlets, you are not required to implement HTTP-protocol specific methods like doGet() or doPost() within your JSP page. You can obtain the data for the FORM input elements via the request implicit object within a scriptlet or expression a...
2013-07-30, 1996👍, 0💬

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, 1979👍, 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, 1970👍, 0💬

How to pass information from JSP to included JSP?
How to pass information from JSP to included JSP? Using &lt;%jsp:param&gt; tag.
2013-08-13, 1948👍, 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, 1925👍, 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, 1922👍, 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, 1917👍, 0💬

How do I mix JSP and SSI #include? What is the difference between include directive & jsp:include action?
How do I mix JSP and SSI #include? What is the difference between include directive & jsp:include action? Difference between include directive and 1. provides the benifits of automatic recompliation,smaller class size ,since the code corresponding to the included page is not present in the servl...
2013-08-06, 1902👍, 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, 1895👍, 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, 1882👍, 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, 1860👍, 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, 1860👍, 0💬

Is there a way I can set the inactivity lease period on a per-session basis?
Is there a way I can set the inactivity lease period on a per-session basis? Typically, a default inactivity lease period for all sessions is set within your JSPengine admin screen or associated properties file. However, if your JSP engine supports the Servlet 2.1 API, you can manage the inactivity ...
2013-07-31, 1842👍, 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, 1829👍, 0💬

How do you prevent the Creation of a Session in a JSP Page and why? What is the difference between include directive & jsp:inclu
How do you prevent the Creation of a Session in a JSP Page and why? What is the difference between include directive & jsp:include action? 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 necess...
2013-08-06, 1825👍, 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, 1825👍, 0💬

How does a servlet communicate with a JSP page?
How does a servlet communicate with a JSP page? The following code snippet shows how a servlet instantiates a bean and initializes it with FORM data posted by a browser. The bean is then placed into the request, and the call is then forwarded to the JSP page, Bean1.jsp, by means of a request dispatc...
2013-08-01, 1823👍, 0💬

How can I implement a thread-safe JSP page?
How can I implement a thread-safe JSP page? You can make your JSPs thread-safe by having them implement the SingleThreadModel interface. This is done by adding the directive &lt;%@ page isThreadSafe="false" % &gt; within your JSP page.
2013-07-27, 1818👍, 0💬

What JSP lifecycle methods can I override?
What JSP lifecycle methods can I override? You cannot override the _jspService() method within a JSP page. You can however, override the jspInit() and jspDestroy() methods within a JSP page. jspInit() can be useful for allocating resources like database connections, network connections, and so forth...
2013-07-24, 1811👍, 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, 1809👍, 0💬

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