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]>

Reply via email to