1 Reply Latest reply on Aug 19, 2003 6:32 PM by blackers

    Where do I put Java Beans

    jfox

      To start off with I really don't know much about JSP development or deployment. I've gotten sucked into an admin role without much background.

      We currently use JRUN. The developers create .war files and I deploy them under JRUN with little difficulty. I need to do the same under JBOSS.

      I can drop a .war file into the deploy directory and JBOSS attempts to compile (or execute or run or whatever) but cannot. The error message makes me think that JBOSS is not seeing the java beans that are located under WEB-INF/classes. Here is an example error message:
      HTTP ERROR: 500 Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file [javac] C:\WINNT\TEMP\Jetty_0_0_0_0_8080__rma\index_jsp.java:7: '.' expected [javac] import EncryptDecryptBean; [javac] ^ [javac] C:\WINNT\TEMP\Jetty_0_0_0_0_8080__rma\index_jsp.java:47: cannot resolve symbol [javac] symbol : class EncryptDecryptBean [javac] location: class org.apache.jsp.index_jsp [javac] EncryptDecryptBean encryptdecrypt = new EncryptDecryptBean(); [javac] ^ [javac] C:\WINNT\TEMP\Jetty_0_0_0_0_8080__rma\index_jsp.java:47: cannot resolve symbol [javac] symbol : class EncryptDecryptBean [javac] location: class org.apache.jsp.index_jsp [javac] EncryptDecryptBean encryptdecrypt = new EncryptDecryptBean(); [javac] ^ [javac] Note: C:\WINNT\TEMP\Jetty_0_0_0_0_8080__rma\index_jsp.java uses or overrides a deprecated API. [javac] Note: Recompile with -deprecation for details. [javac] 3 errors

      EncryptDecryptBean.class is under WEB-INF/classes/

      How do I get JBOSS to find the class files for the java beans?

        • 1. Re: Where do I put Java Beans
          blackers

          Rather than putting my java beans in the WEB-INF/classes folder I generally jar all of my java beans and related classes and put the jar file in WEB-INF/lib I have never had any trouble in doing it this way using both stand alone Tomcat and Tomcat integrated with JBoss. I imagine that Jetty should work in the same way.

          Mat