2011-12-27 56 views
0

我第一次使用displaytag。我已經將jar文件添加到庫中。下面是代碼:Displaytag 1.2錯誤

<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> 

該錯誤消息我得到的是這樣的,我一直在尋找一個星期的解決方案,但無法找到任何東西。謝謝您的幫助。

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

回答

1

確保您必須displaytag.jar,公地beanutils.jar,公地collection.jar,公地lang.jar,公共-logging.jar,log4j.jar文件和displaytag-11.tld在你的WEB-INF文件中。之後在你的web.xml文件中包含tld文件