Adding "servlet-classes" to my Java 2 SDK

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TheLetti

    Adding "servlet-classes" to my Java 2 SDK

    Hy!

    I've just downloaded the latest Java 2 SDK (j2sdk1.4.2_01) .
    For my surprise in this version the servlet-classes are not integrated
    (e.g. the class javax.servlet).

    So I found all the servlet-classes I needed on the
    java.sun.com-Homepage and downloaded the javax.servlet-Package.

    (Maybe this file-description may help you understanding my problem:
    - it's a .zip-File and I am using Win XP
    - when extracting the .zip-File it is organized as following:
    javax (folder)
    servlet (folder)
    http (folder)
    lots of different .class-Files (for example servlet.class)
    )

    Now my problem/question:
    - How can I integrate these package so that they work with my JDK and
    I am able to use them in my programs?

    At the moment in my programs I always get a similar error-message like
    the following:
    "package javax.servlet does not exist"

    So in which folder shall I extract the downloaded files???


    many thx
    for your advices,

    mike
  • Kathy Benson

    #2
    Re: Adding "servle t-classes" to my Java 2 SDK

    Hi,
    Besides using downloading the necessary JAR files, you will also need a
    servlet container, such as Tomcat. I'd recommend that you use the JAR
    files that comes with the container rather than the one you get from
    Sun. The reason I say that is because if your container uses an older
    specification, you won't be able to use the newer JAR files.

    You can get Tomcat, a free servlet container, from http://jakarta.apache.org

    KB.
    --
    ------------------------------------------------------------------------
    This email is certified to be Spam free by Spam Marshall

    You don't pay to get spam, why pay to clean it?
    Visit http://www.spammarshall.com to create an account for free
    <http://www.spammarshal l.com>

    ------------------------------------------------------------------------

    TheLetti wrote:
    [color=blue]
    >Hy!
    >
    >I've just downloaded the latest Java 2 SDK (j2sdk1.4.2_01) .
    >For my surprise in this version the servlet-classes are not integrated
    >(e.g. the class javax.servlet).
    >
    >So I found all the servlet-classes I needed on the
    >java.sun.com-Homepage and downloaded the javax.servlet-Package.
    >
    >(Maybe this file-description may help you understanding my problem:
    >- it's a .zip-File and I am using Win XP
    >- when extracting the .zip-File it is organized as following:
    > javax (folder)
    > servlet (folder)
    > http (folder)
    > lots of different .class-Files (for example servlet.class)
    >)
    >
    >Now my problem/question:
    >- How can I integrate these package so that they work with my JDK and
    >I am able to use them in my programs?
    >
    >At the moment in my programs I always get a similar error-message like
    >the following:
    >"package javax.servlet does not exist"
    >
    >So in which folder shall I extract the downloaded files???
    >
    >
    >many thx
    >for your advices,
    >
    >mike
    >
    >[/color]


    Comment

    • TheLetti

      #3
      Re: Adding &quot;servle t-classes&quot; to my Java 2 SDK

      Thx Kathy for your advice,

      but I've already installed Tomcat and I've configured it well so that
      it works.

      But my problem was that I can't compile my .java-Code, because in my
      (latest) JDK the servlet-Classes are not integrated.

      So I only wanted to know how I can integrate them in my JDK???


      by mike




      Kathy Benson <fornewsgroups@ yahoo.com> wrote in message news:<3F8C5294. [email protected] om>...[color=blue]
      > Hi,
      > Besides using downloading the necessary JAR files, you will also need a
      > servlet container, such as Tomcat. I'd recommend that you use the JAR
      > files that comes with the container rather than the one you get from
      > Sun. The reason I say that is because if your container uses an older
      > specification, you won't be able to use the newer JAR files.
      >
      > You can get Tomcat, a free servlet container, from http://jakarta.apache.org
      >
      > KB.
      > --
      > ------------------------------------------------------------------------
      > This email is certified to be Spam free by Spam Marshall
      >
      > You don't pay to get spam, why pay to clean it?
      > Visit http://www.spammarshall.com to create an account for free
      > <http://www.spammarshal l.com>
      >
      > ------------------------------------------------------------------------
      >
      > TheLetti wrote:
      >[color=green]
      > >Hy!
      > >
      > >I've just downloaded the latest Java 2 SDK (j2sdk1.4.2_01) .
      > >For my surprise in this version the servlet-classes are not integrated
      > >(e.g. the class javax.servlet).
      > >
      > >So I found all the servlet-classes I needed on the
      > >java.sun.com-Homepage and downloaded the javax.servlet-Package.
      > >
      > >(Maybe this file-description may help you understanding my problem:
      > >- it's a .zip-File and I am using Win XP
      > >- when extracting the .zip-File it is organized as following:
      > > javax (folder)
      > > servlet (folder)
      > > http (folder)
      > > lots of different .class-Files (for example servlet.class)
      > >)
      > >
      > >Now my problem/question:
      > >- How can I integrate these package so that they work with my JDK and
      > >I am able to use them in my programs?
      > >
      > >At the moment in my programs I always get a similar error-message like
      > >the following:
      > >"package javax.servlet does not exist"
      > >
      > >So in which folder shall I extract the downloaded files???
      > >
      > >
      > >many thx
      > >for your advices,
      > >
      > >mike
      > >
      > >[/color]
      >
      >
      > --[/color]

      Comment

      • Jay Bromley

        #4
        Re: Adding &quot;servle t-classes&quot; to my Java 2 SDK

        the.newsletter@ gmx.net (TheLetti) wrote in message news:<acba8e17. 0310150430.9946 [email protected] e.com>...[color=blue]
        > But my problem was that I can't compile my .java-Code, because in my
        > (latest) JDK the servlet-Classes are not integrated.
        >
        > So I only wanted to know how I can integrate them in my JDK???[/color]

        Hello there,

        It sounds like you need to add the directories or jar files that
        contain the j2ee classes to your classpath. I'm not really familiar
        with XP (I work on Linux) but you probably need to set a CLASSPATH
        environment variable and add the location of the j2ee classes.

        For example, in my enivornment my CLASSPATH has the following
        locations:
        /opt/j2sdk_nb/j2sdk1.4.2/jre/lib/rt.jar for the J2SDk
        /opt/jwsdp-1.2/common/lib/servlet-api.jar and
        /opt/jwsdp-1.2/common/lib/jsp-api.jar for J2EE.

        Of course, in your case you need to supply the path to the
        servlet-api.jar and jsp-api.jar files.

        Regards and good luck,
        Jay

        Comment

        Working...