I've tried this but take javascript errors saying that the static function
is undefined.  Apparently, the staticJavascript.jsp is not being
compiled/seen.  All my jsp's are in /WEB-INF/jsp/*.

I've tried using every combination I can think of on the src= of the script
tag but can't get a resolution.  Any ideas?

 <script type="text/javascript" src="/WEB-INF/jsp/staticJavascript.jsp"></
script>

Bart




                                                                           
             Joe Germuska                                                  
             <[EMAIL PROTECTED]                                             
             >                                                          To 
                                       Erik Weber                          
             11/18/2004 02:42          <[EMAIL PROTECTED]>, Struts  
             PM                        Users Mailing List                  
                                       <[EMAIL PROTECTED]>            
                                                                        cc 
             Please respond to                                             
               "Struts Users                                       Subject 
               Mailing List"           Re: Performance issues              
             <[EMAIL PROTECTED]                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           




At 2:20 PM -0500 11/18/04, Erik Weber wrote:
>I found that the JavaScript generated by the Validator (Struts 1.1)
>added nearly 40Kb to the page download! (Perhaps there is a way to
>only download a script once and reuse it among pages? I have no
>idea.) I don't use JavaScript validation other than a simple blank
>field check.

There is a way.  You can use the staticJavascript attribute and set
it to "false" in most of your pages, and then make a single JSP like
this:


more validation_js.jsp:
<%@ page language="java" %>
<%@ page contentType="text/javascript; charset=UTF-8" %>

<%@ taglib uri="/struts/html-el" prefix="html" %>
<html:javascript dynamicJavascript="false" staticJavascript="true" />

There you have it.

Joe

--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to