JSP Section Index | Page 47
The following is a code snippet that demonstrates how a JSP page can interact with an EJB session bean: <%@ page import="javax.naming.*, javax.rmi.PortableRemoteObject, foo.AccountHome, foo.Ac...more
The JspPage interface defines the jspInit() and jspDestroy() method which the page writer can use in their pages and are invoked in much the same manner as the init() and destory() methods of a se...more
I've installed the JSWDK and it says I've run out of environment space when I try to start the server. How do I increase the amount of environment space under Windows?
The end of your CONFIG.SYS file should include a line like the following: SHELL=C:COMMAND.COM C: /E:4096 /P This assumes your COMMAND.COM file is in your root level C: directory and you wish yo...more
http://www.jguru.com http://www.techies.com http://www.exolab.org more
This is basically the same as talking to any web page. Check out: http://www.jguru.com/jguru/faq/view.jsp?EID=157 and http://www.jguru.com/jguru/faq/view.jsp?EID=14163more
The kit for developing servlets, containing the Servlet API classes and tools, used to be called the Java Servlet Development Kit (JSDK). Then Sun renamed the Java Development Kit (JDK) to the Ja...more
By printing out the exception's stack trace, you can usually diagonse a problem better when debugging JSP pages. By looking at a stack trace, a programmer should be able to discern which method th...more
Yes, you can invoke the JSP error page and pass the exception object to it from within a servlet. The trick is to create a request dispatcher for the JSP error page, and pass the exception obje...more
The JavaMAIL API is the standard mechanism for sending email. See the JavaMail FAQ for how to use it. You can place j2ee.jar (or mail.jar and activation.jar) under web-inf/lib folder in tomcat3.2....more
How do I use a scriptlet to initialize a newly instantiated bean?
No. You are supposed to make use of only a JSPWriter object (given to you in the form of the implicit object out) for replying to clients. A JSPWriter can be viewed as a buffered version of the st...more
What's a better approach for enabling thread-safe servlets and JSPs? SingleThreadModel Interface or Synchronization?
Although the SingleThreadModel technique is easy to use, and works well for low volume sites, it does not scale well. If you anticipate your users to increase in the future, you may be better...more
You can declare methods for use within your JSP page as declarations. The methods can then be invoked within any other methods you declare, or within JSP scriptlets and expressions. Do note tha...more
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) ...more