» JSP FAQs
JSP FAQs
What is JavaServer Pages technology?
A
JavaServer Pages (JSP) technology provides a simplified, fast way to create web pages that display dynamically-generated content. The JSP specification, developed through an industry-wide initiative led by Sun Microsystems, defines the interaction between the server and the JSP page, and describes the format and syntax of the page.
How does the JavaServer Pages technology work?
A
JSP pages use XML tags and scriptlets written in the Java programming language to encapsulate the logic that generates the content for the page. It passes any formatting (HTML or XML) tags directly back to the response page. In this way, JSP pages separate the page logic from its design and display. JSP technology is part of the Java technology family. JSP pages are compiled into servlets and may call JavaBeans components (beans) or Enterprise JavaBeans components (enterprise beans) to perform processing on the server. As such, JSP technology is a key component in a highly scalable architecture for web-based applications. JSP pages are not restricted to any specific platform or web server. The JSP specification represents a broad spectrum of industry input.
What is a servlet?
A
A servlet is a program written in the Java programming language that runs on the server, as opposed to the browser (applets).
Why do I need JSP technology if I already have servlets?
A
JSP pages are compiled into servlets, so theoretically you could write servlets to support your web-based applications. However, JSP technology was designed to simplify the process of creating pages by separating web presentation from web content. In many applications, the response sent to the client is a combination of template data and dynamically-generated data. In this situation, it is much easier to work with JSP pages than to do everything with servlets.
Where can I get the most current version of the JSP specification?
A
The JavaServer Pages 2.1 specification is available for download from here.
How does the JSP specification relate to the Java Enterprise Edition 5 Platform?
A
The JSP 2.1 specification is an important part of the Java EE 5 Platform. Using JSP and Enterprise JavaBeans technologies together is a great way to implement distributed enterprise applications with web-based front ends.
Which web servers support JSP technology?
A
There are a number of JSP technology implementations for different web servers. The latest information on officially-announced support can be found at http://java.sun.com/products/jsp/industry.html.