Reasons to use Servlet and JSP separately in Java development

I am a beginner in programming. Since I investigated the reason for separating Servlet and JSP, I will output only the rough contents.

Q1: Why separate Servlet and JSP?

A: To make the source code easier to manage

Basically, logic is written in ** Servlet **, and appearance part (HTML etc.) is written in ** JSP *. .. As an image, - Servlet → Write ordinary java code. * ・ * JSP → Mostly HTML and other visual code, but java code is included as needed. *

【Concrete example】

-When developing with multiple people, conflicts will not occur if the person in charge is divided into separate files. -The readability of the source code is improved. Etc ........

As I learned during my research, when JSP is also working, it is finally converted to Servlet by the Servlet container. For details, see the URL below.

URL

** [Reference source] ** IT Glossary that makes you feel like you understand even if you don't understand it

Recommended Posts

Reasons to use Servlet and JSP separately in Java development
[java] Reasons to use static
How to use scope (JSP & Servlet)
How to use classes in Java?
Create a Java Servlet and JSP WAR file to deploy to Apache Tomcat 9 in Gradle
Comparison of WEB application development with Rails and Java Servlet + JSP
Advance hibernate interview questions and answers
Questions in java exception handling throw and try-catch
Java collection interview questions
Input in tabular format with Struts2.5.x (JSP and Thymeleaf compatible)
Reasons to use Servlet and JSP separately in Java development
Multilingual Locale in Java How to use Locale
I want to use @Autowired in Servlet
Java to C and C to Java in Android Studio
[Java] How to use FileReader class and BufferedReader class
[Java] How to use Calendar class and Date class
Summary when trying to use Solr in Java and getting an error (Solr 6.x)
Use OpenCV in Java
Use PreparedStatement in Java
I want to use ES2015 in Java too! → (´ ・ ω ・ `)
Things to watch out for in future Java development
Java classes and instances to understand in the figure
How to convert A to a and a to A using AND and OR in Java
Use of Abstract Class and Interface properly in Java
[Java] Convert JSON to Java and Java to JSON-How to use GSON and Jackson-
Gzip-compress byte array in Java and output to file
Notes on how to use regular expressions in Java
[Java] How to use Map
[Java] How to use Map
[Java] Change language and locale to English in JVM options
How to use java Optional
How to use java class
Things you often use when doing web development in Java
[Java] How to use Optional ②
[Java] How to use removeAll ()
[Java] How to use string.format
What happened in "Java 8 to Java 11" and how to build an environment
Java Servlet / JSP View drawing
How to use Java Map
How to use Java enums (Enum) in MyBatis Mapper XML
First Java development in Eclipse
How to develop and register a Sota app in Java
How to use Java variables
I tried using Dapr in Java to facilitate microservice development
Use Redis Stream in Java
Differences in how to handle strings between Java and Perl
[Java] Use ResolverStyle.LENIENT to handle the date and time nicely
[Java] How to use Optional ①
A Simple CRUD Sample Using Java Servlet / JSP and MySQL
What I have learned in Java (Part 1) Java development flow and overview
[Java8] Proper use of Comparable and Comparator in terms of employee sorting
Basics of Java development ~ How to write programs (variables and types) ~
[Java] How to use static modifiers (What are static final and static import)
How to set and use profile in annotation-based Configuration in Spring framework
AtCoder ARC 081 C hash to solve in Ruby, Perl and Java
Notes on building Kotlin development environment and migrating from Java to Kotlin
[Android] Convert Map to JSON using GSON in Kotlin and Java
Sample to read and write LibreOffice Calc fods file in Java 2021
Steps to install Maven on Mac and use it in Eclipse
How to encrypt and decrypt with RSA public key in Java
How to use Lombok in Spring
How to use StringBurrer and Arrays.toString.
How to use Java HttpClient (Get)
Use java with MSYS and Cygwin
How to use EventBus3 and ThreadMode