aspose file tools*
The moose likes JSP and the fly likes why does our JSP break in Netscape/Mozilla? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "why does our JSP break in Netscape/Mozilla?" Watch "why does our JSP break in Netscape/Mozilla?" New topic
Author

why does our JSP break in Netscape/Mozilla?

Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
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

Joined: Aug 12, 2003
Posts: 92
In my experience, browser issues within the same site usually center around Cascading StyleSheets and JavaScript. Usually the latter.
--BW
Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
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

Joined: Aug 12, 2003
Posts: 92
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

Joined: May 10, 2001
Posts: 265
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

Joined: May 31, 2001
Posts: 29
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

Joined: Jul 15, 2003
Posts: 618
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
No, the web browser is on a different machine from the server.
 
Don't get me started about those stupid light bulbs.
 
subject: why does our JSP break in Netscape/Mozilla?
 
Similar Threads
servlet problem
Has anyone seen this error before??
JSPException
Ant javac task and subdirectories
No scrolling in text input after uppercase ?