从tomcat移植到jboss发生的jsp错误

最近发现从tomcat移植到jboss会有一点差别,尽管jboss的web用的tomcat,但还是有一点差别的。 1、list的问题 jboss的list不能使用泛型,即list不能写成list,否则会报错; 2、pageContent.setAttribute(String,Object)的问题。 jboss除了String类型,例如int,boolean等类型不能写入,不然会出现类似的错误 The method setAttribute(String, Object, int) in the type JspContext is not applicable for the arguments (String, int) 而要把Object写成new Boolean(boolean),new Integer(int)。这样就不会报错。