Does this mean that you can just learn JSP and forget about servlets? Absolutely not! JSP developers need to know servlets for four reasons:
a. JSP pages get translated into servlets. You can't understand how JSP works without understanding servlets.
b. JSP consists of static HTML, special-purpose JSP tags, and Java code. What kind of Java code? Servlet code! You can't write that code if you don't understand servlet programming.
c. Some tasks are better accomplished by servlets than by JSP. JSP is good at generating pages that consist of large sections of fairly well structured HTML or other character data. Servlets are better for generating binary data, building pages with highly variable structure, and performing tasks (such as redirection) that involve little or no output.
d. Some tasks are better accomplished by a combination of servlets and JSP than by either servlets or JSP alone.
JSP technology strength
(1) time to prepare, run everywhere. At this point Java better than PHP, in addition to systems, the code not to make any changes.
(2) the multi-platform support. Basically on all platforms of any development environment, in any environment for deployment in any environment in the expansion. Compared ASP / PHP limitations are obvious.
(3) a strong scalability. From only a small Jar documents can run Servlet JSP, to the multiple servers clustering and load balancing, to multiple Application for transaction processing, information processing, a server to numerous servers, Java shows a tremendous Vitality.
(4) persification and powerful development tools support. This is similar to the ASP, Java already have many very good development tools, and many can be free, and many of them have been able to run on a variety of platforms under.
JSP technology vulnerable:
(1) and the same ASP, Java is the advantage of some of its fatal problem. It is precisely because in order to cross-platform functionality, in order to extreme stretching capacity, greatly increasing the complexity of the product.
(2) Java's speed is class to complete the permanent memory, so in some cases by the use of memory compared to the number of users is indeed a "minimum cost performance." On the other hand, it also needs disk space to store a series of. Java documents and. Class, as well as the corresponding versions of documents.
Know servlets for four reasons:
1. JSP pages get translated into servlets. You can't understand how JSP works without understanding servlets.
2. JSP consists of static HTML, special-purpose JSP tags, and Java code. What kind of Java code? Servlet code! You can't write that code if you don't understand servlet programming.
3. Some tasks are better accomplished by servlets than by JSP. JSP is good at generating pages that consist of large sections of fairly well structured HTML or other character data. Servlets are better for generating binary data, building pages with highly variable structure, and performing tasks (such as redirection) that involve little or no output.
4. Some tasks are better accomplished by a combination of servlets and JSP than by either servlets or JSP alone.
Versus JavaScript
JavaScript, which is completely distinct from the Java programming language, is normally used to dynamically generate HTML on the client, building parts of the Web page as the browser loads the document. This is a useful capability and does not normally overlap with the capabilities of JSP (which runs only on the server). JSP pages still include SCRIPT tags for JavaScript, just as normal HTML pages do. In fact, JSP can even be used to dynamically generate the JavaScript that will be sent to the client. So, JavaScript is not a competing technology; it is a complementary one.
JSP is by no means perfect. Many people have pointed out features that could be improved. This is a good thing, and one of the advantages of JSP is that the specification is controlled by a community that draws from many different companies. So, the technology can incorporate improvements in successive releases. JSP英文文献和中文翻译(2):http://www.751com.cn/fanyi/lunwen_78164.html