--- On Sat, 4/3/10 at 5:07 PM, Hassan Schroeder <[email protected]> wrote:
> To: "Tomcat Users List" <[email protected]> > Date: Saturday, April 3, 2010, 5:07 PM > On Sat, Apr 3, 2010 at 1:57 PM, > nzindian <[email protected]> > wrote: > > > Im trying to use a javascript WYSIWYG editor in a JSP > page. > > > The JSP contains the following code to include the JS > file: > > > and it doesnt work, > > Look at the page source in a browser and see what it is. > Why doesn't > it work? Because it's wrong, *from the perspective of the > user agent*. > > You can hard-code your context path or use JSTL e.g. > "<c:url ... " or > the corresponding JSP declaration to add your context path > in front of > the context-relative script directory path. > Or you can specify a *correct* relative path. For example, if your .jsp is in jsp/ and your .js is in a parallel js/ folder you can use a relative path: src="../js/the-js.js" - Bob --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
