I don't think that JavaScript is your problem.  Once the JSP page is
processed, the javaScript should look just like it does when you hardcode
the value into it.  Looks to me like your application resource bundle may
have the key ("header.simpleQueryImageSourceR") mistyped.  Try just this
line somewhere else in your jsp and see if you still get the error:
<bean:message key="header.simpleQueryImageSourceR"/> , if you do then you
need to make sure that the key is typed correctly and that the latest
application resources bundle can be found on the classpath.  If it does
work, then you will want to keep fiddling with quotes, etc, becuase this
should work the way you were trying to do it.
-Dallas


                                                                                       
                         
                    Steve A Drake                                                      
                         
                    <[EMAIL PROTECTED]        To:     <[EMAIL PROTECTED]>      
                         
                    ar.edu>              cc:                                           
                         
                                         Fax to:                                       
                         
                    06/13/01             Subject:     i18n + html:link                 
                         
                    11:11 AM                                                           
                         
                    Please                                                             
                         
                    respond to                                                         
                         
                    struts-user                                                        
                         
                                                                                       
                         
                                                                                       
                         




 Hello. I am trying to implement internationalized rollover buttons using
html:link. To do this, I'm trying to use quotes three levels deep and I
guess that's illegal in Javascript. For example, for "onmouseover", if I
try to extract the source name from the resource file, I try:


onmouseover="changeImage('<bean:message key
="header.simpleQueryImageSourceR"/>')"

then I get a servlet exception:


A Servlet Exception Has Occurred

org.apache.jasper.compiler.ParseException:
/usr/apps/tomcat/jakarta-tomcat-4.0-b
1/webapps/moria/test.jsp(55,84) Attribute header.simpleQueryImageSourceR
has no value
        at
org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:565)

        at
org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:683)
        at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:826)
...


If I hardwire the source name that I'm trying to extract, it works. For
example:

onmouseover="changeImage('simpq_en_r')"


I'm using Struts 1.0-b3. Ideas are appreciated. Thanks in advance.





Reply via email to