Thank you Jason.
Your theory works. I was working with Netscapt Enterprise webserver
with JDSK 2.0. Now that I installed JRun 2.2, everything works fine.
Lily
> From [EMAIL PROTECTED] Thu May 6 22:26 EDT 1999
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Date: Thu, 6 May 1999 18:39:58 -0700
> From: Jason Hunter <[EMAIL PROTECTED]>
> Subject: Re: getServletContext().getMimeType(file) doesn't work?
> To: [EMAIL PROTECTED]
>
> Lily Y. Fu wrote:
> >
> > Hi,
> >
> > I am reading Jason Hunter's Java Servlet Programming book.
> >
> > on Page 92 (chapter 4, example 4-10)
> > the servlet use
> >
> > String contentType =
> > getServletContext().getMimeType(req.getPathTranslated());
> >
> > seems doesn't work for me.
> >
> > I am using Netscape Enterprise Server 3.5.1(on solaris)
> > JSDK 2.0
>
> Er, I know of no way to use NES 3.5.1 with JSDK 2.0. You can use
> NES with JRun/ServletExec/etc to get API 2.0 functionality, but
> you can't do much with JSDK 2.0 except compile.
>
> Perhaps that's your problem. Are you compiling with JSDK 2.0 but
> trying to run with raw NES which only supports API 1.0, and poorly at
> that? In otherwords, are you using ServletExec or JRun?
>
> > Lily.ViewFile2.doGet(ViewFile2.java:32) * at
>
> Whoa, isn't line 32 ServletUtils.returnFile()? That makes me think
> this might not have anything to do with getMimeType() but rather you
> might just need to put the com.oreilly.servlet classes in your servlet
> engine's classpath.
>
> Hope one of these theories help,
>
> -jh-
>
> --
> Jason Hunter
> [EMAIL PROTECTED]
> Book: http://www.servlets.com/book
> Article: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html
>
> ___________________________________________________________________________
> 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
>
___________________________________________________________________________
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