Where did my Unicode go in 4.1.17?
I think I need the help of outside eyes, because I must be not seeing the forest for the trees. Under Tomcat 4.0.6 I was serving out XML which had Unicode code points for Arabic characters and in all decent browsers (Mozilla, Phoenix, Chimera, etc.) the Arabic displayed beautifully. Yesterday we updated to Tomcat 4.1.17: none of the data files changed, none of the XSL files changed, none of our server settings changed. Under the new Tomcat everything seemed to be as before except ... the beautiful Arabic has gone and in its place is that gobbledegook of squares, at-signs, etc. that browsers give when they don't know what else to do. When I use Mozilla to look at the XML file that the JSP is importing I can see that the Unicode is definitely there and displays fine, so the problem must be occurring after Tomcat gets hold of it. After reading Bill Barker's response to someone else's query yesterday I specifically added charset=UTF-8 to the %@ page contentType=text/xml % that I previously had, but still no Arabic. I couldn't find anything in the RELEASE-NOTES-4.1.txt that looked relevant. Has something changed between 4.0.6 and 4.1.17 that would explain my vanished Arabic? Thanks, Paul. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Enough please!
I agree. As hard as it is to restrain from responding to flamebait and as tempting as it is to have the last word, I think this thread needs to die now. Paul Caton. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Not getting CSS with XML
Dave, Thanks for the reply, but no, I'm sure that's not the problem. Bitter experience has taught us to delete all the work/ files and recompile everything when testing changes, so I'm certain that the compiled JSP file is always up to date with the XML file. Paul. -Original Message- From: Durham David Cntr 805CSS/SCBE [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 4:44 PM To: Tomcat Users List Subject: RE: Not getting CSS with XML Is it possible that you made a change to the xml file that is not showing up in the jsp? The include that you are using is a compile time include meaning that if you change the included xml file without changing the including jsp file then those changes will not be reflected. Dave -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Not getting CSS with XML
Charlie, A colleague suggested I try adding this to the JSP: response.setContentType(text/html;charset=UTF-8) but it made no difference. Is there another way you know of I could try? Paul. -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 10:06 AM To: 'Tomcat Users List' Subject: RE: Not getting CSS with XML are you setting the content type in the jsp? Charlie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Not getting CSS with XML
Okay, I put the Java expression first so that now the JSP file looks like this: %= response.setContentType(text/html;charset=UTF-8) %%@ include file=mary.xml % After I recompiled and tried to access the page I got this error message: org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated. An error occurred at line: 1 in the jsp file: /mary.jsp Generated servlet error: /opt/local/jakarta-tomcat-4.0.6-LE-jdk14/work/Standalone/localhost/acsam /mary$jsp.java:54: Incompatible type for method. Can't convert void to java.lang.Object. out.print( response.setContentType(text/html;charset=UTF-8) ); Paul. ** Charlie wrote: Make sure you have it *before* your include and before any whitespace in your jsp. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Not getting CSS with XML
Ah ha! Thanks, Julius - that got rid of the server error. But I'm still back with the lack of CSS. The logs aren't helping either, except negatively. That is, when I access mary2.jsp (which simply includes mary.html)the localhost_access_log shows: Get /acsam/mary2.jsp HTTP 1.1 200 358 Get /acsam/mary2.css HTTP 1.1 200 96 But when I access mary.jsp (which simply includes mary.xml) the log just shows: Get /acsam/mary.jsp HTTP 1.1 200 182 It looks like there's something inside ?Jasper/?Catalina which doesn't know what to do with the ?xml-stylesheet? tag when it gets it via a compiled JSP. I just wish I knew that for sure, and then I could give up trying to use the XML/CSS/JSP combination (although it would be really, really convenient for our project if that combination worked). If anyone else has got this combination to work, please let me know how. Meanwhile, my thanks to people who have been trying to help. Paul. -Original Message- From: Julius Davies [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 2:28 PM To: Tomcat Users List Cc: Caton, Paul Subject: RE: Not getting CSS with XML Paul Caton, The error message your getting is because of the fact that response.setContentType() doesn't return anything. You used %= % in your jsp, which needs an Object or a primitive inbewteen those brackets. Your jsp is then going to call toString() on that Object (or just blithely print the primitive) and make that part of your webpage. Since response.setContentType() doesn't return anything, there is no Object to call toString() on, or no primitive to blithely print! Try % % instead. Omit the equals sign. Don't forget to put a semicolon at the end. yours, Julius Davies, Programmer, CUCBC Email: [EMAIL PROTECTED], Ph: 604.730.6385 Code inside %= % should never end with a semicolon. Code inside % % needs semicolons at the end of each line. -Original Message- From: Caton, Paul [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 10:49 AM To: Tomcat Users List Subject: RE: Not getting CSS with XML Okay, I put the Java expression first so that now the JSP file looks like this: %= response.setContentType(text/html;charset=UTF-8) %%@ include file=mary.xml % After I recompiled and tried to access the page I got this error message: org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated. An error occurred at line: 1 in the jsp file: /mary.jsp Generated servlet error: /opt/local/jakarta-tomcat-4.0.6-LE-jdk14/work/Standalone/local host/acsam /mary$jsp.java:54: Incompatible type for method. Can't convert void to java.lang.Object. out.print( response.setContentType(text/html;charset=UTF-8) ); Paul. ** Charlie wrote: Make sure you have it *before* your include and before any whitespace in your jsp. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Not getting CSS with XML
That did the trick! Thanks, Kris. Paul. -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 3:04 PM To: Tomcat Users List Subject: RE: Not getting CSS with XML ... How 'bout something like: %@ page contentType=text/xml % %@ include file=mary.xml % -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Not getting CSS with XML
I'd be very grateful for any advice regarding a CSS problem that is puzzling me. Our setup is Tomcat 4.0.6-LE on a Sun running Solaris 8. We have a webapp with the href base set as /acsam. In the acsam webapp directory we have this very simple test CSS stylesheet (mary.css): paragraph { display: block; border: solid red; line-height: 2 } .green {color: green} We also have a simple html file (mary.html): ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN SYSTEM http://www.w3.o rg/TR/xhtml1/DTD/xhtml1-strict.dtd html head titleCSS Test/title link rel=stylesheet type=text/css href=/acsam/mary.css/ /head body div p class=greenMary had a little lamb./p /div /body /html If we access this file directly (ie. [path]/acsam/mary.html) it displays correctly - the text is green as dictated by the mary.css stylesheet. Similarly, if we access mary.html by using an include statement in a JSP, like this (mary2.jsp): %@ include file=mary.html % it displays correctly as before. Now to the XML. We have a simple XML file (mary.xml): ?xml version='1.0' encoding='UTF-8'? ?xml-stylesheet type=text/css href=/acsam/mary.css? document paragraph Mary had a little lamb. /paragraph /document If we access this file directly (ie. [path]/acsam/mary.xml) it displays correctly, with a red border around the paragraph, as dictated by the mary.css stylesheet. However (here's the puzzling part), when we try to access mary.xml with a very simple JSP file like this (mary.jsp): %@ include file=mary.xml % it does NOT display correctly. For some reason the ?xml-stylesheet? link is not getting the CSS, even though it does get it when we access the XML file directly. As you can see, the path to the CSS file is the same in both mary.html and mary.xml. Can anyone explain why accessing the XML via the JSP doesn't get us the CSS styles? Thanks, Paul. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]