3 Replies Latest reply on Oct 20, 2006 2:25 PM by peterj

    Trying to compile with javax.servlet.jsp.tagext.*...

    angbellavia

      I have a class that I am trying to compile that has the following libraries:

      import java.util.*;
      import javax.servlet.jsp.tagext.*;
      import javax.servlet.jsp.*;
      import java.io.*;

      I was told that I need some sort of .jar file to make this file compile. Does anyone know what I am looking for and how I would go about compiling this properly with the .jar file I supossedly need?

      Thanks,

        • 1. Re: Trying to compile with javax.servlet.jsp.tagext.*...
          peterj

          The java.util.* and java.io.* classes are automatically included, so no specific jar file needed there. For javax.servlet.jsp.tagext.* and javax.servlet.jsp.* you need jboss_home/server/default/lib/javax.servlet.jsp.jar.

          To compile, form the same directory as the file, enter:

          java -cp jboss_home/server/default/lib/javax.servlet.jsp.jar yourfile.java


          where jboss_home is the location where you installed JBoss and yourfile.java is the filename of the class you are compiling.

          • 2. Re: Trying to compile with javax.servlet.jsp.tagext.*...
            angbellavia

            I'm currently compiling with JCreator.

            Do I just add javax.servlet.jsp to the same directory and then compile my Java file? I've tried this and I still recieve the same build errors cause it can't find those libraries.

            • 3. Re: Trying to compile with javax.servlet.jsp.tagext.*...
              peterj

              I have never used JCreator, but in the IDEs I have worked with, there is always a way of adding other jar files to the compiler's classpath. Find out how to do that in JCreator and then add the jar.

              What directory do you mean when you say "the same directory"?

              Also, I noticed I should have wirtten "javac -cp ..." (missed the 'c').