As you probably know the language used in web browsers is HTML which stands for Hyper-Text Markup Language. But what can you use if you want to a web page to act like an application? One category of solutions to this problem are a category of languages that allow you to embed programming commands within the HTML. ColdFusion is one example.
Create Java Server Pages (JSP)
Java Server Pages allow you to create an HTML web page, but embed Java into it. You indicate what is java by putting <% and %> around the commands.
Let’s create the JSP for our sample application.
A Servlet is a type of Java class that is equipped to send and receive HTTP requests. They run on the server side and often are coupled with JSPs.
Passing Data Between JSP and Servlet
Previously we showed how to pass data from a JSP to a Servlet. But sometimes you need to pass data from a Servlet to a JSP. Here is how that can be done.