.JSP File Extension
Jakarta Server Page
3.4 | 276 Votes
What is a JSP file?
A JSP file is a Java document used to dynamically generate a webpage using Jakarta Server Pages (JSP) functions. It is similar to an .ASP or .PHP file, except it contains Java code instead of ActiveX or PHP. Web servers parse JSP files and use them to generate HTML, which is sent to a user's web browser.
Jakarta Server Pages is a standard and set of technologies that developers use to create dynamically-generated webpages. Developers write these webpages using Java code, as well as HTML and XML syntax.
JSP files typically contain only Java and HTML content. Any web server that includes a JSP-compatible servlet container, such as Apache Tomcat or Jetty, can render a JSP file as a webpage in users' web browsers.
However, were a user to view a processed JSP webpage's source code in their browser, the user would see only HTML code. When a web server processes a JSP file, it dynamically translates the Java code the file contains into HTML. The user's web browser then renders this fully-HTML version of the webpage.
NOTE: JSP files were formerly known as JavaServer Pages. The Eclipse Foundation rebranded Java Enterprise Edition as Jakarta Enterprise Edition in 2018.
How to open a JSP file
You can open and edit a JSP file in any text or source code editor, such as Microsoft Visual Studio Code (cross-platform) or GitHub Atom (cross-platform). You can also view the file in any web browser.