[ Team LiB ] Previous Section Next Section



Why do some header values show up on only one kind of browser?


There are standard header names, but a browser isn't required to send any header values. Some browser implementations just send more information than others.


Why can't I access a particular header value?


You probably misspelled the name of the header value. The HttpServletRequest class is very forgiving when it comes to capitalization, but it does require you to spell the header name correctly. Also, make sure you use hyphens and not underscores for header values, as in content-type and content-length.


Where are my log messages going?


Each JSP and servlet engine stores its log messages in different places. Tomcat places logs in the logs/ subdirectory of the installation directory. For other servers, consult the documentation for your server.


Why aren't my log messages showing up in the log file?


Occasionally, a server might delay logging, either intentionally or unintentionally. This is purely an implementation-specific detail and not related at all to the JSP or servlet specifications. Sometimes you can force the server to write to the log by shutting it down gracefully.


I stored a cookie on the browser; why can't I see it?


First check to make sure you spelled the cookie name correctly. Next make sure the browser has cookies enabled. Also, if you specified a root path for the cookie, make sure that the JSP or servlet reading the cookie is in that path. Remember, too, that if you don't give the cookie a specific expiration time, the cookie vanishes when the user shuts the browser down.

    [ Team LiB ] Previous Section Next Section