Skip to main content

Posts

Showing posts with the label Java

Quick Reference to JAVA Servlets

I am writing these quick reference blogs for those who wants to brushup the ideas of each topic. This one will lead you through the basic concepts of JAVA Servlets. How this quick reference guideline is different from the numerous other docs available ?  ,  please read on to get an idea : Servlet Lifecycle : The container will identify the servlet based on the URL Servlet class loading Servlet instantaition Call init method Create a servlet thread for the current request. Before calling service(), will create the request and response objects Call service method Service method will identify whether to call doGet or doPost and call it Call destroy method Different servlet objects : A sinlge servlet instance per JVM ( except for SingleTheadModel) A sinlge HttpSession per web application ( session activation and passivation) A sinlge ServletContext per JVM A sinlge ServletConfig per servlet A sinlge ServletRequest per servlet request Important Servlet rq...

Jsp and CSS size limits that web developers need to aware

Here I am listing some erroneous cases that might occur in your web development phase, due to some size restrictions. JSP file size limit : You might get some run time exceptions that the JSP file size limit exceeds. Please find below the reason : In JVM the size of a single JAVA method is limited to 64kb. When the jsp file is converted to Servlet, if the jspservice method's size exceeds the 64kb limit, this exception will occur. Keep in mind that this exception depends on the implementation of the JSP translator, means the same JSP code may give an exception in Tomcat and may run successfully in Weblogic due to the the difference in the logic to built the Servlet methods from JSP. The best way to omit this issue is by using dynamic include.For example, if you are using                  <%@ include file="sample.jsp" %> (static include),  replace this to               ...

Java History and main changes over Java versions

Java SE 7 Codename Dolphin. Releasing on July 28, 2011. Better integral literals allowing for underscores as digit separators. Strings in switch Statements. Improved Type Inference for Generic Instance Creation. Improved Compiler Warnings and Errors When Using Non-Reifiable Formal Parameters with Varargs Methods. Catching Multiple Exception Types and Rethrowing Exceptions with Improved Type Checking . JVM support for dynamic languages, following the prototyping work currently done on the Multi Language Virtual Machine Compressed 64-bit pointers. Available in Java 6 with -XX:+UseCompressedOops. Concurrency and collections updates: a lightweight fork/join framework, flexible and reusable synchronization barriers, transfer queues, concurrent linked double-ended queues, and thread-local pseudo-random number generators. New file I/O library to enhance platform independence and add support for metadata and symbolic links. The new packages are java.nio.file and java.nio.file.attr...