RE: Taglib on tomcat 4.1.24
> > > perhaps the new tomcat manager keep to much things in cache... > > Absolutely. Tag instances may be re-used. This means you can > > only do setup for your tag at the last minute in doStartTag(). > doStartTag ??? > isn't it doEndTag ?? Well, I meant "get things ready for your tag", not "clean up after" (as you seem to be implying) and I specifically meant "as opposed to in constructors, instance initialisers, property writers, etc". > But if I use the doEndTag, Shawn says that "doEndTag() is not > necessarily > called at the end of every invocation (in cases of abnormal > termination -- > e.g., an exception thrown inside a tag's body or by one of > its methods)" If you want to clear up after each invocation, I think you want doFinally() method on the interface TryCatchFinally? > But why the release() method isn't called between two uses of > the same tag > ?? > > Is it a performance issue ??? Presumably the release() method is intended to release heavyweight objects used by the tag, so yes. Cheers, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Taglib on tomcat 4.1.24
> perhaps the new tomcat manager keep to much things in cache... Absolutely. Tag instances may be re-used. This means you can only do setup for your tag at the last minute in doStartTag(). See http://www.mail-archive.com/[EMAIL PROTECTED]/msg00846.html for more info, explained more articulately. Cheers, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Local DTDs not working
I'm building a web application (or two) with Tomcat (4.1.18 LE, Windows 2000). Every time my connection to the internet goes down (or Sun's website...), Tomcat stops working, unable to resolve DTDs. Is this the correct behaviour? From googling, I gather that Tomcat is supposed to keep a local cache of DTDs. Do I have to turn this behaviour on? In case this is the expected behaviour, I'm trying to change all XML files to refer to local copies of DTDs. For web.xml this is fine, I can change http://java.sun.com/dtd/web-app_2_3.dtd";> to , stick the DTD file in WEB-INF and I'm done. But my application also features a tag library. Sticking at the top of my TLD file, and putting the DTD in the jar's META-INF path doesn't work: SEVERE: Parse Fatal Error at line 2 column -1: Relative URI "web-jsptaglibrary_1_1.dtd"; can not be resolved without a base URI. org.xml.sax.SAXParseException: Relative URI "web-jsptaglibrary_1_1.dtd"; can not be resolved without a base URI. at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182) at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3176) at org.apache.crimson.parser.Parser2.resolveURI(Parser2.java:2758) at org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2730) at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1129) (snip huge stack trace) So can anyone help with either approach? Cheers, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Disabling exception handling in JSP generated servlet?
...in short, is it possible? The long version: I have a nice Model 2 web application, and my servlet implements various error logging options (display exception in HTML, log to file, display user-friendly error message, etc). This is fine if any Throwable comes out of the application itself, but if an exception is thrown in the JSP page the servlet has chained to, Tomcat intercepts it and displays its own error page. I can see why you'd need this for Model 1, otherwise throwing an exception would kill your app server. But is there any way to ensure the generated _jspService() method does not contain a try-catch block at all? I don't want to specify an error page in every JSP, because I'd like to keep all the error handling unified. Any help would be most appreciated, Simon MacMullen