Displaytag 1.2 error

谁说胖子不能爱 提交于 2019-12-23 05:52:01

问题


I am using displaytag for the first time. I have added the jar files to the library. Here is the code:

<html:form action="/contractorDetail"  >
        <div class="Frame">
            <div class="Main">
                <%  
                    if ( session.getAttribute("companyList") != null )
                    {
                        List<Company> companyList = (List)session.getAttribute("companyList");
                        if (companyList.size() != 0 )
                        {
                %>
                <% request.setAttribute( "companyList", companyList ); %>
                <display:table name="companyList" >
                </display:table>
                 <%}%>
                <%}%>
             </div>
         </div>
  <html:form>

The error message I get is this and I have been searching for a solution for a week, but cannot find anything. Thanks for the help.

javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/commons        
 /lang/UnhandledException      
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:268)

回答1:


Make sure you must have displaytag.jar, commons-beanutils.jar, commons-collection.jar, commons-lang.jar, commons-logging.jar, log4j.jar files and displaytag-11.tld in your WEB-INF file. After that include the tld file in your web.xml file



来源:https://stackoverflow.com/questions/8640596/displaytag-1-2-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!