• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How to configure JSDK2.0

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Friends,
i want to do a program on JAVA servlets . I've JSDK2.0 downloaded. I'd set the classpath to
CLASSPATH=C:\jdk1.2.2\bin\trials;c:\jsdk2.0\lib\jsdk.jar;
Whenever i used to compile my servlet JAVA program, it gives me an error that javax.... files not found.
How come i can overcome this difficulty ?
from,
vikram .
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the "2.0" in "JSDK2.0" is the Servlet version supported, then it's two versions behind.
I prefer the Tomcat Reference Implementation Server from Apache (with help from Sun):
Release Build 3.1 of Tomcat from the Apache Software Foundation is now
available. Tomcat is the combined JSP 1.1 and Servlets 2.2 reference
implementation
being developed under the Apache process. Tomcat is available at
the Apache web site in both binary and source versions:
http://jakarta.apache.org/downloads/binindex.html
Maybe someone can explain to me the reason for existence or justification of the Servlet Development Kit from Sun? I don't see it, but who knows... Unless one is only initerested in Servlets 2.1 (and JSP 1.0?)... I guess it's possible.
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tony wrote: Maybe someone can explain to me the reason for existence or justification of the Servlet Development Kit from Sun
The reason is both historical and practical. The historical reason is that the JSDK series were both, for several years, the only way to get the servlet API and a very simple reference server. Although Tomcat is up and running now, that is a very recent occurrence, and neither Sun, nor the wider developer community are willing to dispose of a known working way to get servlets until Tomcat has proven itself.
The practical reason is that there are a lot of servers, servlet containers and servlet engines still out there which have been built to use preceding versions of the servlet API. If your web host runs Apache Jserv, for example, it only supports version 2.0 of the servlet API, so you need a version 2.0 jar to compile your servlets against, otherwise they are unlikely to work when deployed. Netscape Enterprise Server up to about version 3.6, only supports version 1.0 of the servlet API.
It's an irritating situation, but to be sure a servlet will run on the widest choice of servers, it currently needs to be built and tested to the lowest-common-denominator of the 1.0, 2.0, 2.1 and 2.2 servlet APIs.
 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..Vikram,
Coming back to your problem,it's apackage problem and not of
classpath one.
remove javax folder and place it in say C:\examples\..\javax
whereas you are compiling in C:\examples\HelloServlet.java
Hope this will solve your problem.
good luck
nm
 
Tony Alicea
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Frank. I knew there had to be a good reason and I am new to Servlets. On the other hand, Servlets 2.1 are not good enough for what we want to do at work in the near future (the forwarding of POSTs via RequestDispatcher). It seems that only Servlets 2.2 supports it and IBM's WebSphere is at Servlets 2.1 and JSP 1.0.
We'll have to wait .
Or do you know of a 2.1 implementation that supports forwarding of POSTs?
 
Frank Carver
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In previous Servlet APIs you had to do it manually - build the HTTP request from the supplied data, send it to a remote URL, retrieve the results and pass them through to your output stream. A bit clumsy, and error prone especially with Readers/Writers, but it can be done.
 
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic