jsp serverlet difference

The concept of JSP and Servlet for JSP for beginners, it is rather unclear, the following summarizes some of my personal views:

(1). Simply for the Jsp is Java code that contains html, which contains the html of the servlet is a Java code;

(2). Jsp ultimately be interpreted as a servlet and compile the re-implementation, Jsp is just another servlet preparation methods;

(3). Jsp good at that, servlet good at data processing, in the MVC in three-tier structure, Jsp is responsible for V (view), servlet is responsible for C (control), each with advantages and carry out their duties;

Servlet in the functional realization of the fact is the same can be said to be able to use Jsp achieved, Servlet can be achieved, but from the application point of view, Jsp presentation layer is more suitable for things because he has tag support, while the Servlet suitable the data logic layer of the data processing.

Serverlet is a Java class, Web application should be the HttpServerlet, which extends from the GenericServerlet (This is a partial realization of Serverlet interface abstract class), Serverlet class biggest advantage is the ability to provide request / response server functionality, when the there is a request submitted to the Serverlet, he was the implementation of its own service (request, response) method.

Is to show no logic function can not process the data to determine how to do?

On the client, using Javascript to solve the

How to solve but the server can use Java code to do the control of the servlet is the client and server connection all the features of an interface

分类:Java 时间:2008-06-16 人气:264
blog comments powered by Disqus


  • Reflection on the java code java reflection notes and destruction of object-oriented description of package 2010-08-01

    Student entity class: package com.vision.reflect; public class Student ( private String name; private int age; public Student () () public Student (String name, int age) ( this.name = name; this.age = age; ) public void setName (String name) ( this.n

  • java code programming optimization 2010-03-26

    Procedures for the use of available resources (memory, CPU time, network bandwidth, etc.) is limited, the purpose of optimization is to allow programs to use the least resources to complete the scheduled tasks. Optimization usually contains two aspec

  • [Change] Java thread-safe series (1) - Servlet thread-safe 2010-05-04

    Just search the time, even found an article I am familiar with. Look closely, wow, it is me writing a long time ago, was reprinted anonymously. I'll just go to my blog again stronghold on it, I think Java novice or help (did not make any changes to t

  • Java code reuse (SSH Study Notes 1) 2010-07-05

    Often and for a code dealing with people, code reuse is very important. When we develop a system inevitably will often write a function very similar code, which will be managed if the code makes the program become very bloated, so that the maintenanc

  • java study notes 8 Servlet / Jsp 2010-10-28

    J2ee finally officially entered the details of the, of course, bear the brunt of the Servlet and Jsp, J2ee on the articles have mentioned only a specification and guidelines, define a set of interfaces must be followed, the core concept of components

  • java where the difference between abstract classes and interfaces 2010-11-04

    java where the difference between abstract classes and interfaces This article is the following very thorough, it reproduced the abstract class and interface is an abstract class for the Java language to support the definition of the two mechanisms,

  • java code conversion process in detail 2011-07-21

    Common JAVA program includes the following categories: * Direct the class to run on the console (including the visual interface of the class) * JSP code class (Note: JSP Servlets class is a variant of) * Servelets class * EJB class * Other classes ca

  • java code optimization and analysis tools 2011-08-04

    Original Address: http://www.iteye.com/news/22285 1. PMD from http://pmd.sourceforge.net/ PMD scans Java source code, look for potential problems like the following: Possible bug--try/catch/finally/switch statement returns a null value. Dead code - u

  • Agile Development of Java code to write high-quality 2009-12-24

    Agile development concept has been popular for a very long time, the development of agile development iteration stage, we can through the five steps to effectively improve the quality of the entire project code. Java project development process, due

  • Java language coding standards (Java Code Conventions 2009-01-05

    At the beginning of Notes ") http://www.huihoo.org/code/java_code_conventions.html - Package and the introduction of statements (see "package and the introduction of statements") - Class and interface declarations (see "classes and int

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 闽ICP备15018612号

processed in 0.235 (s). 12 q(s)