Edilmar Alves wrote:

> At JServ, I should create a file someservlet.properties for specific
> configurations, like these:
>    repositories=d:\...\sistemas\Consulta.jar
>    repositories=d:\...\sistemas\Senha.jar
>    ... # some lines below
>    servlet.Consulta.ServletResConsulta.initArgs=DIRPS=d:/.../sistemas
>
> Can I specify JAR files into Tomcat ? Or does I need to use WAR files ?
> What's the utility to generate WAR files (zip, tar, ...) ?
>

You can use jar files.  WAR files are only for entire web application (aka
all html,jsp,etc, the entire directory).  Fortunately War is basically a
JAR renamed to .war.    use jar, rename to war.

You can even use both.  (a war which contains a jar).

Your jar files should be in myapp/WEB-INF/lib.  You can put them in
tomcat/lib
but then you'll be able to access them from ANY webapp.


> I need to specify the "initArgs" param DIRPS. Where do I do this ?

This is more complex.  Tomcat no longer pays any attention to the initArgs
files, you must use the xml file in your myapp/WEB-INF/lib (see the
examples for the format, there is a DTD as well in tomcat/conf).  Within
the servlet tag use
<init-param> 
<param-name>DIRPS</param-name><param-value>MYDIRPSVALUE</param-value></init-param>

You must have one init-param for every param-name/value pair!  Not a
block!

To specify a webapp BTW see server.xml in tomcat/conf.  Looking at the
examples
app should be sufficient to get you started.

-Andy


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to