• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jspx problem in ie

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have a jsp page using the pure xml syntax (the one that starts with <jsp:root). adding this one line of code to the head causes the page to not render in IE 7:



i don't think there is anything special happening in the site.js page, but here is the code anyway:



when i look at the code of the page generated i notice that thing have been reformated, for example, the script tag i wrote is rendered as:



could that be why it is not working in IE?
 
Ra Carter
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry i posted this question way to soon. if anyone is curious the solution is to add an empty comment inside the script tag because tomcat 5.5 renders it improperly for ie.

is this behavior changed in tomcat 6?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ra Carter:
i have a jsp page using the pure xml syntax (the one that starts with <jsp:root).



Why? That format is not intended for hand-coded pages.

could that be why it is not working in IE?



Yes. self-closed script tags will not work properly in many browsers.

I highy recommend ditching the jspx syntax for the "normal" syntax. This is just the tip of the iceberg of the types of problems you will start running into.
 
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:

I highy recommend ditching the jspx syntax for the "normal" syntax. This is just the tip of the iceberg of the types of problems you will start running into.



Books like http://www.cookwood.com/html6ed/ encourage html page authors to write xhtml. It helps with validation. This brings 2 questions to mind:
1) Do most people write "normal" jsp syntax or are they writing xhtml / jsp syntax? (how will we ever really know for sure?)
2) if one is reading a book which favors xhtml and wants the html equivalent of what is being presented, where can one go to look up the html equivalent? I see http://www.w3schools.com/xhtml/default.asp and want instead a reference table or at least just 1 web page to reference.

Thanks.

tip: http://www.onjava.com/pub/a/onjava/2004/04/21/JSP2part3.html is a good article for JSP Documents (JSP XML)
[ August 07, 2007: Message edited by: Michael Finney ]
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Books like http://www.cookwood.com/html6ed/ encourage html page authors to write xhtml.



XHTML and the JSP document format are separate issues. I highly encourage xhtml format in JSPs. But it really has nothing to do with the JSP document format, except that you must use xhtml with jspx.
[ August 07, 2007: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Further thoughts:

Originally posted by Michael Finney:
1) Do most people write "normal" jsp syntax or are they writing xhtml / jsp syntax? (how will we ever really know for sure?)



It's hard to know what "most people" are doing (and not that what "most people" do is the best way), but the majority of experienced developers that I know write "normal" JSP syntax with xhtml template text.

Remember that within a JSP, everything that's not a directive or action is simply template text. The JSP engine could care less if it's HTML, XHTML, or the results of your iguana walking across your keyboard.

2) if one is reading a book which favors xhtml and wants the html equivalent of what is being presented, where can one go to look up the html equivalent?



xhtml is correctly interpreted even if the doctype is set to html. So why the need for any conversion?
 
Michael Finney
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah I see. Thank you.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic