Problems importing Java packages in JSP

Source: Internet
Author: User

The last time I wrote a JSP guide, there were two errors ( what?). There are two places ..., in a word ... ), so here's what you want to record:

The new JSP file will automatically generate a sentence:

<%@ page language= "java" import= "java.util.*" pageencoding= "UTF-8"%>

Then we need to import the packages we want:

One-to-one import:

<%@ page language= "java" import= "java.sql.*"%>
<%@ page language= "java" import= "java.util.regex.*"%>

A piece of import:

<%@ page import= "java.sql.*,java.util.regex.*"%> in the middle with commas separated, followed by commas!

The mistake I made myself was:

The first place is:

<%@ page language= "java" import= "java.util.*" pageencoding= "UTF-8"%>
<%@ page language= "java" import= "java.sql.*" pageencoding= "UTF-8"%>

Is it a weird feeling?

Problems importing Java packages in JSP

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.