More JSTL Examples

This article contains some more JSTL Examples. To begin with, the three tags that provide the functionality of the switch…case statement in Java are discussed. c:choose Tag Basically this tag work like the switch…case statement in Java and provides a mutually exclusive conditional operations. c:when Tag Likewise, the c:when tag works as a Case statement in switch….case statement of Java. Therefore, witin the c:choose tag, …

A Login Application using JSP, Servlet, and JDBC

The following example shows A Login Application using JSP, Servlet, and JDBC. Specifically, the Login.jsp file creates a client-side form that allows users to enter their credentials. Once, the user enters data and clicks on the Submit button, the LoginServlet executes. Furthermore, the database table used here is named myusers. The following figure shows the data stored in this table. …

Registering a Servlet in Deployment Descriptor

This article explains Registering a Servlet in Deployment Descriptor. Basically, registering a servlet in the deployment descriptor requires providing the <servlet> tag in the web.xml file. Also, within this tag, the <servlet-name>, and <servlet-class> tags specify the name of servlet and associated java class respectively. Additionally, we can also specify <init-parameter> tags to provide the …

Understanding Deployment Descriptor

Basically, a deployment descriptor refers to a configuration file in a web application. Whenever we create a J2EE application, it includes web components comprising of servlets and JSP files, For the purpose of managing the dynamic web application, we can create a web.xml file. In fact, the web.xml is our deployment descriptor. This web.xml file contains information …