Java Server Page (JSP) is a technology for controlling the content or appearance of Web pages through the use of servlets. Small programs that are specified in the Web page and run on the Web server to modify the Web page before it is sent to the user who requested it.
There are total three Scripting Element in JSP
Using these tags we can insert our java code in JSP.
This tag allow user to insert java code in JSP. The statement which is written will be moved to jspservice() using JSP container while generating servlet from JSP. When client make a request, JSP service method is invoked and after that the content which is written inside the scriptlet tag executes.
- The Syntax of JSP Sriptlet tag is begin with ”.
- We can write our java code inside this tag.
- In java we use System.out.println for printing anything on console. In JSP, we use only out.print to write something on console because the out we’re referring to isn’t System.out, it’s a variable in the effective method that wraps our JSP page.
- System.out writes to the servlet container’s console (usually a log file); out is a different class entirely which writes to the output stream for the generated response.
Here we are creating and HTML file to take username from user.save this file as index.html.
Here we are creating A jsp file names as Geeks.jsp
- Why Data Structures and Algorithms are "Must Have" for Developers and Where to learn them : Answered
- Learn Data Structures and Algorithms for your Dream Job with this online Course
- OpenMP | Hello World program
- How I Handle GATE CS Preparation with College Studies
- The complete History of Java Programming Language
- GATE CS 2020 Important (Tentative) Dates
- Git- Setting up a Repository
- Must Do Coding Questions for Companies like Amazon, Microsoft, Adobe, ...
- Creating Knockout Application along with Setting up Environment in Visual Studio
- New Algorithm to Generate Prime Numbers from 1 to Nth Number
- Observables : KnockoutJS
- Must Do Coding Questions Company-wise
- Difference between JSP and ASP
- Introduction and Installation of Git
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.