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
