1 2 3 Previous Next 34 Replies Latest reply on May 30, 2003 2:02 AM by droolinggeezer Go to original post
      • 15. Re: The proper way to deploy a java archive app (jar)????
        ndtemporary

        hey! good tip!
        do u know the proper way to deploy a jar application?
        please let me know...

        i am having trouble with my jar configuration,
        basically in the ejb-jar.xml and jboss.xml, in particular
        the jndi configuration part of the bean.

        anybody out there have a working sample of both
        xml files? thanks! do they have to go together?
        please advise....

        thanks again

        • 16. Re: The proper way to deploy a web app (war)
          szlee

          Hi
          Could you tell me which directory that will put the jboss-web.xml? in D:\jboss\catalina\webapps\ROOT\WEB-INF? or others. I can't find the default Servlet/JSP directory in Jboss 3.0 Thanks

          Roman

          • 17. Re: The proper way to deploy a web app (war)?
            nikolajr

            Using JBoss 3.0 with Tomcat I want to deploy a jar for once and all my war's (it's struts.jar) and not to include it in every war-file. How do I do that?

            All comments are much appreciated.

            /Nikolaj

            • 18. Re: The proper way to deploy a web app (war)?

              Struts uses class.forName() so it is impossible.
              It must be in WEB-INF/lib to get visibility to other
              stuff in there.

              Regards,
              Adrian

              • 19. Re: The proper way to deploy a web app (war)
                kisdr

                Great Post!
                I am new to Jboss.I want to create the development structure in Jboss 3.0, from where I can write the code and execute it(as we create in Tomcat/webapps).Can anybody help me in creating the development structure in Jboss 3.0?

                Thanks in advance

                • 20. Re: The proper way to deploy a web app (war)
                  mech

                  I was also having lot's of difficulties with that topic. Mainly because I forgot to write "complete" xml files. Instead I only did copy&paste of some code snippets that I found.

                  With Jetty/JBoss 3.0.3 proceed like this and create:

                  For your jsp files etc.:
                  ...\server\default\deploy\test.war

                  and save "myfile.jsp" with some code there.


                  For config create:
                  ...\server\default\deploy\test.war\WEB-INF

                  and save "jboss-web.xml" into that directory containing:

                  <?xml version="1.0"?>
                  <!DOCTYPE jboss-web>

                  <jboss-web>
                  <context-root>/</context-root>
                  </jboss-web>

                  [optional] and save a "web.xml" containing for example:

                  <?xml version="1.0" encoding="ISO-8859-1"?>
                  <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
                  <web-app>
                  <!-- Other elements go here. All are optional. -->
                  </web-app>


                  Maybe you need to restart the server and it should work then to access "http://localhost:8080/myfile.jsp" instead of "http://localhost:8080/test/myfile.jsp".

                  • 21. Re: The proper way to deploy a web app (war)
                    jtowell

                    This is what I need to do. How do I do this? How do I point the JBoss deployer to another location?

                    • 22. Re: The proper way to deploy a web app (war)
                      chpchew

                      good post. I'm a newbie in using jboss. can u tell me how to configure jboss in order to point the jboss deployer at the certain directory. can anyone help me?

                      • 23. Re: The proper way to deploy a web app (war)
                        pkrishna

                        I am trying to deploy a web application in in JBoss 3.04\Tomcat 4.1.12 bundled environment. I have placed a jboss-web.xml in the WEB-INF directory. When JBoss starts up, I get messages like the ones below:

                        ]Incompletely deployed packages:
                        [org.jboss.deployment.DeploymentInfo@bf5e9192 { url=file:/C:/jboss304_tc4112/ser
                        ver/default/deploy/administration/ }
                        deployer: null
                        status: null
                        state: INIT_WAITING_DEPLOYER
                        watch: file:/C:/jboss304_tc4112/server/default/deploy/administration/
                        lastDeployed: 1040685800388

                        Is there some other file that I will have to modify besides placing jboss-web.xml in the WEB-INF directory

                        • 24. Re: The proper way to deploy a web app (war)
                          ac249

                          Try renaming the deploy directory to have a .war extension (in your case, use administration.war instead of just administration).

                          • 25. Re: The proper way to deploy a web app (war)
                            redline

                            Q. Does anybody know how to develop with a completely unpacked ear application?

                            I can get the ear to redeploy when it's unpacked, but I can't get the war within the ear (which is also unpacked) to redeploy. touching the web.xml file in the war does not redeploy the war properly.

                            I'm developing an application, currently using jboss 3.0.4 with tomcat 4.1.12 and struts 1.1b3, and would like an easier way to redeploy my java classes in the war (ie. struts action classes) without having to restart the server.

                            is there any simple way to get jboss to restart tomcat to see the changes made in the war?

                            • 26. Re: The proper way to deploy a web app (war)
                              wugang007

                              Sounds great. Can you please tell us how exactly to do that?

                              You did not mention where to create the "exampleapp.war" directory, and what we need do to "point the JBoss deployer at the directory it"? Thanks.

                              • 27. Re: The proper way to deploy a web app (war)
                                redline

                                sure. don't know if this is the "right" way, but it works for me. one thing I don't get is how come more people aren't asking this question, since I haven't seen it answered in the forums, unless I missed it. Without expanded development, changing even a jsp in an ear would require a hot deploy of the entire app, which is unacceptable. again, if anybody knows how to redeploy the war application of an expanded ear, please post an answer. thanks.

                                here's a description of an example application. say I have an example.ear, and in it contains a this.jar, that.jar (regular classes), thisEjb.jar and thatEjb.jar (ejb classes), and a this.war (application files).

                                this is the directory structure I would create in the deploy directory in jboss instead of dropping the ear file in the directory.

                                /example.ear
                                /example.ear/META-INF/application.xml
                                /example.ear/com/example/... (whatever was in this.jar and that.jar)
                                /example.ear/this.war (whatever was in this.war)
                                /example.ear/thisEjb.jar (whatever was in thisEjb.jar)
                                /example.ear/thatEjb.jar (whatever was in thatEjb.jar)

                                to redeploy the ear, just touch the application.xml file. I tried to touch the web.xml file to redeploy, but that only seemed to force recompilation of the jsps. hopes this helps speed up the development of your app.

                                • 28. Re: The proper way to deploy a web app (war)
                                  redline

                                  my bad, touching the application.xml does redeploy the entire application. I guess what I'm looking for is redeploying just the war (struts) part without redeploying the ear part. redeploying the entire ear wastes too much time when trying to do some productive development on the war side.

                                  • 29. Re: The proper way to deploy a web app (war)
                                    dreamcoder

                                    Great thread, lots of good info here. I have a bizarre twist to add to it. Has anyone had any experience with a JAR living in the WEB-INF/lib directory *not* being made visible to calls from code in another JAR living in that *same* directory?

                                    Here's the situation. I'm running jboss-3.2.0_tomcat-4.1.24 on W2K, and I'm deploying my application as a single EAR containing a single WAR. I have two JARs in the WEB-INF/lib directory of the WAR: evp.jar has all my TagHandler code, and jtapi.jar has a JTAPI library which my TagHandler's use. The JSP's which use the tags generally work fine, until one of them attempts to instantiate an object of a class defined in jtapi.jar. When this happens, Tomcat throws an exception which ultimately results in a 500 error to the browser, and an exception stack trace in the log ending with:

                                    org.apache.jasper.JasperException: javax/telephony/JtapiPeerFactory
                                    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
                                    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
                                    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
                                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                                    etc etc etc

                                    What makes this more interesting is that when I repackage the evp.jar and jtapi.jar files into a *single* JAR file, put that single JAR file in the WEB-INF/lib directory, and run the same scenario, the problem goes away. Any ideas on what the heck may be going on here? I'm out of ideas.

                                    Andrew