Outdated JSP and Resin tricks
Setting variable Content-type HTTP headers in JSP
You can't use <%@ page contentType="text/blah" %> to do this - it won't be evaluted in the control flow of your code. Instead only the last page directive mentioned in the entire file will hold. However:
There is a response variable of class HttpServletResponse
automatically accessible to each JSP page instance. It has a method
setHeader(String header-name, String header-content) you
can use to set Content-type, among other headers, and being straight
Java-code, it is subject to the control flow of the code.
There's also a request object of class HttpServletRequest
but I found out about it much more easily for some reason.
Seek the
javadocs
for more info.
Mysterious lack of database access by Resin
I don't know if this happens with Resin in total, or just a particular version running in conjunction with IIS, but if you've highlighted any text in the output window it won't write to it, and database access won't complete. Cease highlighting. Silly, I know.
Resin returns ClassNotDef errors for user-defined classes
It can find them... it just can't interpret the byte-code. Your compiler doesn't match the runtime environment's version, most likely.
The English text of this page is dedicated to the public domain.
Last modified: 25 June 2003