1. JSP EL just support by JSP2.0 or above, the servlet 2.3 works for JSP1.2. If we want to use EL in JSP page, we should declare the version of servlet as 2.4 in web.xml.
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.4//EN"
"http://java.sun.com/dtd/web-app_2_4.dtd">
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
2. If we want refer to a external style sheet or javascript file, the correct link form is :
<link type="text/css" rel="stylesheet" href="pages/css/common.css">
Remember: there is NOT a slash at the beginning of URI.
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.4//EN"
"http://java.sun.com/dtd/web-app_2_4.dtd">
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
2. If we want refer to a external style sheet or javascript file, the correct link form is :
<link type="text/css" rel="stylesheet" href="pages/css/common.css">
Remember: there is NOT a slash at the beginning of URI.