The $ symbol in the expression language in the jsp page does not work. jsp does not work.

Source: Internet
Author: User

The $ symbol in the expression language in the jsp page does not work. jsp does not work.

Today, I deployed a test project in myeclipse. I found that the $ symbol tomcat in jsp is displayed on the page after it is started. Baidu searched for similar problems. It is reminded that the version configured in web. xml is set to 2.5, and I started Tomcat 5. Because the version of tomcat is earlier than the web version, the $ symbol cannot be used normally.

Then, change Tomcat 5 to Tomcat 6. Jdk starts the spring2.5 project in 1.6. $ Solve the problem.

The following is a detailed description of the online excerpt:

The $ symbol in the expression language is used in the jsp page. For example, when $ {pagination. title} is output, the content cannot be displayed as unchanged as $ {pagination. titl }.

However, by running the following code on the current jsp page, you can test that pageContext. getAttribute ("title") has a value.

<% ... pageContext.setAttribute("title",aboutusBean.getTitle()); System.out.println("pageContext="+pageContext.getAttribute("title"));%> 

I use the Tomcat 5.5 version, which only supports the servlet/JSP standard version: 2.4/2.0, while my web. the 2.5 specification is configured in xml, so the $ symbol cannot be used normally.

1. Check your web. xml file to ensure that it is of Servlet 2.4 or later version and EL is not disabled.

2. Check your Web server to ensure that the Servlet 2.4 and later specifications are supported.

3. Pay attention to the Tomcat version. The Servlet specifications supported by each Tomcat version are different.

4. Tomcat versions and supported Servlet specifications are as follows:

Tomcat: 6.0.13 servlet/JSP standard version: 2.5/2.1
Tomcat: 5.5.23 compliant servlet/JSP version: 2.4/2.0
Tomcat: servlet/JSP standard version implemented in 4.1.36: 2.3/1.2
Tomcat: 3.3.2 compliant servlet/JSP version: 2.2/1.1

The above is all about the solution that the $ symbol in the expression language on the jsp page does not work for everyone. I hope you can support the help house a lot ~

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.