Mattias Jiderhamn wrote:
>
> Hans Bergsten wrote
> > You're right about not mixing expressions with static strings, but
> > what you suggest still doesn't work. The reason is that the
> > file attribute of the include directive doesn't accept expression
> > values.
>
> I was a little bit puzzled that you, Hans, didn't mention this in your
> first reply. But since I haven't tried (and I know you are more
> experienced than me) I thought I might be wrong.
Sorry, I should have mentioned the problem with expressions as well.
> In the original post Kevin Duffey wrote:
> > I use compile-time includes instead of run-time.
>
> To me it seems obvious you can't use dynamic strings for compile time
> parameters. It would be like
> String myPackage = "java.io.*";
> import myPackage;
>
> (Right?)
Right. When you use the include directive (as opposed to the include
action), the included file is merged into the original file during
the translation to a servlet. Hence, the file name must be known at
compile time, so request time data is not supported.
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets