Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript on a .jsp page is not working

Status
Not open for further replies.

aob

Programmer
Jun 30, 2001
10
MX
When I run a .jsp page with some javascript , it doesn't work and get an error that a script error ocurred.

Any ideas?

alejandro
 
What's the error message you're getting, and can you include the code that's causing the error?
 
Varocho:

The error I'm getting is:
"A script error ocurred. Some scripts on the affected page may not work correctly. Do you want to continue running scripts on the affected page?

And a pair of no yes buttons.

the problem is that any javascript works ok when the page is .html but when is .jsp any javascript doesn't work, and I get the error.

Of course if the page is .html my dimamic page won't work at all.

thanks for your help

Alejandro

 
LittleWing:
thank you for your help

Server: linux with jakarta-tomcat
and Ultradev 4.0 for the Mac OS.

I discovered that the code in my .jsp page returns from the server unformatted all in one line.

If I format the code javascript works perfect.

Please help

Alejandro
 
hi aob,
check that your build process is correct. I have the same setup on my machine although its on win32. ensure all your class files and jsp's are in a jar before you do the antbuild and all your jsps are in a folder called web. the build process for jakarta is quite strict.

the fact that all your code is on one line shouldn't matter as long as each line is terminated with the usual ;

let me know if this doesn't help. getting jsps to work for the first time is usually a big pain %-(
 
Hi Littlewing:

One work around is to reformat the code, so when it is proccessed by the server comes out right.

But you are right, probably I have to reinstall the software again.

I'll ket you know

Thanks for your help

Alejandro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top