Is it possible to send the packae name inside a import as a jsp expression

Hi, I am using jsp pages <% @ page import="package names"%>How i can pass the package names as a jsp expressions Regards,ahamad
[175 byte] By [ahamad15a] at [2007-11-26 15:08:37]
# 1

No, why should it be, it makes no sense; it's just a typing help for the programmer.

If you dynamically need to load classes (my guess), you might want to consider using Class.forName().

Actually, you might really want to consider not doing any of that stuff in JSPs. That sounds like a task for the business model, or at least a servlet.

CeciNEstPasUnProgrammeura at 2007-7-8 8:59:03 > top of Java-index,Java Essentials,Java Programming...
# 2
Hi, I am doing templates.I am forwarding the request from other pages to the same page.At that case i neeed to change the value which is in import attribute. Is it possible to avoid hard-coded value inside a import attribute.Regards,ahamad
ahamad15a at 2007-7-8 8:59:03 > top of Java-index,Java Essentials,Java Programming...
# 3

> I am doing templates.I am forwarding the request

> from other pages to the same page.At that case i

> neeed to change the value which is in import

> attribute.

> Is it possible to avoid hard-coded value inside a

> import attribute.

Only by preprocessing the sources. But why would you need to change just an import statement? Wouldn't you have to replace all class references as well?

CeciNEstPasUnProgrammeura at 2007-7-8 8:59:03 > top of Java-index,Java Essentials,Java Programming...