473,387 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
Jul 17 '05 #1
3 4780
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Miles Davenport | last post by:
I would like some advice on what Java server-side alternatives their are to an applet which is a shopping cart application which allows the user to drag-and-drop individual items into "an order"...
9
by: Russ Perry Jr | last post by:
I'm using "ID" and "Value" in the generic sense here... Let's say one page I had a <html:select> with a collection like this: <html:options collection="items" property="key"...
1
by: Nick Nygaard | last post by:
Hi everyone, I'm using O'Reilly's servlet API to make an object based HTTP communication between an Applet and a servlet. Following their own tutorial 10.2.3. Object-based HTTP Communication...
1
by: Kevin Schneider | last post by:
I am trying to POST an XML string to a Java servlet, but I am getting the error "The underlying connection was closed: An unexpected error occurred on a receive." when I try to get the response....
4
by: Rachel McConnell | last post by:
Hello, I have a Java web application using Hibernate to connect to a PostgreSQL backend. I am seeing the below stack trace during processing of a set of data consisting of around 1000 objects;...
1
by: javabeginner | last post by:
I m new to Java Servlet. I have project assignment, where i need to create web blog using Java Servlet. I should have following functionalities Program data model will include: ● blog class...
1
by: shyaminf | last post by:
hi everybody! iam facing a problem with the transfer of file using servlet programming. i have a code for uploading a file. but i'm unable to execute it using tomcat5.5 server. kindly help me how to...
7
by: ankitoshniwal | last post by:
Hello, I have been having this problem for the whole day today, so even after i googled for the solution i was not able to get one, so i had to post to this forum. I had checked the solutions...
2
by: crabsdf | last post by:
My project is a single method class which takes a xml object and, using Apache FOP, transforms it into a PDF which is returned as an output stream. Here is full code package...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.