JSP Architecture Last Updated : 18 Jul, 2025 Comments Improve Suggest changes 26 Likes Like Report JSP (Java Server Pages) uses a three-tier architecture with a client, web server, and database. When the client sends a request, the web server's JSP engine processes the JSP file by converting it into a servlet, compiling, and executing it. The generated HTML is sent back to the client. The following diagram shows the architecture of JSP.Architecture of JSP:JSP (JavaServer Pages): It is a server-side technology used to create dynamic, platform-independent web applications. It allows embedding Java code directly into HTML or XML using JSP tags. When a client sends a request, the JSP file is first converted into a servlet by the JSP container, then compiled and executed.Below diagram explanation step-by-step working of JSP.Working of a JSP fileWhen a user accesses a webpage with a .jsp extension, the browser sends an HTTP request to the web server for that JSP file.The web server checks if a compiled version of the JSP already exists. If it does, it uses that. If not, the request is passed to the JSP engine for processing.The JSP engine reads the JSP file and translates it into a Java Servlet by converting the HTML and JSP code into equivalent Java code.This Java Servlet is then compiled into a .class file (bytecode) that the server can execute.The servlet runs on the server, generates dynamic content (usually HTML), and prepares it as a response.Finally, the web server sends this generated HTML back to the user’s browser, which displays the resulting webpage. Create Quiz Comment G Ganeshchowdharysadanala Follow 26 Improve G Ganeshchowdharysadanala Follow 26 Improve Article Tags : Misc Java Java-JSP Explore Java BasicsIntroduction to Java3 min readJava Programming Basics9 min readJava Methods6 min readAccess Modifiers in Java4 min readArrays in Java7 min readJava Strings7 min readRegular Expressions in Java3 min readOOP & InterfacesClasses and Objects in Java5 min readAccess Modifiers in Java4 min readJava Constructors4 min readJava OOP(Object Oriented Programming) Concepts10 min readJava Packages2 min readJava Interface7 min readCollectionsCollections in Java12 min readCollections Class in Java13 min readCollection Interface in Java4 min readIterator in Java4 min readJava Comparator Interface5 min readException HandlingJava Exception Handling6 min readJava Try Catch Block4 min readJava final, finally and finalize4 min readChained Exceptions in Java3 min readNull Pointer Exception in Java5 min readException Handling with Method Overriding in Java4 min readJava AdvancedJava Multithreading Tutorial3 min readSynchronization in Java7 min readFile Handling in Java4 min readJava Method References7 min readJava 8 Stream Tutorial7 min readJava Networking6 min readJDBC Tutorial5 min readJava Memory Management3 min readGarbage Collection in Java6 min readMemory Leaks in Java3 min readPractice JavaJava Interview Questions and Answers1 min readJava Programs - Java Programming Examples7 min readJava Exercises - Basic to Advanced Java Practice Programs with Solutions5 min readJava Quiz1 min readJava Project Ideas For Beginners and Advanced15+ min read Like