Hi,

   I followed the tutorial:

http://www.jboss.org/documentation/HTML/ch11s78.html

  And tried to share a .jar file in the method described. When my JSP, which does <%@ 
page import="SomePackage"> compiles, the compiler complains that the class is not 
found. Now I had a hunch that the class loader to run the JSP (once its compiled) 
works fine but the compiler does not see the extra .jar files? I tested this out by 
using two java class files where C1 requires C2 to work. C1 was in my .war and C2 in 
the shared .jar as described in the article. This did work! So I assume the compiler 
simply needs C1 to compile my JSP. When C1 is actually loaded and instantiated, C2 is 
loaded?

  The only test provided with JBoss on this is a servlet which is pre-compiled so 
hence does not show this issue.

  Questions: 

   1)If I include the C1 in both the .war and as a shared lib in the .ear will the 
call optimization still happen?
   2)Any way to fix the JSP compiler with Tomcat so the shared lib is being used?

                               Thanks
                               Doron

Here is my C1

public class TestClass {

  public TestClass()
  {
    TestClassDep td = new TestClassDep();
  }

  public String sayHello()
  { return "Hello";}
}

here is my C2

public class TestClassDep {

  public TestClassDep() {
  }
}

Roughly my JSP:
<%@ page import="SomePackage" %>
<HTML>
  <HEAD>
  </HEAD>

  <BODY>
    
    <%
      TestClass tc = new TestClass();
      out.println("TestClass:" +tc.sayHello());
    %>
    
  </BODY>

</HTML>



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to