11 Replies Latest reply on Dec 26, 2001 2:59 AM by twhphan

    How to JBoss 3.0 alpha  + Jetty 4 ?

    swatkat

      Hi Everybody,
      I just downloaded jboss-all module from the cvs and compiled every thing with jetty ,
      I also have Jetty and JettyExtra Modules compiled from source.
      Now i want to integrate JBoss3.0 with Jetty 4.0
      Can any body give me a lead what do i do next to integrate JBoss 3.0 and Jetty ?

      Cheers

        • 1. Re: How to JBoss 3.0 alpha  + Jetty 4 ?
          swatkat

          Well After i lookied into the the jetty config.. i replaced a all the jetty related jars from the jboss bundle with the newly compiled jetty 4 from the cvs
          Did i do the correct thing.. can any one .. just hint whether i did the correct thing or not?

          Cheers
          Binoy

          • 2. Re: How to JBoss 3.0 alpha  + Jetty 4 ?
            jules_gosnell

            The Jetty jars present in the RH tree are compiled from Jetty cvs. They may lag a few days behind, because they represent the last point at which I tested the integration.

            Unless you have an overwhelming need for a fix that has only just gone into Jetty cvs you are simply complicating matters for yourself. If such a need should arise, let me know and I will update RH cvs.

            Simply check out and build jboss-all, then run it. Jetty4 should come up and all should be wonderful.

            If you have any further Jetty related problems - let me know ....


            Jules

            • 3. Re: How to JBoss 3.0 alpha  + Jetty 4 ?
              jriedesel

              I'll admit first that I don't know what RH stands
              for... but are you saying that JBoss 3.0 alpha
              includes Jetty 3 and if I grab JBoss 3.0 alpha from
              the CVS tree and build the entire thing I'll then
              get Jetty 4 (which I also want)?
              (Darn class not found: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequestWrapper)

              • 4. Re: How to JBoss 3.0 alpha  + Jetty 4 ?
                pazu

                RH means Rabbit Hole -- that's the codename for JBoss 3.0

                • 5. Re: How to JBoss 3.0 alpha  + Jetty 4 ?
                  jules_gosnell

                  RH=3.0.

                  It contains Jetty4 (Servlet 2.3, JSP1.2) which replaces Jetty3 (Servlet 2.2, JSP1.1).

                  It's meant to be easy. Just build JBoss and run it. You should see Jetty4 happily logging away as it starts up...


                  Jules

                  • 6. Re: How to JBoss 3.0 alpha  + Jetty 4 ?
                    swatkat

                    Thanks,
                    Things are just working fine. and JAAS seems to be working fine too .. ( an earlier issue with jetty :) )
                    Cheers

                    • 7. Re: How to JBoss 3.0 alpha  + Jetty 4 ?
                      twhphan

                      Hi,

                      I just complied the newest CVS code, and attempted to deploy my application, but I get:

                      org.apache.jasper.JasperException: Unable to compile class for JSP
                      /tmp/Jetty__8080___esb/control/main$jsp.java:3: Package javax.servlet not found in import.
                      import javax.servlet.*;
                      ^

                      /tmp/Jetty__8080___esb/control/main$jsp.java:4: Package javax.servlet.http not found in import.
                      import javax.servlet.http.*;
                      ^

                      /tmp/Jetty__8080___esb/control/main$jsp.java:5: Package javax.servlet.jsp not found in import.
                      import javax.servlet.jsp.*;
                      ^

                      /tmp/Jetty__8080___esb/control/main$jsp.java:6: Package org.apache.jasper.runtime not found in import.
                      import org.apache.jasper.runtime.*;
                      ^

                      /tmp/Jetty__8080___esb/control/main$jsp.java:9: Superclass org.apache.jsp.HttpJspBase of class org.apache.jsp.main$jsp not found.
                      public class main$jsp extends HttpJspBase {
                      ^
                      5 errors

                      Seems that there's a classpath problem. I've:

                      tc_path_add=../lib/ext/org.apache.jasper.jar:../lib/ext/javax.servlet.jar

                      in jetty.properties, and the 2 jar files exist in $JBOSS_DIST/lib/ext

                      How may I correct this? Thanks

                      • 8. Re: How to JBoss 3.0 alpha  + Jetty 4 ?
                        swatkat

                        Try adding the same classpath in the system classpath too ..it works for me :)

                        • 9. Re: How to JBoss 3.0 alpha  + Jetty 4 ?
                          twhphan

                          Hi,

                          I added the classes into the system one, but still doesn't work

                          [root@eswww4 bin]# CLASSPATH=$CLASSPATH:/opt/jboss-all/build/output/jboss-3.0.0alpha/lib/ext/org.apache.jasper.jar:/opt/jboss-all/build/output/jboss-3.0.0alpha/lib/ext/javax.servlet.jar;export CLASSPATH
                          [root@eswww4 bin]# echo $CLASSPATH
                          /usr/java/jdk1.3/lib/tools.jar:...:/opt/jboss-all/build/output/jboss-3.0.0alpha/lib/ext/org.apache.jasper.jar:/opt/jboss-all/build/output/jboss-3.0.0alpha/lib/ext/javax.servlet.jar
                          [root@eswww4 bin]# echo $JBOSS_DIST
                          /opt/jboss-all/build/output/jboss-3.0.0alpha
                          [root@eswww4 bin]#

                          FYI, I use the $JBOSS_DIST/bin/run.sh script to start JBoss/Jetty

                          13:13:08,435 INFO [Jetty] Starting Jetty/4.0.D2
                          13:13:08,534 INFO [Jetty] Started SocketListener on 0.0.0.0:8080
                          13:13:08,542 INFO [Jetty] Started org.jboss.jetty.Jetty@61899b
                          13:13:08,543 INFO [JettyService] Started
                          ...
                          13:13:12,563 INFO [Default] JBoss (MX microkernel) 3.0.0alpha(200112250255) [RABBIT-HOLE] Started in 0m:10s:186ms

                          Thanks

                          • 10. Re: How to JBoss 3.0 alpha  + Jetty 4 ?
                            swatkat

                            You can try adding these lines in the /etc/profile
                            file ( on RedHat Linux ) :

                            ##########################
                            # JBOSS Related CLASSPATH
                            ##########################
                            CLASSPATH="$CLASSPATH:<your needed classpath 1>:<your needed classpath 2>"
                            export CLASSPATH
                            JAVA_HOME="<jdk installation folder>"
                            export JAVA_HOME
                            ##############################
                            # END JBOSS Related CLASSPATH
                            ##############################
                            Hope this works !!

                            • 11. Re: How to JBoss 3.0 alpha  + Jetty 4 ?
                              twhphan

                              Hi, I found that the problem exists if we use servlet mapping, I've:


                              <servlet-name>entryPoint</servlet-name>
                              <display-name>centralJsp</display-name>
                              <jsp-file>/control/main.jsp</jsp-file>



                              <servlet-mapping>
                              <servlet-name>entryPoint</servlet-name>
                              <url-pattern>/control/*</url-pattern>
                              </servlet-mapping>

                              whenever I access a URL in the format: http://:8080/esb/control/, I got the error. Within the url-pattern, /control/*, no classpath is recognized