wood burning stoves 2.0*
The moose likes Struts and the fly likes Tiles - problem with .Js Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles - problem with .Js" Watch "Tiles - problem with .Js" New topic

Tiles - problem with .Js

Pramoda Bhat
Ranch Hand

Joined: Oct 17, 2003
Posts: 32
I've been trying to use tiles..
I have a header.jsp, where I need to import a .js file, which has my Menus. I tried giving it this way..
<Script language="javaScript" src="<%=request.getContextPath()%>/cssStyle/menu.js"></Script>
It is not working!!!
Any help?
Eric Sexton
Ranch Hand

Joined: Sep 12, 2003
Posts: 133
Are you sure that you need the scriptlet to get the context path? I'm sure that your problem is with the src" " portion. Everything else looks fine there.
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
Try removing the request.getContextPath() method call and adding the <html:base/> tag at the top of the page.
[ November 13, 2003: Message edited by: Matthew Phillips ]

Matthew Phillips
Pramoda Bhat
Ranch Hand

Joined: Oct 17, 2003
Posts: 32
The problem wasn't with the code at all..!!! It was with the javaScript itself..
Sorry for the trouble
I agree. Here's the link: http://aspose.com/file-tools
subject: Tiles - problem with .Js
Similar Threads
what is the URL ?
Prototype Ajax.Request error - Function Expected Options
javascript include src path not right
Access resources from jsp without using "bean:message" tag
I Want to Cache bulk of js files.