Submitted by heartin on Fri, 09/18/2015 - 14:06
JSPs are actually servlets. Container will convert all jsp files as servlets before executing it. By default, the JSP is compiled into a servlet and then loaded the first time it is accessed. This might cause a small delay for the first request, but there won’t be any delay in subsequent requests. You may also precompile JSPs before adding them into JARs. Certain application servers might even provide tools for doing so.
Submitted by heartin on Fri, 09/18/2015 - 06:17
I can suppress direct access to a JSP file and want users to go only through a registered name and a servlet mapping in web.xml. I can place the JSP page under WEB- INF and configure it in the web.xml file.
Submitted by heartin on Sat, 04/11/2015 - 22:13
JSP elements can be mainly divided into 3 categories:
Submitted by heartin on Sat, 04/11/2015 - 22:11
JSPs are actually servlets, as you have already seen. Container will convert all jsp files into servlets before executing them. JSPs just provide an easy way to create components containing non-java code.
Once a JSP page is created and deployed, container will do some life cycle events, which also includes calling some of its methods similar to servlet life cycle events.
Submitted by heartin on Fri, 04/10/2015 - 13:17
Submitted by heartin on Mon, 03/30/2015 - 12:09
Web fragments are xml files that will have part of the configurations of a web.xml. There can be many web fragments, and when the application is deployed container will combine all the fragments and will treat it like a single web.xml. Similar to annotations, now developers can write web fragments for their modules and application assemblers would not have to add them to the web.xml file. We can override annotation behavior with a web fragment or web.xml.
Submitted by heartin on Mon, 03/30/2015 - 12:03
Annotations were introduced to reduce the burden of Application assemblers who would otherwise have to combine every developer’s configuration details into the web.xml file. Thus annotations allow for pluggability of the code by allowing developers to specify configurations on their own classes and hence application assemblers would not have to add them to the web.xml file. We can still use web.xml to override any of the configuration given by an annotation.
Submitted by heartin on Sun, 03/29/2015 - 07:57
Methods related to getPart will throw IOException if an I/O error occurred during the retrieval of the Part components of this request, ServletException if this request is not of type multipart/form-data or IllegalStateException if the request body is larger than maxRequestSize, or any Part in the request is larger than maxFileSize.
Submitted by heartin on Sun, 03/29/2015 - 07:44
Java EE introduced built in support for handling multipart MIME file uploads in Servlet 3.0 (Java EE 6). If you enable this functionality on a servlet, the container will make additional methods available on an HttpServletRequest to get all parts available on a request and also to get one of those parts passing in its name. We will see a demo of the multipart file upload in Servlet 3.0 using multipart config.
Submitted by heartin on Fri, 03/27/2015 - 20:38
Java EE introduced built in support for handling multipart MIME file uploads in Servlet 3.0 (Java EE 6). Web servers based on PHP and ASP.NET have provided this functionality for some time now, saving having to use other third party libraries for the multipart “heavy lifting”.