jsp java: my tag files don't replace parameters -


script.tag:

<%@ attribute name="file" required="true"%> <script type="text/javascript" src="/path/to/${file}"></script> 

my.jsp

<%@ page language="java" contenttype="text/html; charset=utf-8"     pageencoding="utf-8"%>  <%@ taglib tagdir="/web-inf/tags" prefix="x"%> <x:script file="register.js"/> 

however, ${file} param not replaced , stays literally ${file}

help!

did try adding pagescope when use attribute in tag? this:

<script type="text/javascript" src="/path/to/${pagescope.file}"></script>


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -