-
How to compile Servlets?
I've downloaded the JDK1.3 and have used javac to compile and run some simple
apps (on Win NT 4) . Being an impatient type that wants to jump ahead to
writing servlets, I downloaded the JSDK2.1, but am having trouble figuring
out how to compile servlet code.
There isn't any javac.exe file in the JSDK, so I tried using the JDK's version
- and of course it gives compile errors because it can't find the servlet
class methods that are referenced in the code.
Should the jsdk be installed in the same directory as the JDK? Are there
version compatibility issues? I'm sure setting this up is fairly straight
forward for those of you in the know ( but I sure could use a clue or two
)
Thanks in advance
-
Re: How to compile Servlets?
No, you just use javac to compile as you always have. It doesn't matter
where you install the servlet development kit, only it contains a jar file
(called servlet.jar) which needs to be in your classpath for your compiles
to work. Since you're using JDK1.3, the easiest way to achieve this is to
just drop a copy of that jar file in the JDK's extension directory. For me
this is D:\jdk1.3.0\jre\lib\ext, modify that based on where you installed
your JDK.
PC2
DonM <dmottolo@synap.com> wrote in message news:3a72526a$1@news.devx.com...
>
> I've downloaded the JDK1.3 and have used javac to compile and run some
simple
> apps (on Win NT 4) . Being an impatient type that wants to jump ahead to
> writing servlets, I downloaded the JSDK2.1, but am having trouble figuring
> out how to compile servlet code.
>
> There isn't any javac.exe file in the JSDK, so I tried using the JDK's
version
> - and of course it gives compile errors because it can't find the servlet
> class methods that are referenced in the code.
>
> Should the jsdk be installed in the same directory as the JDK? Are there
> version compatibility issues? I'm sure setting this up is fairly straight
> forward for those of you in the know ( but I sure could use a clue or two
> )
>
> Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks