你的jsp中(taglibs.jsp)开头定义了两个或两个以上contentType.如contentType="text/html;charset=xxx"。有可能你的jsp中引入(<%include file="xxxxxxxx"%>)了其他的jsp,而其他的jsp也包含了contentType的定义

解决方案 »

  1.   

    同意,我也遇到过类似情况,就是用<%include file="sss"%>的时候,正好那个文件里也包含了contentType的定义,很挠心的!
      

  2.   

    org.apache.jasper.JasperException: /taglibs.jsp(0,0) Page directive: can't have multiple occurrences of contentTypemultiple occurrences of contentType有可能你的jsp中引入(<%include file="xxxxxxxx"%>)了其他的jsp,而其他的jsp也包含了contentType的定义
      

  3.   

    在动态包含jsp文件时被包含jsp文件不能指定contentType,否则就会出现上面的问题。而静态包含时必须指定,否则就会出现乱码。你把被包含文件中的contentType去掉就行了。
      

  4.   

    对,是头文件重复了。有些server就不会出现这样的问题。