Posts

Showing posts with the label JSP

JSP interview questions and answers

This page contains the most frequently asking JSP interview questions and answers.This will helps for freshers as well as experienced. 1. What are the advantages of JSP over Servlet?                               OR By using Servlet we can do UI implementation, then why to use JSP in any of the applications? A: JSP is a server side technology to make content generation a simple appear.  The advantages of JSP is that they are document-centric. Servlet on the other hand, look and act like programs. A Java Server Page(JSP) can contain Java program fragments that instantiate and execute java classes, but these occurs inside an HTML template file and are primarily used to generate dynamic content. The power of JSP is that it is server-based and provides a framework for web application development. 2. What is the life cycle of JSP?                   ...

how to count the page views by using JSP

To count no.of page's are viewed by user in your application is a challenge in real time application. In this page we will see how to count the page views when user has viewed the page.           Here, we will do one example how many times user has visited each page in our application. In this post we will come to know, how to count the total application page views as well as individually each pages count.           Let us assume my web application name is "Page Counter". For creating the web application in eclipse IDE, Click here . This Page Counter contains three pages, assume that are the different pages in an application. But, there is the link between each other files for navigating from one page to another. Also it will show the total pages view count and individual page view count in all the pages. Let us see, below is my first jsp file,         ...