| Author |
Problem with JSP Includes
|
kartik krishnan
Ranch Hand
Joined: Nov 19, 2006
Posts: 63
|
|
|
I have a JSP file which includes a lot of JSPs for purposes of modularity. But I am having to include the taglibs and javascript files that we use in every JSP file that has been included. That way , I am import files in every JSP file. I wanted to know if there is a way to import all of these files in one location and make them available to all the JSPS
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56179
|
|
Originally posted by kartik krishnanand: I have a JSP file which includes a lot of JSPs for purposes of modularity.
If you are using JSP 2.0, tag files would be a better mechanism for this purpose.
But I am having to include the taglibs and javascript files that we use in every JSP file that has been included. That way , I am import files in every JSP file.
If you are worried that this is going to cause any sort of a performance issue, rest easy. The "import" is a translation-time artifact and will not affect run-time performance. However, it is a pain in the neck, as well as error-prone, to copy the declarations on each and every page. You may want to explore the concept of a JSP prelude. More information can be found in the JSP Specification.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Problem with JSP Includes
|
|
|