Importing Classes in JSP
As a JSP developer, you might encounter situations where you need to use classes other than those in the java.lang package. To utilize external classes, such as java.util.List, in your JSP page, you must import them using an import statement.
Importing a Single Class
To import a single class, like java.util.List, into your JSP page, use the following syntax:
1 |
|
Importing Multiple Classes
If you need to import multiple classes, you can use the following format:
1 |
|
For example, to import java.util.List and java.util.Map, you would use:
1 |
|
The above is the detailed content of How Do I Import Classes into My JSP Pages?. For more information, please follow other related articles on the PHP Chinese website!