WEB-INF/lib directory?

2004-09-16 Thread Bjørn T Johansen
In Weblogic I can have subfolders in the lib directory, isn't this possible in Tomcat? It 
seems like I need to have all my jar files directly under the lib folder...

Regards
BTJ
--
---
Bjørn T Johansen (BSc,MNIF)
[EMAIL PROTECTED]
---
Someone wrote:
I understand that if you play a Windows CD backwards you hear strange Satanic 
messages
To which someone replied:
It's even worse than that; play it forwards and it installs Windows
---
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: WEB-INF/lib directory?

2004-09-16 Thread Tim Funk
Correct.  No subdirs.
-Tim
Bjørn T Johansen wrote:
In Weblogic I can have subfolders in the lib directory, isn't this 
possible in Tomcat? It seems like I need to have all my jar files 
directly under the lib folder...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Creating an HTML file with the correct codebase and archivevalue parameters for a jar in the /WEB-INF/lib directory

2003-03-28 Thread Susan Hoddinott
Thanks.  Do you have the servlet spec reference link where this is
explained?

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 11:51 AM
Subject: Re: Creating an HTML file with the correct codebase and
archivevalue parameters for a jar in the /WEB-INF/lib directory




 On Fri, 28 Mar 2003, Susan Hoddinott wrote:

  Date: Fri, 28 Mar 2003 09:25:45 +0800
  From: Susan Hoddinott [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Subject: Creating an HTML file with the correct codebase and archive
  value parameters for a jar in the /WEB-INF/lib directory
 
 
  Hello,
 
  I am trying to create an HTML file which accesses classes and applets in
  a jar file (demo.jar) which is in the WEB-INF/lib directory.  I seem to
  have problems getting it to recognise the existence of the jar file
  and/or more than the first applet in the jar file.  If I put the jar in
  a known directory, it runs but takes about 5 minutes to load.  Can
  anyone tell me what the values should be for codebase and archive so
  that it correctly finds the jar and classes.  My HTML is as follows:
 

 This is not ever going to work.

 The servlet spec includes a requirement that no resources under /WEB-INF
 can be requested directly by the client.  For applets, that means the
 .class and .jar files that you want to download must *not* be under
 /WEB-INF, because the browser will not be able to retrieve them.

 Craig

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Creating an HTML file with the correct codebase and archivevalueparameters for a jar in the /WEB-INF/lib directory

2003-03-28 Thread Tim Funk
Java(TM) Servlet API Specification (Specification)
Version: 2.3
SRV.9.5 Directory Structure

http://java.sun.com/products/servlet/download.html

-Tim

Susan Hoddinott wrote:
Thanks.  Do you have the servlet spec reference link where this is
explained?
- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 11:51 AM
Subject: Re: Creating an HTML file with the correct codebase and
archivevalue parameters for a jar in the /WEB-INF/lib directory


On Fri, 28 Mar 2003, Susan Hoddinott wrote:


Date: Fri, 28 Mar 2003 09:25:45 +0800
From: Susan Hoddinott [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Creating an HTML file with the correct codebase and archive
   value parameters for a jar in the /WEB-INF/lib directory
Hello,

I am trying to create an HTML file which accesses classes and applets in
a jar file (demo.jar) which is in the WEB-INF/lib directory.  I seem to
have problems getting it to recognise the existence of the jar file
and/or more than the first applet in the jar file.  If I put the jar in
a known directory, it runs but takes about 5 minutes to load.  Can
anyone tell me what the values should be for codebase and archive so
that it correctly finds the jar and classes.  My HTML is as follows:
This is not ever going to work.

The servlet spec includes a requirement that no resources under /WEB-INF
can be requested directly by the client.  For applets, that means the
.class and .jar files that you want to download must *not* be under
/WEB-INF, because the browser will not be able to retrieve them.
Craig 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Creating an HTML file with the correct codebase and archivevalueparameters for a jar in the /WEB-INF/lib directory

2003-03-28 Thread Craig R. McClanahan


On Sat, 29 Mar 2003, Susan Hoddinott wrote:

 Date: Sat, 29 Mar 2003 08:35:20 +0800
 From: Susan Hoddinott [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Creating an HTML file with the correct codebase and
 archivevalue parameters for a jar in the /WEB-INF/lib directory

 Thanks.  Do you have the servlet spec reference link where this is
 explained?


Section 9.5, second paragraph:  No file contained in the WEB-INF
directory may be served directly to a client by the container.

Craig

 - Original Message -
 From: Craig R. McClanahan [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, March 28, 2003 11:51 AM
 Subject: Re: Creating an HTML file with the correct codebase and
 archivevalue parameters for a jar in the /WEB-INF/lib directory


 
 
  On Fri, 28 Mar 2003, Susan Hoddinott wrote:
 
   Date: Fri, 28 Mar 2003 09:25:45 +0800
   From: Susan Hoddinott [EMAIL PROTECTED]
   Reply-To: Tomcat Users List [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Subject: Creating an HTML file with the correct codebase and archive
   value parameters for a jar in the /WEB-INF/lib directory
  
  
   Hello,
  
   I am trying to create an HTML file which accesses classes and applets in
   a jar file (demo.jar) which is in the WEB-INF/lib directory.  I seem to
   have problems getting it to recognise the existence of the jar file
   and/or more than the first applet in the jar file.  If I put the jar in
   a known directory, it runs but takes about 5 minutes to load.  Can
   anyone tell me what the values should be for codebase and archive so
   that it correctly finds the jar and classes.  My HTML is as follows:
  
 
  This is not ever going to work.
 
  The servlet spec includes a requirement that no resources under /WEB-INF
  can be requested directly by the client.  For applets, that means the
  .class and .jar files that you want to download must *not* be under
  /WEB-INF, because the browser will not be able to retrieve them.
 
  Craig
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Creating an HTML file with the correct codebase and archivevalue parameters for a jar in the /WEB-INF/lib directory

2003-03-28 Thread Susan Hoddinott
As you are aware of this problem and from my experience that putting a jar
anywhere else seems to result in a large download time, what was your final
solution?

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, March 28, 2003 11:51 AM
Subject: Re: Creating an HTML file with the correct codebase and
archivevalue parameters for a jar in the /WEB-INF/lib directory




 On Fri, 28 Mar 2003, Susan Hoddinott wrote:

  Date: Fri, 28 Mar 2003 09:25:45 +0800
  From: Susan Hoddinott [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Subject: Creating an HTML file with the correct codebase and archive
  value parameters for a jar in the /WEB-INF/lib directory
 
 
  Hello,
 
  I am trying to create an HTML file which accesses classes and applets in
  a jar file (demo.jar) which is in the WEB-INF/lib directory.  I seem to
  have problems getting it to recognise the existence of the jar file
  and/or more than the first applet in the jar file.  If I put the jar in
  a known directory, it runs but takes about 5 minutes to load.  Can
  anyone tell me what the values should be for codebase and archive so
  that it correctly finds the jar and classes.  My HTML is as follows:
 

 This is not ever going to work.

 The servlet spec includes a requirement that no resources under /WEB-INF
 can be requested directly by the client.  For applets, that means the
 .class and .jar files that you want to download must *not* be under
 /WEB-INF, because the browser will not be able to retrieve them.

 Craig

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Creating an HTML file with the correct codebase and archivevalueparameters for a jar in the /WEB-INF/lib directory

2003-03-28 Thread Susan Hoddinott
Thanks am downloading it now to see if I can get any more clues.

- Original Message -
From: Tim Funk [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 9:34 AM
Subject: Re: Creating an HTML file with the correct codebase and
archivevalueparameters for a jar in the /WEB-INF/lib directory


 Java(TM) Servlet API Specification (Specification)
 Version: 2.3

 SRV.9.5 Directory Structure

 http://java.sun.com/products/servlet/download.html

 -Tim

 Susan Hoddinott wrote:
  Thanks.  Do you have the servlet spec reference link where this is
  explained?
 
  - Original Message -
  From: Craig R. McClanahan [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Friday, March 28, 2003 11:51 AM
  Subject: Re: Creating an HTML file with the correct codebase and
  archivevalue parameters for a jar in the /WEB-INF/lib directory
 
 
 
 
 On Fri, 28 Mar 2003, Susan Hoddinott wrote:
 
 
 Date: Fri, 28 Mar 2003 09:25:45 +0800
 From: Susan Hoddinott [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Creating an HTML file with the correct codebase and archive
 value parameters for a jar in the /WEB-INF/lib directory
 
 
 Hello,
 
 I am trying to create an HTML file which accesses classes and applets
in
 a jar file (demo.jar) which is in the WEB-INF/lib directory.  I seem to
 have problems getting it to recognise the existence of the jar file
 and/or more than the first applet in the jar file.  If I put the jar in
 a known directory, it runs but takes about 5 minutes to load.  Can
 anyone tell me what the values should be for codebase and archive so
 that it correctly finds the jar and classes.  My HTML is as follows:
 
 
 This is not ever going to work.
 
 The servlet spec includes a requirement that no resources under
/WEB-INF
 can be requested directly by the client.  For applets, that means the
 .class and .jar files that you want to download must *not* be under
 /WEB-INF, because the browser will not be able to retrieve them.
 
 Craig


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Creating an HTML file with the correct codebase and archive value parameters for a jar in the /WEB-INF/lib directory

2003-03-27 Thread Susan Hoddinott





Hello,

I am trying to create an HTML file which accesses 
classes and applets in a jar file (demo.jar) which is in the WEB-INF/lib 
directory. I seem to have problems getting it to recognise the existence 
of the jar file and/or more than the first applet in the jar file. If I 
put the jar in a known directory, it runs but takes about 5 minutes to 
load. Can anyone tell me what the values should be for codebase and 
archive so that it correctly finds the jar and classes. My HTML is as 
follows:

**

HTML
HEAD
TITLETestKit HTML Page/TITLE
/HEAD
BODY bgcolor="#99" text="#228b22"
!--"CONVERTED_APPLET"--
!-- HTML CONVERTER --
OBJECT 
classid = ""
codebase = 
""
WIDTH = "100%" HEIGHT = "100%" 
PARAM NAME = CODE VALUE = "TestKit.StartTester" 
PARAM NAME = CODEBASE VALUE = ""
PARAM NAME = ARCHIVE VALUE = "/lib/demo.jar" 
PARAM NAME = "type" VALUE = 
"application/x-java-applet;jpi-version=1.3.1"
PARAM NAME = "scriptable" VALUE = "false"
PARAM NAME = "defaultPath" VALUE = "Tester/TesterDemo" /
PARAM NAME = "defaultTestName" VALUE = "demo" /
PARAM NAME = "Entry" VALUE="T" /
COMMENT
EMBED 
type = "application/x-java-applet;jpi-version=1.3.1" 
CODE = "TestKit.StartTester"
JAVA_CODEBASE = ""
ARCHIVE = "/lib/demo.jar"
WIDTH = "100%"
HEIGHT = "100%" 
defaultPath = "Tester/TesterDemo"
defaultTestName ="demo"
Entry ="T"
scriptable = false 
pluginspage = 
"http://java.sun.com/products/plugin/index.html#download"
NOEMBED

/NOEMBED
/EMBED
/COMMENT
/OBJECT
!--
APPLET CODE = "TestKit.StartTester" JAVA_CODEBASE = "" ARCHIVE = 
"/lib/demo.jar" WIDTH = "100%" HEIGHT = "100%"
PARAM NAME = "defaultPath" VALUE = "Tester/TesterDemo" /
PARAM NAME = "defaultTestName" VALUE = "demo" /
PARAM NAME = "Entry" VALUE="T" /

/APPLET
--

!--"END_CONVERTED_APPLET"--
/BODY
/HTML
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Creating an HTML file with the correct codebase and archivevalue parameters for a jar in the /WEB-INF/lib directory

2003-03-27 Thread Craig R. McClanahan


On Fri, 28 Mar 2003, Susan Hoddinott wrote:

 Date: Fri, 28 Mar 2003 09:25:45 +0800
 From: Susan Hoddinott [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Creating an HTML file with the correct codebase and archive
 value parameters for a jar in the /WEB-INF/lib directory


 Hello,

 I am trying to create an HTML file which accesses classes and applets in
 a jar file (demo.jar) which is in the WEB-INF/lib directory.  I seem to
 have problems getting it to recognise the existence of the jar file
 and/or more than the first applet in the jar file.  If I put the jar in
 a known directory, it runs but takes about 5 minutes to load.  Can
 anyone tell me what the values should be for codebase and archive so
 that it correctly finds the jar and classes.  My HTML is as follows:


This is not ever going to work.

The servlet spec includes a requirement that no resources under /WEB-INF
can be requested directly by the client.  For applets, that means the
.class and .jar files that you want to download must *not* be under
/WEB-INF, because the browser will not be able to retrieve them.

Craig

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: No jars allowed in the WEB-INF/lib directory

2002-10-18 Thread Larry Meadors
Maybe it is corrupt? Can you view the contents of the jar file? 

  jar -tf iwxml.jar

Larry

 [EMAIL PROTECTED] 10/17/02 15:17 PM 
Hi:

It seems that Tomcat doesn't support any jar in the WEB-INF/lib
directory.
By the way I'm not using symlinks at all in the WEB-INF/lib directory. 

Tomcat 4.1.12
Sun JDK 1.4.1
Red Hat 8

The file mywebapp/WEB-INF/lib/iwxml.jar does exist!
The owner of the Tomcat process is root,so it can read the archive.


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




No jars allowed in the WEB-INF/lib directory

2002-10-18 Thread Gustavo Antonio Muñoz Lechuga
Hi:

It seems that Tomcat doesn't support any jar in the WEB-INF/lib
directory.
By the way I'm not using symlinks at all in the WEB-INF/lib directory. 
Tomcat 4.1.12
Sun JDK 1.4.1
Red Hat 8

The file mywebapp/WEB-INF/lib/iwxml.jar does exist!
The owner of the Tomcat process is root,so it can read the archive.

The exception is:

javax.servlet.ServletException: Exception processing JAR at resource
path /WEB-INF/lib/iwxml.jar
at
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930)
at
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
- Root Cause -
java.io.FileNotFoundException
at
org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:344)
at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:161)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:68)
at
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85)
at
sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:69)
at
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906)
at
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

2002-10-17 14:36:16 ContextConfig[/examples]: Marking this application
unavailable due to previous error(s)


What am I doing wrong?


-- 
Gustavo Muñoz
Investigador Sr.
InterWare de México, S. A. de C. V.
---

Muévete, oh tumba, Tsuka mo ugoke
el sonido de mi llanto waga naku koe wa
es el viento del otoño.aki no kaze.

Basho.
---
  INFORMACION PRIVILEGIADA Y CONFIDENCIAL

Este comunicado puede incluir anexos para el uso exclusivo del
destinatario asi como  informacion confidencial y privilegiada del
propietario remitente.
Si usted no es el destinatario de la

RE: symlinks in WEB-INF/lib directory

2002-10-18 Thread Shapira, Yoav
Hi,

I want to use symlinks for all my jar files in the WEB-INF/lib
directory
of my webapp. Tomcat can't handle those symlinks.

That's not part of the specification.  In fact, all tomcat's required to
handle is a WAR file containing your entire webapp.  That tomcat allows
you to deploy an exploded directory structure is just a nice bonus.

Any clues?

Copy the files, don't link them.  I would suggest the same for your
static resources as well.  Actually, to be portable and adhere to the
spec, you should package your app in a war file and just deploy that.

Yoav Shapira
Millennium ChemInformatics

This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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


Re: No jars allowed in the WEB-INF/lib directory

2002-10-18 Thread Gustavo Antonio Muñoz Lechuga
Hi:

It's not corrupt
jar -tvf iwxml.jar 
works fine.



On Thu, 2002-10-17 at 16:29, Larry Meadors wrote:
 Maybe it is corrupt? Can you view the contents of the jar file? 
 
   jar -tf iwxml.jar
 
 Larry
 
  [EMAIL PROTECTED] 10/17/02 15:17 PM 
 Hi:
 
 It seems that Tomcat doesn't support any jar in the WEB-INF/lib
 directory.
 By the way I'm not using symlinks at all in the WEB-INF/lib directory. 
 
 Tomcat 4.1.12
 Sun JDK 1.4.1
 Red Hat 8
 
 The file mywebapp/WEB-INF/lib/iwxml.jar does exist!
 The owner of the Tomcat process is root,so it can read the archive.
 
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
 
-- 
Gustavo Muñoz
Investigador Sr.
InterWare de México, S. A. de C. V.
---

Muévete, oh tumba, Tsuka mo ugoke
el sonido de mi llanto waga naku koe wa
es el viento del otoño.aki no kaze.

Basho.
---
  INFORMACION PRIVILEGIADA Y CONFIDENCIAL

Este comunicado puede incluir anexos para el uso exclusivo del
destinatario asi como  informacion confidencial y privilegiada del
propietario remitente.
Si usted no es el destinatario de la informacion, tiene estrictamente
prohibido usar,copiar, divulgar, difundir, reproducir y/o distribuirla
por cualquier medio.
Por favor notifique de inmediato al remitente devolviendo el e-mail,
borre esta comunicacion y destruya todas las copias, de lo contrario
podria incurrir en alguna responsabilidad por el uso indebido de la
informacion confidencial de acuerdo a las leyes aplicables.
--


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




RE: No jars allowed in the WEB-INF/lib directory

2002-10-18 Thread Cox, Charlie
This was posted on another thread(socket permission catalina.policy
question) by Erik Erskine - see if its is related:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7319

Charlie

 -Original Message-
 From: Gustavo Antonio Muñoz Lechuga [mailto:gmunoz;interware.com.mx]
 Sent: Thursday, October 17, 2002 6:18 PM
 To: Tomcat Users List
 Subject: Re: No jars allowed in the WEB-INF/lib directory
 
 
 Hi:
 
 It's not corrupt
 jar -tvf iwxml.jar 
 works fine.
 
 
 
 On Thu, 2002-10-17 at 16:29, Larry Meadors wrote:
  Maybe it is corrupt? Can you view the contents of the jar file? 
  
jar -tf iwxml.jar
  
  Larry
  
   [EMAIL PROTECTED] 10/17/02 15:17 PM 
  Hi:
  
  It seems that Tomcat doesn't support any jar in the WEB-INF/lib
  directory.
  By the way I'm not using symlinks at all in the WEB-INF/lib 
 directory. 
  
  Tomcat 4.1.12
  Sun JDK 1.4.1
  Red Hat 8
  
  The file mywebapp/WEB-INF/lib/iwxml.jar does exist!
  The owner of the Tomcat process is root,so it can read the archive.
  
  
  --
  To unsubscribe, e-mail:   
 mailto:tomcat-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail: 
 mailto:tomcat-user-help;jakarta.apache.org
  
 -- 
 Gustavo Muñoz
 Investigador Sr.
 InterWare de México, S. A. de C. V.
 ---
 
 Muévete, oh tumba, Tsuka mo ugoke
 el sonido de mi llanto waga naku koe wa
 es el viento del otoño.aki no kaze.
 
 Basho.
 --
 -
   INFORMACION PRIVILEGIADA Y CONFIDENCIAL
 
 Este comunicado puede incluir anexos para el uso exclusivo del
 destinatario asi como  informacion confidencial y privilegiada del
 propietario remitente.
 Si usted no es el destinatario de la informacion, tiene estrictamente
 prohibido usar,copiar, divulgar, difundir, reproducir y/o distribuirla
 por cualquier medio.
 Por favor notifique de inmediato al remitente devolviendo el e-mail,
 borre esta comunicacion y destruya todas las copias, de lo contrario
 podria incurrir en alguna responsabilidad por el uso indebido de la
 informacion confidencial de acuerdo a las leyes aplicables.
 --
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: 
 mailto:tomcat-user-help;jakarta.apache.org
 

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




symlinks in WEB-INF/lib directory

2002-10-16 Thread Gustavo Antonio Muñoz Lechuga

Hi:

I want to use symlinks for all my jar files in the WEB-INF/lib directory
of my webapp. Tomcat can't handle those symlinks.

My OS is RedHat 8.0
Sun JDK 1.4.1
Tomcat 4.1.12

I need to get it to work in RedHat 7.3, 8.0 and Solaris 8.0
I have not test with Solaris, anyway, I need it working in those three
OS's.

Any clues?

For instance, do you think I should use another release of Tomcat in
order to use symlinks in the WEB-INF/lib directory?
Sincerely, I would prefer to keep using 4.1.12

Gustavo Muñoz
Investigador Sr.
Círculo InterWare S. C.


PS: By the way, I got Tomcat 4.1.12 work with symlinks of static
content, using the allowLinking flat set to true, in the Resources
element (child of Context element). (I'm writing this, because I have
read a lot of messages asking this issue, but realize that my problem
nowadays is other one)




PS2:
About the problem in the WEB-INF/lib directory and symlinks, the
exception in RedHat 8.0 is:
2002-10-16 22:13:59 ContextConfig[/sio] Exception processing JAR at
resource path /WEB-INF/lib/iwcatalog.jar
javax.servlet.ServletException: Exception processing JAR at resource
path /WEB-INF/lib/iwcatalog.jar
at
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930)
at
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
- Root Cause -
java.io.FileNotFoundException
at
org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:344)
at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:161)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:68)
at
sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85)
at
sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:69)
at
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906)
at
org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main

Accessing jar out of webapps/ROOT/WEB-INF/lib directory

2002-07-11 Thread Serdar BOZDA

Hi,
I am currently working on a project. I want to install this project under c:\root in 
my computer. in c:\root\servlet\servlet.jar there are my servlets. and I want to call 
these servlets like the following url:

http://localhost/servlet/hello (there is hello.class in c:\root\servlet\servlet.jar)
When I put them webapps\root\web-inf\lib it works, but now it does not.
 
What configuration changes do I need to make?
 
Thanks in advance

Serdar BOZDA
Computer Engineer

MobiPath Information Technologies 
Istanbul/TURKEY
Tel : +90 212 213 4975
Fax: +90 212 213 7361



Re: Accessing jar out of webapps/ROOT/WEB-INF/lib directory

2002-07-11 Thread Jacob Kjome

The servlet spec requires that your app must look like:

contextName/  (put static content here)
 WEB-INF/  (put web.xml here)
 lib/  (put your .jar libraries here)
 classes/  (put your standalone classes here)

Also, you will need to put your contextName directory under tomcat's 
webapps directory, or create a Context entry in server.xml which points 
to the absolute path of the contextName directory and specifies what the 
context is called when running.

For instance...

Context path=/myapp docBase=c:\root\servlets\contextName 

Jake

At 11:39 AM 7/11/2002 +0300, you wrote:
Hi,
I am currently working on a project. I want to install this project under 
c:\root in my computer. in c:\root\servlet\servlet.jar there are my 
servlets. and I want to call these servlets like the following url:

http://localhost/servlet/hello (there is hello.class in 
c:\root\servlet\servlet.jar)
When I put them webapps\root\web-inf\lib it works, but now it does not.

What configuration changes do I need to make?

Thanks in advance

Serdar BOZDAÐ
Computer Engineer

MobiPath Information Technologies
Istanbul/TURKEY
Tel : +90 212 213 4975
Fax: +90 212 213 7361



Accessing jar out of webapps/ROOT/WEB-INF/lib directory

2002-07-11 Thread Serdar BOZDA

Hi,
I am currently working on a project. I want to install this project under c:\root in 
my computer. in c:\root\servlet\servlet.jar there are my servlets. and I want to call 
these servlets like the following url:

http://localhost/servlet/hello (there is hello.class in c:\root\servlet\servlet.jar)
When I put them webapps\root\web-inf\lib it works, but now it does not.

What configuration changes do I need to make?

Thanks in advance

Serdar BOZDA
Computer Engineer

MobiPath Information Technologies 
Istanbul/TURKEY
Tel : +90 212 213 4975
Fax: +90 212 213 7361



RE: problem in loading jar files in WEB-INF\lib directory

2001-08-18 Thread Paresh Deshpande

Hey Rob, thanks for the help. Let me figure out how this works for me.
greetings
Paresh
-Original Message-
From: Rob S. [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 8:07 PM
To: [EMAIL PROTECTED]
Subject: Re: problem in loading jar files in WEB-INF\lib directory


Ugh, mispellings and whatnot aside =) each time I come across a little
gotcha like that, I email it to myself and stick it in my Wacky Java
Experiences folder.  That code snippet is the result of searching the
mailing list archives and the java.sun.com forums and some other places I
probably can't remember.

Anyway, yeah, it should do the trick for you!

- r

On Fri, 17 Aug 2001 7:23:50 PDT [EMAIL PROTECTED] wrote:
 Alright my friend, I'm about to make your day.
 
 There's a but with the JNDI classloader in that it doesn't delegate to its
 parent classloader the task of loaded the intial context factory. This
 means that, while the web-app classloader knows where your class is, the
 JNDI one DOESN'T and isn't asking for any help! Put this in your pipe and
 smoke it: Keeps throwing a ClassNotFoundException when it tries to load
 my context factory. Turns out that the JNDI classloader is broken and you
 need to install your own builder. You can read the docs for more info,
also
 check out this code snippet:
NamingManager.setInitialContextFactoryBuilder(
 new InitialContextFactoryBuilder() { public InitialContextFactory
 createInitialContextFactory( Hashtable environment )

 throws NamingException
   {
   try
   {
 // Since we're the only ones using this, we can really disregard the
 Hashtable. return( (InitialContextFactory)
 ((Class.forName(com.sun.jndi.nis.NISCtxFactory)).newInstance()) );

   }
   catch(InstantiationException e)
   {
 NISUtils.cat.fatal(Unable to instantiate the JNDI NIS factory, message
 [+e.getMessage()+]);   throw new
 NamingException(e.getMessage());
   }
   catch(IllegalAccessException e)
   {
 NISUtils.cat.fatal(Unable to access the JNDI NIS factory, message
 [+e.getMessage()+]);   throw new
 NamingException(e.getMessage());
   }
   catch(ClassNotFoundException e)
   {
 NISUtils.cat.fatal(Unable to find the JNDI NIS factory, message
 [+e.getMessage()+]);   throw new
 NamingException(e.getMessage());
   }
   }
   });
 
 Enjoy!
 
 - r
 
 On Fri, 17 Aug 2001 19:48:55 +0530 [EMAIL PROTECTED] wrote:
  hey rob,
  my servlet calls a class which tries to instantiate JNDI's
InitialContext
  by passing env Hashtable...
  
  env.put(Context.INITIAL_CONTEXT_FACTORY,
  com.sun.jndi.fscontext.RefFSContextFactory);
  
  initialContext = new InitialContext(env);
  
  the class com.sun.jndi.fscontext.RefFSContextFactory is available in the
  jar file in my
  WEB-INF\lib folder. And the error that I get while loading the servlet
is
  
  
  getInitialContext:exception: javax.naming.NoInitialContextException:
 Cannot  instantiate class: com.sun.jndi.fscontext.RefFSContextFactory
 [Root  exception is java.lang.ClassNotFoundException:
  com.sun.jndi.fscontext.RefFSContextFactory]
  getInitialContext:More Details: Cannot instantiate class:
  com.sun.jndi.fscontext.RefFSContextFactory
  
  You really are onto helping me, aren't you? if you could solve this one,
 I  owe you a mug of
  beer, when you come donw to Bangalore...
  paresh
  
  -Original Message-
  From: Rob S. [mailto:[EMAIL PROTECTED]]
  Sent: Friday, August 17, 2001 7:34 PM
  To: [EMAIL PROTECTED]
  Subject: Re: problem in loading jar files in WEB-INF\lib directory
  
  
   Then, the only question remaining is classes in my jar file are not
 being   loaded for
   some reason. While loading the servlet, somewhere midway, the classes
 in   WEB-INF\lib
   directory are not being loaded. strange isn't it?
  
  How do you know the classes are not being loaded?  What kind of error
  message are you getting?
  
  Help me help you =)
  
  - r
 
 







RE: problem in loading jar files in WEB-INF\lib directory

2001-08-18 Thread Paresh Deshpande

Craig,

This could probably explain why I am facing this problem.
Actually all the JNDI classes are in a single jar file in my WEB-INF\lib 
folder. But since I am running on JDK 1.3, this option would not work.

When I add WEB-INF\classes and WEB-INF\lib\xxx.jar (where jndi classes are
in
xxx.jar) in the classpath (while calling tomcat.bat), application works 
smoothly.

regards
Paresh

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Craig R. McClanahan
Sent: Friday, August 17, 2001 10:41 PM
To: [EMAIL PROTECTED]
Subject: RE: problem in loading jar files in WEB-INF\lib directory




On Fri, 17 Aug 2001, Paresh Deshpande wrote:

 Hi Rob, 
 thanks for your reply, Rob. I was waiting for the reply for quite a while
 :)).
 It is not specifically mentioned in the docs how the class files in
 WEB-INF\classes
 are loaded. Neither is it mentioned whether the jar file in the
 WEB-APP\lib folder will be automatically picked in classpath. 

Technically, Tomcat does not modify the CLASSPATH *environment variable*,
but it does make these classes available to your application.  If you
think about it for a second, this makes sense -- different web apps have
different sets of classes available, but there is only one CLASSPATH ...

 If I do not provide anything (jar or WEB-INF\classes) from my web
 application folder,
 kind of strange problem occurs in which the servlets get loaded from
 WEB-INF\classes
 directory, but when I try to cast a particular resource from JNDI to my
 class (
 placed in the same WEB-INF\classes folder), I get class cast exception
 error. Tomcat 
 does not find the class. How can I solve this problem?
 paresh
 

A likely cause of this problem is the following (which is why class
loaders are black magic sometimes :-).

When Tomcat starts up, it creates a hierarchy of class loaders.  Here's a
simplified model for Tomcat 3.2.x:

Java Runtime Classes
|
System Extensions Classloader ($JAVA_HOME/jre/lib/ext/*.jar)\
|
System Classloader ($CLASSPATH)
|
Webapp Classloader (/WEB-INF/classes, /WEB-INF/lib/*.jar)

Now, when you try to create a class in a servlet (i.e. Object foo = new
Foo()), you are asking the webapp class loader to load class Foo.  If it's
there, that's fine and dandy ... if not, it delegates upwards to see if
one of the parent class loaders can find it.  (That is why classes you put
on the classpath are visible to all webapps in 3.2).

But note -- the searching process only goes *upwards*, not
*downwards*.  In other words, a class that is loaded from the System
Classloader (for example) cannot see *any* classes in the webapp class
loader.

Why does this matter to you?  Because the key to your problem is most
likely where the JNDI classes themselves are being loaded from.  If you
have jndi.jar on your CLASSPATH, they are being loaded from the System
Classloader.  If you're running JDK 1.3 or above, they are loaded from the
Java Runtime Classes classloade.  But, you're trying to reference a class
that is loaded from your webapp classloader.  Can you see the problem yet?

A couple of approaches to try:

* Move the JNDI classes into your webapp (in /WEB-INF/lib).  This won't
  work on a JDK 1.3 or above system, though.

* Move the application classes you want to cast to up into
  the System classloader (by putting them on the CLASSPATH, or
  into Tomcat's top level lib directory).

Craig





RE: problem in loading jar files in WEB-INF\lib directory

2001-08-17 Thread Rob S.

Sounds like you could learn a lot from reading the Application Developer's
Guide that comes packaged with tomcat in the /doc directory.  It's also
available online at:

http://jakarta.apache.org/tomcat/index.html

- r

 -Original Message-
 From: Paresh Deshpande [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 17, 2001 1:14 AM
 To: [EMAIL PROTECTED]
 Subject: problem in loading jar files in WEB-INF\lib directory


  Hi,
 
  I am trying to run my application on APACHE with TOMCAT servlet
 engine. I
  have placed the jar files required for web
  application in myapp\WEB-INF\lib folder. Will tomcat
 automatically pick up
  this jar file? Or do I need to add them manually
  in tomcat.bat?
 
  Further, do I need to add myapp\WEB-INF\classes in the classpath? Who
  takes care of the classes in this folder?
 
 
 greetings
  Paresh
 





RE: problem in loading jar files in WEB-INF\lib directory

2001-08-17 Thread Paresh Deshpande

Hi Rob, 
thanks for your reply, Rob. I was waiting for the reply for quite a while
:)).
It is not specifically mentioned in the docs how the class files in
WEB-INF\classes
are loaded. Neither is it mentioned whether the jar file in the
WEB-APP\lib folder will be automatically picked in classpath. 
If I do not provide anything (jar or WEB-INF\classes) from my web
application folder,
kind of strange problem occurs in which the servlets get loaded from
WEB-INF\classes
directory, but when I try to cast a particular resource from JNDI to my
class (
placed in the same WEB-INF\classes folder), I get class cast exception
error. Tomcat 
does not find the class. How can I solve this problem?
paresh

-Original Message-
From: Rob S. [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 5:00 PM
To: [EMAIL PROTECTED]
Subject: RE: problem in loading jar files in WEB-INF\lib directory


Sounds like you could learn a lot from reading the Application Developer's
Guide that comes packaged with tomcat in the /doc directory.  It's also
available online at:

http://jakarta.apache.org/tomcat/index.html

- r

 -Original Message-
 From: Paresh Deshpande [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 17, 2001 1:14 AM
 To: [EMAIL PROTECTED]
 Subject: problem in loading jar files in WEB-INF\lib directory


  Hi,
 
  I am trying to run my application on APACHE with TOMCAT servlet
 engine. I
  have placed the jar files required for web
  application in myapp\WEB-INF\lib folder. Will tomcat
 automatically pick up
  this jar file? Or do I need to add them manually
  in tomcat.bat?
 
  Further, do I need to add myapp\WEB-INF\classes in the classpath? Who
  takes care of the classes in this folder?
 
 
 greetings
  Paresh
 






Re: problem in loading jar files in WEB-INF\lib directory

2001-08-17 Thread Rob S.

Hiya,

Did you read the appdev guide?  I believe it discusses the significance of the WEB-INF 
folder, among other things.

- r

On Fri, 17 Aug 2001 17:19:12 +0530 [EMAIL PROTECTED] wrote:
 Hi Rob,
 thanks for your reply, Rob. I was waiting for the reply for quite a while
 :)).
 It is not specifically mentioned in the docs how the class files in
 WEB-INF\classes
 are loaded. Neither is it mentioned whether the jar file in the
 WEB-APP\lib folder will be automatically picked in classpath.
 If I do not provide anything (jar or WEB-INF\classes) from my web
 application folder,
 kind of strange problem occurs in which the servlets get loaded from
 WEB-INF\classes
 directory, but when I try to cast a particular resource from JNDI to my
 class (
 placed in the same WEB-INF\classes folder), I get class cast exception
 error. Tomcat
 does not find the class. How can I solve this problem?
 paresh
 
 -Original Message-
 From: Rob S. [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 17, 2001 5:00 PM
 To: [EMAIL PROTECTED]
 Subject: RE: problem in loading jar files in WEB-INF\lib directory
 
 
 Sounds like you could learn a lot from reading the Application Developer's
 Guide that comes packaged with tomcat in the /doc directory.  It's also
 available online at:
 
 http://jakarta.apache.org/tomcat/index.html
 
 - r
 
  -Original Message-
  From: Paresh Deshpande [mailto:[EMAIL PROTECTED]]
  Sent: Friday, August 17, 2001 1:14 AM
  To: [EMAIL PROTECTED]
  Subject: problem in loading jar files in WEB-INF\lib directory
 
 
   Hi,
  
   I am trying to run my application on APACHE with TOMCAT servlet
  engine. I
   have placed the jar files required for web
   application in myapp\WEB-INF\lib folder. Will tomcat
  automatically pick up
   this jar file? Or do I need to add them manually
   in tomcat.bat?
  
   Further, do I need to add myapp\WEB-INF\classes in the classpath? Who
   takes care of the classes in this folder?
  
  
  greetings
   Paresh
  
 






RE: problem in loading jar files in WEB-INF\lib directory

2001-08-17 Thread Paresh Deshpande

thanks Rob,
got the particular information :
When you install an application into Tomcat (or any other 2.2-compatible
server), the classes in the WEB-INF/classes/ 
directory, as well as all classes in JAR files found in the WEB-INF/lib/
directory, are added to the class path for your 
particular web application. Thus, if you include all of the required
library classes in one of these places (be sure to 
check licenses for redistribution rights for any third party libraries you
utilize), you will simplify the installation of 
your web application -- no adjustment to the system class path will be
necessary. 

Then, the only question remaining is classes in my jar file are not being
loaded for 
some reason. While loading the servlet, somewhere midway, the classes in
WEB-INF\lib 
directory are not being loaded. strange isn't it?

regards
Paresh



-Original Message-
From: Rob S. [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 5:35 PM
To: [EMAIL PROTECTED]
Subject: Re: problem in loading jar files in WEB-INF\lib directory


Hiya,

Did you read the appdev guide?  I believe it discusses the significance of
the WEB-INF folder, among other things.

- r

On Fri, 17 Aug 2001 17:19:12 +0530 [EMAIL PROTECTED] wrote:
 Hi Rob,
 thanks for your reply, Rob. I was waiting for the reply for quite a while
 :)).
 It is not specifically mentioned in the docs how the class files in
 WEB-INF\classes
 are loaded. Neither is it mentioned whether the jar file in the
 WEB-APP\lib folder will be automatically picked in classpath.
 If I do not provide anything (jar or WEB-INF\classes) from my web
 application folder,
 kind of strange problem occurs in which the servlets get loaded from
 WEB-INF\classes
 directory, but when I try to cast a particular resource from JNDI to my
 class (
 placed in the same WEB-INF\classes folder), I get class cast exception
 error. Tomcat
 does not find the class. How can I solve this problem?
 paresh
 
 -Original Message-
 From: Rob S. [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 17, 2001 5:00 PM
 To: [EMAIL PROTECTED]
 Subject: RE: problem in loading jar files in WEB-INF\lib directory
 
 
 Sounds like you could learn a lot from reading the Application Developer's
 Guide that comes packaged with tomcat in the /doc directory.  It's also
 available online at:
 
 http://jakarta.apache.org/tomcat/index.html
 
 - r
 
  -Original Message-
  From: Paresh Deshpande [mailto:[EMAIL PROTECTED]]
  Sent: Friday, August 17, 2001 1:14 AM
  To: [EMAIL PROTECTED]
  Subject: problem in loading jar files in WEB-INF\lib directory
 
 
   Hi,
  
   I am trying to run my application on APACHE with TOMCAT servlet
  engine. I
   have placed the jar files required for web
   application in myapp\WEB-INF\lib folder. Will tomcat
  automatically pick up
   this jar file? Or do I need to add them manually
   in tomcat.bat?
  
   Further, do I need to add myapp\WEB-INF\classes in the classpath? Who
   takes care of the classes in this folder?
  
  
  greetings
   Paresh
  
 







Re: problem in loading jar files in WEB-INF\lib directory

2001-08-17 Thread Rob S.

 Then, the only question remaining is classes in my jar file are not being
 loaded for
 some reason. While loading the servlet, somewhere midway, the classes in
 WEB-INF\lib
 directory are not being loaded. strange isn't it?

How do you know the classes are not being loaded?  What kind of error message are you 
getting?

Help me help you =)

- r




RE: problem in loading jar files in WEB-INF\lib directory

2001-08-17 Thread Paresh Deshpande

hey rob, 
my servlet calls a class which tries to instantiate JNDI's InitialContext 
by passing env Hashtable...

env.put(Context.INITIAL_CONTEXT_FACTORY,
com.sun.jndi.fscontext.RefFSContextFactory);

initialContext = new InitialContext(env);

the class com.sun.jndi.fscontext.RefFSContextFactory is available in the jar
file in my
WEB-INF\lib folder. And the error that I get while loading the servlet is


getInitialContext:exception: javax.naming.NoInitialContextException: Cannot
instantiate class: com.sun.jndi.fscontext.RefFSContextFactory [Root
exception is java.lang.ClassNotFoundException:
com.sun.jndi.fscontext.RefFSContextFactory]
getInitialContext:More Details: Cannot instantiate class:
com.sun.jndi.fscontext.RefFSContextFactory

You really are onto helping me, aren't you? if you could solve this one, I
owe you a mug of
beer, when you come donw to Bangalore...
paresh

-Original Message-
From: Rob S. [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 7:34 PM
To: [EMAIL PROTECTED]
Subject: Re: problem in loading jar files in WEB-INF\lib directory


 Then, the only question remaining is classes in my jar file are not being
 loaded for
 some reason. While loading the servlet, somewhere midway, the classes in
 WEB-INF\lib
 directory are not being loaded. strange isn't it?

How do you know the classes are not being loaded?  What kind of error
message are you getting?

Help me help you =)

- r





Re: problem in loading jar files in WEB-INF\lib directory

2001-08-17 Thread Rob S.

Alright my friend, I'm about to make your day.

There's a but with the JNDI classloader in that it doesn't delegate to its parent 
classloader the task of loaded the intial context factory.  This means that, while the 
web-app classloader knows where your class is, the JNDI one DOESN'T and isn't asking 
for any help!

Put this in your pipe and smoke it:

Keeps throwing a ClassNotFoundException when it tries to load my context factory.  
Turns out that the JNDI classloader is broken and you need to install your own 
builder.  You can read the docs for more info, also check out this code snippet:

NamingManager.setInitialContextFactoryBuilder( new 
InitialContextFactoryBuilder()
{
public InitialContextFactory createInitialContextFactory( Hashtable 
environment )
   throws NamingException
{
try
{
// Since we're the only ones using this, we can really 
disregard the Hashtable.
return( (InitialContextFactory) 
((Class.forName(com.sun.jndi.nis.NISCtxFactory)).newInstance()) );
}
catch(InstantiationException e)
{
NISUtils.cat.fatal(Unable to instantiate the JNDI NIS 
factory, message [+e.getMessage()+]);
throw new NamingException(e.getMessage());
}
catch(IllegalAccessException e)
{
NISUtils.cat.fatal(Unable to access the JNDI NIS factory, 
message [+e.getMessage()+]);
throw new NamingException(e.getMessage());
}
catch(ClassNotFoundException e)
{
NISUtils.cat.fatal(Unable to find the JNDI NIS factory, 
message [+e.getMessage()+]);
throw new NamingException(e.getMessage());
}
}
});

Enjoy!

- r

On Fri, 17 Aug 2001 19:48:55 +0530 [EMAIL PROTECTED] wrote:
 hey rob,
 my servlet calls a class which tries to instantiate JNDI's InitialContext
 by passing env Hashtable...
 
 env.put(Context.INITIAL_CONTEXT_FACTORY,
 com.sun.jndi.fscontext.RefFSContextFactory);
 
 initialContext = new InitialContext(env);
 
 the class com.sun.jndi.fscontext.RefFSContextFactory is available in the
 jar file in my
 WEB-INF\lib folder. And the error that I get while loading the servlet is
 
 
 getInitialContext:exception: javax.naming.NoInitialContextException: Cannot
 instantiate class: com.sun.jndi.fscontext.RefFSContextFactory [Root
 exception is java.lang.ClassNotFoundException:
 com.sun.jndi.fscontext.RefFSContextFactory]
 getInitialContext:More Details: Cannot instantiate class:
 com.sun.jndi.fscontext.RefFSContextFactory
 
 You really are onto helping me, aren't you? if you could solve this one, I
 owe you a mug of
 beer, when you come donw to Bangalore...
 paresh
 
 -Original Message-
 From: Rob S. [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 17, 2001 7:34 PM
 To: [EMAIL PROTECTED]
 Subject: Re: problem in loading jar files in WEB-INF\lib directory
 
 
  Then, the only question remaining is classes in my jar file are not being
  loaded for
  some reason. While loading the servlet, somewhere midway, the classes in
  WEB-INF\lib
  directory are not being loaded. strange isn't it?
 
 How do you know the classes are not being loaded?  What kind of error
 message are you getting?
 
 Help me help you =)
 
 - r






Re: problem in loading jar files in WEB-INF\lib directory

2001-08-17 Thread Rob S.

Ugh, mispellings and whatnot aside =) each time I come across a little gotcha like 
that, I email it to myself and stick it in my Wacky Java Experiences folder.  That 
code snippet is the result of searching the mailing list archives and the java.sun.com 
forums and some other places I probably can't remember.

Anyway, yeah, it should do the trick for you!

- r

On Fri, 17 Aug 2001 7:23:50 PDT [EMAIL PROTECTED] wrote:
 Alright my friend, I'm about to make your day.
 
 There's a but with the JNDI classloader in that it doesn't delegate to its
 parent classloader the task of loaded the intial context factory. This
 means that, while the web-app classloader knows where your class is, the
 JNDI one DOESN'T and isn't asking for any help! Put this in your pipe and
 smoke it: Keeps throwing a ClassNotFoundException when it tries to load
 my context factory. Turns out that the JNDI classloader is broken and you
 need to install your own builder. You can read the docs for more info, also
 check out this code snippet: NamingManager.setInitialContextFactoryBuilder(
 new InitialContextFactoryBuilder() { public InitialContextFactory
 createInitialContextFactory( Hashtable environment )  
 throws NamingException
   {
   try
   {
 // Since we're the only ones using this, we can really disregard the
 Hashtable. return( (InitialContextFactory)
 ((Class.forName(com.sun.jndi.nis.NISCtxFactory)).newInstance()) );  
   }
   catch(InstantiationException e)
   {
 NISUtils.cat.fatal(Unable to instantiate the JNDI NIS factory, message
 [+e.getMessage()+]);   throw new
 NamingException(e.getMessage());
   }
   catch(IllegalAccessException e)
   {
 NISUtils.cat.fatal(Unable to access the JNDI NIS factory, message
 [+e.getMessage()+]);   throw new
 NamingException(e.getMessage());
   }
   catch(ClassNotFoundException e)
   {
 NISUtils.cat.fatal(Unable to find the JNDI NIS factory, message
 [+e.getMessage()+]);   throw new
 NamingException(e.getMessage());
   }
   }
   });
 
 Enjoy!
 
 - r
 
 On Fri, 17 Aug 2001 19:48:55 +0530 [EMAIL PROTECTED] wrote:
  hey rob,
  my servlet calls a class which tries to instantiate JNDI's InitialContext
  by passing env Hashtable...
  
  env.put(Context.INITIAL_CONTEXT_FACTORY,
  com.sun.jndi.fscontext.RefFSContextFactory);
  
  initialContext = new InitialContext(env);
  
  the class com.sun.jndi.fscontext.RefFSContextFactory is available in the
  jar file in my
  WEB-INF\lib folder. And the error that I get while loading the servlet is
  
  
  getInitialContext:exception: javax.naming.NoInitialContextException:
 Cannot  instantiate class: com.sun.jndi.fscontext.RefFSContextFactory
 [Root  exception is java.lang.ClassNotFoundException:
  com.sun.jndi.fscontext.RefFSContextFactory]
  getInitialContext:More Details: Cannot instantiate class:
  com.sun.jndi.fscontext.RefFSContextFactory
  
  You really are onto helping me, aren't you? if you could solve this one,
 I  owe you a mug of
  beer, when you come donw to Bangalore...
  paresh
  
  -Original Message-
  From: Rob S. [mailto:[EMAIL PROTECTED]]
  Sent: Friday, August 17, 2001 7:34 PM
  To: [EMAIL PROTECTED]
  Subject: Re: problem in loading jar files in WEB-INF\lib directory
  
  
   Then, the only question remaining is classes in my jar file are not
 being   loaded for
   some reason. While loading the servlet, somewhere midway, the classes
 in   WEB-INF\lib
   directory are not being loaded. strange isn't it?
  
  How do you know the classes are not being loaded?  What kind of error
  message are you getting?
  
  Help me help you =)
  
  - r
 
 






RE: problem in loading jar files in WEB-INF\lib directory

2001-08-17 Thread Craig R. McClanahan

On Fri, 17 Aug 2001, Rob S. wrote:

 Sounds like you could learn a lot from reading the Application Developer's
 Guide that comes packaged with tomcat in the /doc directory.  It's also
 available online at:
 
 http://jakarta.apache.org/tomcat/index.html
 

The most up-to-date version of this document (reflecting some cool new
stuff that Ant 1.3 lets you do) is available online at:

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc-exp/appdev/index.html

The updated version shows you how to let Ant build classpaths for you.  I
now have *nothing* in my classpath, and my Ant scripts for all my projects
happily build whatever is needed for that particular project.

Although this document references Tomcat 4 (because it will ship with
Tomcat 4 final), the information about web apps is all the same for Tomcat
3.x).

 - r
 

Craig


  -Original Message-
  From: Paresh Deshpande [mailto:[EMAIL PROTECTED]]
  Sent: Friday, August 17, 2001 1:14 AM
  To: [EMAIL PROTECTED]
  Subject: problem in loading jar files in WEB-INF\lib directory
 
 
   Hi,
  
   I am trying to run my application on APACHE with TOMCAT servlet
  engine. I
   have placed the jar files required for web
   application in myapp\WEB-INF\lib folder. Will tomcat
  automatically pick up
   this jar file? Or do I need to add them manually
   in tomcat.bat?
  
   Further, do I need to add myapp\WEB-INF\classes in the classpath? Who
   takes care of the classes in this folder?
  
  
  greetings
   Paresh
  
 
 
 




RE: problem in loading jar files in WEB-INF\lib directory

2001-08-17 Thread Craig R. McClanahan



On Fri, 17 Aug 2001, Paresh Deshpande wrote:

 Hi Rob, 
 thanks for your reply, Rob. I was waiting for the reply for quite a while
 :)).
 It is not specifically mentioned in the docs how the class files in
 WEB-INF\classes
 are loaded. Neither is it mentioned whether the jar file in the
 WEB-APP\lib folder will be automatically picked in classpath. 

Technically, Tomcat does not modify the CLASSPATH *environment variable*,
but it does make these classes available to your application.  If you
think about it for a second, this makes sense -- different web apps have
different sets of classes available, but there is only one CLASSPATH ...

 If I do not provide anything (jar or WEB-INF\classes) from my web
 application folder,
 kind of strange problem occurs in which the servlets get loaded from
 WEB-INF\classes
 directory, but when I try to cast a particular resource from JNDI to my
 class (
 placed in the same WEB-INF\classes folder), I get class cast exception
 error. Tomcat 
 does not find the class. How can I solve this problem?
 paresh
 

A likely cause of this problem is the following (which is why class
loaders are black magic sometimes :-).

When Tomcat starts up, it creates a hierarchy of class loaders.  Here's a
simplified model for Tomcat 3.2.x:

Java Runtime Classes
|
System Extensions Classloader ($JAVA_HOME/jre/lib/ext/*.jar)\
|
System Classloader ($CLASSPATH)
|
Webapp Classloader (/WEB-INF/classes, /WEB-INF/lib/*.jar)

Now, when you try to create a class in a servlet (i.e. Object foo = new
Foo()), you are asking the webapp class loader to load class Foo.  If it's
there, that's fine and dandy ... if not, it delegates upwards to see if
one of the parent class loaders can find it.  (That is why classes you put
on the classpath are visible to all webapps in 3.2).

But note -- the searching process only goes *upwards*, not
*downwards*.  In other words, a class that is loaded from the System
Classloader (for example) cannot see *any* classes in the webapp class
loader.

Why does this matter to you?  Because the key to your problem is most
likely where the JNDI classes themselves are being loaded from.  If you
have jndi.jar on your CLASSPATH, they are being loaded from the System
Classloader.  If you're running JDK 1.3 or above, they are loaded from the
Java Runtime Classes classloade.  But, you're trying to reference a class
that is loaded from your webapp classloader.  Can you see the problem yet?

A couple of approaches to try:

* Move the JNDI classes into your webapp (in /WEB-INF/lib).  This won't
  work on a JDK 1.3 or above system, though.

* Move the application classes you want to cast to up into
  the System classloader (by putting them on the CLASSPATH, or
  into Tomcat's top level lib directory).

Craig




problem in loading jar files in WEB-INF\lib directory

2001-08-16 Thread Paresh Deshpande

 Hi,
 
 I am trying to run my application on APACHE with TOMCAT servlet engine. I
 have placed the jar files required for web 
 application in myapp\WEB-INF\lib folder. Will tomcat automatically pick up
 this jar file? Or do I need to add them manually
 in tomcat.bat?
 
 Further, do I need to add myapp\WEB-INF\classes in the classpath? Who
 takes care of the classes in this folder?
 
 
greetings 
 Paresh 
 



WAR files and the WEB-INF/lib directory

2001-07-24 Thread Tait, Allen

I am working on a web publishing app and am using Tomcat 3.2.1 with Cocoon.
My application is installed by putting the .war file in the
tomcat_home/webapps directory and restarting Tomcat.  I am finding that any
.jar files that I include in the WEB-INF/lib directory are not available to
my application.  However, if I explicitly include them in the CLASSPATH,
when tomcat starts, everything works fine.  Is there some configuration that
I am missing or is an entry required in the web.xml file to get Tomcat to
look at the application's WEB-INF/lib directory?  I want to keep some .jars
that apply to a particular app out of the global environment.

Thanks





Re: WAR files and the WEB-INF/lib directory

2001-07-24 Thread Wyn Easton

I don't think you are missing anything.
The jar files in your web apps. web-inf/lib directory
can not be seen from classes loaded from outside of
your web app.  Someplace you are probably loading a
class that does not have access to the jar files in
your web app.


--- Tait, Allen [EMAIL PROTECTED] wrote:
 I am working on a web publishing app and am using
 Tomcat 3.2.1 with Cocoon.
 My application is installed by putting the .war file
 in the
 tomcat_home/webapps directory and restarting Tomcat.
  I am finding that any
 .jar files that I include in the WEB-INF/lib
 directory are not available to
 my application.  However, if I explicitly include
 them in the CLASSPATH,
 when tomcat starts, everything works fine.  Is there
 some configuration that
 I am missing or is an entry required in the web.xml
 file to get Tomcat to
 look at the application's WEB-INF/lib directory?  I
 want to keep some .jars
 that apply to a particular app out of the global
 environment.
 
 Thanks
 
 


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Jar files not found in WEB-INF/lib directory

2001-01-29 Thread Les Hartzman

I've just started to use Tomcat.  I created a .war file for my servlet and
on startup of tomcat, the .war file was processed.  Trying to access the
servlet caused some ClassDefNotFound errors to appear.  I moved the
necessary .jar files to the WEB-INF/lib directory, and restarted tomcat.

Unfortunately, tomcat still isn't finding the .jar files to resolve the
references.

I'm using Tomcat 3.2.1.

Thanks for any help.

Les


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]