David,
That worked. I was able to set the content type in the page directive. I
guess I was being a little stubborn since it worked on the other two
servers. Tomcat is just not so forgiving.
Thanks again.
Doug

-----Original Message-----
From: David Tildesley [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 17, 2002 1:51 AM
To: Tomcat Users List
Subject: RE: JSP1.2 xml syntax


Doug,

If you look at what you are sending to the browser - html right (the stuff
in the CDATA elements)?
yet you have the contenttype set to xml.
IE is therefore told the content type is xml, expects to receive well-formed
xml yet gets fed non-well-formed html from your jsp script and then
correctly tells you what and where the problem is.

Why don't you take the simple step and do:
response.setContentType("text/html;charset=UTF-8")

David.
-----Original Message-----
From: Doug Blackburn [mailto:[EMAIL PROTECTED]]
Sent: Sunday, 17 November 2002 12:39 p.m.
To: Tomcat Users List
Subject: RE: JSP1.2 xml syntax


David,

Thanks for you suggestion.  I just looked at the Tomcat generated
TableEntry_jsp used to process the requests. It has
response.setContentType("text/xml;charset=UTF-8").  I think that should work
fine. The only difference between that and the servlet generated by the Sun
J2ee Ref Impl Server is that charset=ISO-8859-1.

Am I missing something here?

Doug

-----Original Message-----
From: David Tildesley [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 16, 2002 5:34 PM
To: Tomcat Users List
Subject: RE: JSP1.2 xml syntax


reading beween the lines:

it seems IE it not happy because it thinks it needs to display it as XML so
it looks like a mime type setting in the header. Set it it text/html and it
should be fine :-)



-----Original Message-----
From: Doug Blackburn [mailto:[EMAIL PROTECTED]]
Sent: Sunday, 17 November 2002 10:28 a.m.
To: Tomcat Users List
Subject: RE: JSP1.2 xml syntax


It looks like Tomcat 4.1.12 may not support this jsp1.2 coding style. Any
comments, suggestions?

-----Original Message-----
From: Doug Blackburn [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 16, 2002 2:06 AM
To: Tomcat Users List
Subject: RE: JSP1.2 xml syntax


I just ran this jsp successfully on Weblogic 7.0 without any modifications.

-----Original Message-----
From: Doug Blackburn [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 16, 2002 12:43 AM
To: Tomcat Users List
Subject: RE: JSP1.2 xml syntax


Ok. I received the following error when running on Tomcat.  This same code
worked fine on Sun J2ee RI server. The code follows the error message.

The XML page cannot be displayed

Cannot view XML input using XSL style sheet.  Please correct the error and
then click the Refresh button, or try again later.

End tag "HEAD" does not match the start tag 'LINK'. Error processing
resource
'http://localhost:8080/metadataTags/TableEntry.jsp'. Line 8, Position 5

</HEAD>


Jsp Code follows:

<jsp:root
  xmlns:jsp="http://java.sun.com/JSP/Page";
  xmlns:md="/metadataTags.tld"
  version="1.2">

<jsp:directive.page errorPage="Error.jsp"/>
<jsp:useBean id="mdbean" scope="session" class="metadataTags.MDBean" />
<jsp:setProperty name="mdbean" property="tablename" />

<jsp:text><![CDATA[
  <HTML>

  <HEAD>
  <TITLE>Meta Data Table Entry</TITLE>
  <SCRIPT language="JavaScript" SRC="common.js"></SCRIPT>
  <LINK rel="stylesheet" href="Styles.css" type="text/css">
  </HEAD>

  <BODY>

  <H1>Meta Data Display</H1>
  <BR>

  <H2>Enter Table Name:</H2>
  <P>
  <FORM name="tbl" method="post" onSubmit="return SubmitPressed()">
  <LABEL for="tablename">Table Name:</LABEL>
  <INPUT type="text" name="tablename" size="10">
  <BR>
  <INPUT type="submit" value="Submit">
  </FORM>
  </P>
]]></jsp:text>

<md:confirm>

  <jsp:scriptlet>System.out.println("message BEFORE SCRIPT = " +
message);</jsp:scriptlet>

  <jsp:text><![CDATA[<SCRIPT language="JavaScript">CheckMsg("]]></jsp:text>
  <jsp:expression>message</jsp:expression>
  <jsp:text><![CDATA[")</SCRIPT>]]></jsp:text>

  <jsp:scriptlet>System.out.println("message AFTER SCRIPT = " +
message);</jsp:scriptlet>

</md:confirm>

<jsp:forward page="TableDisplay.jsp"/>

<jsp:text><![CDATA[
  </BODY>
  </HTML>
]]></jsp:text>

</jsp:root>

-----Original Message-----
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 16, 2002 12:18 AM
To: Tomcat Users List
Subject: Re: JSP1.2 xml syntax




On Fri, 15 Nov 2002, Doug Blackburn wrote:

> Date: Fri, 15 Nov 2002 22:57:56 -0500
> From: Doug Blackburn <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: JSP1.2 xml syntax
>
> According to JSP1.2 spec HTML tags within the JSP page written in XML
syntax
> can be encapsulated in <jsp:text><![CDATA[..... ]]></jsp:text>. I used
this
> construction successfully when deploying to the J2EE Reference
> Implementation server from Sun. However, when I ported it to Tomcat 4.1.12
I
> received XML parsing errors within the CDATA section.
>
> Any insight would be greatly appreciated.

How is anyone supposed to be able to offer any useful advice unless you
show us the source for a page that works in one environment but not the
other?  And show us what error messages you get when it fails?

> Thanks,
> Doug Blackburn
>

Craig


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




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



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



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