3 Replies Latest reply on Nov 26, 2002 8:28 AM by lerm

    Inner classes and JSP

    lerm

      I have such class:

      public class UniChildSheet extends UniTableSheet
      {
      protected class SingleTableCtrl extends TableCtrl
      {
      public void init() throws Exception
      {
      ...
      }
      }
      }

      And such code in jsp:

      public class FormsSheet extends UniChildSheet
      {
      ...
      class FormTableCtrl extends SingleTableCtrl
      {
      public void init() throws Exception
      {
      super.init();
      ...
      }
      }
      }

      This section work fine under Weblogic 6, but when trying to get jsp from JBoss 3.0.2, i receive error:

      Jetty__8080___\forms$jsp.java:310:
      The type UniChildSheet.SingleTableCtrl to which the member
      init belongs is not accessible from inner class
      org.apache.jsp.forms$jsp. FormsSheet.FormTableCtrl.super.init();

      Why?

        • 1. Re: Inner classes and JSP

          put together a testcase .war with a very simple servlet and JSP both making use of these classes.

          If the Servlet works and the JSP does not, I will take a look at it.

          Cheers,

          Jules

          • 2. Re: Inner classes and JSP

            Are you using Sun's 1.3 jdk?
            There are plenty of bugs relating to protected
            members and inner classes.
            Most seem to be fixed by 1.4

            When you used Weblogic, you probably used the jrockit VM

            Regards,
            Adrian

            • 3. Re: Inner classes and JSP
              lerm

              This is such sample. There are servlet TestServlet and jsp TestJsp.jsp inside.
              I try JBoss 3.0.4 (Jetty), try jdk 1.4.1. Don't work...