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