You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matthias Barmeier <ba...@BARMEIER.COM> on 2000/08/03 14:32:58 UTC

RE: tomcat-user Digest 3 Aug 2000 09:18:48 -0000 Issue 72

Hi !

Thanx for all your help but here are some more questions:


Arion wrote:
...
>
> I am also a newbie in taglib. Have you defined the file
> META-INF/taglib.tld for your
> tag library?
...

Is it important to place the tld there and do I need a META-INF directory
???
I thought I only have to reference it like this:

<%@taglib
	uri="http://snet.barmeier.com/webtaglib/katolib.tld"
	prefix="kato"
%>


Horst wrote:
...
> If you reference your taglibs jar file from inside the web.xml
> file then t=
> his error occurs.=20
> Either reference your taglib directly from the *.jsp file or=20
> unpack the taglib.tld file from the archive and reference this
> file in you=
> r web.xml.
> Place your taglib in the web-inf/lib directory so it can be found
> in the c=
> lasspath.
...
Ahh, maybe something is clearer now.
You mean the best thing I can do is to put all my files (classes and tld) in
a
jar-file and put this to WEB-INF/lib folder.

Do I have to put this META-INF folder into this jar file that Arion
mentioned ????

...
> Sorry if I misunderstand your meaning.
> I can referece my taglibs jar file inside the web.xml with:
>
> <taglibs>
> <taglib-uri>mytags</taglib-uri>
> <taglib-location>/WEB-INF/lib/mytags.jar</taglib-location>
> </taglib>
>
> and the jsp reference the taglib uri as mytags.
>
> The jar file is of course under WEB-INF/lib.
...

Ok, I will try this !!

Thanx for your help !!!

Ciao
	Matze


Re: global parameters

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Rene Duettra wrote:

> Hi,
> Normally I use web.xml to define parameters for servlets.
> Now I need to define some which should apply to all servlets.
> I think there is an easier way than defining all parameters
> for each servlet in the web.xml ...
>

The easiest way to do this is to use context initialization parameters,
rather than servlet initialization parameters.  I don't have the Servlet
2.2 spec in front of me, but it's probably <context-param> or something
like that.

In the servlet, you retrieve such a parameter like this:

    String paramValue =
      getServletContext().getInitParameter("paramName");

>
> Thanks for answers.
>
> Rene

Craig McClanahan



global parameters

Posted by Rene Duettra <bu...@gmx.de>.
Hi,
Normally I use web.xml to define parameters for servlets.
Now I need to define some which should apply to all servlets.
I think there is an easier way than defining all parameters
for each servlet in the web.xml ...

Thanks for answers.

Rene