Java Servlet example eclipse

Steps to create Sample Project Using Java Servlets Lets see how to create a sample web application using Java Servlets and widely used Web server TOMCAT in Eclipse. Environment : Eclipse Java EE IDE for Web Developers. Version: Kepler Service Release 1  Server info: Apache Tomcat/7.0.37 Servlet version: 3.0 JSP version: 2.1 Java version: 1.8.0_40 Create a new…

Continue reading

What is Servlet?

Servlet Overview Earlier Common Gateway Interface (CGI) server-side scripts used to generate dynamic content. Disadvantages of CGI Platform dependence Lack of scalability Always a new process should be created to serve a request. i.e. f there are N simultaneous requests to the same CGI program, the code for the CGI program is loaded into memory N times….

Continue reading

Custom Annotation

Custom Annotation Similar to interface we can define Custom Annotations or user defined annotations simply by adding @interface in the declaration. For example: @interface CustomAnnotation{} Here, CustomAnnotationis the custom annotation name. While writing the custom annotations few points has to be considered. Method should not have any throws clauses, Similar to interface only declarations available…

Continue reading