2 Replies Latest reply on Jun 22, 2008 2:37 PM by peterj

    JasperException: Need classpath for JSP compile

    bbredohl

      Hi,

      I have some problems to migrate a war project from BEA to JBoss 4.2.2.
      In this project are a lot of .jsp files, which use a lot of java classes without imports!

      Example:

      FileReader fReader = new FileReader(new File(file));


      When I try to deploy the Pproject, I get a lot of "... cannot be resolved to a type" errors.
      In this case:
      FileReader cannot be resolved to a type


      If I add
      import="java.io.*"


      to the jsp, everything is ok!

      How can I change this in the global configuration?




        • 1. Re: JasperException: Need classpath for JSP compile
          bbredohl

          sorry for tha bad subject. I'll try to ask in another way:

          How is it possible to handle the packages java.util and java.io in the same way as java.lang ?

          I have a lot of jsp files, which uses this packages without imports. In Bea Weblogic Server all works fine, but in JBoss 4.2.2 I get a lot of JasperExceptions.

          Thanks for your help

          • 2. Re: JasperException: Need classpath for JSP compile
            peterj

            There is no global configuration to do this. Adding the import statement to the JSP is the correct way to do this. The mechanism provide by WebLogic Server (WLS) is proprietary to WLS and is not portable.