2

HelloWorld is my ActionSupport class and the pop method is loading the values to countryList object of Country class type.

package example;    
import com.opensymphony.xwork2.ActionSupport;
import java.util.ArrayList;

public class HelloWorld extends ActionSupport {

    ArrayList<Country> countryList = new ArrayList<Country>();

    public ArrayList<Country> getCountryList() {
        return countryList;
    }

    public void setCountryList(ArrayList<Country> countryList) {
        this.countryList = countryList;
    }

    public String pop() {
        countryList.add(new Country("IND", "INDIA"));
        countryList.add(new Country("PAK", "PAKISTAN"));

        System.out.println("countryList " + countryList);

        return SUCCESS;
    }

    @Override
    public String execute() throws Exception {

        return SUCCESS;
    }
}

The struts.xml is

<struts>
    <package name="example" namespace="/example" extends="struts-default">
        <action name="HelloWorld" method="pop" class="example.HelloWorld">
            <result name="success">/example/HelloWorld.jsp</result>
        </action>
    </package>
</struts>

and jsp page is:

<%@taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
    <head>
        <title></title>
    </head>

    <body>
        HAI

        <display:table name="${countryList}"  class="Country" uid="row" pagesize="20" sort="list" requestURI="/example/HelloWorld" >
            <display:column property="id" title="ID" />
            <display:column property="name" />
        </display:table>
    </body>
</html>

When i run this application,it shows the following error :

description The server encountered an internal error () that prevented it from fulfilling this request.

exception javax.servlet.ServletException: java.lang.SecurityException: class "org.apache.commons.collections.FastHashMap"'s signer information does not match signer information of other classes in the same package

root cause java.lang.SecurityException: class "org.apache.commons.collections.FastHashMap"'s signer information does not match signer information of other classes in the same packa

Please solve this.

user871611
  • 3,307
  • 7
  • 51
  • 73
Master Mind
  • 2,386
  • 3
  • 31
  • 48

1 Answers1

2

As per few forums there could be a jar conflict here. Please verify all the included jars to see if there is duplication of class org.apache.commons.collections.FastHashMap in them. Remove the duplicated and jar and that should resolve this issue.

James Jithin
  • 10,183
  • 5
  • 36
  • 51