• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why does our JSP break in Netscape/Mozilla?

 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a JSP site that breaks in Netscape and Mozilla--it won't even load pages in partway (it's like it's infinitely looping on something). I've tried creating a simple HTML page with improper items such as   instead of   and <br> instead of <br /> and opened this page in Netscape, but that doesn't break it. Anyone have any ideas of what all to test for?
Whatever the problem is, IE handles it. Now, I didn't write the original site--I've just been brought in to add onto it, and I thought I'd might as well try to fix this too, if possible, since some people who prefer to use Netscape are complaining.
 
Brian R. Wainwright
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my experience, browser issues within the same site usually center around Cascading StyleSheets and JavaScript. Usually the latter.
--BW
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, man...we use both. So we have to check to make sure that the parts of each that we're using are supported by both browsers?
 
Brian R. Wainwright
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well... to some extent the unfortunate answer is yes. Different browsers (and versions of those browsers) support different implementations of both CSS and JS, but JS is usually the most problematic since functionality on the client usually involves some kind of JS implementation. I'm not a Javascript expert, so someone else may have more input. What you'll need to do is first identify what JavaScripts are browser specific and then rewrite to detect what browser the client is using and throw in some "if" statements to allow for a browser specific implementation. The Document object is a good example when trying to display different CSS layers. In Netscape 4, you'd use document.layers, but in IE 5+ you'd use document.all, while in Netscape 6 you'd use document.getElementById. e.g.

An alternative solution, since you're using JSP is to place your JavaScripts in their own files. The Netscape specific JavaScripts would reside in one file while the IE would reside in another. Based on the browser of the client you could dynamically include (using an include directive) the appropriate JavaScript file on a JSP.
Good Luck!
[ November 25, 2003: Message edited by: Brian R. Wainwright ]
 
Chad McGowan
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would check the javascript console that is available in Netscape. It will show you any Javascript errors that it encounters. It's under Tools-Web Development.
 
Wally Schnok
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Macromedia Dreamveawer MX has incorporated a kind of html code validator, for different browsers and versions ....
you could save the generated html of your jsp page and try to validate it ... and see the errors ....
;-)
(i think there is some kind of html validator for different browsers and versions around , not only in Macromedia)
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I appreciate the tips. Hah...it's so bad that I can't even view anything in Netscape's Javascript console--in other words, it hangs so much that it never finishes loading the page, and it maxes out my CPU usage in Win XP! It's just staying at a flat 100%! I've also got half a gig of RAM on my laptop, but currently only about 28 MB of it is available! Gotta love bad software (ours, not Netscape, though I do wish it could recover from this).
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34974
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the server on the same machine as the browser? This happens to me in Netscape. Netscape uses 100% of the CPU and doesn't let the server generate the JSP. Try testing from another person's machine to verify if this is the problem.
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, the web browser is on a different machine from the server.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic