A variable in a JSP should be included in bracelets, otherwise it will not be traeted as variables, although it works with .htm with Velocity engine. So $path works in .htm, in JSP it should write as ${path} if you wnat it to be teated as a variable instead of a literal.