0

How can I configure a display tag in jsp project?

WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: org/apache/commons/lang/UnhandledException
Divyang
  • 601
  • 2
  • 9
  • 18

2 Answers2

0

For display tag there is not required any configuration in web.xml

display tag is used for pagination sorting in your grid data

there is put only more three jar (1)displaytag-1.2,(2)displaytag-export-poi-1.2,(3)displaytag-portlet-1.2

and write tag lib in your jsp page like:

   <%@ taglib uri="http://displaytag.sf.net" prefix="display"%>    

your code for griding:

        <display:table name="sessionScope.yourListname" pagesize="5" sort="list" cellspacing="10" cellpadding="5">

            <display:column property="var1" title="Title1" sortable="true" />  
            <display:column property="var2" title="Title2" sortable="true" />  
            <display:column property="var3" title="Title3" sortable="true"  />  

        </display:table> 

for more understanding follow link

http://viralpatel.net/blogs/struts-displaytag-tutorial-sort-pagination-data-displaytag-struts/

Rohit R.K.
  • 309
  • 1
  • 4
  • 14
0

Example Jsp Page:

<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>


<display:table uid="ratingAdjustmentHistoryUID" name="${ratingAdjustmentHistoryForm.ratingAdjustmentHistoryQOList}"
                            requestURI="/ratingAdjustmentHistoryPre.do?method=searchRatingTracker" excludedParams="method"
                            decorator="com.ford.mpl.superg.decorator.RatingAdjustmentHistoryTableDecorator" keepStatus="true" style="width:100%">
                            <%@include file="/jsp/include/displaytag.jsp"%>
                                <display:column property="shipSite" title="RAHSiteCode" sortable="true" />
                                <display:column property="ratingMonth" title="RAHRatingMonth" sortable="true" />
                                <display:column property="prior" title="RAHPrior" sortable="true" />
                                <display:column property="revised" title="RAHRevised" sortable="true" />
                                <display:column property="adjustments" title="RAHAdjustments" sortable="true" />
                                <display:column property="comments" title="RAHComments" sortable="true" />
                                <display:column property="lastUpdated" title="RAHLastUpdated" sortable="true" />
                                <display:column property="lastUpdatedCDSID" title="RAHLastUpdatedCDSID" sortable="true" />
                        </display:table>

RatingAdjustmentHistoryTableDecorator - It is used for the Decorator

Paste the displaytag.jar file in your location *YourApplicationName*/Webcontent/WEB-INF/lib/displaytag-1.2.jar`

display tag Overview

display:column is used to display your column property is used the bean name defined in your java file title is used to show the header of a table sortable is used to sort the individual column or not name is used to get list using the form name uid is a Unique Identifier it is used to store your table as a object keepStatus is used to maintain the status of the table until the session expires

If you have still facing the issue let me know. Thanks.