jsp:include static svg does not work
843835Nov 15 2002 — edited Nov 18 2002I am running tomcat4- and I have a jsp file that outputs svg content like so:
<?xml version="1.0" encoding="US-ASCII"?>
<%@ page contentType="image/svg+xml"%>
This works fine- the problem is that up until now I have included other svg widgets like this:
<g id="radio_off" >
<%@ include file="../graphics/radioButton.svg" %>
</g>
which also works just fine. Now, I have to change this to pass in a dynamic directory containing the image (there will be various directories with same file name- I determine at runtime which directory to use)- so I have to use a jsp:include instead.
When I do this:
<g id="radio_off" >
<jsp:include page="graphics/radioButton.svg" flush="true"/>
</g>
When it is run I just get:
g id="radio_off" >
</g>
Just blank inside the <g> . If I change radioButton.svg to radioButton.jsp and say:
g id="radio_off" >
<jsp:include page="graphics/radioButton.jsp" flush="true"/>
</g>
Then I get what I expect with
g id="radio_off" >
<svg width="15" height="15">
....and so on
</g>
I thought jsp:include would include the static content of a file (like html or svg), but apparently only the OUTPUT of that file.....
Is this correct- I cannot get my svg content to be included in the svg by using jsp:include or am I missing something?
I think it will be strange that I have to rename all my svg files jsp to get them included...Anu ideas???
Thanks,
Jim