10 Replies Latest reply on Nov 1, 2004 9:29 AM by frodo_20

    Where in the he$$ is javax.servlet.jar???

    frodo_20

      I did a FULL search on my machine and I can't find javax.servlet.jar. I have installed JDK1.4, JBOSS, Ant and tutorials and NONE of them put that file on my machine. JBOSS won't build without it.

      WHERE ON EARTH DO I GET IT

      I even imagined Microsoft removing all references to it from the entire web to foil me :-)

        • 1. Re: Where in the he$$ is javax.servlet.jar???
          robisz

          I have it in JBOSS_HOME/server/default/deploy/lib dir. (JBOSS 4.0)

          • 2. Re: Where in the he$$ is javax.servlet.jar???
            frodo_20

            I installed the 3.2.6 version and I am finding it unbelievable that javax.servlet.jar was not included. Can I get that package by itself somewhere? I wanted to spend this weekend in JSP immersion therapy.
            Seriously I wanted to go through the tutorials.

            Any suggestions welcome.

            Cheers

            • 3. Re: Where in the he$$ is javax.servlet.jar???
              darranl

              Have you searched the forums for information on this? I don't have all of the JBoss versions available to check but I know this jar has in the past been renamed / moved, I think this has been discusses in the Getting started guide forum.

              Are you sure that you are using the correct version of the tutorial for your JBoss version?

              • 4. Re: Where in the he$$ is javax.servlet.jar???
                starksm64

                server/default/deploy/jbossweb-tomcat50.sar/servlet-api.jar

                • 5. Re: Where in the he$$ is javax.servlet.jar???
                  frodo_20

                  Thanks for the responses. I got the javax.servlet.jar file put it into each of the server conf lib dirs and voila I was able to compile immediately! I am using the suggested sources from the Getting Started with JBoss
                  J2EE applications on the JBoss 3.2.x Server PDF. Even if I change to use the servlet-api.jar won't I have to go in and change all of the import statements that refer to javax.servlet.jar in the source code. Forgive me if that is a dumb question I am a newbie.

                  Thanks

                  • 6. Re: Where in the he$$ is javax.servlet.jar???
                    darranl

                    The name of a jar file has nothing to do with the packages of the classes it contains so you will not need to update any import statements.

                    • 7. Re: Where in the he$$ is javax.servlet.jar???
                      frodo_20

                      OK. Thanks for the help. I put servlet-api.jar and jsp-api.jar into the jboss-3.2.6/server/default/lib directory AND changed the content of the following tags in the jboss-build.xml file like so (I have removed the less than and greater than symbols from the XML):

                      property name="myservlet.jar" value="${jboss.server}/lib/servlet-api.jar"
                      property name="myjsp.jar" value="${jboss.server}/lib/jsp-api.jar"

                      and this section like so.

                      path id="build.classpath"
                      path refid="client.classpath"
                      pathelement location="${myservlet.jar}"
                      pathelement location="${myjsp.jar}"
                      path

                      And everything compiled fine. So is the file javax.servlet.jar kind of deprecated or something? It seems to have contained everything from the other two jars.

                      Thanks again.

                      • 8. Re: Where in the he$$ is javax.servlet.jar???
                        frodo_20

                        I also noticed that the name "servlet.jar" seems to be reserved (by ant) or something because when I tried to re-assign the path to servlet-api.jar it (the property named "servlet.jar") kept echoing as javax.servlet.jar until I changed the name of the property to "myservlet.jar". Am I nuts or is this old news.

                        • 9. Re: Where in the he$$ is javax.servlet.jar???
                          luc.texier

                          in build.properties, update as follows

                          servlet.jar=${jboss.deploy.dir}/jbossweb-tomcat50.sar/servlet-api.jar
                          jsp.jar=${jboss.deploy.dir}/jbossweb-tomcat50.sar/jsp-api.jar


                          in jboss-build.xml, update as follows
                          <!--
                          | The build classpath
                          -->






                          Don't move libs around.

                          • 10. Re: Where in the he$$ is javax.servlet.jar???
                            frodo_20

                            I will take your advice. Thanks to all of you for sharing your expertise.

                            Cheers