Including files using variables/data types instead of a filename string value
Posted on 2002-03-14
Hi, I'm working on a website template, converting PHP code to JSP code. But I've come across a problem with including files using variables/data types instead of a filename string value.
With PHP that would look like this:
<?php $var = "filename"; ?>
/* and then later on below: */
<?php include($var); ?>
But a JSP equivalent of:
<% String var = "filename"; %>
/* and then later below: */
<%@ include file = var %>
doesn't work because the value must be in quotes unlike PHP. Is there a work around? Or do I have no choice in using variables/data types in this kind of situation?