0

I defined class Test in test1.jsp


    <%! public final class Test{

    }
    %>

This class actually has implicity package names, for example if I include it in test2.jsp, the class name is org.apache.test2.Test or the like. Is there a way to define packaged class Test in test1.jsp so that I can reuse it and pass it across different jsps?

user767034
  • 15
  • 1
  • 5

1 Answers1

0

Using a filter would promote re-use. If you wanted to include test1.jsp within test2.jsp you can use scriplets to include (or forward request) to test2.jsp. But underneath jsp will be compile to a servlet (class).

Mukus
  • 4,870
  • 2
  • 43
  • 56