Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
SOLVED: OT?:Can 't include .js file on jsp page

SOLVED: OT?:Can 't include .js file on jsp page

2004-01-12       - By Januski, Ken

 Back
Thanks to Merrill for pointing out that the problem was probably in the
javascript. By includining actual file, section by section, in jsp page I
was able to isolate some javascript errors that triggered the
requestDispatcher. I haven't figured out exactly why yet but at least I now
know where the problem is coming from.

Thanks to everyone for their suggestions,

Ken

-- --Original Message-- --
From: Merrill Cornish [mailto:merrill.cornish@(protected)]
Sent: Monday, January 12, 2004 12:43 PM
To: Januski,Ken
Subject: RE: OT?:Can't include .js file on jsp page controlled by front
co ntro ller servlet


Ken,

 One interesting "characteristic" of JavaScript is that if there is any
error, it quietly does nothing.  So, you may be correctly downloading it,
but it finds something wrong and does nothing.

 One way to attack the problem is to get a copy of the JavaScript file and
include it directly in your JSP page between <script> ... </script> tags
rather than downloading the .js file with <script src=...>.

 Once you have it in your JSP page, edit the JavaScript so that each
JavaScript function is individually enclosed in a <script> ... </script>
pair rather than having the whole thing in a single <script> ... </script>
tag pair.  JavaScript merges all of the individual tag pair together as if
it were one big declaration EXCEPT an error in one function now does not
stop other functions from executing.

  Finally, use alert(...); statements at the top fo the various JavaScript
functions to see which one is refusing to execute.  That will tell you which
function(s) have the error.  You can then start commenting out blocks of
code until you isolate the failing statement.

  Of course, it would be easier to use a JavaScript debugger, but I'm not
familiar with them.


Merrill

©2008 junlu.com - Jax Systems, LLC, U.S.A.