1 Reply Latest reply on Jul 18, 2005 4:19 AM by amirkibbar

    tagfiles and generics

      Is it possible to use Java5 generics as method parameters in a JSP 2.0 tagfile? I've tried specifying the method parameters using both angle brackets and their html escape equivalent.

      <function-signature>boolean foo(java.util.Collection<Bar>)</function-signature>
      

      and
      <function-signature>boolean foo(java.util.Collection&lt;Bar&gt;)</function-signature>
      


      Neither works. When using the angle brackets, there is an XML parsing problem. When using the html escape characters, it claims that it can't find type "java.util.Collection&lt;Bar&gt;".

      Thank you!
      Darin

        • 1. Re: tagfiles and generics
          amirkibbar

          Hi,


          to enable 1.5-complient code in jboss you must do the following:

          * edit jboss-home/server/default/deploy/jbossweb-tomcat55.sar/conf/web.xml
          o find the servlet called jsp and add the following init params:
          <!-- enable 1.5 code -->
          <init-param>
          <param-name>compilerSourceVM</param-name>
          <param-value>1.5</param-value>
          </init-param>
          <init-param>
          <param-name>compilerTargetVM</param-name>
          <param-value>1.5</param-value>
          </init-param>
          <!-- end of 1.5 enablement -->
          * copy java-home/lib/tools.jar to jboss-home/server/default/deploy/jbossweb-tomcat55.sar/
          * copy ant-home/lib/ant.jar to the same location (use ant 1.6.5 or above)
          * remove jasper-compiler-jdt.jar from that location (the ant.jar replaces its functionality)

          Amir