J2EE basics-why can't jsp replace servlet?

Source: Internet
Author: User

JSP dynamic Web content may be a great technology of dynamic Web content, and the content and expression presentation can be separated,
Some people still wonder why servlets still needs to be implemented simultaneously with JSP.


In fact, the practicality of servlets is not a problem. They have excellent performance in server-side processing, and they continue to exist due to their compelling installation methods. In fact, you can regard JSP as an advanced abstraction of servlets, which is implemented in the form of Servlet 2.1 API extension.


You should still not use servlets unselectively; they may not apply to everyone. For example, when a page designer can easily use convenient HTML or XML tools to compile JSP pages, servlets may be more suitable for backend developers, because they often use a certain IDE To Write-this is a process that usually requires high programming experience.

When publishing servlets, Even developers have to be careful to ensure that there is no close combination between presentation and content. You can do this by adding a third-party release package such as htmlKona. However, even if this can be done, although some flexibility can be provided through simple screen adjustment, it still cannot be guaranteed for you to change the presentation format. For example, if your presentation changes from HTML to DHTML, you still need to ensure that the release package is consistent with the new format, in the worst case-scenario, if a release package cannot be obtained, you will end up using handwritten code for presentation in the dynamic web content.


So what is the solution?
One way is to use JSP and servlet technologies to build an application system.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.