Re: Tomcat vs Apache
Chris wrote: Ah, okay. The only reason we were considering switching to Apache was to possibly improve the performance of our Java applet. The performance of the applet should have nothing to do with the server that delivers it, unless perhaps the server happens to be downloading slower than the user's link would allow. The applet by definition runs on the browser's computer, not the server. A. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble with XSL transforms with JSP
The error message you are getting I haven't seen before, but it seems that you have some text before the root element of your document. This would be outside of the ? .. ? elements. Personally, I wrote a java class to do my XSL transforms. My JSPs call them, so other than that there is nothing XSLT in the JSPs themselves. The alternative is to use JSTL tags to do XSLT, which I have avoided by doing this. Regards, A. [EMAIL PROTECTED] wrote: I have played with several versions of Tomcat, but now I have decided to study JSP in earnest and I downloaded the latest release two days ago. I have also upgraded my Java installation. The installation went relatively well and Tomcat is running on my machine. I decided to start with something I know about, so I am attempting to transform an XML document to an HTML page via JSP. For a sanity check, I have downloaded O'Reilly's source code from JavaServer Pages, 3rd edition. Specifically, chapter 15 has an example of what I wish to do. The example works flawlessly, but my transform coughs up this error message. ... org.xml.sax.SAXParseException: Content is not allowed in prolog. I have researched this to some degree and found that this class sometimes gags on UTF-8 files. I checked my XML document in the Hex view of my editor and saw that there indeed were two bytes at the beginning of the file that were suggested as the source of my problem. So I wrote an XSLT identity transform stylesheet that reproduces the document while changing the encoding from UTF-8 to ISO-8859-1. After running the transform of my XML document I checked it in the Hex view of my editor and the encoding appears now to be ISO-8859-1. I re-wrote my stylesheet so that its output encoding is ISO-8859-1 now also. Nonetheless, I still get the same exception message when I attempt the transform. Does anyone know of a cookbook approach or checklist I can use to get over this hump? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Fwd: Re: Test]
I wouldn't go that far. I posted a question twice since joining but haven't seen anything yet. Maybe the list server was eating stuff? Regards, Alan Deikman ZNYX Networks 20 hours and counting. This is spooky. No wait, I understand now, we the open source community have solve all the problems. Well Tomcat issues at least. Take that M$! Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question about JNDI resources
I'm just learning this stuff, but having good success so far. In my SQL-backed bean I use a JDBCResource as per the documentation: protected static Connection getConnection() { //System.out.println(User.getConnection Attempting to get connection); try { Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource) envContext.lookup(jdbc/); Connection conn = ds.getConnection(); return conn; } catch (NamingException ne) { System.out.println(User.getConnection caught Naming exception); System.out.println(ne.toString()); } catch (SQLException sqle) { System.out.println(User.getConnection caught SQL exception); System.out.println(sqle.toString()); } This works, way cool. My question is do I need to look up two new Context objects and a new DataSource each time I get a connection? Or can I just store initContext, envContext, and ds in static variables and load them just once for all instances of the class? If that works, why don't the examples do it that way? Alan Deikman ZNYX Networks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question about JNDI resources
I'm just learning this stuff, but having good success so far. In my SQL-backed bean I use a JDBCResource as per the documentation: protected static Connection getConnection() { //System.out.println(User.getConnection Attempting to get connection); try { Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource) envContext.lookup(jdbc/); Connection conn = ds.getConnection(); return conn; } catch (NamingException ne) { System.out.println(User.getConnection caught Naming exception); System.out.println(ne.toString()); } catch (SQLException sqle) { System.out.println(User.getConnection caught SQL exception); System.out.println(sqle.toString()); } This works, way cool. My question is do I need to look up two new Context objects and a new DataSource each time I get a connection? Or can I just store initContext, envContext, and ds in static variables and load them just once for all instances of the class? If that works, why don't the examples do it that way? Alan Deikman ZNYX Networks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]