Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP include  RSS feed

 
Reeti Saha
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
I've a jsp file (india.jsp) which displays the SVG content perfectly with svg browser plugin installed. Now when I'm trying to include this jsp (india.jsp) from another jsp which displays simple html (test.jsp) then the included jsp is not working.
Could u pls. explain me the reason.
The code for both of the jsp's are given.
Regards
Reeti Saha

test.jsp
-------------
<HTML>
<HEAD>
<TITLE>Play with SVG</TITLE>
</HEAD>
<%@ page language="java" session="false" isThreadSafe="false" %>
<BODY aLink=#000000 bgColor=#ffffff leftMargin=0 link=#0033cc topMargin=0
vLink=#0066ff marginheight="0" marginwidth="0">
<form name="detail" method="POST" >
<table border=1 cellPadding=0 cellSpacing=0 width="100%">
<tr width="1000">
<td>xxxxx</td>
<td>xxxxx</td>
</tr>
<tr width="1000">
<td>
<jsp:include page="india.jsp" flush="true" />
</td>
<td>
u r there
</td>
</tr>
<tr width="1000">
<td>xxxxx</td>
<td>xxxxx</td>
</tr>
</table>
</form>
</body>
</html>
india.jsp
---------------
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN" "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd" [
<!ENTITY BASE "stroke:black;stroke-width:0.00100;fill:none;">
<!ENTITY BOUNDARY "stroke:magenta;stroke-width:0.00100;fill:white;fill-opacity:0">
<!ENTITY EURNASIA "stroke:magenta;stroke-width:0.00100;fill:magenta;fill-opacity:0.1;">
<!ENTITY NOAMER "stroke:green;stroke-width:0.00100;fill:green;fill-opacity:0.1;">
<!ENTITY SOAMAFR "stroke:cyan;stroke-width:0.00100;fill:cyan;fill-opacity:0.1;">
<!ENTITY SOASAUS "stroke:yellow;stroke-width:0.00100;fill:yellow;fill-opacity:0.1;">
<!ENTITY WORLD "stroke:red;stroke-width:.10100;fill:none;">
]>
<%@ page contentType="image/svg-xml" %>
<%@ page language="java" session="true" %>

<svg width="450" height="375" preserveAspectRatio="xMinYMin" viewBox=" -180.0 -90.0 360.0 180.0" >
<title>World</title>
<g id="canvas" >
<% System.out.println("Me here" ); %>
<g transform="translate(-740, 250)" >
<g transform="scale(9)" >
<g id="WORLD" style="&WORLD;">
<path
d="M73.577,-15.754 L73.445,-15.935 L73.401,-16.127 L73.246,-16.361 L73.180,-16.733 L73.147,-17.030 L73.103,-17.315 L72.981,-17.632 L72.915,-17.822 L72.860,-18.033 L72.860,-18.254 L72.761,-18.496 L72.794,-18.748 L72.860,-18.968 L72.816,-19.146 L72.683,-19.324 L72.628,-19.512 L72.584,-19.700 L72.584,-19.888 L72.628,-20.085 L72.727,-20.356 L72.705,-20.708 L72.628,-20.915 L72.562,-21.102 L72.485,-21.298 L72.540,-21.525 L72.440,-21.731 L72.474,-21.926 L72.496,-22.162 L72.694,-22.162 L72.507,-22.306 L72.253,-22.306 L72.109,-22.142 L72.054,-21.936 L72.043,-21.628 L71.944,-21.308 L71.833,-21.153 L71.524,-20.978 L71.270,-20.884 L70.917,-20.781 L70.685,-20.802 L70.442,-20.802 L70.277,-20.884 L69.945,-21.143 L69.714,-21.391 L69.261,-21.813 L68.963,-22.080 L68.919,-22.347 L69.151,-22.316 L69.360,-22.367 L69.603,-22.388 L69.824,-22.429 L70.012,-22.551 L70.199,-22.705 L70.266,-22.878 L70.343,-23.052 L70.133,-22.980 L69.945,-22.919 L69.680,-22.848 L69.426,-22.817 L69.128,-22.827 L68.919,-22.858 L68.753,-22.939 L68.565,-23.123 L68.433,-23.265 L68.300,-23.428 L68.190,-23.570 L68.080,-23.722 "/>
<path
d="M73.611,-15.743 L73.677,-15.573 L73.898,-15.498 L73.820,-15.316 L73.887,-15.092 "/>
<path
d="M88.890,-21.628 L88.691,-21.648 L88.504,-21.628 L88.261,-21.535 L88.139,-21.689 L88.084,-21.864 L88.117,-22.080 L87.930,-21.916 L87.720,-21.689 L87.543,-21.628 L87.124,-21.442 L86.958,-21.360 L86.848,-21.091 L86.925,-20.833 L86.770,-20.491 L86.572,-20.200 L86.273,-19.940 L86.042,-19.846 L85.733,-19.763 L85.457,-19.617 L85.169,-19.460 L84.938,-19.282 L84.695,-19.010 L84.496,-18.769 L84.297,-18.528 L84.110,-18.360 L83.823,-18.170 L83.558,-17.981 L83.326,-17.727 L83.006,-17.516 L82.564,-17.167 L82.321,-17.008 L82.211,-16.839 L82.211,-16.637 L81.747,-16.372 L81.427,-16.308 L81.195,-16.244 L81.074,-16.010 L80.941,-15.786 L80.621,-15.818 L80.279,-15.711 L80.124,-15.466 L79.981,-15.284 L79.981,-14.888 L80.014,-14.674 L80.091,-14.374 L80.036,-14.180 L80.113,-13.869 L80.168,-13.621 L80.235,-13.405 L80.268,-13.157 L80.224,-12.963 L80.168,-12.758 L80.102,-12.531 L80.003,-12.271 L79.914,-12.087 L79.793,-11.826 L79.749,-11.631 L79.738,-11.403 L79.738,-11.110 L79.760,-10.772 L79.782,-10.587 L79.782,-10.347 L79.594,-10.271 L79.285,-10.293 L79.186,-10.096 L79.031,-9.802 L78.899,-9.616 L78.888,-9.321 L78.590,-9.222 L78.391,-9.135 L78.181,-9.025 L78.126,-8.850 L78.049,-8.653 L77.916,-8.368 L77.640,-8.115 L77.331,-8.105 L77.099,-8.302 L76.834,-8.631 L76.602,-8.981 L76.481,-9.233 L76.338,-9.747 L76.117,-10.260 L75.940,-10.685 L75.819,-11.142 L75.697,-11.490 L75.377,-11.881 L75.189,-12.043 L75.046,-12.282 L74.968,-12.552 L74.814,-13.049 L74.737,-13.395 L74.704,-13.589 L74.593,-13.847 L74.461,-14.019 L74.406,-14.277 L74.317,-14.470 L74.229,-14.663 L73.942,-14.953 "/>
<path
d="M91.639,-27.809 L91.849,-27.829 L92.025,-27.888 L92.224,-27.917 L92.412,-27.966 L92.610,-28.015 L92.765,-28.122 L92.942,-28.181 L93.118,-28.298 L93.339,-28.493 L93.626,-28.658 L93.891,-28.774 L94.101,-28.949 L94.211,-29.123 L94.366,-29.220 L94.553,-29.297 L94.763,-29.210 L95.072,-29.191 L95.271,-29.200 L95.525,-29.268 L95.790,-29.422 L96.000,-29.471 L96.209,-29.278 L96.209,-28.997 L96.430,-28.939 L96.419,-28.706 L96.364,-28.463 L96.695,-28.463 L96.872,-28.395 L97.126,-28.395 L97.313,-28.327 L97.391,-28.132 "/>
<path
d="M97.391,-28.132 L97.391,-27.937 L97.082,-27.731 L97.004,-27.525 L97.059,-27.270 L96.673,-27.270 L96.485,-27.191 L96.132,-27.142 L95.989,-26.925 L95.812,-26.776 L95.536,-26.668 L95.282,-26.480 L95.150,-26.212 L95.161,-25.993 L95.183,-25.754 L95.072,-25.544 L94.774,-25.364 L94.675,-25.214 L94.642,-24.873 L94.476,-24.571 L94.311,-24.279 L94.200,-23.945 L93.968,-23.864 L93.736,-23.905 L93.483,-23.854 L93.339,-23.722 L93.361,-23.540 L93.372,-23.286 L93.328,-23.041 L93.240,-22.878 L93.041,-22.888 L92.997,-22.664 L93.019,-22.408 L93.085,-22.234 L93.008,-22.029 L92.754,-22.039 L92.599,-21.905 "/>
<path
d="M92.599,-21.905 L92.533,-22.469 L92.434,-22.950 L92.323,-23.225 L92.235,-23.520 L92.103,-23.753 L91.805,-23.520 L91.683,-23.174 L91.473,-23.133 L91.374,-23.286 L91.186,-23.316 L91.065,-23.641 L91.032,-23.915 L91.319,-24.208 L91.540,-24.309 L91.738,-24.460 L91.871,-24.601 L92.003,-24.863 L92.213,-25.014 L91.970,-25.194 L91.540,-25.264 L91.131,-25.294 L90.932,-25.274 L90.325,-25.254 L90.049,-25.274 L89.872,-25.344 L89.674,-25.514 L89.585,-25.814 L89.530,-26.132 L89.343,-25.973 L89.188,-26.073 L88.945,-26.152 L88.901,-26.400 L88.724,-26.232 L88.504,-26.400 L88.294,-26.271 L88.150,-26.073 L88.029,-25.873 L88.150,-25.594 L88.481,-25.514 L88.603,-25.264 L88.404,-25.254 L88.194,-25.124 L87.940,-25.044 L87.841,-24.813 L88.029,-24.652 L88.216,-24.561 L88.426,-24.380 L88.459,-23.976 L88.415,-23.783 L88.537,-23.540 L88.537,-23.296 L88.592,-22.929 L88.570,-22.735 L88.713,-22.500 L88.735,-22.213 L88.768,-22.029 L88.890,-21.628 "/>
<path
d="M81.034,-30.221 L80.849,-30.198 L80.746,-30.031 L80.593,-29.922 L80.413,-29.809 L80.409,-29.602 L80.301,-29.437 L80.323,-29.230 L80.238,-29.053 L80.081,-28.915 L80.139,-28.738 L80.328,-28.691 L80.431,-28.525 L80.634,-28.556 L80.827,-28.458 L80.984,-28.359 L81.155,-28.272 L81.308,-28.173 L81.439,-28.034 L81.582,-27.911 L81.767,-27.839 L81.951,-27.819 L82.149,-27.744 L82.311,-27.612 L82.536,-27.596 L82.698,-27.437 L82.864,-27.341 L83.053,-27.309 L83.260,-27.301 L83.489,-27.365 L83.723,-27.305 L83.903,-27.337 L84.091,-27.317 L84.307,-27.285 L84.519,-27.121 L84.712,-26.909 L84.865,-26.809 L85.085,-26.752 L85.265,-26.720 L85.481,-26.728 L85.692,-26.688 L85.859,-26.572 L86.088,-26.539 L86.322,-26.499 L86.668,-26.451 L86.969,-26.439 L87.140,-26.366 L87.338,-26.395 L87.572,-26.374 L87.765,-26.419 L87.954,-26.395 L88.066,-26.556 L88.111,-26.736 L87.981,-26.917 L87.949,-27.101 "/>
<path
d="M87.954,-27.117 L88.152,-27.041 L88.404,-27.121 L88.642,-27.121 "/>
<path
d="M88.930,-27.329 L88.813,-27.185 L88.849,-27.005 L88.952,-26.845 L89.191,-26.748 L89.402,-26.712 L89.640,-26.688 L89.833,-26.680 L90.018,-26.696 L90.234,-26.773 L90.454,-26.817 L90.638,-26.777 L90.845,-26.752 L91.048,-26.781 L91.331,-26.837 L91.520,-26.845 L91.726,-26.869 L91.992,-26.913 L92.145,-27.025 L92.145,-27.233 L92.059,-27.409 L91.866,-27.485 L91.686,-27.584 L91.745,-27.760 "/>
<path
d="M77.663,-35.462 L77.843,-35.502 L78.027,-35.524 L78.221,-35.623 L78.392,-35.710 L78.567,-35.776 L78.715,-35.882 L78.927,-35.904 L79.102,-35.951 L79.282,-35.987 L79.444,-35.896 L79.651,-35.831 L79.718,-35.652 L79.889,-35.594 L80.015,-35.458 L80.195,-35.509 L80.384,-35.469 L80.253,-35.312 L80.195,-35.128 L80.172,-34.936 L80.069,-34.770 L79.880,-34.619 L79.808,-34.452 L79.633,-34.411 L79.610,-34.226 L79.484,-34.047 L79.259,-34.013 L79.071,-33.972 L79.021,-33.786 L79.039,-33.606 L78.958,-33.434 L79.066,-33.287 L79.268,-33.186 L79.421,-33.069 L79.480,-32.873 L79.583,-32.710 L79.457,-32.559 L79.250,-32.544 L79.138,-32.388 L78.949,-32.365 L78.765,-32.502 L78.572,-32.559 L78.482,-32.384 L78.522,-32.187 L78.675,-32.057 L78.724,-31.882 L78.742,-31.656 L78.711,-31.422 L78.855,-31.227 L78.945,-31.065 L79.111,-30.988 L79.304,-31.026 L79.516,-31.023 L79.673,-30.907 L79.853,-30.876 L79.997,-30.760 L80.141,-30.636 L80.321,-30.582 L80.473,-30.466 L80.631,-30.365 L80.802,-30.288 L80.982,-30.249 "/>

<path
d="M77.663,-35.462 L77.488,-35.348 L77.330,-35.260 L77.151,-35.150 L76.998,-35.047 L76.957,-34.870 L76.804,-34.752 L76.624,-34.811 L76.427,-34.796 L76.260,-34.693 L76.072,-34.663 L75.887,-34.671 L75.743,-34.560 L75.550,-34.560 L75.370,-34.597 L75.186,-34.615 L74.956,-34.685 L74.786,-34.752 L74.592,-34.789 L74.421,-34.855 L74.232,-34.863 L74.057,-34.796 L73.909,-34.693 L73.819,-34.515 L73.945,-34.370 L73.859,-34.192 L74.048,-34.084 L74.219,-33.995 L74.057,-33.879 L74.107,-33.674 L74.219,-33.501 L74.048,-33.355 L74.084,-33.174 L74.201,-33.024 L74.304,-32.862 L74.489,-32.782 L74.673,-32.794 L74.700,-32.563 L74.889,-32.483 L75.073,-32.468 L75.253,-32.426 L75.343,-32.267 L75.276,-32.099 L75.105,-32.023 L74.898,-32.034 L74.731,-31.950 L74.597,-31.817 L74.570,-31.637 L74.646,-31.472 L74.606,-31.292 L74.682,-31.127 L74.821,-31.011 L74.637,-31.003 L74.489,-30.899 L74.318,-30.837 L74.160,-30.644 L74.008,-30.544 L73.873,-30.396 L73.850,-30.202 L73.774,-30.019 L73.567,-29.945 L73.383,-29.867 L73.284,-29.711 L73.212,-29.535 L73.108,-29.371 L72.996,-29.230 L72.888,-29.085 L72.762,-28.951 L72.578,-28.849 L72.425,-28.750 L72.236,-28.572 L72.133,-28.418 L71.993,-28.244 L71.885,-28.078 L71.786,-27.927 L71.557,-27.855 L71.359,-27.859 L71.179,-27.855 L71.004,-27.788 L70.851,-27.676 L70.707,-27.847 L70.590,-27.994 L70.352,-27.935 L70.240,-27.792 L70.078,-27.668 L69.934,-27.521 L69.799,-27.377 L69.655,-27.237 L69.561,-27.073 L69.516,-26.881 L69.561,-26.644 L69.731,-26.588 L69.974,-26.568 L70.159,-26.528 L70.226,-26.334 L70.154,-26.157 L70.109,-25.943 L70.208,-25.781 L70.379,-25.655 L70.554,-25.700 L70.644,-25.534 L70.662,-25.347 L70.761,-25.184 L70.847,-25.013 L70.990,-24.875 L71.076,-24.715 L70.995,-24.536 L71.103,-24.388 L70.883,-24.306 L70.676,-24.245 L70.599,-24.413 L70.415,-24.409 L70.208,-24.343 L70.064,-24.179 L69.866,-24.183 L69.687,-24.237 L69.507,-24.265 L69.322,-24.290 L69.133,-24.298 L68.954,-24.306 L68.778,-24.232 L68.778,-24.035 L68.544,-23.999 L68.356,-23.978 L68.189,-23.896 L68.090,-23.744 "/>

</g>
</g>
</svg>
 
Mark Elliott
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is just a (hopefully educated) guess as I have no means of testing. I presume that your plugin is being started due to the mime type of your original page. When you include this in your second page your browser will see the mime type of the wrapping page "text/html" and will attempt to render the whole page itself, and not bother sending it to the plugin.
[ January 16, 2002: Message edited by: Mark Elliott ]
 
Reeti Saha
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Elliott:
This is just a (hopefully educated) guess as I have no means of testing. I presume that your plugin is being started due to the mime type of your original page. When you include this in your second page your browser will see the mime type of the wrapping page "text/html" and will attempt to render the whole page itself, and not bother sending it to the plugin.
[ January 16, 2002: Message edited by: Mark Elliott ]


Hi:
Thanks for the reply but I think this is not the only problem. Actually what I found out is that when I try to load any svg embedded jsp which contains a System.out line at the begining , is getting displayed repetitively on the console. I think I need to solve this problem first. Could u pls. help me in this regard.
Regards
Reeti
 
Pranit Saha
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can u pls check with
<%@ include file="xyz.jsp" %>
Pranit..
 
Reeti Saha
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pranit Saha:
can u pls check with
<%@ include file="xyz.jsp" %>
Pranit..


If I use include file then it will give error for multiple occurrences of contentType.
Reeti
 
William Dimac
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot embed one document type (svg) inside another (html). The browser will not suddenly switch from one to the other. You might try using frames instead and have the svg document in one of the frames and your html in the others.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!