1 / 5

Understanding JSP and Servlets in Java Web Applications

This guide provides an overview of JavaServer Pages (JSP) and Servlets, essential components in Java web applications. JSP allows you to embed Java code within HTML, enabling dynamic web content. Key JSP elements include scriptlets for embedding code, declarations for defining variables, and expressions for outputting values. Servlets, on the other hand, separate business logic from presentation, allowing for better organization of code. All JSP pages are converted into Java Servlets and executed by the Tomcat server. For development, download NetBeans to get started.

jabari
Télécharger la présentation

Understanding JSP and Servlets in Java Web Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Cliente JSP CSS HTML Processa os dados e devolve a página Envia requisiçãojunto com dados Servidor Tomcat Servlet MySQL

  2. Arquitetura aplicação Web Java

  3. JSP • O JSP é uma página web, dentro da qual inserimos código Java. • Elementos sintáticos JSP: • Scriptlet: <% codigo_programação; %> • Declaração: <%! declaração; %> • Expressão: <%= expressão %>

  4. Servlet • Um servleté uma classe Java, dentro da qual inserimos o código HTML. • É utilizado para separar o código da apresentação (JSP) • Toda página JSP é convertida em código Java puro (Servlet) e executada pelo container Tomcat.

  5. Baixando o NetBeans http://netbeans.org/downloads/index.html

More Related