tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 王国前 <guoqian.w...@ezcross.com>
Subject Can not include javascript using TC 4.1.29
Date Mon, 29 Dec 2003 11:39:01 GMT
Howdy,

I am developing a web app using win2k pro + Tomcat

In a servlet , the following code works ( file /script/utility.js can be get by IE)

        sb.append ("<html>\n");
        sb.append ("<head>\n");
        sb.append ( getContentTypeMeta(_req) );
        sb.append ("<script language=javascript1.2 src=\"/script/utility.js\"></script>\n");
                                                                                         
    ^
but when the preceding slash is deleted,  IE can not get the js file:

        sb.append ("<html>\n");
        sb.append ("<head>\n");
        sb.append ( getContentTypeMeta(_req) );
        sb.append ("<script language=javascript1.2 src=\"script/utility.js\"></script>\n");
                                                                                         
     ^ no / here

BTW, both are OK under TC 4.0.1.
Because  the web app will be deployed in another servlet container which only 
recognize the first format ,  I want to using the  format  with preceding "/ " , how should
I do ?
( better not to use 4.0.1 :)

TIA
                                                                                         
                   
Mime
View raw message