Re: DataSource and initialContext.lookup(java:comp/env)

2004-11-07 Thread Frank W. Zammetti
java:comp/env is the default namespace defined by JNDI.  The call to 
lookup() with this as an argument is returning an instance of a context 
corresponding to that namespace, which you need to do a further lookup 
for your specific resource.

On a related note, I'm pretty sure you could condense all the code you 
have to just one line, something like:

DataSource ds = (DateSource)new 
InitialContext().lookup(java:comp/env/jdbc/wms)

I'm fairly certain that works.  That might be clearer to you.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Eric Wulff wrote:
helpful somewhat...  at least in helping me narrow my question.  So
what is this java:comp/env?  What exactly is being returned based on
this string passed to lookup()?
Eric
On Sat, 06 Nov 2004 23:35:34 -0500, Frank W. Zammetti
[EMAIL PROTECTED] wrote:
I'll give it a shot...
All JNDI resource lookups occur relative to some context.  The code you
posted first gets the default initial context, then looks for a resource
named java:comp/env relative to that default context.  It then gets a
reference to a DataSource that exists within the context jdbc/wms
relative to java:comp/env
You can ROUGHLY think of this the same way you do URLs... in a sense,
the java:comp/env might be something like www.apache.org.  That gives
you a starting context.  Then if you want to retrieve a particular file
in that domain, you look it up relative to the domain (i.e.,
www.apache.org/tomcat.htm).
Same thing here... There is a hierarchy of JNDI resources, a tree
structure, that has an initial context as the root.  You then are in a
sense constructing a path to your DataSource, and it might look
something like /initial_context/java:comp/env/jdbc/wms (not exactly, but
you get the idea).
Does that help any?
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

Eric Wulff wrote:
I just returned from working on a tutorial at sun which I was inspired
to go over based on my lack of understanding of the code snippet
below.  I'm trying to fully understand what's going on.  Docs state
that the code...
initialContext.lookup(java:comp/env)
returns a named object.  Best I can tell is that this is a reference
to a starting point in my directory... or something like that.  Is
anyone willing to explain what initialContext.lookup() fundamentally
takes care of when called?
Context initialContext = new InitialContext();
Context context = (Context) initialContext.lookup(java:comp/env);
DataSource dataSource = (DataSource) context.lookup(jdbc/wms);
thx
Eric
-
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]


Accessing resource in WEB-INF outside servlet

2004-11-07 Thread Morkeleb
Hi.

I have a file in WEB-INF which I want to access.
However, this is done in a static class which is not a servlet,
so I do not have the servlet context.

Is there a way to access the servlet context non the less?
Is there a way to make getResource find the file anyway?

I know a resource is found when it's in /WEB-INF/classes,
but it is only in /WEB-INF/ and it is not an option to move
it to the classes directory.

Can you help me?
Thanx in Advance,
Lukas sterreicher



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



Tomcat not starting...Tomcat4.1.30

2004-11-07 Thread Shilpa Nalgonda
Hi My Tomcat instance is so badly messed up , i am not able to start it...at
all...while i was redeploying my app , it gave me some email related classes
not found error...so i copied all the relevant jar into Tomcat/common/lib
directory...Then it gave me some other other, so to eliminate the problem, i
removed those jars from common/lib and thats it..from then on Tomcat is not
starting...nothing in logs...and says exception starting up...i tried so
many things but the console is not coming up...I just dowmloaded new Tomcat
version in other diretory, did not uninstall the old one , even the new
Tomcat is coming up.. do i have to uninstall the old one before the new
install?...i am afraid that i loose all my old stuff.



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



Re[2]: DataSource and initialContext.lookup(java:comp/env)

2004-11-07 Thread Allen Holub
It's also helpful, I think, to look at a JNDI directory as a database
that's organized in a directory-like fashion. The database contains
objects, not arbitrary data, however. The context is effectively the
database name, and when you lookup something in the context, you're
effectively looking it up in that database. Don't confuse any of this
with the file-system directory out on your hard disk.


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



RE: Tomcat not starting...Tomcat4.1.30

2004-11-07 Thread Filip Hanik \(lists\)
look at all the logs files, there is always something in there,
if you are running on windows, go to the bin directory in a dos prompt and
type catalina.bat run
and see why its failing,

and also, get yourself a version control system, that way you won't lose
data :)

Filip

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 07, 2004 12:07 PM
To: Tomcat Users List
Subject: Tomcat not starting...Tomcat4.1.30


Hi My Tomcat instance is so badly messed up , i am not able to start it...at
all...while i was redeploying my app , it gave me some email related classes
not found error...so i copied all the relevant jar into Tomcat/common/lib
directory...Then it gave me some other other, so to eliminate the problem, i
removed those jars from common/lib and thats it..from then on Tomcat is not
starting...nothing in logs...and says exception starting up...i tried so
many things but the console is not coming up...I just dowmloaded new Tomcat
version in other diretory, did not uninstall the old one , even the new
Tomcat is coming up.. do i have to uninstall the old one before the new
install?...i am afraid that i loose all my old stuff.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.786 / Virus Database: 532 - Release Date: 10/29/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.786 / Virus Database: 532 - Release Date: 10/29/2004


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



Naoki Ando は不在にしております。

2004-11-07 Thread Naoki . Ando




2004/11/08 から不在にしております。2004/11/10 に帰社いたします。

ご迷惑をおかけしますが帰社しましてから、返答いたします。
宜しくお願たします。



*
PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*


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

RE: Tomcat not starting...Tomcat4.1.30

2004-11-07 Thread Shilpa Nalgonda
i looked in all the logs, there is no error at the time i ran the tomcat,
and the way i run tomcat is :
catalina start from the cmd prompt  from directory /tomcat/bin.  The window
closes so that that i cannot see anything.

But i tried to install another tomcat in different directory and even it is
not running? why is it so. and thh newer version does not have logs folders.
I did not unistall old Tomcat version yet...


-Original Message- 
From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] 
Sent: Sun 11/7/2004 1:20 PM 
To: Tomcat Users List 
Cc: 
Subject: RE: Tomcat not starting...Tomcat4.1.30



look at all the logs files, there is always something in there,
if you are running on windows, go to the bin directory in a dos prompt 
and
type catalina.bat run
and see why its failing,

and also, get yourself a version control system, that way you won't lose
data :)

Filip

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 07, 2004 12:07 PM
To: Tomcat Users List
Subject: Tomcat not starting...Tomcat4.1.30


Hi My Tomcat instance is so badly messed up , i am not able to start 
it...at
all...while i was redeploying my app , it gave me some email related 
classes
not found error...so i copied all the relevant jar into 
Tomcat/common/lib
directory...Then it gave me some other other, so to eliminate the 
problem, i
removed those jars from common/lib and thats it..from then on Tomcat is 
not
starting...nothing in logs...and says exception starting up...i tried so
many things but the console is not coming up...I just dowmloaded new 
Tomcat
version in other diretory, did not uninstall the old one , even the new
Tomcat is coming up.. do i have to uninstall the old one before the new
install?...i am afraid that i loose all my old stuff.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.786 / Virus Database: 532 - Release Date: 10/29/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.786 / Virus Database: 532 - Release Date: 10/29/2004


-
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: Tomcat 5.0.28 fails to start

2004-11-07 Thread sven morales
  Am curious, this jmx.jar is required in all Tomcat
5.x?  I thought it was only for the jmxproxy servlet
under the manager webapp?


--- Bill Barker [EMAIL PROTECTED] wrote:

 The problem is that Tomcat isn't finding the classes
 in 
 $CATALINA_HOME/bin/jmx.jar.  Either this jar got
 corrupted somehow, or your 
 JVM isn't honoring the classpath in the manifest. 
 If the jar is there and 
 looks ok, then try adding it to the classpath in the
 startup script.
 
 Steve Delahunty [EMAIL PROTECTED] wrote in
 message 
 news:[EMAIL PROTECTED]
 I recently downloaded a binary version of tomcat
 version 5.0.28. I
  configured it and everything was running fine.
 Then, a few days ago,
  when I try to start it (using bin/startup.sh), I
 get the following
  message in logs/catalina.out:
 
 

---
  Due to new licensing guidelines mandated by the
 Apache Software
  Foundation Board of Directors, a JMX
 implementation can no longer
  be distributed with the Apache Tomcat binaries. As
 a result, you
  must download a JMX 1.2 implementation (such as
 the Sun Reference
  Implementation) and copy the JAR containing the
 API and
  implementation of the JMX specification to:
  ${catalina.home}/bin/jmx.jar
 


 
  Tomcat exits after logging this message. I
 searched the web for
  information regarding this issue and I did see
 someone else posting a
  similar question, but there was no response. I
 downloaded and tried
  running version 5.0.29, but the same thing is
 happening. I searched
  through the archive, but I don't see any
 information regarding this
  issue.
 
  I have this sinking feeling that the answer is
 obvious, or the answer is
  posted in place that I have not searched yet.
 Thanks in advance.
 
  I'm running SUSE Linux 9.0 with an unmodified
 2.4.21 kernel. 
 
 
 
 

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




__ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


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



Re: yoav, can u suggest something?

2004-11-07 Thread Peter Johnson
Hi Vaneet,
Rather than reiterate Yoav's comments I will simply suggest that you 
learn a little about HTML and HTTP or even better RTFM.

Your site is operating within a frameset thus the URL in the browser 
stays the same whilst the underlying URL for each page changes within a 
frame. When someone refreshes the browser re-requests the the URL 
displayed in the Address Bar, thus your homepage reappears. It is 
correct and expected behaviour.

PJ
[EMAIL PROTECTED] wrote:
Hello everyone,
yoav, i have been reading many posts on this user list and i see that u have 
been solving many problems for people. thats why i put subject is on you :) to 
ask suggestion / hint on this.
I have a domain name and i am using no-ip software to bind my IP address (my 
ISP provides dynamic IP ) so, i have redirected my domain name: 
http://www.export4u.co.uk to micsexport.servepics.com
now problem is:
when u visit http://www.export4u.co.uk
u click on contact us section.
If a user refreshes a page, it takes back the user to the home page which is 
index page.
I think it has to do with redirection as i am redirected
i researched and found something below:  

Can this be a problem ( can framesets be a problem in getting the home page 
again and again )
When I tried the URL the content
was served. This is what I got.
HTTP/1.1 200 OK
Date: Mon, 27 Sep 2004 13:33:15 GMT
Server: Apache/1.3.29 (Unix)
Transfer-Encoding: chunked
Content-Type: text/html
HTMLHEAD
META NAME=description content=
META NAME=keywords content=
TITLEwww. Export4U.co.uk/TITLE
/HEAD
FRAMESET ROWS=100%,* BORDER=0 FRAMEBORDER=0
FRAME SRC=http://micsexport.servepics.com/;; SCROLLING=AUTO 
NAME=bannerframe
 NORESIZE
/FRAMESET
NOFRAMES
www. Export4U.co.uk
P
DIV ALIGN=CENTERA HREF=http://micsexport.servepics.com/;http://export4u.c
o.uk//A/DIV
/NOFRAMES
/HTML
any help or suggestion will be appreciated.
Thankx again.
Vaneet
-
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]


FW: Configuring JAAS realm for a web appplication (Catalina class loader bug)

2004-11-07 Thread Reingold Genna
Title: FW: Configuring JAAS realm for a web appplication (Catalina classloader bug)






Hi,
My company isusing Tomcat 4.1.29 and I'm investigating a transition to version 5.0.28. 


We use JAAS for authentication. The realm is decleared inside the web application context. The authentication code makes an EJB call to jBoss server (we are using stand alone Tomcat not jBoss bundled version).

In verion 4.1 we have ejb-client code jar in both server/lib and Web Application lib directories. I have replicated the same structure in version 5 but I get ClassCastException inside my JAAS Authentication module. If I remove the copy of ejb-client jar from Web Application it all works fine which suggest to me that the ClassCastException related to the fact that the same class id loaded by different classloaders. Tomcat doco specifies that Catalina classloader is invisible to webapplications ( and that's why we use it in Tomcat 4) but it doesn't seem to be the case. The work-around (removing ejb-client code from web app) is not a solution because it has a lot of web app specific code. 

If I don't copy authentication code to server/lib directory and only keep it in web app Tomcat doesn't find it. That is the case for both versions - 4 and 5. To me it suggests a different problem - since JAAS realm declared in web app context it should apply to web application only and therefore it should be looking into webapp not server/lib directory. But that is a different discussion topic altogether. 


Thanks in advance


Genna 



 






CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee(s) named above. If you are not the intended recipient of this message you are notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Siemens Ltd., ABN 98 004 347 880, or Siemens (NZ) Limited immediately. No representation is made that this email or any attachments are free of viruses. Virus Scanning is recommended and is the responsibility of the recipient.



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

Re: Tomcat 5.0.28 fails to start

2004-11-07 Thread Bill Barker
It is required for all Tomcat 5.x unless you are using a 1.5 JVM (which 
ships with the javax.management.* classes).  Hence the message below if 
Tomcat can't find a JMX implementation.

sven morales [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
  Am curious, this jmx.jar is required in all Tomcat
 5.x?  I thought it was only for the jmxproxy servlet
 under the manager webapp?


 --- Bill Barker [EMAIL PROTECTED] wrote:

 The problem is that Tomcat isn't finding the classes
 in
 $CATALINA_HOME/bin/jmx.jar.  Either this jar got
 corrupted somehow, or your
 JVM isn't honoring the classpath in the manifest.
 If the jar is there and
 looks ok, then try adding it to the classpath in the
 startup script.

 Steve Delahunty [EMAIL PROTECTED] wrote in
 message
 news:[EMAIL PROTECTED]
 I recently downloaded a binary version of tomcat
 version 5.0.28. I
  configured it and everything was running fine.
 Then, a few days ago,
  when I try to start it (using bin/startup.sh), I
 get the following
  message in logs/catalina.out:
 
 

 ---
  Due to new licensing guidelines mandated by the
 Apache Software
  Foundation Board of Directors, a JMX
 implementation can no longer
  be distributed with the Apache Tomcat binaries. As
 a result, you
  must download a JMX 1.2 implementation (such as
 the Sun Reference
  Implementation) and copy the JAR containing the
 API and
  implementation of the JMX specification to:
  ${catalina.home}/bin/jmx.jar
 

 
 
  Tomcat exits after logging this message. I
 searched the web for
  information regarding this issue and I did see
 someone else posting a
  similar question, but there was no response. I
 downloaded and tried
  running version 5.0.29, but the same thing is
 happening. I searched
  through the archive, but I don't see any
 information regarding this
  issue.
 
  I have this sinking feeling that the answer is
 obvious, or the answer is
  posted in place that I have not searched yet.
 Thanks in advance.
 
  I'm running SUSE Linux 9.0 with an unmodified
 2.4.21 kernel.





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






 __
 Do you Yahoo!?
 Check out the new Yahoo! Front Page.
 www.yahoo.com 




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



Re: Root directory...

2004-11-07 Thread e-Denton Subscriber
Create a context for your app with path=. That makes it the root app.

- Original Message - 
From: Luc Vantroys [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, November 06, 2004 9:40 PM
Subject: Root directory...


 Hi,

 I work in a regular directory but I'm tired to have to reload the
 application all the time after I recompiled the source code...

 I don't understand how I am suppose to work with the ROOT directory, I've
 heard that when the classes are in the ROOT directory, they are relaoded
 each time you need them.
 so
 Can anybody help me? I copied my application in the root directory but I
can
 access it. How can I do?

 Thanks,

 Luc.


 -
 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: Root directory...

2004-11-07 Thread Luc Vantroys
Hi,

What do you mean by this?

thanks,

Luc.
- Original Message -
From: e-Denton Subscriber [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, November 07, 2004 7:44 PM
Subject: Re: Root directory...


 Create a context for your app with path=. That makes it the root app.

 - Original Message -
 From: Luc Vantroys [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Saturday, November 06, 2004 9:40 PM
 Subject: Root directory...


  Hi,
 
  I work in a regular directory but I'm tired to have to reload the
  application all the time after I recompiled the source code...
 
  I don't understand how I am suppose to work with the ROOT directory,
I've
  heard that when the classes are in the ROOT directory, they are relaoded
  each time you need them.
  so
  Can anybody help me? I copied my application in the root directory but I
 can
  access it. How can I do?
 
  Thanks,
 
  Luc.
 
 
  -
  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]



Jason Stahl is out of the office.

2004-11-07 Thread Jason . Stahl
I will be out of the office starting Mon 11.08.2004 and will not return
until Fri 11.12.2004.

I will respond to your message when I return.


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



Doubts with tomcat

2004-11-07 Thread Amit Gupta
Hello everybody,

I have following section in server.xml

Connector port=8080

maxThreads=25 minSpareThreads=5 maxSpareThreads=15

enableLookups=false redirectPort=8443 acceptCount=100

debug=0 connectionTimeout=2 

disableUploadTimeout=true /

!-- Note : To disable connection timeouts, set connectionTimeout value

to 0 --


!-- Note : To use gzip compression you could set the following properties :


compression=on 

compressionMinSize=2048 

noCompressionUserAgents=gozilla, traviata 

compressableMimeType=text/html,text/xml

--

!-- Define a SSL HTTP/1.1 Connector on port 8443 --

!--

Connector port=8443 

maxThreads=25 minSpareThreads=5 maxSpareThreads=15

enableLookups=false disableUploadTimeout=true

acceptCount=100 debug=0 scheme=https secure=true

clientAuth=false sslProtocol=TLS /

--

!-- Define an AJP 1.3 Connector on port 8009 --

Connector port=8009 

enableLookups=false redirectPort=8443 debug=0

protocol=AJP/1.3 /

I have following queries:

1) When I start tomcat with above server.xml , it creates 9 process with same 
output on shell. it is 

/usr/java/jdk1.5.0//bin/java 
-Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath 
/usr/java/jdk1.5.0//lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar
 -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat 
-Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap 
start. 

I configured tomcat to run with minSpareThreads=5 then why it start with 9 
threads?

2) In tomcat , port 8080 is redirected to SSL port 8443. Why NON-SSL port is 
redited to SSL port?

Please help me to understand these basics.

Amit Gupta


Re: User Authentication Problem LDAP

2004-11-07 Thread Sandeep N
Hi All,

I got my problem solved..The culprit was that I hadn't included the
attribute digest with value SHA (SHA because my LDAP directory is
storing the password in this format) in the realm directive in
server.xml. Also, I had to change role-namecn/role-name to
role-name*/role-name in web.xml. Now, the things seems to work
without any hassles.

Regards,
Sandeep


On Tue, 02 Nov 2004 12:19:13 +0100, Olivier Jolly
[EMAIL PROTECTED] wrote:
 I'm not a specialist in this but it smells like you're saying that the
 role name are listedin the attribute 'cn' and that to access your site
 the connected user should have the role 'cn' hence if you do not have a
 user with it's cn=cn (attribute cn = value cn), it won't work. Maybe
 you could either enter real roles to your users in another attribute
 than cn and adapt your web.xml accordingly or suppress the
 auth-constraint on the role-name
 
 Hope it helps
 
 Olivier
 
 
 
 Sandeep N wrote:
 
 Hi,
 
 I have a problem trying to authenticate users, whose details are
 stored in the LDAP directory through Apache Tomcat. The details of the
 software I am using are as follows :
 
 LDAP: OpenLDAP V 2.2.17
 Web-Server: Apache-Tomcat V 4.1.30
 OS: Suse - Linux
 
 The LDAP directory structure is somewhat like this -
 dc=my-domain,dc=com
 cn= Manager
cn=person1
cn=person2 and so on
 
 In the server.xml file (under APACHE-TOMCAT-DIR/conf/) I have included
 he following piece of code  -
 
 Realm className=org.apache.catalina.realm.JNDIRealm debug=99
 connectionName=cn=Manager,dc=my-domain,dc=com
 connectionPassword=secret connectionURL=ldap://localhost:389;
 roleName=cn roleSearch=(uniqueMember={0})
 userPassword=userPassword
 userPattern=cn={0},cn=Manager,dn=my-domain,dn=com /
 
 The folder I have to authenticate is param_test and this resides
 under APACHE-TOMCAT-DIR/webapps.
 
 The web.xml file under the param_test folder contains the following
 piece of code  -
 ..
 security-constraint
 web-resource-collection
 web-resource-nametest/web-resource-name
 url-pattern/*/url-pattern
 /web-resource-collection
 auth-constraint
 role-namecn/role-name
 /auth-constraint
 /security-constraint
 
 login-config
 auth-methodBASIC/auth-method
 realm-nametest/realm-name
 /login-config
 
 ..
 
 I have even copied the jndi.jar, ldap.jar files to
 APACHE-TOMCAT-DIR/server/lib directory
 
 When I try to access the link, http://localhost:8089/param_test, it
 prompts me for the username and password. When I type in these
 parameters as per the entries in the LDAP directory, the pop-up
 reappears and this goes on continously. If I cancel this pop-up, HTTP
 error 401 is returned. Any guesses where I have gone wrong?
 
 Thanks in advance.
 
 Regards,
 Sandeep
 
 -
 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]



Is their any tutorial for optimizing tomcat performance?

2004-11-07 Thread Amit Gupta
Hi,

Is their any tutorial for optimizing tomcat performance? I run it on 64 MB RAM 
and 64 SWAP Space. is it Ok or not?
 
Amit Gupta
Email: [EMAIL PROTECTED]



Re: FW: Configuring JAAS realm for a web appplication (Catalina class loader bug)

2004-11-07 Thread Jacob Kjome
Well, the short answer is, move it to common/lib, not 
server/lib.  server/lib is for stuff that *only* Tomcat itself should 
see.  common/lib is for stuff that both the server and applications should 
see (and shared/lib is the converse of server/lib, but different from 
WEB-INF/lib since it is global to all apps in the server).

Even in the common/lib case, you may run into the same problem, though, 
because if you put the jar in WEB-INF/lib, that will be loaded, 
preferentially by the application because of child first classloading 
behavior that Tomcat implements.  If JASS looks up this class as well, but 
loads it in a different classloader you will run into the same issue.  In 
this case, you'll need to remove the jar from WEB-INF/lib and load it from 
common/lib only.

I can't say for sure that it isn't bad behavior by Tomcat, but I doubt 
it.  It is just a classloading issue you'll have to deal with.  However, 
this is one reason why many appservers out there don't use child first 
classloading behavior by default, although in the server/lib situation 
you'd get the same result in this case.  The common/lib case would have 
been taken care of in a server implementing normal parent first 
classloading behavior, but then it would be redundant to have the jar in 
WEB-INF/lib in that case anyway.  Bottom line is that classloaders are 
tricky and different situations call for different solutions so I doubt 
there is anything fundamentally wrong with what Tomcat is doing.

Jake
At 09:31 AM 11/8/2004 +1100, you wrote:
Hi,
My company  isusing Tomcat 4.1.29 and I'm investigating a transition to 
version 5.0.28.

We use JAAS for authentication. The realm is decleared inside the web 
application context. The authentication code makes an EJB call to jBoss 
server (we are using stand alone Tomcat not jBoss bundled version).

In verion 4.1 we have ejb-client code jar in both server/lib and Web 
Application lib directories. I have replicated the same structure in 
version 5 but I get ClassCastException inside my JAAS 
Authentication  module. If I remove the copy of ejb-client jar from Web 
Application it all works fine which suggest to me that the 
ClassCastException related to the fact that the same class id loaded by 
different classloaders. Tomcat doco specifies that Catalina classloader is 
invisible to webapplications ( and that's why we use it in Tomcat 4) but 
it doesn't seem to be the case. The work-around (removing ejb-client code 
from web app) is not a solution because it has a lot of web app specific code.

If I don't copy authentication code to server/lib directory and only keep 
it in web app Tomcat doesn't find it. That is the case for both versions - 
4 and 5. To me it suggests a different problem - since JAAS realm declared 
in web app context it should apply to web application only and therefore 
it should be looking into webapp not server/lib directory. But that is a 
different discussion topic altogether.

Thanks in advance
Genna



CAUTION - This message may contain privileged and confidential information 
intended only for the use of the addressee(s) named above. If you are not 
the intended recipient of this message you are notified that any use, 
dissemination, distribution or reproduction of this message is prohibited. 
If you have received this message in error please notify Siemens Ltd., ABN 
98 004 347 880, or Siemens (NZ) Limited immediately. No representation is 
made that this email or any attachments are free of viruses. Virus 
Scanning is recommended and is the responsibility of the recipient.

-
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: FW: Configuring JAAS realm for a web appplication (Catalina c lass loader bug)

2004-11-07 Thread Reingold Genna
Title: RE: FW: Configuring JAAS realm for a web appplication (Catalina class loader bug)





Jake,


Thanks for our reply.


I have tried common/lib scenario. As a matter of fact I have started with that option. However it produces the same result. 

I have tried to move ejb-client jar out of of web app. But then I run into the problem when the application uses a class loaded by common class loader and if the class references another class in the WEB_INF/lib jar (a different jar) I get NoClassDefError. Effectively the only safe way to install my application in that scenario is to copy all application jars into common/lib and that is fundamently wrong. 

What I don't understand is why my set up works in 4.1.29 and doesn't work in 5.0.28.





-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]] 
Sent: Monday, 8 November 2004 3:52 PM
To: Tomcat Users List
Subject: Re: FW: Configuring JAAS realm for a web appplication (Catalina class loader bug)



Well, the short answer is, move it to common/lib, not 
server/lib. server/lib is for stuff that *only* Tomcat itself should 
see. common/lib is for stuff that both the server and applications should 
see (and shared/lib is the converse of server/lib, but different from 
WEB-INF/lib since it is global to all apps in the server).


Even in the common/lib case, you may run into the same problem, though, 
because if you put the jar in WEB-INF/lib, that will be loaded, 
preferentially by the application because of child first classloading 
behavior that Tomcat implements. If JASS looks up this class as well, but 
loads it in a different classloader you will run into the same issue. In 
this case, you'll need to remove the jar from WEB-INF/lib and load it from 
common/lib only.


I can't say for sure that it isn't bad behavior by Tomcat, but I doubt 
it. It is just a classloading issue you'll have to deal with. However, 
this is one reason why many appservers out there don't use child first 
classloading behavior by default, although in the server/lib situation 
you'd get the same result in this case. The common/lib case would have 
been taken care of in a server implementing normal parent first 
classloading behavior, but then it would be redundant to have the jar in 
WEB-INF/lib in that case anyway. Bottom line is that classloaders are 
tricky and different situations call for different solutions so I doubt 
there is anything fundamentally wrong with what Tomcat is doing.


Jake


At 09:31 AM 11/8/2004 +1100, you wrote:


Hi,
My company isusing Tomcat 4.1.29 and I'm investigating a transition to 
version 5.0.28.

We use JAAS for authentication. The realm is decleared inside the web 
application context. The authentication code makes an EJB call to jBoss 
server (we are using stand alone Tomcat not jBoss bundled version).

In verion 4.1 we have ejb-client code jar in both server/lib and Web 
Application lib directories. I have replicated the same structure in 
version 5 but I get ClassCastException inside my JAAS 
Authentication module. If I remove the copy of ejb-client jar from Web 
Application it all works fine which suggest to me that the 
ClassCastException related to the fact that the same class id loaded by 
different classloaders. Tomcat doco specifies that Catalina classloader is 
invisible to webapplications ( and that's why we use it in Tomcat 4) but 
it doesn't seem to be the case. The work-around (removing ejb-client code 
from web app) is not a solution because it has a lot of web app specific code.

If I don't copy authentication code to server/lib directory and only keep 
it in web app Tomcat doesn't find it. That is the case for both versions - 
4 and 5. To me it suggests a different problem - since JAAS realm declared 
in web app context it should apply to web application only and therefore 
it should be looking into webapp not server/lib directory. But that is a 
different discussion topic altogether.

Thanks in advance

Genna







CAUTION - This message may contain privileged and confidential information 
intended only for the use of the addressee(s) named above. If you are not 
the intended recipient of this message you are notified that any use, 
dissemination, distribution or reproduction of this message is prohibited. 
If you have received this message in error please notify Siemens Ltd., ABN 
98 004 347 880, or Siemens (NZ) Limited immediately. No representation is 
made that this email or any attachments are free of viruses. Virus 
Scanning is recommended and is the responsibility of the recipient.

-
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]



CAUTION - This message may contain privileged and confidential information intended only for the 

Re: Environment entries question

2004-11-07 Thread Igor
Hello!

I have made some researches and I think, that I have found patch, that
solves my problem.
I tested it a little. It works fine for me. But I might miss something
important while testing.

As I mentioned in previous letter, open Bugzilla item is related with my
problem, but it is not the same.
It is JNDI env-entry not reload when context reloaded
(http://issues.apache.org/bugzilla/show_bug.cgi?id=29727)

My patch will solve the following problem If Environment entry is changed
using admin app, the change is not visisble in JNDI.
So I am attaching my patch to the letter.

Thank you,
Igor

- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, November 01, 2004 4:01 PM
Subject: RE: Environment entries question



Hi,

But it appears that I can change this value in admin application. And
this
change is not visible in JNDI :-(

There's a Bugzilla item open for this.

it was:

Attach your patch in diff -u format to the open Bugzilla item.

Could you please tell you opinion - is this modification ok?

You test it and tell us ;)  If you get it into Bugzilla within the next
couple of days it'll probably make it to Tomcat 5.0.30.

Yoav




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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Tomcat 5 - coyote/jk2 connector defaults - maxthreads, timeout?

2004-11-07 Thread Dan Carwin
Resending...anyone know???

-Original Message-
From: Dan Carwin 
Sent: Friday, November 05, 2004 11:01 AM
To: [EMAIL PROTECTED]
Subject: Tomcat 5 - coyote/jk2 connector defaults - maxthreads, timeout?


what is the default maxThreads in tomcat 5 jk2/coyote connector? What is
the default serverTimeout ?

#channelSocket.serverTimeout=???
#channelSocket.maxThreads=???

(fwiw I'm referring to the version included in tc 5.0.28) 

Thanks,
Dan



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



Re: Doubts with tomcat

2004-11-07 Thread Michael Echerer

1) When I start tomcat with above server.xml , it creates 9 process with same output on shell. it is 
I configured tomcat to run with minSpareThreads=5 then why it start with 9 threads?
You configured 5 connector threads that not necessarily match OS threads 
(or whatever you saw). Check with Tomcat's manager application how many 
connector threads you really have.
2) In tomcat , port 8080 is redirected to SSL port 8443. Why NON-SSL port is redited to SSL port?
That's used, if one of your webapps has a security constraint (can be 
done in the web.xml) saying that this app (or some of its resources) may 
only be accessed using https. In that case, if Tomcat receives a http 
request it will automatically redirect the browser to the same resource, 
but using https scheme and using the mentioned redirect ports. Thus you 
won't have to do ugly port number hardcoding into your app (or other 
strange approaches), if you need to support https.
Please help me to understand these basics.
Hope I could help.
Michael
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Starting Tomcat as an Apache inprocess with Jni

2004-11-07 Thread O . Strobel
Hi,

I have problems starting the Tomcat as an inprocess of Apache via Jni. 
I tried that with the examples of the Jakarta Hompage.
Running Apache and Tomcat seperatly and connect both with a 
Socket-Connection is no problem and works fine. 
That tells me that the mod_jk2 is well working.

My System :
Windows XP SP1
Apache 2.0.52 (Folder: C:\Programme\Apache Group\Apache2)
Tomcat 5.0.28 (Folder: C:\Programme\Apache Group\Tomcat5)
Java SDK 1.5  (Folder: C:\Programme\Java\jdk1.5.0)


Error file of Apache (Folder: C:\Programme\Apache Group\Apache2\logs):

[Thu Nov 04 08:08:52 2004] [notice] Parent: Created child process 4628
[Thu Nov 04 08:08:52 2004] [notice] Child 4628: Child process is running
[Thu Nov 04 08:08:52 2004] [error] workerEnv.initChannel() init failed for 
channel.jni:jni
[Thu Nov 04 08:08:52 2004] [error] workerEnv.initWorkers() init failed for 
worker.jni:onStartup
[Thu Nov 04 08:08:52 2004] [error] workerEnv.initWorkers() init failed for 
worker.jni:onShutdown
[Thu Nov 04 08:08:52 2004] [notice] Child 4628: Acquired the start mutex.
[Thu Nov 04 08:08:52 2004] [notice] Child 4628: Starting 250 worker 
threads.

it seems that the Apache can't find the starter class for the Tomcat.
What have I done wrong?


As I know, running Tomcat as an inprocess of Apache on the same PC is the 
fastest connection between both servers.
Because of that i tried that very hard getting this constellation running.


best regards

Oliver

Re: Doubts with tomcat

2004-11-07 Thread Amit Gupta
With

following mod_jk2.conf

LoadModule jk2_module modules/mod_jk2.so

JkSet config.file /etc/httpd/conf/workers2.properties

JkAutoAlias /usr/local/tomcat/webapps

JkMount /*.jsp ajp13

JkMount /*/servlet/ ajp13

Following error is coming:
 service httpd start
Starting httpd: Syntax error on line 7 of /etc/httpd/conf.d/jk2.conf:
Invalid command 'JkAutoAlias', perhaps mis-spelled or defined by a module
not included in the server configuration

please help boss.

Amit


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