Tomcat: The JavaBeans referenced by JSP must have a package name.

Source: Internet
Author: User

At the beginning, I wrote JSP + JavaBeans and habitually used the default package. After the result is published to Tomcat 5.5.17, the corresponding JavaBeans class cannot be found on the JSP page in any way. The same web app is packaged into A. War and tested on the Resin server for a friend. In the script snippet on the JSP page (<%>), I explicitly call getclass (). getclassloader (). loadclass (clazzname) can load my JavaBeans class successfully, but jaspercompiler cannot find this class.

The world is full of Google, but all Chinese posts are vague .. Later, I saw the class not found issues section in the Tomat FAQ. I found that the JavaBeans must be located in a package, so I suddenly realized that. Modify my JavaBeans and test. Everything passes.

The strange thing is that this bug exists from Tomcat 3. Why does it remain unchanged from 5.5.17? Or is there no intention to change the tomcat-specific behavior?

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.