By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,704 Members | 1,076 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,704 IT Pros & Developers. It's quick & easy.

Adding "servlet-classes" to my Java 2 SDK

P: n/a
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
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.spammarshall.com>

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

TheLetti wrote:
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

Jul 17 '05 #2

P: n/a
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 <fo***********@yahoo.com> wrote in message news:<3F**************@yahoo.com>...
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.spammarshall.com>

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

TheLetti wrote:
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

--

Jul 17 '05 #3

P: n/a
th************@gmx.net (TheLetti) wrote in message news:<ac***********************@posting.google.com >...
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???


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
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.