On Tue, 25 Sep 2001, Purav wrote:

> Hi,
> I am in the process of upgrading my servlet engine from Jserv to Tomcat
> 3.3 The installation and configuartion was smooth. Tomcat 3.3 implements
> Servlet API 2.2 specification whereas my app runs on servlet 2.1. I have
> used ServletContext().getServlet() in all my pages. This method is
> deprecated in Servlet 2.2. It returns null. So all my pages throw error.
> What's the solution?. Is it possible for Tomcat to refer Servlet 2.1
> API..maybe by replacing some JAR file..otherwise it will be a hell of a
> tedious task to change code in almost 200 pages. Please Help.

Well, I'll give you an answer, but it's probably not the one you want
to hear: Change the code.  It may take a little bit of work now, but
it's better in the long run.  That method is gone and it ain't coming
back.  If you're going to stay relatively current with the servlet
spec, you are going to have to find another way of doing what you want.

I don't know if there's an easy shortcut/workaround.  I suppose you
can continue to use an old version of the spec, but then you'll be
stuck with it.  If you're not going to be doing any further
development of those web pages, that may be OK, but otherwise probably
not.

I don't think you can do anything like drop in an old version of the
servlet.jar file -- that will probably cause some problems.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to