You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Gavin, Rick" <RG...@vidyah.com> on 2003/03/19 16:20:55 UTC

Possible to have default classes and taglib includes in JSPs?

Hi all,
  Does anyone know if you can include classes and taglibs in all jsp pages
in a webapp by default, instead of having to import and reference them on
each page?  I didn't see it in the servlet or jsp spec.

Thanks for the help,
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Possible to have default classes and taglib includes in JSPs?

Posted by Jon Wingfield <jo...@mkodo.com>.
You can do a static include of a page which has your default imports:

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

Tim Funk wrote:
> No - you have to explicitly import the classes and/or taglibs.
> 
> -Tim
> 
> Gavin, Rick wrote:
> 
>> Hi all,
>>   Does anyone know if you can include classes and taglibs in all jsp 
>> pages
>> in a webapp by default, instead of having to import and reference them on
>> each page?  I didn't see it in the servlet or jsp spec.
>>
>> Thanks for the help,
>> Rick
>>  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Possible to have default classes and taglib includes in JSPs?

Posted by Tim Funk <fu...@joedog.org>.
No - you have to explicitly import the classes and/or taglibs.

-Tim

Gavin, Rick wrote:
> Hi all,
>   Does anyone know if you can include classes and taglibs in all jsp pages
> in a webapp by default, instead of having to import and reference them on
> each page?  I didn't see it in the servlet or jsp spec.
> 
> Thanks for the help,
> Rick
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Possible to have default classes and taglib includes in JSPs?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 19 Mar 2003, Gavin, Rick wrote:

> Date: Wed, 19 Mar 2003 07:20:55 -0800
> From: "Gavin, Rick" <RG...@vidyah.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: Possible to have default classes and taglib includes in JSPs?
>
> Hi all,
>   Does anyone know if you can include classes and taglibs in all jsp pages
> in a webapp by default, instead of having to import and reference them on
> each page?  I didn't see it in the servlet or jsp spec.
>

In JSP 2.0 (i.e. Tomcat 5), you'll be able to declare a "prelude" file
that is attached to the front of every JSP page, which is real useful for
stuff like this.  For JSP 1.2 (i.e. Tomcat 4.1), the idea of a single file
included with the <%@ include %> directive is the easiest way to deal with
this kind of thing.

> Thanks for the help,
> Rick

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org