JSP compile errors when using include directive

645 Views Asked by At

I have a bunch of jsps that use the include directive to pull in content from other files

<%@ include file=".jsp"%> 

I've moved development envrionment (JBuilder 2008 with JBOSS as the server) and now the included files are causing compilation errors.

I understand that they are not valid JSPs outwith the context of the including jsp. However I want to stop the precomilation so that I can run the JSPs and everything will be ok at runtime. Is this possible?

2

There are 2 best solutions below

0
On BEST ANSWER

I've encountered this kind of thing. One possible workaround is to use a different file suffix for the included files so that the development environment doesn't try to compile them.

0
On

You can use .jspf extension (JSP fragment) and so they will not be considered as jsp pages and so they will get compiled at compile time