13 Replies Latest reply on Sep 3, 2004 10:15 AM by clara

    javax.servlet.jar missing in 3.2.5?

    tiredofworkingfortheman

      Hi,

      I was trying to get the Duke's Bank App deployed; following the tutorial.

      During the build process I kept getting errors that servlet methods were missing. I looked for the file javax.servlet.jar as listed in the build.properties file in the j2eetutorial directory after unpacking the tutorial src from this site over the tutorial download from SUN, but no joy. So I found a servlet.jar file buried in the dist somewhere (.../tomcat/jbossweb-tomcat41....) and used it. Good news was my complile problem was over; bad news was now I have all kinds of problems getting Bank application to work.

      After thinking about this I realize what a moron I am for thinking I could just change the build.xml file pointed to "some other servlet.jar" and have it work. There are a bunch of methods that it doesn't seem to have in it. No wonder the server's getting a little miffed come run time.

      So... Am I high on crack, or is the javax.servlet.jar just not there?

      Thanks for any input.

      P.S. I did find some things on the web that suggest that the method locations have changed, and now that stuff is in servlet-api.jar. Maybe javax.servlet.jar is not supposed to be there, and I should alter my build.properties

        • 1. Re: javax.servlet.jar missing in 3.2.5?
          aliasncnu

          I also met the difficulity you were just facing
          You may try the following







          # Note I can not assure that it is the best shortcut to solve this problem

          Good luck

          • 2. Re: javax.servlet.jar missing in 3.2.5?
            aliasncnu

             

            "aliasncnu" wrote:
            I also met the difficulity you were just facing
            You may try the following

            <path id="client.classpath">
            <fileset dir="${jboss.home}/server/all/deploy/jbossweb-tomcat50.sar">
            <include name="*.jar"/>
            </fileset>
            </path>

            # Note I can not assure that it is the best shortcut to solve this problem

            Good luck


            • 3. Re: javax.servlet.jar missing in 3.2.5?
              aliasncnu

              Sorry! I do know how to let <></> show in the article
              I use () instead of <>

              <!--
              | The classpath for running the client
              -->
              (path id="client.classpath")
              (fileset dir="${jboss.home}/server/all/deploy/jbossweb-tomcat50.sar")
              ( include name="*.jar"/)
              (/fileset)
              (/path)

              • 4. Re: javax.servlet.jar missing in 3.2.5?
                tiredofworkingfortheman

                Thanks very much. I started back again from scratch following your advice, and my compile problem is fixed. What you did makes a lot of sense when I look at it. Now I'm on to bigger and better problems!

                org.apache.jasper.JasperException
                org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
                org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
                javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


                ...I'll throw some time at this and see if I can't get anywhere.

                Thanks again.

                • 5. Re: javax.servlet.jar missing in 3.2.5?
                  darranl

                  Is your JAVA_HOME set?

                  • 6. Re: javax.servlet.jar missing in 3.2.5?
                    tiredofworkingfortheman

                    Thanks, but I don't think it's my JAVA_HOME. I just started using a mac so the JAVA_HOME ENV is a little odd, but I'm pretty certain it's right.

                    I'm going to dig on it a while and see if I can't solve it. If I can't, I'll post again with a better Subject line as I think my problem with the javax.servlet.jar is definately solved.

                    BTW, my understanding of the build scripts for ant has imporoved a lot.

                    Thanks again,

                    • 7. Re: javax.servlet.jar missing in 3.2.5?
                      antsi

                      I encounted this problem some time ago.

                      There used to be a jboss-servlet.jar in <JBOSS3.2.3_HOME>/server/default/lib,but in the release of jboss3.2.5,this jar was divided into two part -servlet_api.jar and jsp_api.jar-and put in <JBOSS3.2.5_HOME>/server/default/deploy/jbossweb-tomcat41.sar

                      • 8. Re: javax.servlet.jar missing in 3.2.5?
                        adar

                        Hello,
                        I have encountered a similar problem,
                        i cannot create an extended class of the sessionBean interface in my tutorial project
                        i put the right .jars in the build path;
                        is there an environment cariable to put the path of the jars in ?
                        thanks
                        antoine

                        • 9. Re: javax.servlet.jar missing in 3.2.5?
                          ir

                          Hi,

                          Set your CLASSPATH (using the Control Panel-> System-> Advanced-> Environment Variables route) to include %JAVA_HOME%\lib and %JAVA_HOME\jre\lib. That should do it.

                          Good luck,
                          Sanjay

                          • 10. Re: javax.servlet.jar missing in 3.2.5?
                            noel.rocher

                            Hi,

                            the main pb comes from the new packaging of the web container.
                            You should replace all javax.servlet.jar by
                            default/deploy/jbossweb-tomcat50.sar/servlet-api.jar

                            you can set it (servlet.jar property) up in the build.properties file (highest level).
                            Add a jsp.jar property too (pointing to the same dir with jsp-api.jar)

                            then, change the build files to add the use of the jsp.jar propertie in the same way as servlet.jar

                            • 11. Re: javax.servlet.jar missing in 3.2.5?
                              macunkie

                               

                              "aliasncnu" wrote:
                              Sorry! I do know how to let <></> show in the article
                              I use () instead of <>

                              <!--
                              | The classpath for running the client
                              -->
                              (path id="client.classpath")
                              (fileset dir="${jboss.home}/server/all/deploy/jbossweb-tomcat50.sar")
                              ( include name="*.jar"/)
                              (/fileset)
                              (/path)


                              I'm in the process of attempting a build of jbossj2ee-src.
                              Where do I place the above code?

                              Thanks,

                              MacUnkie.

                              • 12. Re: javax.servlet.jar missing in 3.2.5?
                                dee_cal

                                Hi !

                                I am getting problems in

                                import javax.ejb.*
                                even after setting variables as mentioned below in build.properties and build.xml files.

                                Any help is highly appreciated.

                                TIA,
                                Dee.

                                "noel.rocher" wrote:
                                Hi,

                                the main pb comes from the new packaging of the web container.
                                You should replace all javax.servlet.jar by
                                default/deploy/jbossweb-tomcat50.sar/servlet-api.jar

                                you can set it (servlet.jar property) up in the build.properties file (highest level).
                                Add a jsp.jar property too (pointing to the same dir with jsp-api.jar)

                                then, change the build files to add the use of the jsp.jar propertie in the same way as servlet.jar



                                • 13. Re: javax.servlet.jar missing in 3.2.5?
                                  clara

                                  What "noel.rocher" suggests worked for me!