JSP FAQ

xiaoxiao2021-03-06  82

General problems

What is JSP technology? What is the working principle of JSP technology? What is servlets? I have already used servlets. Why does I need JSP technology? Where can I get the latest version of JSP specification? JSP specification and Java 2 Platform, Enterprise Edition relationship ? What web servers support JSP technology? Is Sun provide a reference implementation of JSP specifications? JSP technology is different from other product technology? From there about JSP technology?

Technology common problem

What is the JSP page?

How does the JSP page work?

Does JSP technology need to use another Java platform API?

How does the JSP page call and compile? What is the syntax of JSP technology?

Can you use JSP technology to generate an XML page?

Can you use an XML tool to generate and process the JSP page?

How to use JavaBeans Components (Bean) in the JSP page?

General problems

What is JSP technology?

JavaServer Pages (JSP) technology provides a simple and quick way to create a web page that displays dynamically generated content. SUN, which is in the industry, has developed relevant JSP technical specifications, which defines how to interact between servers and JSP pages, and describe the format and syntax of the page.

Working principle of JSP technology?

The JSP page uses XML tags and Scriptlets (a script code written in Java language), encapsulates the logic of generating page content. It passes the label (HTML or XML) of various formats directly back the response page. In this way, the JSP page implements the separation of page logic and its design and display. JSP technology is part of the Java series technology. The JSP page is compiled into servlets and may call JavaBeans Components (Beans) or Enterprise JavaBeans Components to process on server. Therefore, JSP technology plays an important role when building upgraded web-based applications. The JSP page is not limited to any specific platform or web server. The JSP specification has a wide range of adaptation in the industry.

What is servlet?

Compared to Applets running on your browser, servlet is running on the server, written in Java language. Detailed information can be accessed

http://java.sun.com/products/servlet

.

I have used servlets, why also need JSP technology?

Since the JSP page is also compiled into servlets, you can write Servlets directly to support your web-based application. However, JSP technology simplifies the process of creating a web page by separating the page content and display logic. In many applications, you need to send a template content and dynamically generated data to the client. Based on this consideration, using JSP page technology will be more convenient than all servlets.

Where can I get the latest version of JSP specification?

The latest JavaServer Pages 2.0 specification can

Since then

download.

What is the relationship between JSP specifications and Java 2 Platform, Enterprise Edition?

JSP 2.0 specification is

Java 2 Platform, Enterprise Edition 1.4

important parts of. The combination of JSP and EJB technologies showed powerful strength in the construction of distributed enterprise applications based on web front-end display.

What web servers support JSP technology?

There are many JSP technology implementations that can be used in different web servers. To get the latest Web server information that has been officially supported, please visit

Http://java.sun.com/products/jsp/industry.html.

Does Sun provide a reference implementation for JSP specifications?

J2EE SDK is a reference implementation of JavaTM 2 Platform, Enterprise Edition. Sun is modified in J2EE SDK and integrate Tomcat JSP and Java Servlet implementation. J2EE SDK can be used as the development environment before the application deployment and release. Tomcat is an implementation of Java Servlet and JSP technology for free and open source, which is developed by the Jakarta project group of Apache Software Foundation. From

http://jakarta.apache.org

download. Tomcat's business applications require a license for Apache Software Foundation (ASF) and access to binary and source code available on Apache's website. The implementation of JSP technology is

J2EE SDK

a part of.

What is the difference between JSP technology compared to other product technology?

JSP technology is the result of industry collaboration, its design is open, in line with industry standards, and supports the vast majority of servers, browsers, and related tools. Since the use of reusable components and labels replace the serious dependence on the page itself scripting language, JSP technology has greatly accelerated the development of the development. All JSP implementations support scripting languages ​​based on Java programming languages, which have a born adaptability, support complex operations.

From there to get more information about JSP technology?

Get the best place for JSP technical information is

http://java.sun.com/products/jsp/

. There are a large number of resources here, and there are information on mailing lists and discussion groups in JSP-related technical topics.

Technology common problem

What is the JSP page?

The JSP page is a web developer uses a JSP built-in tag and custom label to generate a page generated by other static tags (HTML or XML tags). The extension of the JSP page is .jsp or .jspx, the web server notifies the JSP engine to process the elements in the page through this extension. You can also contact other extensions and JSP engines by deploying file web.xml. The authentication format of the JSP page is described in the JSP specification.

How does the JSP page work?

Explain the tags in the JSP page through the JSP engine to generate the required content. For example, calling a bean to access a database using the JDBC API or contain a file. The JSP engine then sends the result in the HTML (or XML) page in the HTML (or XML) page. It is essentially to encapsulate the business logic of the generated content to the label and beans processed by the server.

Does JSP technology need to use another Java platform API?

The JSP page is usually compiled into a Java platform servlet class. Therefore, the operation of the JSP page requires a Java virtual machine that supports the Java Platform Servlet specification.

How does the JSP page call and compile?

The JSP page is actually compiled once when they were called. The page is compiled into a Java Servlet class and resides in server memory so that it will be quickly called.

What is the syntax of JSP technology?

About JSP

Grammar and reference

You can browse and download on our website.

Can you use JSP technology to generate an XML page?

Of course, the JSP specification supports the creation of XML documents. For simple XML documents, the XML tag will be included in the JSP page in a static part. Dynamic XML generation requires the use of bean components or custom labels. See White Paper Developing XML Solutions with JavaServer Pages Technology (

PDF

) You can get more details.

Can I use an XML tool to generate and process the JSP page? JSP 2.0 specification describes the mapping between JSP pages and XML documents. The XML tool can be used to generate and process the JSP page by this mapping.

How to use JavaBeans Components (Bean) in the JSP page?

The JSP specification includes standard labels for use and processing Beans. Generate a specific Javabeans instance using the UseBean tab. If the instance of this class already exists, use it directly. Otherwise, create a new instance. SetProperty and GetProperty tags allow you to operate the properties of a given object. These tags have been described in detail in JSP specifications and guidelines.

转载请注明原文地址:https://www.9cbs.com/read-98338.html

New Post(0)