Struts + tiles configuration error Solution

Source: Internet
Author: User
Tags tld

Struts2.0.11.1/2 + tiles 2.0.4 (part of struts2.0.11)

Struts2.0.11.2 modifies some security issues compared with struts2.0.11.1.

According to the online tiles example, there were two headaches, and finally I figured out where the error was.

1. org. Apache. Tiles. taglib. useattributetag $ Tei cannot be found.

10:12:31, 343 error [[JSP] servlet. Service () for servlet JSP threw exception
Java. Lang. classnotfoundexception: org. Apache. Tiles. taglib. useattributetag $ Tei

This is because in the taglib line in layout. jsp:

The original use is/WEB-INF/tiles. TLD. It does not match the current version. Extract the tiles-jsp-2.0.4.jar from the tiles-jsp.tld. Put it in a proper position and write the statement right.

2. Attribute 'header' not found.

10:36:05, 734 error [rendertagsupport] error during rendering
Javax. servlet. jsp. jspexception: Error executing Tag: attribute 'header' not found.

This problem is defined in struts. xml


Org. Apache. Tiles. impl. basictilescontainer. definitions_config

/WEB-INF/tiles. xml

The doctype field in tiles. XML is as follows:

"-// Apache Software Foundation // DTD tiles configuration 2.0 // en"
Http://jakarta.apache.org/struts/dtds/tiles-config.dtd>

This is wrong and should be written

"-// Apache Software Foundation // DTD tiles configuration 2.0 // en"
Http://tiles.apache.org/dtds/tiles-config_2_0.dtd>

References:

For the definition of doctype, see example in tiles.

Http://openbeyond.javaeye.com/blog/194297
Struts2 + tiles2 configuration (Memo)-openbeyond-javaeye technical website

Http://blog.sina.com.cn/s/blog_5d96d99a0100d5q5.html
Struts 2 + hibernate 3 + spring 2 + tiles 2 integrate the required jar

Project error question _ Baidu Knows
Http://zhidao.baidu.com/question/36207135.html

Http://liuxue.javaeye.com/blog/130006
Configure tiles in struts2.0 [from column haoxing272]
Http://d.download.csdn.net/down/213702/haoxing272

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.