File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Strange behaviour of JSP file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Strange behaviour of JSP file" Watch "Strange behaviour of JSP file" New topic

Strange behaviour of JSP file

kiran bayyana

Joined: Aug 15, 2000
Posts: 17
Hi all,
I am developing a JSP file and I wrote code for animating two images for that file. I want to run that code(JS function) in the body load event. But if I have JSP tags in my files, BODY's onload event is not working. I tried it without JSP tags(pure HTML and JS) and with other event handlers, it is working fine. Anybody, pls help. I tried image onLoad also, but it is getting into a loop continuously downloading the two images from the server.
- Kiran
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13025
I suggest you do a view-source of the page produced by your JSP and go over it very carefully. Even a single misplaced " could be causing trouble.
kiran bayyana

Joined: Aug 15, 2000
Posts: 17
I got the solution for my problem. Actually, I am writing a jsp include tag and including another HTML file. So, since there are two BODY tags, the onLoad event of BODY is not working. Anyway, thanks William for your reply.
I agree. Here's the link:
subject: Strange behaviour of JSP file
It's not a secret anymore!