wood burning stoves 2.0*
The moose likes Servlets and the fly likes Using j2ee packages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Using j2ee packages" Watch "Using j2ee packages" New topic
Author

Using j2ee packages

Winston Smith
Ranch Hand

Joined: Jun 06, 2003
Posts: 136
Hi all,
I have j2sdk1.4.1 currently installed, as well as j2sdkee1.3.1, and I need to use some j2ee packages in my Java classes, however, it cannot find the packages I specify. I've added j2sdkee to my classpath, but still no luck. I've also tried copying j2ee.jar into my jdk directory, but that didn't work.
In detail, here is what I need to do:
import javax.servlet.*;
Thanks for any suggestions.


for (int i = today; i < endOfTime; i++) { code(); }
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

set the CLASSPATH to the jar files in the lib directory of the sdk.


Groovy
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60741
    
  65

If all you need is the javax.servlet.* packages, you don't need the whole J2EE shebang. Your servlet container provides what you need. For example, Tomcat implements javax.servlet in servlet.jar.
Just make sure that this jar in in your classpath when you compile.
hth,
bear
P.S. Highly recommend ant to help you compile and set up classpaths easily.
[ August 12, 2003: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Using j2ee packages
 
Similar Threads
Installation of J2EE
software needed for SCWCD
Proguard parameters
Clarification required J2EE, Tomcat, SDK, J2SE
Excluding existing code from custom JAAS login module