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

Can I stop JSP execution while in the midst of processing a request?
Can I stop JSP execution while in the midst of processing a request? Yes. Preemptive termination of request processing on an error condition is a good way to maximize the throughput of a high-volume JSP engine. The trick (asuming Java is your scripting language) is to use the return statement when y...
2013-07-29, 2156👍, 0💬

Can we implement an interface in a JSP?
Can we implement an interface in a JSP? No
2013-08-10, 2153👍, 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, 2144👍, 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, 2133👍, 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, 2121👍, 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, 2093👍, 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, 2077👍, 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, 2076👍, 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, 2073👍, 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, 2047👍, 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, 2045👍, 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, 2044👍, 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, 2028👍, 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, 2010👍, 0💬

How do I prevent the output of my JSP or Servlet pages from being cached by the browser?
How do I prevent the output of my JSP or Servlet pages from being cached by the browser? You will need to set the appropriate HTTP header attributes to prevent the dynamic content output by the JSP page from being cached by the browser. Just execute the following scriptlet at the beginning of your J...
2013-07-23, 2006👍, 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, 1998👍, 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, 1992👍, 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, 1990👍, 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, 1972👍, 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, 1965👍, 0💬

What is JSP?
What is JSP? Let's consider the answer to that from two different perspectives: that of an HTML designer and that of a Java programmer. If you are an HTML designer, you can look at JSP technology as extending HTML to provide you with the ability to seamlessly embed snippets of Java code within your ...
2013-08-05, 1961👍, 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, 1954👍, 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, 1944👍, 0💬

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