The $ symbol in the expression language in the JSP page is not working solution _jsp programming

Source: Internet
Author: User

Today MyEclipse deployed a previous test project, found in the JSP in the $ symbol Tomcat started on the page displayed, Baidu Search under others have similar problems appeared. I was reminded that the version set by the Web.xml configuration was 2.5 and I tomcat5 started it. is a version of Tomcat that is below the web, resulting in the $ symbol not being used properly.

The TOMCAT5 is converted to TOMCAT6. The JDK uses 1.6 to start the spring2.5 project. $ display Problem resolution.

The following is a detailed description of the online excerpt:

In the JSP page with the $ symbol in the expression language, such as ${pagescope.title} output, the content or ${PAGESCOPE.TITL} is displayed intact

But in fact, by running the following code on the current JSP page, you can test that Pagecontext.getattribute ("title") is a valued

<% ...
 Pagecontext.setattribute ("title", Aboutusbean.gettitle ());
 System.out.println ("pagecontext=" +pagecontext.getattribute ("title"));
%> 

I am using the Tomcat5.5 version, which only supports the SERVLET/JSP spec version: 2.4/2.0, and my web.xml is configured with the 2.5 specification, so the $ symbol is not working properly.

1. Check your web.xml file to ensure that the servlet is above 2.4 and does not disable El.

2. Check your Web server to ensure support for servlet 2.4 and above specifications.

3. Note the Tomcat version, each Tomcat version supports the servlet specification is not the same

The 4.TOMCAT version and the supported servlet specifications are as follows:

tomcat:6.0.13 implementation of the SERVLET/JSP specification version: 2.5/2.1
tomcat:5.5.23 implementation of the SERVLET/JSP specification version: 2.4/2.0
tomcat:4.1.36 implementation of the SERVLET/JSP specification version: 2.3/1.2
tomcat:3.3.2 implementation of the SERVLET/JSP specification version: 2.2/1.1

The above is a small series for everyone to bring the JSP page in the expression language of the $ symbol does not work in the solution of all the content, I hope that we support cloud Habitat Community ~

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.