8 Replies Latest reply on Dec 3, 2001 6:20 AM by Roland Bergler

    How to run sample JSP/Servlet from Catalina in JBoss-2.4.3_T

    PAtrick Newbie

      I am having problems running sample jsp/servlet from JBoss-2.4.3_Tomcat-4.0. Has anyone encountered same problems.?
      Does this have anything to do with jboss integration with server.xml.?

        • 1. Re: How to run sample JSP/Servlet from Catalina in JBoss-2.4
          pohl longsine Newbie

          I encountered this problem too. I turns out that the example JSPs and servlets are in the wrong deployment directory, and I had to use the "jar" command to make a package that I could drop into the right directory.

          In particular, I stepped into the catalina/webapps/examples directory and did a "jar cvf examples.jar *". I then took the resulting jar and placed it in the jboss/deploy directory.

          Hope this helps.

          • 2. Re: How to run sample JSP/Servlet from Catalina in JBoss-2.4
            Hitesh Parashar Newbie

            Hi:

            I encountered the same problem and then jarED and deployed the examples and everything seemed to be working fine. Now, I need to do something more ... Could you suggest the way to do the following.

            I am running JBoss 2.4.3, Tomcat 4.0, Apache 1.3.22. I am using module mod_auth_ldap for BASIC HTTP authentication. For specifying the protected resources, we have to protect the directory where those resources reside. e.g.

            <Directory "/usr/local/apache/htdocs/foo">
            #<Directory "C:/Apache/htdocs/foo">
            Options Indexes FollowSymLinks
            AllowOverride None
            order allow,deny
            allow from all
            AuthName "RCS Staff only"
            AuthType Basic
            LDAP_Server ldap.fccc.edu
            LDAP_Port 389
            Base_DN "o=Fox Chase Cancer Center,c=US"
            #Bind_DN "uid=admin,o=Fox Chase Cancer Center,c=US"
            #Bind_Pass "secret"
            UID_Attr uid
            #require valid-user
            require user muquit foo bar "john doe"
            #require roomnumber "123 Center Building"
            #require filter "(&(telephonenumber=1234)(roomnumber=123))"
            #require group cn=rcs,ou=Groups


            JBoss requires us to put the resources in JAR/WAR/EAR files and put into deploy directory (because my understanding is that server.xml of catalina does not talk to JBoss (please let me know if I am wrong)).

            How can I use BASIC HTTP auth in this scenario. Is there a workaround? Can I put my JSP/HTML/gif resources in a directory and protect them and make JBoss happy too!

            TIA,

            Hitesh.

            • 3. Re: How to run sample JSP/Servlet from Catalina in JBoss-2.4
              Leon5000 Newbie

              Hello,

              I am interested in the same top. Does anyone have the experience with running servlet from catalina in JBoss-2.4.3_Tomcat-4.0?

              • 4. Re: How to run sample JSP/Servlet from Catalina in JBoss-2.4
                Steinar Overbeck Cook Newbie

                Yes, I have experienced the same as "pohl".

                You must create a war file and copy it into the "deploy" directory of JBoss.

                • 5. Re: How to run sample JSP/Servlet from Catalina in JBoss-2.4
                  akeijou Newbie

                  >JBoss requires us to put the resources in JAR/WAR/EAR files and put into deploy directory (because my understanding is that server.xml of catalina does not talk to JBoss (please let me know if I am wrong)).

                  there's a discussion on this in
                  http://jboss.org/forums/thread.jsp?forum=50&thread=2439

                  >How can I use BASIC HTTP auth in this scenario. Is there a workaround? Can I put my JSP/HTML/gif resources in a directory and protect them and make JBoss happy too!

                  above discussion also mentions that we might be able to connect apache to jboss+tomcat in the future. in which case i would imagine that any request going through apache can be authenticated using basic http. however, there's also mention that jboss will be able to handle all of that on its own. i don't know, i'm quite attached to my apache. i'm doing wait-and-see for now.
                  --meg


                  • 6. Re: How to run sample JSP/Servlet from Catalina in JBoss-2.4
                    vernon wu Newbie

                    I am totally confused after I read through this thread. I think the original question is about unable to run the samples come with Tomcat in the bundle, that doesn’t request any deployment at all. And responses are about how to run your own applications which you need to deploy them.

                    Can anyone explain that why I can bring up a page of Tomcat when the stand-alone Tomcat in run, but the same URL doesn’t work for the JBoss and Tomcat bundle?

                    • 7. Re: How to run sample JSP/Servlet from Catalina in JBoss-2.4
                      vernon wu Newbie

                      After spending more time on the bundle, I have more understanding on how it works. Ignore my previous post.

                      On the other hand, I still have some problems to get an web client sample up, although the EJB client runs: a parse error on a web.xml file: "Element type "web-app" is not declared." Any soluations?


                      • 8. Re: How to run sample JSP/Servlet from Catalina in JBoss-2.4
                        Roland Bergler Newbie

                        try declaring your dtd in web.xml:

                        <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

                        hope this helps