Vedr.: RE: Fetching protected URL in Tomcat

2003-08-14 Thread pste

Hi

Im not involeved with Tomcat as a developer. Cant any of you developers
make the patch. Let me know ;-)

Steff



I believe the j_target_url was a proprietary add-on attribute WebLogic
added, not part of the servlet spec, and that there's no equivalent in
tomcat at this time.  I could be wrong, however ;)  Even if I'm right,
adding this attribute wouldn't be a big deal I imagine: want to
contribute a patch? ;)

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



Attaching File Monitor Thread to Tomcat

2003-08-14 Thread Tyn T. Ong
Hi all,

I'm trying to develop a Thread (I call it Monitor) which monitors a folder 
for FTP uploaded files (arbitrary upload interval) and parse them to DBMS.
I would like to start and stop that Monitor Thread with tomcat so I loaded 
from a (load-on-startup) servlet. It loads OK and works fine but when 
Tomcat shuts down, it doesn't wait for my Thread to cleanup.

I tried in Servlet destroy method...
Monitor.stopNow(); // my thread polite stop method
while(Monitor.isAlive()); // wait until thread's while loop exists
in servlet destroy method but tomcat forcefully unload before 
Monitor thread can clean up.

I also tried overriding  finalize()  method but it was never called :-(

Any ideas??

Thanx,
Tyn
PS: It would be great if tomcat has standard API to attach/control other 
Java Server/Daemon process. If developers reading this, please consider my 
request.



Re: Run Windows' command in Java method

2003-08-14 Thread Kwok Peng Tuck
Beware of the pitfalls that can come from using Runtime.exec()

Have a look at this article first :
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html



Cui Xiaojing-a13339 wrote:

>Hello, 
>
>Thanks so much for the help. Now I only want to execute a SQL Server's import/export 
>utility in Java method. The utility could be executed using below command line in 
>Windows Command prompt window:
>
>C:> BCP flex.dbo.CF_load in e:\Flex\file\inbound.txt /f e:\Flex\prog\bcp.fmt /S flex 
>/U  /P 
>
>Does the utility could be executed in Java method? If I could use below method to run 
>it?
>
>   Runtime r=Runtime.getRuntime();
>   try{
>   
>   r.exec("BCP  flex.dbo.CF_load in e:\Flex\file\inbound.txt /f 
> e:\Flex\prog\bcp.fmt /S flex /U  /P ");
>   
>   }catch(IOException e){}
>
>Thanks&Regards,
>Xiaojing
>
>
>-Original Message-
>From: engp0510 [mailto:[EMAIL PROTECTED]
>Sent: 2003年8月15日 13:07
>To: Tomcat Users List
>Subject: Re: Run Windows' command in Java method
>
>
>http://java.sun.com/docs/books/tutorial/native1.1/
>
>- Original Message - 
>From: "Cui Xiaojing-a13339" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Friday, August 15, 2003 11:41 AM
>Subject: Run Windows' command in Java method
>
>
>  
>
>>Hello All,
>>
>>Do you know if windows' command could be executed in Java method? If yes,
>>
>>
>which API class method can be used to do it? Thanks a lot.
>  
>
>>Regards,
>>Xiaojing
>>
>>
>>-
>>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]
>
>
>
>
>  
>


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



RE: Run Windows' command in Java method

2003-08-14 Thread Cui Xiaojing-a13339
Hello, 

Thanks so much for the help. Now I only want to execute a SQL Server's import/export 
utility in Java method. The utility could be executed using below command line in 
Windows Command prompt window:

C:> BCP flex.dbo.CF_load in e:\Flex\file\inbound.txt /f e:\Flex\prog\bcp.fmt /S flex 
/U  /P 

Does the utility could be executed in Java method? If I could use below method to run 
it?

Runtime r=Runtime.getRuntime();
try{

r.exec("BCP  flex.dbo.CF_load in e:\Flex\file\inbound.txt /f 
e:\Flex\prog\bcp.fmt /S flex /U  /P ");

}catch(IOException e){}

Thanks&Regards,
Xiaojing


-Original Message-
From: engp0510 [mailto:[EMAIL PROTECTED]
Sent: 2003年8月15日 13:07
To: Tomcat Users List
Subject: Re: Run Windows' command in Java method


http://java.sun.com/docs/books/tutorial/native1.1/

- Original Message - 
From: "Cui Xiaojing-a13339" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, August 15, 2003 11:41 AM
Subject: Run Windows' command in Java method


> Hello All,
>
> Do you know if windows' command could be executed in Java method? If yes,
which API class method can be used to do it? Thanks a lot.
>
> Regards,
> Xiaojing
>
>
> -
> 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: mod_jk2.so w/redhat9

2003-08-14 Thread Steve Madonna
very good! Thanks for the quick response. :-)

-Original Message-
From: Clive Luk [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2003 10:35 PM
To: Tomcat Users List
Subject: RE: mod_jk2.so w/redhat9


it just build a DSO file but you need to configure apache yourself have a
look at the jakarta tomcat website. it tells your how to configure apache to
talk to tomcat

Cheers,
Clive

-Original Message-
From: Steve Madonna [mailto:[EMAIL PROTECTED]
Sent: Friday, 15 August 2003 3:33 PM
To: Tomcat Users List
Subject: RE: mod_jk2.so w/redhat9


does that build the connector directly into apache?


-Original Message-
From: Clive Luk [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2003 10:27 PM
To: Tomcat Users List
Subject: RE: mod_jk2.so w/redhat9


Hi Steve,

That's how i build my mod_jk2.so

i used jakarta-tomcat-connectors-4.1.26-src

you may want to do a goole search and look for
jakarta-tomcat-connectors-4.1.26-src

but i aslos complied apache2 from source using httpd-2.0.47.

chmod +x buildconf.sh
./buildconf.sh
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-tomcat41=/usr/lo
cal/jakarta-tomcat-4.1.26 --with-jave-home=/usr/local/j2sdk1.4.2
make

Cheers,
Clive

-Original Message-
From: Steve Madonna [mailto:[EMAIL PROTECTED]
Sent: Friday, 15 August 2003 3:20 PM
To: [EMAIL PROTECTED]
Subject: mod_jk2.so w/redhat9


Has anyone out there built a mod_jk2.so file for the latest RH9
httpd-2.0.40-21.3? or know where I could get one? I did a a few google
searches and looked through the archive for this list, but I can't find any
info. I'm pretty surprised, actually. I figured someone would have built one
by now? Thanks in advance for any info!

-Steve



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



-
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: From which apache virtual host did a request come from?

2003-08-14 Thread Bill Barker
It seems that I had a momentary lapse here.  A better suggestion is to use
request.getServerName();.  The 'host' header will also include the port
number (if it's a non-standard port).

"Bill Barker" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Have you tried request.getHeader("host"); ?
>
> "Mike Curwen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Our Tomcat has one .  There is also only one webapp to which any
> > request to the foo.com domain should go.
> >
> > Apache vhost blah.foo.com   -> TC default host, default webapp
> > Apache vhost abc.foo.com-> TC default host, default webapp
> > Apache vhost xyz.foo.com-> TC default host, default webapp
> >
> > The webapp parses  blah, abc and xyz.
> >
> >
> >
> > > -Original Message-
> > > From: Angus Mezick [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, August 14, 2003 9:37 AM
> > > To: Tomcat Users List
> > > Subject: RE: From which apache virtual host did a request come from?
> > >
> > >
> > > Same deal.  Apache doesn't know anything about webapps.  You
> > > just send requests for certain hosts to tomcat using
> > > workers2.properties.  Tomcat then uses its  entries to
> > > decide which webapp get what.
> > >
> > > > -Original Message-
> > > > From: Mike Curwen [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, August 14, 2003 10:27 AM
> > > > To: 'Tomcat Users List'
> > > > Subject: RE: From which apache virtual host did a request come from?
> > > >
> > > >
> > > > Actually, I was speaking about virtual hosts in Apache Web
> > > Server.  ;)
> > > >
> > > > A few more details:
> > > >
> > > > I have an application that parses the URI for some
> > > > parameters. Basically
> > > > the sponsors hate URLs that look like:
> > > > http://www.foo.com/?foo=a&bar=b&baz=c
> > > >
> > > > So my fix was to parse the URI for the parameters in a known order.
> > > > http://www.foo.com/a/b/c
> > > >
> > > > They don't like this either. less typing, cleaner, but *still* not
> > > > 'friendly'.  I might tell them that people using the web
> > > are used to
> > > > this sort of thing by now, but hey, they're the sponsors
> > > and they want
> > > > it different.
> > > >
> > > > So my last option is to flatten the parameters and use a subdomain.
> > > >
> > > > http://abc.foo.com/
> > > > http://xyz.foo.com/
> > > >
> > > > So that's two virtual hosts in Apache, jk mounted to a single
> > > > (default)
> > > > application on Tomcat.  That's possible, right?
> > > >
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: John Turner [mailto:[EMAIL PROTECTED]
> > > > > Sent: Thursday, August 14, 2003 8:59 AM
> > > > > To: Tomcat Users List
> > > > > Subject: Re: From which apache virtual host did a request
> > > come from?
> > > > >
> > > > >
> > > > >
> > > > > It's within .
> > > > >
> > > > > John
> > > > >
> > > > > Angus Mezick wrote:
> > > > >
> > > > > > Isn't there an  tag within ?
> > > > > >
> > > > > >
> > > > > >>-Original Message-
> > > > > >>From: John Turner [mailto:[EMAIL PROTECTED]
> > > > > >>Sent: Thursday, August 14, 2003 9:32 AM
> > > > > >>To: Tomcat Users List
> > > > > >>Subject: Re: From which apache virtual host did a request
> > > > come from?
> > > > > >>
> > > > > >>
> > > > > >>Mike Curwen wrote:
> > > > > >>
> > > > > >>
> > > > > >>>1) Is it possible to mount several virtual hosts to
> > > the same web
> > > > > >>>application (the default one, as it happens)
> > > > > >>
> > > > > >>I think this is possible, though maybe not desired.
> > > > > >>
> > > > > >>You can see this with the manager app.  Setup a bunch
> > > of virtual
> > > > > >>hosts that have the same appBase, with Contexts that have the
> > > > > same docBase,
> > > > > >>and you will be able to reach the same application on any
> > > > > of the host
> > > > > >>names.  I determined that it was better to give a separate
> > > > > appBase to
> > > > > >>each virtual host.
> > > > > >>
> > > > > >>If you mean setting separate appBase's for each virtual
> > > host, and
> > > > > >>still being able to access the same webapp (Context
> > > with the same
> > > > > >>docBase not
> > > > > >>a copy of the webapp in another docBase), I would say "no".
> > > > >  It's at
> > > > > >>least a security risk.  Someone please correct me if I'm wrong.




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



RE: mod_jk2.so w/redhat9

2003-08-14 Thread Clive Luk
it just build a DSO file but you need to configure apache yourself have a
look at the jakarta tomcat website. it tells your how to configure apache to
talk to tomcat

Cheers,
Clive

-Original Message-
From: Steve Madonna [mailto:[EMAIL PROTECTED]
Sent: Friday, 15 August 2003 3:33 PM
To: Tomcat Users List
Subject: RE: mod_jk2.so w/redhat9


does that build the connector directly into apache?


-Original Message-
From: Clive Luk [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2003 10:27 PM
To: Tomcat Users List
Subject: RE: mod_jk2.so w/redhat9


Hi Steve,

That's how i build my mod_jk2.so

i used jakarta-tomcat-connectors-4.1.26-src

you may want to do a goole search and look for
jakarta-tomcat-connectors-4.1.26-src

but i aslos complied apache2 from source using httpd-2.0.47.

chmod +x buildconf.sh
./buildconf.sh
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-tomcat41=/usr/lo
cal/jakarta-tomcat-4.1.26 --with-jave-home=/usr/local/j2sdk1.4.2
make

Cheers,
Clive

-Original Message-
From: Steve Madonna [mailto:[EMAIL PROTECTED]
Sent: Friday, 15 August 2003 3:20 PM
To: [EMAIL PROTECTED]
Subject: mod_jk2.so w/redhat9


Has anyone out there built a mod_jk2.so file for the latest RH9
httpd-2.0.40-21.3? or know where I could get one? I did a a few google
searches and looked through the archive for this list, but I can't find any
info. I'm pretty surprised, actually. I figured someone would have built one
by now? Thanks in advance for any info!

-Steve



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



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



Re: Tomcat 4.1.24 with JDK 1.4.1_03 compiled version wont start

2003-08-14 Thread Bill Barker
Did you do an 'ant clean' between builds?  Otherwise, you might be using the
j-t-c classes that were compiled w/o JMX.

As a test, I commented out the references to 'jmx' and 'modeler' in by
build.properties, and did a clean build.  Once I commented out the two JMX
listeners, Tomcat worked perfectly (well, except for the admin web-app, but
that's expected :).  JMX is definitely optional for 4.1.x if you don't care
about the admim web-app.

"David Kramer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I decide to be brave and build Tomcat from scratch this time around.  I
was
> able to conquer the the few pitfalls of building Tomcat from source.  Once
> compiled I attempted to start Tomcat via catalina.sh.  Unfortunately
Tomcat
> errored on start with the following error:
>
> Aug 14, 2003 11:55:19 AM org.apache.commons.digester.Digester startElement
> SEVERE: Begin event threw exception
> java.lang.ClassNotFoundException:
> org.apache.catalina.mbeans.ServerLifecycleListener
> at
>
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
> .java:992)
> at
>
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
> .java:857)
> at
>
org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:252
> )
> at org.apache.commons.digester.Rule.begin(Rule.java:200)
> at
> org.apache.commons.digester.Digester.startElement(Digester.java:1273)
> at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535)
> at org.apache.crimson.parser.Parser2.content(Parser2.java:1824)
> at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552)
> at
org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534)
> at org.apache.crimson.parser.Parser2.parse(Parser2.java:318)
> at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
> at org.apache.commons.digester.Digester.parse(Digester.java:1546)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
> 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)
> Catalina.start: java.lang.ClassNotFoundException:
> org.apache.catalina.mbeans.ServerLifecycleListener
> java.lang.ClassNotFoundException:
> org.apache.catalina.mbeans.ServerLifecycleListener
> at
>
org.apache.commons.digester.Digester.createSAXException(Digester.java:2583)
> at
>
org.apache.commons.digester.Digester.createSAXException(Digester.java:2609)
> at
> org.apache.commons.digester.Digester.startElement(Digester.java:1276)
> at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1535)
> at org.apache.crimson.parser.Parser2.content(Parser2.java:1824)
> at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1552)
> at
org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:534)
> at org.apache.crimson.parser.Parser2.parse(Parser2.java:318)
> at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
> at org.apache.commons.digester.Digester.parse(Digester.java:1546)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
> 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)
>
>
> So I searched around on the web and found a posting that had the same
error,
> apparently the BUILDING.TXT file contains disinformation about optional
> libraries.  The email stated that Tomcat wasnt compiled with JMX, and that
I
> would have to modify my server.xml file.  Within my build I actually added
> the JMX Libraries and still received the above error.  I then commented
out
> the JMX entries in the server.xml, when I attempted to start Tomcat again
I
> got the following Coyote error:
>
> Aug 14, 2003 12:18:05 PM org.apache.commons.digester.Digester startElement
> SEVERE: Begin event threw exception
> java.lang.ClassNotFoundException:
org.apache.coyote.tomcat4.CoyoteConnector
> at

RE: mod_jk2.so w/redhat9

2003-08-14 Thread Steve Madonna
does that build the connector directly into apache?


-Original Message-
From: Clive Luk [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2003 10:27 PM
To: Tomcat Users List
Subject: RE: mod_jk2.so w/redhat9


Hi Steve,

That's how i build my mod_jk2.so

i used jakarta-tomcat-connectors-4.1.26-src

you may want to do a goole search and look for
jakarta-tomcat-connectors-4.1.26-src

but i aslos complied apache2 from source using httpd-2.0.47.

chmod +x buildconf.sh
./buildconf.sh
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-tomcat41=/usr/lo
cal/jakarta-tomcat-4.1.26 --with-jave-home=/usr/local/j2sdk1.4.2
make

Cheers,
Clive

-Original Message-
From: Steve Madonna [mailto:[EMAIL PROTECTED]
Sent: Friday, 15 August 2003 3:20 PM
To: [EMAIL PROTECTED]
Subject: mod_jk2.so w/redhat9


Has anyone out there built a mod_jk2.so file for the latest RH9
httpd-2.0.40-21.3? or know where I could get one? I did a a few google
searches and looked through the archive for this list, but I can't find any
info. I'm pretty surprised, actually. I figured someone would have built one
by now? Thanks in advance for any info!

-Steve



-
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: mod_jk2.so w/redhat9

2003-08-14 Thread Clive Luk
Hi Steve,

That's how i build my mod_jk2.so

i used jakarta-tomcat-connectors-4.1.26-src

you may want to do a goole search and look for
jakarta-tomcat-connectors-4.1.26-src

but i aslos complied apache2 from source using httpd-2.0.47.

chmod +x buildconf.sh
./buildconf.sh
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-tomcat41=/usr/lo
cal/jakarta-tomcat-4.1.26 --with-jave-home=/usr/local/j2sdk1.4.2
make

Cheers,
Clive

-Original Message-
From: Steve Madonna [mailto:[EMAIL PROTECTED]
Sent: Friday, 15 August 2003 3:20 PM
To: [EMAIL PROTECTED]
Subject: mod_jk2.so w/redhat9


Has anyone out there built a mod_jk2.so file for the latest RH9
httpd-2.0.40-21.3? or know where I could get one? I did a a few google
searches and looked through the archive for this list, but I can't find any
info. I'm pretty surprised, actually. I figured someone would have built one
by now? Thanks in advance for any info!

-Steve



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



mod_jk2.so w/redhat9

2003-08-14 Thread Steve Madonna
Has anyone out there built a mod_jk2.so file for the latest RH9
httpd-2.0.40-21.3? or know where I could get one? I did a a few google
searches and looked through the archive for this list, but I can't find any
info. I'm pretty surprised, actually. I figured someone would have built one
by now? Thanks in advance for any info!

-Steve



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



Tomcat 4.1.24 + Verisign global server id

2003-08-14 Thread Punam Mutha
Hi,

If any one has successfully installed verisign global id certificate with
Tomcat 4.1.24 on red hat linux. 
Please help me, once I replace the self signed certificate with that
received from verisign, https://localhost:443 shows page not found.


Regards,
Punam


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

Re: Apache_SSL+Tomcat_nonSSL+mod_proxy

2003-08-14 Thread Bill Barker
I assume that you mean the client-cert.  Firstly, I don't think that you can
get this passed from mod_proxy to Tomcat (but I could be wrong, I've never
tried :).  It looks like the client doesn't have any valid certs to send
(the blank dialog).  You could try setting 'SSLVerifyClient optional' to
verify this (but it's a potential security hole in production).

I'm using Apache 1.3.x, but I've never had a problem with mod_proxy and
https -> http connections.

"Jennifer Shi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi,

We have an web application running on Tomcat.
However we can not get SSL certificate on Tomcat.

So we installed Apache+SSL which will proxy the HTTPS request to HTTP
requests to Tomcat using mod_proxy.

Apache_nonSSL+mod_proxy+Tomcat_nonSSL works well.
However Apache_SSL+mod_proxy+Tomcat_nonSSL does not work.

Specifically, a blank diaglog box is popped up when user clicked on
the login button of a page. Meanwhile Tomcat ouputs the following logs.
-
2003-08-06 08:54:47 - Ctx(  ): 400 R( /) null
2003-08-06 08:54:47 - Ctx(  ): IOException in: R( /) Socket closed
-

We have configured Apache to proxy the httpS requests to HTTP requests
to Tomcat. Somehow Tomcat still receives SSL requests.

Does anyone know where we could find the documentation on
Apache_SSL+mod_proxy+Tomcat_nonSSL? I have read some documentation on mod_jk
but our customer uses mod_proxy.

Any clue is appreciated.

Apache is 2.0.
Tomcat is 3.2.5.

Thanks,
Jennifer




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



Re: Run Windows' command in Java method

2003-08-14 Thread engp0510
http://java.sun.com/docs/books/tutorial/native1.1/

- Original Message - 
From: "Cui Xiaojing-a13339" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, August 15, 2003 11:41 AM
Subject: Run Windows' command in Java method


> Hello All,
>
> Do you know if windows' command could be executed in Java method? If yes,
which API class method can be used to do it? Thanks a lot.
>
> Regards,
> Xiaojing
>
>
> -
> 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: Preventing access to a directory

2003-08-14 Thread Tim Funk
IIRC, /foo/bar/*.jsp is an invalid pattern. You can do path matching, or 
extension mapping, but not both at the same time. :(

So you can either:
   *.jsp
or
   /foo/bar/*
or
   /foo/bar/pre_*
Where you rename all your files which need protected to a prefix like 
pre_foo.jsp.

OR you can use apache and use a Location regular expression any ignore the 
tomcat config issues.

OR - (THE BEST WAY) - Move your jsp's under WEB-INF - then they are 
accessable only via a RequestDispatcher.forward() or (include which includes 
jsp:forward and jsp:include)

-Tim

Tim Davidson wrote:
Thanks.
I googled for examples using secrity-constraint but with not much luck (just many 
people asking how to do it), and I've tried a few things but I'm not having much luck. 
something like:

	  
		foo
		prevent access to jsp's under bar directory in foo webapp   
		/foo/bar/*.jsp  
  


can you help?
 


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


Re: Tomcat 4.1.24: details of ServletExceptions

2003-08-14 Thread Tim Funk
Yup, this is a problem since the root cause is never really exposed. An easy 
workaround is to create your own custom error handler and use the following 
logic:
Throwable rootCause;
rootCause =(Throwable)request.getAttribute("javax.servlet.error.exception");

while (rootCause!=null) {
  doMagicPrintStackTraceAndErrorMessageMethod(rootCause);
  if (rootCause instance of ServletException) {
rootCause = ((ServletException)rootCause).getRootCause();
  } else if (rootCause instance of JspException) {
rootCause = ((JspException)rootCause).getRootCause();
  } else  {
rootCause  = null;
  }
}
-Tim

Freek Segers wrote:
Hello,

I've been developing with Tomcat and Struts from about a year and a half 
now. Ever since I started using Tomcat 4.1 I don't get very much 
information when a ServletException occurs in a JSP page. The error page 
just says that there was a JspException caused by a ServletException but 
there's no clue to what actually went wrong.

Is this a configuration matter? I've already set the Jasper 
configuration parameter logVerbosityLevel to DEBUG, but that doesn't 
help (The JSPs are compiled allright.)

I would appreciate some help; developing like this is a trial and error 
process. 


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


RE: how to suppor 30000 concurrent users

2003-08-14 Thread Angus Mezick
Actually, that is exactly how it is done.  Here at
http://www.guidestar.org we have 6 2xproc dell servers each running a
webserver.  If one drops out the cisco load balancer sees this and
directs traffic to the other 5.  We use a database table and a custom
jdbc session manager to provide for session persistance.  This session
manager allows not to worry about session affinity.  Every webserver can
get at every session at anytime.  When we update code we have an ant
script that downs the service, replaces the code from a central server,
starts the service and then repeats this process for each machine in
turn.  On the backend we have 4 DB servers 2 clustered active/passive as
read only for our heavy read only usage and 2 clustered active/passive
as read write for editing and data loading.  There is a nightly job that
refreshes the R/O from the R/W right after the backups run.  The actual
DB data is stored on an EMC drive box (I have no idea what TLA (Three
Letter Acronym) is running on this thing).  I will say that being a tech
NPO is a GREAT thing, we get lots of cool toys cheap!  
--Angus

> -Original Message-
> From: Raffi [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 05, 2003 9:17 AM
> To: 'Tomcat Users List'
> Subject: RE: how to suppor 3 concurrent users
> 
> 
> I always wondered about how high-profile sites like Ebay and Amazon
> updated their systems because they never seem to place 
> messages at their
> sites regarding system downtime for routine maintainance. In 
> a clustered
> app server environment, I'm assuming that each node is downed and
> updated individually while the other nodes support user requests, or
> perhaps it's done differently. Can you explain, thanks!
> 
> Raffi
> 
> -Original Message-
> From: Angus Mezick [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 05, 2003 9:07 AM
> To: Tomcat Users List
> Subject: RE: how to suppor 3 concurrent users 
> 
> 
> With that many users you are going to HAVE to cluster if for no other
> reason than to provide backup for system maintanence.  As to how many,
> the answer is it depends on the hardware you are going to use and the
> types of load your webapp puts on the system.  When you say 30k
> concurrent users do you mean 30k people clicking a link at 
> the same time
> or 30k active sessions at a time?  If you are going to have this many
> people clicking on the same time you should have the cash to do proper
> load testing to see how many people one of your servers can 
> take, divide
> 30k by that number for the number of servers you have, multiply by 1.1
> AT LEAST and round up to get 110% capacity so you should be 
> able to swap
> out one server.  This is BARE minimum.  Don't forget about 
> the wonderful
> world of DB backends and routers and all the fun stuff :) --Angus
> 
> > -Original Message-
> > From: Heart Prince [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, August 05, 2003 8:57 AM
> > To: [EMAIL PROTECTED]
> > Subject: how to suppor 3 concurrent users 
> > 
> > 
> > howmany concurrent users does tomcat support? if i want to
> > design a web 
> > application for 30,000 concurrent users, what is the step?  
> > clustering is 
> > related to this? how many servers i need if i am clustering
> > 
> > _
> > Latest movie trailers. On your mobile.
> > http://server1.msn.co.in/sp03/gprs/howcani_movie.asp With GPRS.
> > 
> > 
> > 
> -
> > 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]
> 
> 

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



Fwd: Re: Front Controller Servlet

2003-08-14 Thread Justin Ruthenbeck

Date: Tue, 05 Aug 2003 14:42:05 -0700
To: "Tomcat Users List" <[EMAIL PROTECTED]>
From: Justin Ruthenbeck <[EMAIL PROTECTED]>
Subject: Re: Front Controller  Servlet
At 05:42 AM 8/5/2003, you wrote:
I am trying to build FrontController servlet for a web site on Tomcat 4 ,
after long time of changes on the web.xml file , I wasn't able to achieve
this pattern,
the web.xml portion is :

  FCservlet
  *.jsp

my problem start when the FrontController servlet needs to forward the
request to other jsp pages
and when he uses the Forward method , the tomcat activate my FrontController
again , and after a  while  I get : StackOverflowError .
You say that you're using the forward() method -- why?  There are reasons 
to do this, but if you're trying to create a FrontController, then 
presumably you're not interested in hitting your jsps directly in the 
first place.  Is there any reason you aren't using a RequestDispatcher to 
dispatch/include your jsp page output instead of forwarding to the page?
Sorry -- reread this and realized my mind was wondering somewhere 
else.  Next time, remind me not to eat a big lunch and then try to think 
right away afterwards...

justin


Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

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


Tomcat/JDBC/Unicode

2003-08-14 Thread Kurt Overberg
I'm having a rather strange problem that I'm hoping someone can help me 
with.  I'm using Struts 1.0/jsp on Debian linux under Tomcat 4.1.x and 
the blackdown JVM against PostgreSQL 7.3.2 .  I'm attempting to convert 
my current SQL_ASCII database to UNICODE.  I'm new to this, so am most 
likely making a few mistakes.  Here's what I've done so far:

o  Converted database encoding to be UNICODE.  I'm pretty sure this part 
worked okay.  (did a pg_dump, then iconv -f 8859_1 -t UTF-8, then 
created new db with encoding UNICODE and reloaded- no errors upon reload)

sparky:~$ psql -l
List of databases
   Name|  Owner   | Encoding
---+--+---
 unitest   | kurt | UNICODE
 template1 | postgres | SQL_ASCII
(2 rows)
o  set client_encoding to 'UTF8';

o  In my JSP files, I set the following at the top of each:

<%@ page lanuage="java" pageEncoding="UTF-8" %>

Now, to test this, I go to a japanese page, copy some text, then paste 
it into a form, that gets submitted to the server and saved into the DB. 
Then I try to display what I got back from the database.  It comes out 
garbled.  HOWEVER- if I leave the 'pageEncoding' out of my display .jsp 
file it still comes out garbled, UNTIL I set UTF-8 manually in my 
browsers Character Encoding settings (both mozilla and IE).  Then the 
japanese characters render fine (just like I entered them).

Very strange.  What's confusing is that when I set the pageEncoding to 
'UTF-8', the characters don't render properly, and as far as I can tell, 
thats the same as manually setting the browser manually.  I must be 
doing something wrong because I get the same results in IE and mozilla 
(recent build).

What may be the problem- I don't do anything differently when getting 
the data out of the database, just standard 
resultset.getString("column");  Do I need to change that call, to handle 
the potentially UTF-8 encoded strings?  I can't find anything on that at 
all with google/usenet.

Any and all help, suggestions or pointers would be greatly appreciated.

Thanks!

/kurt

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


RE: servlet-Mapping using Tomcat 4

2003-08-14 Thread Shapira, Yoav

Howdy,

>2. Name of JSP = whoKnows.war

I'll assume you meant name of war file.

>1. The main problem ist, that 'normal call' (/whoKnows/) works fine.
That
>means that I get my index.jsp, and all works the way I wanted to.
>BUT, if I use /whoKnows/foo/bar my java-class of my jsp-Servlet
(defined in
>whoKnows web.xml)
>is directly called (skipping my index.jsp). But I still want that my
>index.jsp is called first.
>May JSP-Page knows what to do with the java-class. Any Idea how I can
>configure this?

You need a filter also mapped to /foo/bar which inspects the request or
session to see if an attribute is present.  That attribute is one that's
placed there by index.jsp.  If the attribute is not present, the filter
will redirect the request to index.jsp.  If the attribute is present,
the filter will let the request proceed.

>2. The default context ist the Name of the JSP in the webapps-dir.
>In this case it is '/whoKnows'. Is there any trick, that I cann change
>this?

Yes, read the  configuration reference in the tomcat docs.

>I know that it is possible to configure an context for every
application in
>tomcats own xml-configuration files. But who is this done, and is there
any
>better possibility (doing this in whoKnows web.xml for example)?

You can include a context.xml with your war file.  Or configure the
context in $CATALINA_HOM/conf/server.xml.  Again, read the 
configuration reference.

Yoav Shapira



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]



IIS+jk2 = bad performance?

2003-08-14 Thread Thomas Nybro Bolding
Having just upgraded to Tomcat 4.1.27 I also upgraded from jk to the jk2 
redirector as I (has to!) use IIS to validate users etc.
Thing is that with the jk2 connector (isapi_redirector2.dll) my JSP pages 
are CONSIDERABLY slower, i.e. way to slow to be acceptable.

Does anyone has any experiences with IIS+jk2 or perhaps a few comments to 
the settings used by http://reynir.net/tomcat/tomcat_IIS_service_jk2.html?

Is it possible to use the old jk (isapi_redirect.dll) under Tomcat 4.1.27 
and what needs to be done to accomplish this? 

Regards Thomas

___
Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig information. Hvis du 
ved en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om 
fejlen ved at bruge svar-funktionen. Samtidig beder vi dig slette e-mailen i dit 
system uden at videresende eller kopiere den.
Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er fri for 
virus og andre fejl, som kan paavirke computeren eller it-systemet, hvori den modtages 
og laeses, aabnes den paa modtagerens eget ansvar. Vi paatager os ikke noget ansvar 
for tab og skade, som er opstaaet i forbindelse med at modtage og bruge e-mailen.
___
Please note that this message may contain confidential information. If you have 
received this message by mistake, please inform the sender of the mistake by sending a 
reply, then delete the message from your system without making, distributing or 
retaining any copies of it.
Although we believe that the message and any attachments are free from viruses and 
other errors that might affect the computer or IT system where it is received and 
read, the recipient opens the message at his or her own risk. We assume no 
responsibility for any loss or damage arising from the receipt or use of this message.




RE: XP "random" tomcat crashes

2003-08-14 Thread Lenny Karpel
Are you using the client or server jvm ?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003 2:41 PM
To: [EMAIL PROTECTED]
Subject: XP "random" tomcat crashes

Hi,

We're using tomcat 4.1.12 with Java 1.4.1.02, and are encountering strange
crashes on XP especially.

The crashes happen in apparently random places in our app, and cause the VM
to crash with various messages, none of which are very helpful!

I noticed that Cameron Hart had a similar problem
(http://www.mail-archive.com/[EMAIL PROTECTED]/msg88603.html)
- please could anyone point me in the right direction to try and get to the
bottom of this.  Is it easy to run tomcat in a debugger so we can catch
what happens?

Many thanks,

David






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


RE: URI Servlet Path Problems

2003-08-14 Thread Gregg Bolinger
Lol, I might as well just say /holocron/servlet/AddReference.  That
works.  Is this typical or is there a problem and this is just a quick
fix.

Gregg

-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 4:16 PM
To: 'Tomcat Users List'
Subject: RE: URI Servlet Path Problems

How about 



 ?

> -Original Message-
> From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 06, 2003 4:10 PM
> To: 'Tomcat Users List'
> Subject: RE: URI Servlet Path Problems
> 
> 
> I did that.  But here is the problem with that.  My pages are 
> under a folder called "secure" so then the URL was 
> http://localhost:8080/holocron/secure/holocron/servlet/AddRefe
> rence  ha. Thanks for the quick response though.
> 
> Gregg
> 
> -Original Message-
> From: Mike Curwen [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 06, 2003 4:08 PM
> To: 'Tomcat Users List'
> Subject: RE: URI Servlet Path Problems
> 
> take off the leading slash on the form's action, so that it's 
> referencing your web-app (root), and not the server root.
>  
> The URI pattern still needs the leading slash.
> 
> 
> 
> > -Original Message-
> > From: Gregg Bolinger [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 06, 2003 4:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: URI Servlet Path Problems
> > 
> > 
> > I have a web app in the following directory 
> c:\tomcat\webapps\holocron
> >  
> > I have specified my URI to a servlet as
> > /servlet/AddReference
> >  
> > And in my form I have action="/servlet/AddReference"
> >  
> > The problem is that when I click the submit button, I am
> > taken to http://localhost:8080/servlet/AddReference and what 
> > it should be is http://localhost:8080/holocron/servlet/AddReference
> >  
> > So I am getting an error Cannot Find Servlet/Path etc.  Now,
> > if I change my action to 
> > action="/holocron/servlet/AddReference" it works just fine, 
> > but that doesn't make any sense to me.  I have read a bit on 
> > the Invoker Servlet being turned off in Tomcat 4.1.24 but 
> > can't really find any good information on it.  Can someone 
> > explain to me what is going on here?
> >  
> > Thanks.
> >  
> > Gregg
> > 
> 
> 
> -
> 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]




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



System properties

2003-08-14 Thread Christian Hauser
Hello

I'd like to know how I can set system properties when starting Tomcat 4.1.

I mean those properties that I can get from within a JSP file as:
System.getProperty("CONFIG_HOME")
Thank you in advance for any hint.

Christian



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


?

2003-08-14 Thread John Blanco
Sometimes I get the feeling that nothing works for me 
and I am at the mercy of this mailing list. :)

Out of the box...4.1.27 with applied, latest 
hotfix...I uncomment the two ssi entries in 
conf/web.xml...I've renamed the jarfile as instructed 
to server/lib/servlets-ssi.jar.  I've created a file 
called hello-world.shtml and it's contents are:

...

http://localhost:8080/my_app";>
 Sorry, not for you.


...

I've tried half a billion combos for how to do the 
CODEBASE/CODE...I see no other errors.  And, SSI is 
running because in my logs I get:

2003-08-14 22:25:57 ssi: SSIServlet.doGet()
2003-08-14 22:25:57 ssi: SSIServlet.requestHandler()
Serving buffered resource '/hello-world.shtml'

I've restarted Tomcat several times.  Can anyone think 
of anything I'm missing?

-- 
- John Blanco
- Code Guru @ Rapture In Venice
- http://members.bbnow.net/jblanco

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



RE: Turning off session persistence

2003-08-14 Thread Angus Mezick
Don't know, with the scattered nature of the FM, any one stating RTFM
probably should include which part (FP?) of which FM they want you to R.
Or at least give you a keyword to search the FM for.
--Angus

> -Original Message-
> From: Aurele Venet [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 05, 2003 12:50 PM
> To: Tomcat Users List
> Subject: Re: Turning off session persistence
> 
> 
> Hi Yoav,
> 
> thanks for the pointer.  I will look it up.  Indeed now that 
> you mention 
> the DefaultContext, that rings a bell.  I will experiment with that. 
> 
> Apologies for my RTFQ!
> 
> Vrata
> 
> -- 
> V
>  . . . . . . . . . 
> tel:+34.918.131.331
> 
> 
> 
> 
> -
> 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 authentication against unixware/linux

2003-08-14 Thread Kristian A. Leth

It should be possible to use a JAASRealm!
Has anyone any knowledge about authentificating against linus/unix using this realm ?

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/realm/JAASRealm.html

Regards

Kleth

--
Kristian A. Leth
Maersk Data Transport/Architects & Specialists.
--



   
  
  "Kristian A. 
  
  Leth"  To:   [EMAIL PROTECTED]   
 
  <[EMAIL PROTECTED]   cc: 

  dk>Subject:  Tomcat authentication against 
unixware/linux  
   
  
  05-08-2003 12:17 
  
  Please respond   
  
  to "Tomcat Users 
  
  List"
  
   
  
   
  
   
  




I looking for a realm implementation, designpattern or api that makes Tomcat able to 
authentificate
against a unix/linux operating system.

This will be the best solution for my little problem of maintaining two user lists - 
The users for
Tomcat and the users for my operating system.
Alternately I would like to know if there is an api for java that can 
access/authenticate the users
on unix/linux.

Thanks!

Regards

Kleth

--
Kristian A. Leth
Maersk Data Transport/Architects & Specialists.
--




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



database connection

2003-08-14 Thread Hans Wichman
Hi,
I am evaluating a jsp application for a customer, which provides an 
interface to a database through some helperclasses.
Each helper class manages the retrieval  (and updates) of related 
underlying tables, and there are about 10 helperclasses.

In the header (header.jsp) the jsp calls an initialize method on a 
Configuration object, checks if it is already initialized
(this process is not synchronized), and if not, creates one connection, 
creates all the 10 helper classes as static instances passing this 
one-and-only connection.

In the rest of the application a collection of tags call the static methods 
(unsynchronized) on the Configuration object, such as
getDatabaseHelper1 (be it with a more descriptive name) and performs 
operations on the underlying database through this class.
All the methods in the Helper classes are unsynchronized as well, but they 
are standalone (utility functions, I don't know a better way to describe it).

My question is, except from any race conditions in the helper classes 
themselves, is it a problem that all those helper classes share only one 
connection and access it unsynchronized. If so, why is it a problem if 
unsynchronized communication occurs on a database connection? Or are all 
the underlying methods on the connection object already synchronized and is 
there no need to worry?

Some pointers to why and how would be appreciated as well. And I am not 
only looking to why connection pooling would be good, but also why one 
connection would be bad ;-)

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


RE: large objects in sessions

2003-08-14 Thread Hans Wichman
Hi,
it appears freeMemory is highly not to be trusted ;-):
Here is the free memory after each 1000 objects created:
#:717000
#:320080
#:1152992
#:512992
#:266208
#:1784800
#:1144800
#:504800
#:389088
#:3894240
The more objects I create the more memory I get ;-). In addition, how can 
the garbage collecter still collect any of these objects, if I have stored 
them in an array or is it collecting other objects (??)?

[ testing testing ]
ok after some more tests, it appears freeMemory keeps on returning 
different results because it allocates more and more memory as more is 
consumed. I ran the taskmanager and looked at the footprint, here is what 
it gave me:
no objects -> 6 MB
5000 objects-> 9MB (3MB for 5000 objects)
1 objects -> 12MB (6MB for 1 objects)
2 objects -> 18MB (12MB for 2 objects)

This seems to be pretty accurate, about 629 bytes per object (still seems 
low for what I am creating ;-)).

I rewrote the testing procedure to see if I could come up with the same, 
here it is:

  System.gc();
  int N =1;
  int  valid = 0;//count object creations that did not cause 
additional memory to be allocated by the VM
  long last = -1;   //free memory during last run
  long current = 0; //free memory during current run
  long usedup = 0;   //total memory used up by all 'valid' allocations
  Object workers[] = new Object[N];
  for(int i = 0; i < N; i++) {
workers[i] = new MyObject ();
current = Runtime.getRuntime().freeMemory();
if (current < last) {   //if allocation is deemed valid update 
administration
  valid++;
  usedup += last-current;
}
last = current;
  }
  System.out.println ("Footprint in bytes:"+usedup/valid);

Result 640 bytes. I hope it is not a coincidence ;-)

greetz
Hans
ps here is some more info as well:
http://java.sun.com/docs/books/performance/1st_edition/html/JPRAMFootprint.fm.html
At 09:03 AM 8/6/2003 -0400, Shapira, Yoav wrote:

Howdy,

>i've read in a number of locations that you shouldn't put large objects
in
>session, because of the overhead incurred.
>Is this also true for non-serializable objects? Aren't they simply kept
in
>memory?
Not exactly: I wouldn't put non-serializable objects in the session at
all, regardless of their size.  You will get errors.  Instead, put the
ID (or some other key allowing you to retrieve the object) in the
session.
>In addition does anybody know how I can accurately estimate the memory
>footprint such an object has?
The same way you estimate the memory footprint of any other object.

For example, from a simple command-line program that does nothing else:

int N = 1;
long freeBefore = Runtime.getRuntime().freeMemory();
MyObject[] myArray = new MyObject[N];
for(int i = 0; i < N; i++) {
  myArray[i] = new MyObject();
}
long freeAfter = Runtime.getRuntime().freeMemory();
long delta = freeAfter - freeBefore;
long memPerObject = delta / N;
(Use a large N to reduce impact of overhead, allocation, etc.)

Yoav Shapira



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]


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


RE: server.xml

2003-08-14 Thread Shapira, Yoav

Howdy,

> Which values must I change in server.xml-file to improve the
nummer
>of users?

You would typically remove everything you don't need, and raise min and
maxProcessors on your connector to be as high as your hardware/OS
supports.

>Which are the highest values for all the parameters in
>server.xml (max. nummer of user)?

Technically, the JDK's Integer.MAX_VALUE or Long.MAX_VALUE is the
highest value for attributes for most elements in server.xml.  However,
you probably don't want to raise them that high ;)

The max number of users your app can handle is highly dependent on your
app, your OS, your hardware, your confiruation.  There are many
variables.  You have to keep load-testing and tuning until you reach an
optimal solution.  This has been discussed on this list many times:
search the archives.

Yoav Shapira



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: Java and tomcat issues

2003-08-14 Thread Ahmad, Kashif
Sounds like your not appending the $JAVA_HOME/bin, but replacing the whole
$PATH setting.  You want to start the PATH assignment with something like
this:

PATH=$PATH:$JAVA_HOME/bin

Hope this helps

Kashif

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 2:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Java and tomcat issues


Okay everytime I do it my commands don't work on the box like ls, cd, ll -
the
only command that works is the exit command

Any ideas?

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003 2:06 PM
To: Tomcat Users List
Subject: RE: Java and tomcat issues



Howdy,

>I'm trying to set up JAVA for tomcat on a redhat 8.1 box and I keep
getting
>this message after I set the JAVA_HOME path
>
>-bash-2.05b# which java
>/usr/bin/which: no java in 
>(/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R
6/bi
>n
>)
>-bash-2.05b#

That's pretty clear, isn't it? ;)  Add $JAVA_HOME/bin to your $PATH.

Yoav Shapira



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]

-
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: Mapping problem

2003-08-14 Thread Tim Funk
Yeah - this is on my to FAQ list.

-Tim

Shapira, Yoav wrote:
Aug 6, 2003 10:27:15 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 129 column 11: The content of element type
"web-app" must
match "(icon?.desplay-name?,description?,distributable?, context-parm*,
filter*,
filter-mapping*, listener*, servlet* ...


This is a FAQ.


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


[OT] Struts ActionForms and XDoclet

2003-08-14 Thread james Folsom
Hi. Normally I try not to bother people on this list, but I have been trying to get 
xdoclet to generate struts action forms for a CMP entity bean and cannot figure out 
what I am doing wrong.

I have the  task as a sub-element of the ejbcolet task.
I have the @struts.form name="Person" as a class level tag.
I have both my setters and getters tagged with @struts.form-field

XDoclet creates my ActionForm class, but it only puts a default constructor in the 
class. There are no methods or instance fields. What am I missing?

Thanks

James

_
Are you a Techie? Get Your Free Tech Email Address Now! Visit http://www.TechEmail.com

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



RE: URI Servlet Path Problems

2003-08-14 Thread Mike Curwen
Sorry, I realized after sending it didn't explain the
misunderstanding...

I got caught up with this not long ago when using sendRedirect, so I
think I have this clear in my mind.

It's all in the browser.
 
The browser interprets form actions that begin with slashes as meaning
"relative to the domain" so that would result in an action of
"/servlet/foo" being requested by the browser as
"http://www.yourdomain.com/servlet/foo";
 
So unless your application is the deafult application (which in this
case it's not, it's /holocron), you'll get a 404.
 
If on the other hand you give it no leading slash ("servlet/foo"), the
browser says "relative".  But relative to the domain and "folder" (for
lack of a much more technically accurate label).  And to a browser,
/holocron/secure looks like folders.

So if you GOT to the form by saying 
http:///www.yourdomain.com/holocron/secure/showmetheform

Then all relative urls will be from
http://www.yourdomain.com/holocron/secure/


> -Original Message-
> From: Gregg Bolinger [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 06, 2003 4:22 PM
> To: 'Tomcat Users List'
> Subject: RE: URI Servlet Path Problems
> 
> 
> Lol, I might as well just say /holocron/servlet/AddReference. 
>  That works.  Is this typical or is there a problem and this 
> is just a quick fix.
> 
> Gregg
> 
> -Original Message-
> From: Mike Curwen [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 06, 2003 4:16 PM
> To: 'Tomcat Users List'
> Subject: RE: URI Servlet Path Problems
> 
> How about 
>  
> 
>  ?
> 
> > -Original Message-
> > From: Gregg Bolinger [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 06, 2003 4:10 PM
> > To: 'Tomcat Users List'
> > Subject: RE: URI Servlet Path Problems
> > 
> > 
> > I did that.  But here is the problem with that.  My pages are
> > under a folder called "secure" so then the URL was 
> > http://localhost:8080/holocron/secure/holocron/servlet/AddRefe
> > rence  ha. Thanks for the quick response though.
> > 
> > Gregg
> > 
> > -Original Message-
> > From: Mike Curwen [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 06, 2003 4:08 PM
> > To: 'Tomcat Users List'
> > Subject: RE: URI Servlet Path Problems
> > 
> > take off the leading slash on the form's action, so that it's
> > referencing your web-app (root), and not the server root.
> >  
> > The URI pattern still needs the leading slash.
> > 
> > 
> > 
> > > -Original Message-
> > > From: Gregg Bolinger [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, August 06, 2003 4:04 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: URI Servlet Path Problems
> > > 
> > > 
> > > I have a web app in the following directory
> > c:\tomcat\webapps\holocron
> > >  
> > > I have specified my URI to a servlet as 
> > > /servlet/AddReference
> > >  
> > > And in my form I have action="/servlet/AddReference"
> > >  
> > > The problem is that when I click the submit button, I am taken to 
> > > http://localhost:8080/servlet/AddReference and what it 
> should be is 
> > > http://localhost:8080/holocron/servlet/AddReference
> > >  
> > > So I am getting an error Cannot Find Servlet/Path etc.  Now, if I 
> > > change my action to 
> action="/holocron/servlet/AddReference" it works 
> > > just fine, but that doesn't make any sense to me.  I have 
> read a bit 
> > > on the Invoker Servlet being turned off in Tomcat 4.1.24 but
> > > can't really find any good information on it.  Can someone 
> > > explain to me what is going on here?
> > >  
> > > Thanks.
> > >  
> > > Gregg
> > > 
> > 
> > 
> > 
> -
> > 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]
> 
> 
> 
> 
> -
> 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]



JDBC authority unstable

2003-08-14 Thread MaFai
Hello, tomcat-user,

 Now,using JDBC realm to implement authority.But some times,the tomcat would hang up 
while we press submit button to login.
 I have  check catalina.out ,no error found,the apache log also has no error.
 Mysql runs smoothly,when the webpage can not login.

 Any idea?

 

Best regards. 

MaFai
[EMAIL PROTECTED]
2003-08-07

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

RE: large objects in sessions

2003-08-14 Thread Shapira, Yoav

Howdy,

>And the hash in which you look up the object with the retrieved id can
be
>just something like a static hashtable in some class ?

Yup.  It's usually that simple.

Yoav Shapira



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: Name JDBC is not bound in this context.

2003-08-14 Thread Andoni
Hi,

I think this might be because I have the .war file that is using the JNDI
connection pooling loading as the default context.

Because it is in the /webapps folder it is also loading as the /
context, even though I have nothing specified for this in server.xml.

But this one I have no JNDI resources for, so it produses an error.

Is there any way I can stop webapps loading by default?

Andoni.

- Original Message -
From: "Andoni" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, August 06, 2003 11:43 AM
Subject: Name JDBC is not bound in this context.


Hi,

I am getting this error in my log files:

name jdbc is not bound in this context

and I cannot see any reason why.  I have found multiple examples on the web
but nobody seems to answer queries about it!  My program is using Tomcat
4.0.4 connection pooling and seems to be working fine (if a little slow) so
I cannot see what could be wrong.

Can anyone help me?

Please!

Andoni.


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



Virus Alert

2003-08-14 Thread abuse
We have detected a virus (WORM_KLEZ.H) in your mail traffic sent from [EMAIL 
PROTECTED] in the file frames..bat on 08/14/2003 23:13:02. We took the action deleted. 
If you have questions regarding files or updating/installing Anti-virus protection on 
your PC, please contact your e-mail administrator or help desk.

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



Re: Session Listener's Session Event session empty?

2003-08-14 Thread Anthony Cunningham

Never did two lines make so much sense:)

I will get a valid ID I suppose..

I now realise why all the examples of the session listener just showed the number of 
sessions and not any data from the sessions.

Is there a mechanism where if you have the a list of session identifiers you can 
access them in turn to get the user data stored in them?

For anyone else looking for a solution to this there is also a 
HttpSessionAttributeListener that will fire when you add/update/remove an attribute to 
a session.  If you have a User class that you add to the session you could watch for 
this and add/remove the username etc. to a static array.   This may be what I'll end 
up using.  If anyone else tries it with success please let me know.

Anthony

"Shapira, Yoav" wrote:

> Howdy,
> When the session is created it has no attributes, that's why it's empty.
> You can't have put attributes there before it was created ;)
>
> Yoav Shapira
> Millennium ChemInformatics
>
> >-Original Message-
> >From: Anthony Cunningham [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, August 05, 2003 2:54 AM
> >To: Tomcat Users List; this
> >Subject: Session Listener's Session Event session empty?
> >
> >Greetings,
> >
> >I am trying to make a page showing all the logged in users and possibly
> >all their details (stored in the session).
> >While searching I came across information about the HttpSessionListener
> >interface and tried implementing that.
> >
> >However in Tomcat 4.0.1 and also 4.0.4 when sessionCreated is called,
> >the session retrieved from from the session event object doesn't appear
> >to contain the attributes I put there.   Has anyone experienced this?
> >
> >Also if anyone has implemented this type of logged in user list in
> >another way I'd be grateful for your advice.
> >
> >
> >thanks in advance,
> >
> >Anthony
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
> 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]


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



RE: Help! heavy traffic is crapping out our site every 5 min! DBCP exceptions

2003-08-14 Thread Barclay A. Dunn
well, i followed the dbcp comment that says "set to 0 for unlimited" and
that turns out to be wrong.

i also tried -1 and that is equally unuseful in terms of setting it to
unlimited.

so i tried setting maxActive to 10 and so far it is generating no
errors. no, i'm wrong. connecs shot up to around 600 or maybe more, then we
started getting the java.sql.SQLException: [Microsoft][SQLServer 2000 Driver
for JDBC]Error establishing socket.

the db has an insanely huge connection limit of 99,999 we think.

barclay

-Original Message-
From: Eric J. Pinnell [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 1:27 PM
To: Tomcat Users List
Subject: RE: Help! heavy traffic is crapping out our site every 5 min!
DBCP exceptions


Is it also unlimited (or insanely huge) on the database?

-e

On Fri, 8 Aug 2003, Barclay A. Dunn wrote:

> i adjusted the pool to unlimited and am still getting these errors.
> something else seems to be fekachte.
>
> barclay
>
> -Original Message-
> From: Eric J. Pinnell [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 08, 2003 1:11 PM
> To: Tomcat Users List
> Subject: Re: Help! heavy traffic is crapping out our site every 5 min!
> DBCP exceptions
>
>
> Hi,
>
> Your pool of  connections to your database is exhausted.  Try upping the
> number.
>
> -e
>
> On Fri, 8 Aug 2003, Barclay A. Dunn wrote:
>
> > we are getting a ton of these errors in our catalina.out and i could use
> > help in fixing it.
> >
> > i know they are related to our connection pooling, but not what to do to
> > fix. my understanding of the underlying mechanics of connection pooling
is
> > somewhat limited.
> >
> > i have put two different but related error messages in here:
> >
> > java.sql.SQLException: DBCP could not obtain an idle db connection, pool
> > exhausted
> > at
> >
>
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
> > .java:123)
> > at
> >
>
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
> > va:110)
> > at
> >
>
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3
> > 12)
> > at com.happypuppy.util.HPSql.getConnection(HPSql.java:21)
> > at org.apache.jsp.index_jsp._jspService(index_jsp.java:222)
> > at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> >
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> > 04)
> > at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> > at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> >
>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
> > java:684)
> > at
> >
>
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
> > er.java:575)
> > at
> >
>
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
> > .java:498)
> > at
> >
>
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
> > 22)
> > at org.apache.jsp._404_jsp._jspService(_404_jsp.java:373)
> > at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> >
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> > 04)
> > at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> > at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > FilterChain.java:247)
> > at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > ain.java:193)
> > at
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> > va:260)
> > at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(StandardPipeline.java:643)
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > at
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> > va:191)
> > at
> >
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(StandardPipeline.java:643)
> > at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > at
> >
org.apache.catalina.core.StandardContext.

RE: A good book about Tomcat

2003-08-14 Thread Angus Mezick
Get the Apache Tomcat Bible from Wiley.  It compares nicely to the wrox book.


-Original Message-
From:   John Blanco [mailto:[EMAIL PROTECTED]
Sent:   Thu 8/14/2003 11:18 PM
To: Tomcat Users List
Cc: 
Subject:Re: A good book about Tomcat
Wrox sucked anyway.  I hated the red, glaring cover 
with the geeks in the pictures. :)  If I wanted to see 
a geek, I'd go through my own photo album, thank you 
very much.

The TomCat book from O'Reilly is OK, but it 
left be scrambling to find the real way to do things 
so I can't recommend it as a perfect guide.  I'm sure 
a lot of stuff is out of date with 4.1, but it's one 
of the few O'Reilly books I can't recommend.  I look 
forward to an updated edition in the future.


On Thursday 14 August 2003 13:29, Mubaraka Arif wrote:
> Professional Apache Tomcat - Vivek Chopra, Ben
> Galbraith, Sing Li, Romin Irani... [Wrox
> Publication] is good one for TOmcat Administration
> and Configuration.
>
> ~ Mubaraka Arif
>Software Developer
>Administrative Technology & Information Services
>St Mary's University
>San Antonio, TX -78228
>
> On 2003.08.14 14:22 Alexander Vavilin wrote:
> > Hi all, can anybody advice me a good book about
> > Tomcat ???.
> >
> > --
> > Best regards,
> >  Alexander 
> > mailto:[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]

-- 
- John Blanco
- Code Guru @ Rapture In Venice
- http://members.bbnow.net/jblanco

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

Q: JAAS Realm useage

2003-08-14 Thread Roman \"Blade\" Velichko
Hi to All!

How can I get Subject in my web application with JAASRealm?


With best wishes
Roman "Blade" Velichko [mailto:[EMAIL PROTECTED]

Chance favour to prepared mind


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



RE: sendRedirect() doesnt work in https (posted again)

2003-08-14 Thread Shapira, Yoav

Howdy,
Thanks for posting the solution, and glad you got it fixed ;)

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Vijay Kandy [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, August 06, 2003 11:23 AM
>To: 'Tomcat Users List'
>Subject: RE: sendRedirect() doesnt work in https (posted again)
>
>FYI in case anyone else have this issue,
>
>I got this fixed with the help of this article:
>http://www.jguru.com/faq/view.jsp?EID=445939
>
>Apparently, sendRedirect()s were going to localhost, so I changed
>webapp.conf so that WebAppConnection maps to proper domain name:port
>(instead of localhost) like so:
>WebAppConnection warpConn warp domainName:9003
>
>--Vijay
>
> -Original Message-
>From:  Vijay Kandy
>Sent:  Monday, August 04, 2003 4:40 PM
>To:'Tomcat Users List'
>Subject:   sendRedirect() doesnt work in https (posted again)
>
>Help anyone?
>
>Hello Everyone,
>
>I recently installed mod_ssl on an Apache 2.0.44/Tomcat 4.0.3/Debian
2.4.18
>machine. I used openssl to create certificate and key and most of the
web
>application works fine. The only part that seems broken is when
>sendRedirect() is used. I used something along the lines of:
>res.sendRedirect(req.getContextPath() + "/" + "ServletName"); Is this
not
>legal? Could someone let me know why it does not work.
>
>Sincerely,
>Vijay
>
>-
>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]




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]



Tomcat 4.1.24 behind a proxy

2003-08-14 Thread Sylvain.Thevoz
Hello,

My Tomcat server runs behind a proxy.
I set on my Windows 2000 server this environment variable to be able to access to 
external locations:
CATALINA_OPTS = -DproxySet=true -DproxyHost=myproxy.blabla.com -DproxyPort=8080

It worked very well since I updated Tomcat to 4.1.24.
Now it doesn't work anymore.

Is there something wrong with my configuration?

Thanks
Sylvain

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



Re: Tomcat 4.1 & https problem

2003-08-14 Thread Bill Barker
"full path to mykeystore" is a very unusual name for a file. ;-).

"Hou, Rowena" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I've been running Tomcat as a standalone Web server for a while. My
project
> run fine at http with sign applet. I want to switch from HTTP to HTTPS.
> I followed the directions in the document"
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html"; :
>
>1. keytool -genkey -alias tomcat -keyalg RSA -keystore mykeystore
>2. keytool -certreq -keyalg RSA -alias tomcat -file
certreq.csr -keystore
> mykeystore
>and
>3. uncommented the connector provided by the config file:
>  port="8443" minProcessors="5" maxProcessors="75"
>  enableLookups="true"
>  acceptCount="10" debug="0" scheme="https" secure="true"
>  useURIValidationHack="false">
>  className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
>clientAuth="false" protocol="TLS"
>keystoreFile="full path to mykeystore"
>keystorePass- "changeit"
> />
>  
>
> However, it isn't working. I can't start Tomcat at all. I don't get any
> errors at prompt or in the logs; I tried to use command window run "start
> tomcat". It popup a command prompt and disappear. If I change className to
>  which used in document. I can start Tomcat and get "http://localhost:8443";
> work but not https://localhost:8443 ( I commented out connector for http
in
> server.xml file).
> I use jakarta-tomcat-4.1.12-LE-jdk14 which come with jbuilder 8. runing on
> Window 2000 and IE 6
>
> Question:
> 1. How can I fix the problem.
> 2. How can I find out error message? I tried to rum "catalina debug
> -security" from command prompt. Most of error message is unrecognized.




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



RE: Help! heavy traffic is crapping out our site every 5 min! DBCP exceptions

2003-08-14 Thread Lawrence, Gabriel
Try running netstat on the linux box to see how many connections are out
there. This might give you some more visibility into what network
connections are actually being used and where they are going.

-gabe

-Original Message-
From: Barclay A. Dunn [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 10:43 AM
To: Tomcat Users List
Subject: RE: Help! heavy traffic is crapping out our site every 5 min!
DBCP exceptions

your logic seems on target to me.

my sysadmin (who's just as stymied as i am) says that according to his
sources, sockets on linux are open files so if the open file limit is
exceeded, it would affect sockets as well. any thoughts on this?

barclay

-Original Message-
From: Eric J. Pinnell [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 1:38 PM
To: Tomcat Users List
Subject: RE: Help! heavy traffic is crapping out our site every 5 min!
DBCP exceptions


I'm pretty sure "can't create socket" means it can't connect to the DB
for
some reason.  I would wager the DB (or something) is refusing the
connection.  The fact that it said "can't create socket" means that
tomcat
is trying to do so.  So that part of it seems alright.

-e

On Fri, 8 Aug 2003, Barclay A. Dunn wrote:

> well, i followed the dbcp comment that says "set to 0 for unlimited"
and
> that turns out to be wrong.
>
> i also tried -1 and that is equally unuseful in terms of setting it to
> unlimited.
>
> so i tried setting maxActive to 10 and so far it is generating
no
> errors. no, i'm wrong. connecs shot up to around 600 or maybe more,
then
we
> started getting the java.sql.SQLException: [Microsoft][SQLServer 2000
Driver
> for JDBC]Error establishing socket.
>
> the db has an insanely huge connection limit of 99,999 we think.
>
> barclay
>
> -Original Message-
> From: Eric J. Pinnell [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 08, 2003 1:27 PM
> To: Tomcat Users List
> Subject: RE: Help! heavy traffic is crapping out our site every 5 min!
> DBCP exceptions
>
>
> Is it also unlimited (or insanely huge) on the database?
>
> -e
>
> On Fri, 8 Aug 2003, Barclay A. Dunn wrote:
>
> > i adjusted the pool to unlimited and am still getting these errors.
> > something else seems to be fekachte.
> >
> > barclay
> >
> > -Original Message-
> > From: Eric J. Pinnell [mailto:[EMAIL PROTECTED]
> > Sent: Friday, August 08, 2003 1:11 PM
> > To: Tomcat Users List
> > Subject: Re: Help! heavy traffic is crapping out our site every 5
min!
> > DBCP exceptions
> >
> >
> > Hi,
> >
> > Your pool of  connections to your database is exhausted.  Try upping
the
> > number.
> >
> > -e
> >
> > On Fri, 8 Aug 2003, Barclay A. Dunn wrote:
> >
> > > we are getting a ton of these errors in our catalina.out and i
could
use
> > > help in fixing it.
> > >
> > > i know they are related to our connection pooling, but not what to
do
to
> > > fix. my understanding of the underlying mechanics of connection
pooling
> is
> > > somewhat limited.
> > >
> > > i have put two different but related error messages in here:
> > >
> > > java.sql.SQLException: DBCP could not obtain an idle db
connection,
pool
> > > exhausted
> > > at
> > >
> >
>
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObject
Pool
> > > .java:123)
> > > at
> > >
> >
>
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSourc
e.ja
> > > va:110)
> > > at
> > >
> >
>
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja
va:3
> > > 12)
> > > at com.happypuppy.util.HPSql.getConnection(HPSql.java:21)
> > > at
org.apache.jsp.index_jsp._jspService(index_jsp.java:222)
> > > at
> > >
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at
> > >
> >
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:2
> > > 04)
> > > at
> > >
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> > > at
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at
> > >
> >
>
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.
> > > java:684)
> > > at
> > >
> >
>
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDisp
atch
> > > er.java:575)
> > > at
> > >
> >
>
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispat
cher
> > > .java:498)
> > > at
> > >
> >
>
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja
va:8
> > > 22)
> > > at org.apache.jsp._404_jsp._jspService(_404_jsp.java:373)
> > > at
> > >
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at
> > >
> >
>
org.apache.jasper.servlet.Jsp

Re: Tomcat does not want to compile

2003-08-14 Thread Jon Wingfield
This is a JBuilder problem not a Tomcat problem. The JBuilder JSP 
compiler 
(com.borland.jbuilder.webserverglue.tomcat.jsp.JasperSunJavaCompiler 
from your stacktrace) can't find the tools.jar of your jdk. Is it in the 
path JBuilder uses to run the embedded Tomcat?

Bob Hacker wrote:

I am running Jbuilder 7, JBoss 3.0.2. When I touch a jsp I get the
following exception when trying to run it
 
Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
 
javax.servlet.ServletException: sun/tools/javac/Main
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:485)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234
3)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.j
ava:1012)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:
1107)
at java.lang.Thread.run(Thread.java:479)
root cause 
java.lang.NoClassDefFoundError: sun/tools/javac/Main
at
com.borland.jbuilder.webserverglue.tomcat.jsp.JasperSunJavaCompiler.comp
ile(Unknown Source)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:272)
at
org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(J
spServlet.java:177)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.java:189)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.Containe

RE: how to get tomcat's tmp dir path?

2003-08-14 Thread Shapira, Yoav

Howdy,

>any way to get the absolute path to my $CATALINA_BASE or
>$CATALINA_BASE/temp directory? Thx.

Several ways, none of which you want to do.  One easy way is to add
-DCATALINA_BASE=$CATALINA_BASE to your JAVA_OPTS, and then do a
System.getProperty("CATALINA_BASE").

What you probably really want is your context's temporary directory,
which the container is required to provide according to the servlet
specification.  This is available as a context attribute of type File
(javax.servlet.context.tempdir or something like that is the name of the
attribute -- read the spec for more).

Yoav Shapira



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: tried alot of searching - caving in and emailing this list now

2003-08-14 Thread jherschel
Thanks for your reply Angus,

We are using the WARP connector - here is my server.xml file below:








  

  

  
  





  



  


  
  

  
  



  




As an aside, do you recommend using JK2 over WARP, and if so why?

James Herschel
Systems Administrator
Quarry Integrated Communications
(519)570-2020x2489
(519)503-2563
[EMAIL PROTECTED]

-Original Message-
From: Angus Mezick [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 1:04 PM
To: Tomcat Users List
Subject: RE: tried alot of searching - caving in and emailing this list now

Um, are you using the JK2 connector to like up apache and tomcat?  I
don't see it mentioned.  If you are, your workers2.propertties,
jk2.properties (sp), and server.xml would also be helpful.
--Angus

> -Original Message-
> From: jherschel [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 12:32 PM
> To: [EMAIL PROTECTED]
> Subject: tried alot of searching - caving in and emailing
> this list now
>
>
> Google has failed me!  I have been trying to get IP based
> access control
> working for a java site using Apache directives to no avail.
> I am using
> Stronghold 4.0 with Tomcat 4.1.24 - Here is the Apache conf I
> am working
> with ...
>
> 
>
>   ServerName [omitted]
>   ServerAdmin [omitted]
>   DocumentRoot "/var/wwwroot/wrcm-staging/htdocs/"
>
>   
>
> AllowOverride None
> Options +ExecCGI +FollowSymLinks
> order deny,allow
> Deny from all
> Allow from [omitted]
> Allow from [omitted]
>   
>
>   
>
> AllowOverride None
> Options +ExecCGI +FollowSymLinks
> order deny,allow
> Deny from all
> Allow from [omitted]
> Allow from [omitted]
>
>  
>
>   WebAppDeploy /var/wwwroot/wrcm-staging/tomcat/ conn /
>
> #Logging directives
>
>   TransferLog "var/log/wrcm-staging/access_log"
>   ErrorLog "var/log/wrcm-staging/error_log"
>
> 
>
> The java site resides in /var/wwwroot/wrcm-staging/tomcat -
> these directives
> usually work for normal HTTP sites - maybe this is a Jakarta
> config issue
> and not Apache?  I'm also thinking that maybe my DocumentRoot
> directive is
> overriding the /var/wwwroot/wrcm-staging/tomcat Directory block?
>
> Thanks in advance for your help!
>
> James Herschel
>
>
>
> -
> 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: Apache 2.0.47, Tomcat 5.0.5, JK2 connector 2.0.2

2003-08-14 Thread Pat Pomatto
Hi,

I have done everything you mentioned. I also reconfigured the connector
without jni. Tomcat does not throw any errors but apache does. Apache
errors:

[Thu Aug 07 12:39:45 2003] [error] mod_jk child init 1 0
[Thu Aug 07 12:39:45 2003] [error] jk2_init() Can't find child 9981 in
scoreboard
[Thu Aug 07 12:39:45 2003] [error] mod_jk child init 1 -2

Any ideas?

Thanks,
Pat



-Original Message-
From: John Turner [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003 1:30 PM
To: Tomcat Users List
Subject: Re: Apache 2.0.47, Tomcat 5.0.5, JK2 connector 2.0.2


Are either of those directories in $LD_LIBRARY_PATH?

Without JNI, what's the error message then?  My advice: get it working 
without JNI first.  If its not working either way, pounding on JNI isn't

going to help much.

John

Pat Pomatto wrote:

> I have libjvm.so under JAVA_HOME/jre/lib/i386/server and
> JAVA_HOME/jre/lib/i386/client. I can't get to work without jni either.
> 
> Pat
> 
> -Original Message-
> From: John Turner [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 05, 2003 11:00 AM
> To: Tomcat Users List
> Subject: Re: Apache 2.0.47, Tomcat 5.0.5, JK2 connector 2.0.2
> 
> 
> It can't find libjvm.so.  Do you have that installed?
> 
> Alternatively, does it work without JNI?
> 
> John
> 
> Pat Pomatto wrote:
> 
> 
>>Hi,
>>
>> 
>>
>>I'm running on Linux Apache 2.0.47, Tomcat 5.0.5 and trying to use JK2
> 
> 
>>connector 2.0.2 which I built successfully. I configured the connector
> 
> 
>>with jni.  I cannot seem to get the connector to work. In my 
>>apache/logs/error_log the error generated is:
>>
>> 
>>
>>[Tue Aug 05 10:31:53 2003] [error] vm.init(): no jvm_dll_path, will
> 
> use 
> 
>>LD_LIBRARY_PATH libjvm.so
>>
>>[Tue Aug 05 10:31:53 2003] [error] Can't load native library libjvm.so
> 
> : 
> 
>>libjvm.so: cannot open shared object file:
>>
>> No such file or directory
>>
>>[Tue Aug 05 10:31:53 2003] [error] jni.loadJvm() Error - can't load
> 
> jvm dll
> 
>>[Tue Aug 05 10:31:53 2003] [error] workerEnv.initChannel() init failed
> 
> 
>>for channel.jni:jni
>>
>>[Tue Aug 05 10:31:53 2003] [error] workerEnv.initWorkers() init failed
> 
> 
>>for worker.jni:onStartup
>>
>>[Tue Aug 05 10:31:53 2003] [error] workerEnv.initWorkers() init failed
> 
> 
>>for worker.jni:onShutdown
>>
>>[Tue Aug 05 10:31:53 2003] [error] shm.init(): No file
>>
>>[Tue Aug 05 10:31:53 2003] [error] uriEnv.init() map to invalid worker
> 
> 
>>/jsp-examples/* ajp13:localhost:8009
>>
>>[Tue Aug 05 10:32:05 2003] [error] mod_jk.handle() No worker for 
>>/jsp-examples/index.html
>>
>> 
>>
>> 
>>
>>Any ideas? Has anyone successfully gotten jk2 connector 2.0.2 working 
>>with Tomcat 5?
>>
>> 
>>
>>Thanks in Advance,
>>
>>Pat
>>
> 
> 
> 
> 
> -
> 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]


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



Re: Tuning KeepAlive Connections?

2003-08-14 Thread Venkata Srinivasa Rao, Yerra
To disable connection timeouts, set connectionTimeout value to -1
At 02:09 PM 8/7/2003 -0400, you wrote:
RedHat Linux 7.3
IBM JDK 1.4.1
Tomcat 4.1.24
Is it possible to disable KeepAlive connections with the Coyote HTTP/1.1
connector?  If it's not possible to turn them off, is it possible to lower
the request limit and timeout period for them?
Have a nice day ...

Sincerely,

Mike Cherichetti
Renegade Internet
www.renegadeinternet.com
Phone (724) 658-6346
Fax (724) 658-6346


-
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: From which apache virtual host did a request come from?

2003-08-14 Thread Bill Barker
Have you tried request.getHeader("host"); ?

"Mike Curwen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Our Tomcat has one .  There is also only one webapp to which any
> request to the foo.com domain should go.
>
> Apache vhost blah.foo.com   -> TC default host, default webapp
> Apache vhost abc.foo.com-> TC default host, default webapp
> Apache vhost xyz.foo.com-> TC default host, default webapp
>
> The webapp parses  blah, abc and xyz.
>
>
>
> > -Original Message-
> > From: Angus Mezick [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 14, 2003 9:37 AM
> > To: Tomcat Users List
> > Subject: RE: From which apache virtual host did a request come from?
> >
> >
> > Same deal.  Apache doesn't know anything about webapps.  You
> > just send requests for certain hosts to tomcat using
> > workers2.properties.  Tomcat then uses its  entries to
> > decide which webapp get what.
> >
> > > -Original Message-
> > > From: Mike Curwen [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, August 14, 2003 10:27 AM
> > > To: 'Tomcat Users List'
> > > Subject: RE: From which apache virtual host did a request come from?
> > >
> > >
> > > Actually, I was speaking about virtual hosts in Apache Web
> > Server.  ;)
> > >
> > > A few more details:
> > >
> > > I have an application that parses the URI for some
> > > parameters. Basically
> > > the sponsors hate URLs that look like:
> > > http://www.foo.com/?foo=a&bar=b&baz=c
> > >
> > > So my fix was to parse the URI for the parameters in a known order.
> > > http://www.foo.com/a/b/c
> > >
> > > They don't like this either. less typing, cleaner, but *still* not
> > > 'friendly'.  I might tell them that people using the web
> > are used to
> > > this sort of thing by now, but hey, they're the sponsors
> > and they want
> > > it different.
> > >
> > > So my last option is to flatten the parameters and use a subdomain.
> > >
> > > http://abc.foo.com/
> > > http://xyz.foo.com/
> > >
> > > So that's two virtual hosts in Apache, jk mounted to a single
> > > (default)
> > > application on Tomcat.  That's possible, right?
> > >
> > >
> > >
> > > > -Original Message-
> > > > From: John Turner [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, August 14, 2003 8:59 AM
> > > > To: Tomcat Users List
> > > > Subject: Re: From which apache virtual host did a request
> > come from?
> > > >
> > > >
> > > >
> > > > It's within .
> > > >
> > > > John
> > > >
> > > > Angus Mezick wrote:
> > > >
> > > > > Isn't there an  tag within ?
> > > > >
> > > > >
> > > > >>-Original Message-
> > > > >>From: John Turner [mailto:[EMAIL PROTECTED]
> > > > >>Sent: Thursday, August 14, 2003 9:32 AM
> > > > >>To: Tomcat Users List
> > > > >>Subject: Re: From which apache virtual host did a request
> > > come from?
> > > > >>
> > > > >>
> > > > >>Mike Curwen wrote:
> > > > >>
> > > > >>
> > > > >>>1) Is it possible to mount several virtual hosts to
> > the same web
> > > > >>>application (the default one, as it happens)
> > > > >>
> > > > >>I think this is possible, though maybe not desired.
> > > > >>
> > > > >>You can see this with the manager app.  Setup a bunch
> > of virtual
> > > > >>hosts that have the same appBase, with Contexts that have the
> > > > same docBase,
> > > > >>and you will be able to reach the same application on any
> > > > of the host
> > > > >>names.  I determined that it was better to give a separate
> > > > appBase to
> > > > >>each virtual host.
> > > > >>
> > > > >>If you mean setting separate appBase's for each virtual
> > host, and
> > > > >>still being able to access the same webapp (Context
> > with the same
> > > > >>docBase not
> > > > >>a copy of the webapp in another docBase), I would say "no".
> > > >  It's at
> > > > >>least a security risk.  Someone please correct me if I'm wrong.




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



RE: url-pattern and realms security

2003-08-14 Thread Madere, Colin
So simple, gotta love those.  All is working as desired.  Thanks Bill!

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2003 11:27 PM
To: [EMAIL PROTECTED]
Subject: Re: url-pattern and realms security


It's a Tomcat implementation detail, but I believe that 4.1.x does a
first-match (so moving "/*" to the end of the list should work).  The
Servlet 2.4 spec is much more specific about what to do in your case, so
Tomcat 5 and WebLogic should do the same thing when they come out.

"Madere, Colin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> So I looked at the servlet spec, but it doesn't specify (as far as I 
> read) how hierarchical security constraints should work and Tomcat 
> 4.1.27 seems
to
> not do hiarachical constraints :)  Also searching the list I didn't 
> turn
up
> results of this type, although I swear I've seen this issue before...
>
> I want to secure "/*" with a standard role and then "/stuff1" with 
> another role and "/stuff2" with yet another role.
>
> So I put in the web.xml:
>
> 
> 
>   General Secured content root
>   /*
>   GET
>   POST
> 
> 
>   standard
> 
> 
>
> 
> 
>   General Secured content root
>   /stuff1
>   GET
>   POST
> 
> 
>   usertype1
> 
> 
>
> 
> 
>   General Secured content root
>   /stuff2
>   GET
>   POST
> 
> 
>   usertype2
> 
> 
>
> But the second two seem to be overriden by the first.  (A link on a
WebLogic
> site shows the above to work, but I don't have WebLogic)
>
> Is this known behavior or did I miss something?




-
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 4.1, https & access denied

2003-08-14 Thread Hou, Rowena

Hi,

I can get my web application from https://localhost:8443/
but not from https://:8443/.. 

I got error message for access denied.

It works fine for http://:8080/

What should I do?

Thanks






=
error message from web
==

The requested URL could not be retrieved


While trying to retrieve the URL:  
The following error was encountered: 
Access Denied. 
Access control configuration prevents your request from being a


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



Re[2]: A good book about Tomcat

2003-08-14 Thread Alexander Vavilin
Hello John,

And what about Apress ??? I have ebook called Apache Jakarta-Tomcat by
James Goodwill.

The year of publication is 2002, and it covers Tomcat 4.0 beta 1.
Certainly things was changed in version 4.1, but it is a good start
point, I think.

-- 
Best regards,
Alexander
mailto:[EMAIL PROTECTED]

Friday, August 15, 2003, 5:18:11 AM, you wrote:

JB> Wrox sucked anyway.  I hated the red, glaring cover 
JB> with the geeks in the pictures. :)  If I wanted to see 
JB> a geek, I'd go through my own photo album, thank you 
JB> very much.

JB> The TomCat book from O'Reilly is OK, but it 
JB> left be scrambling to find the real way to do things 
JB> so I can't recommend it as a perfect guide.  I'm sure 
JB> a lot of stuff is out of date with 4.1, but it's one 
JB> of the few O'Reilly books I can't recommend.  I look 
JB> forward to an updated edition in the future.


JB> On Thursday 14 August 2003 13:29, Mubaraka Arif wrote:
>> Professional Apache Tomcat - Vivek Chopra, Ben
>> Galbraith, Sing Li, Romin Irani... [Wrox
>> Publication] is good one for TOmcat Administration
>> and Configuration.
>>
>> ~ Mubaraka Arif
>>Software Developer
>>Administrative Technology & Information Services
>>St Mary's University
>>San Antonio, TX -78228
>>
>> On 2003.08.14 14:22 Alexander Vavilin wrote:
>> > Hi all, can anybody advice me a good book about
>> > Tomcat ???.
>> >
>> > --
>> > Best regards,
>> >  Alexander 
>> > mailto:[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]


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



RE: tried alot of searching - caving in and emailing this list now

2003-08-14 Thread jherschel
I just talked with the lead on this and it seems we used WARP by default
since it is provided with Stronghold.  We were having WARP specific issues,
so we're going to look into getting mod_j2k to work with Stronghold.
Shouldn't be too big an issue I hope.  Thanks for your help Angus!

James Herschel


-Original Message-
From: Angus Mezick [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 2:36 PM
To: Tomcat Users List
Subject: RE: tried alot of searching - caving in and emailing this list now

1) it is what I use and the only one I know about :)

2) from the site:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/connectors.html
mod_webapp  WARP/1.0WarpConnector   Deprecated. Not for
Win32; no in-process nor load balancing; works in 4.x. Use APR.
Supported Apache-2.0 and Apache-1.3). See Webapp

> -Original Message-
> From: jherschel [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 2:30 PM
> To: Tomcat Users List
> Subject: RE: tried alot of searching - caving in and emailing
> this list now
>
>
> As an aside, do you recommend using JK2 over WARP, and if so why?
>
> James Herschel
> Systems Administrator
> Quarry Integrated Communications
> (519)570-2020x2489
> (519)503-2563
> [EMAIL PROTECTED]
>
> -Original Message-
> From: Angus Mezick [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 07, 2003 1:04 PM
> To: Tomcat Users List
> Subject: RE: tried alot of searching - caving in and emailing
> this list now
>
> Um, are you using the JK2 connector to like up apache and tomcat?  I
> don't see it mentioned.  If you are, your workers2.propertties,
> jk2.properties (sp), and server.xml would also be helpful.
> --Angus
>
> > -Original Message-
> > From: jherschel [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 07, 2003 12:32 PM
> > To: [EMAIL PROTECTED]
> > Subject: tried alot of searching - caving in and emailing
> > this list now
> >
> >
> > Google has failed me!  I have been trying to get IP based
> > access control
> > working for a java site using Apache directives to no avail.
> > I am using
> > Stronghold 4.0 with Tomcat 4.1.24 - Here is the Apache conf I
> > am working
> > with ...
> >
> > 
> >
> >   ServerName [omitted]
> >   ServerAdmin [omitted]
> >   DocumentRoot "/var/wwwroot/wrcm-staging/htdocs/"
> >
> >   
> >
> > AllowOverride None
> > Options +ExecCGI +FollowSymLinks
> > order deny,allow
> > Deny from all
> > Allow from [omitted]
> > Allow from [omitted]
> >   
> >
> >   
> >
> > AllowOverride None
> > Options +ExecCGI +FollowSymLinks
> > order deny,allow
> > Deny from all
> > Allow from [omitted]
> > Allow from [omitted]
> >
> >  
> >
> >   WebAppDeploy /var/wwwroot/wrcm-staging/tomcat/ conn /
> >
> > #Logging directives
> >
> >   TransferLog "var/log/wrcm-staging/access_log"
> >   ErrorLog "var/log/wrcm-staging/error_log"
> >
> > 
> >
> > The java site resides in /var/wwwroot/wrcm-staging/tomcat -
> > these directives
> > usually work for normal HTTP sites - maybe this is a Jakarta
> > config issue
> > and not Apache?  I'm also thinking that maybe my DocumentRoot
> > directive is
> > overriding the /var/wwwroot/wrcm-staging/tomcat Directory block?
> >
> > Thanks in advance for your help!
> >
> > James Herschel
> >
> >
> >
> >
> -
> > 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]
>
>

-
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: Custom Tag Lib

2003-08-14 Thread Mike Cherichetti \(Renegade Internet\)
Hi Shawn,

Actually, I wasn't aware that there was an option to disable it.  When I
figured out what was happening, I went ahead and handled it in my code.  No
telling how other application servers might handle it.  If you're only going
to be deploying on Tomcat, disabling pooling would probably save you some
time, but you still might want to handle it in your code to get better
performance.

Mike

-Original Message-
From: Shawn Zernik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 11:41 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Custom Tag Lib


Mike:

Thanks so very much...  I saw their is a config option in the Jasper to
turn off tag pooling.  do you thing that would work too, of shouldI
impliment it in my source code.  I'm gonna take a look at it right now.

Shawn

-Original Message-
From: Mike Cherichetti (Renegade Internet)
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:28 PM
To: Tomcat Users List
Subject: RE: Custom Tag Lib


Shawn,

I ran into this problem as well when switching from 4.0 to 4.1.  I think it
has something to do with 4.1 pooling and re-using tag objects.  What I did
in all of my doStartTag(), doAfterBody(), etc... methods was manually call
release() to reset the data in the tags like so:

public int doStartTag() throws JspException
{
  try
  {
...
  }

  catch (Exception exception)
  {
throw new JspException(exception);
  }

  finally
  {
release();
  }

  return SKIP_BODY;
}

Have a nice day ...

Sincerely,

Mike Cherichetti
Renegade Internet
Internet Advertising Delivery Solutions
www.renegadeinternet.com
Phone (724) 658-6346
Fax (724) 658-6346


-Original Message-
From: Shawn Zernik [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 10:56 PM
To: [EMAIL PROTECTED]
Subject: Custom Tag Lib


Tomcat Users:

I've been fighting with some version differences in tom cat wondering why my
app acts severly different on Tomcat 4.1.27 then 4.0.6.  It appears that
4.1.27 is not working from my perspective, and have been fighting with it
since monday.  None of the books I have touch this subject or ellude to the
problem, and I've seached high and low for solutions.

I'm having a problem working with my custom tag library.  The stange part to
this is it appears to work on tomcat 4.0.6 but not on 4.1.27.  The library
has a tage called site that extends a base tag, and those tags use other
classes in my data namespace to hit a database.

The tags are returning the proper data in both versions, but in 4.1.27, I
have to "reload" the contect in the manager for it to "register" the changes
from the database.  I have added some printlns to std out to track what's
going on.  In tomcat 4.0.6 they are going through all the code as I would
exspect it to.  I have included each of the class files that are called.  I
have also included the printouts from both versions of tomcat to clierify
how each version is handling the calls.

The object hiarchey goes as follows:

jPublish.Tags site extends inc_tag.
jPublish.Data.site_manager extends jPublish.Data.manager, managers contain,
load, and fill datas.
jPublish.Data.site_data extends jPublish.Data.data, used for storing data
and tracking updates.


--- INDEX.JSP ---
<%@ page contentType="text/html" %>
<%@ taglib prefix="inc" uri="inc" %>





Welcome to !
© 



--- TOMCAT 4.0.6 STDOUT ---
Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
Starting service Tomcat-Apache
Apache Tomcat/4.0.6
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Internetwork Consulting
jPublish.Tags.site.doEndTag(): End
jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.doEndTag(): Begin
jPublish.Tags.inc_tag.loaded()
jPublish.Tags.inc_tag.loaded(): not instance
jPublish.Data.manager.load()
jPublish.Tags.inc_tag.loaded(): load ok
jPublish.Tags.inc_tag.loaded(): next ok
jPublish.Tags.inc_tag.loaded(): reached fill.
jPublish.Tags.site.loaded()
Shawn
jPublish.Tags.site.doEndTag(): End

jPublish.Data.manager()
jPublish.Tags.site()
jPublish.Tags.site.setSite()
jPublish.Data.manager()
jPublish.

Run Windows' command in Java method

2003-08-14 Thread Cui Xiaojing-a13339
Hello All,

Do you know if windows' command could be executed in Java method? If yes, which API 
class method can be used to do it? Thanks a lot.

Regards,
Xiaojing


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



[OT] JDBC confusion

2003-08-14 Thread john-paul delaney

Hello List... newbie question coming up:

If I set up a jdbc connection object in one servlet, do I have to close it each time 
or can the same connection be re-utilized by other servlets each using a different sql 
statement (perhaps storing the connection as a session attribute?).

Is there a significant resource saving by not creating a JDBC connection object for 
each database access?

I'm thinking of storing a connection for each user in the session, as opposed to 
pooling - primarily because I'm not sure how a database pool works nor how to set it 
up.  Should I do a re-think on this?

I'm using one postgresql 7.3.3

thanks
/j-p.


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



Stop, Start Applications - Using TOMCAT Manager , Multiple Services

2003-08-14 Thread Thana Letchumi

Hi,

  May I know how do I configure the tomcat to run multiple services ?. I
have installed tomcat in one UNIX server but there are more than one
developer with applications to run on production. I need to ensure that
the testing and reload of the particular application will not affect the
others . I tried using the TOMCAT manager to reload applications but it
did not work. How do I reload a particular application after recompile
without restarting the tomcat server ?. 
Please advice !. 
Thanks

Regards,
Thana


-
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: How Does GlobalNamingResources Work?

2003-08-14 Thread Carl Walker
I found the answer to this question this morning.  Use  in the
 to point to the definitions in the globals section.

Carl Walker wrote:

> Hi,
>
> I have an object and a javax.naming.spi.Naming factory that I want to
> access as resources in server.xml.  I'm able to use  and
>  in the .  However, when I try to move either
> one of these to , Tomcat returns a 500 error
> saying "Cannot create resource instance".
>
> I think the factory code is correct since I can access the JNDI resource
> in a JSP when I put the resource definition in .
>
> Any help is appreciated,
> Carl
>
> -
> 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: can a taglib include a .jsp file ?

2003-08-14 Thread Bill Barker
Assuming that your Tag extends TagSupport try:
   pageContext.include("mySomething.jsp");


"Mufaddal Khumri" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I know what the problem is and I know what I am trying to do wont get
> translated... thats why i have asked for a better solution ! I asked if
> there was a way ... the answer to that is a yes or no (since I might
> have missed something) .
>
> On Friday, August 15, 2003, at 03:03  AM, RANDAD,KAILASH
> (HP-PaloAlto,ex1) wrote:
>
> > Basics, not clear!!!
> > JSP file gets translated to java file. During translation, tags &
> > include
> > related code gets converted to java code. Now, comes java compiler in
> > picture which does not know anything about jsp. So, how can you expect
> > or
> > design such wrong thing.
> >
> > Solution to your problem - Better define the code in "mySomething.jsp"
> > as
> > java function and call that function in include file as well custom
> > tag, and
> > use one at a time.
> >
> > Regards
> > KP
> >
> > -Original Message-
> > From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 14, 2003 1:45 AM
> > To: Tomcat List
> > Subject: can a taglib include a .jsp file ?
> >
> >
> > Hi,
> >
> > I have a taglib that needs to include a .jsp file .. .how can i do so ?
> >
> > if i try doing a out.println(" <%@ include file=\"" +
> > mySomething.jsp
> > + "\" %>") in my taglibrary called myTag it just spits out the exact
> > same line in the output. The same happens when i use a
> > out.println(" >
> > I can have if else blocks instead my taglibrary and avoid including the
> > mySomething.jsp. Is there a better solution than this ?
> >
> > Thanks.
> >
> > -
> > 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]



JspC.setArgs()

2003-08-14 Thread Dmitry Beransky
Is there a way to manually compile jsp under Jasper 2 of Tomcat 4.1.x?
Since JspC.setArgs is package private, I can't find another way to pass
the options to the compiler.  I've tried declaring a class inside
org.apache.jasper package, but am still getting an error:

java.lang.IllegalAccessError: tried to access method
org.apache.jasper.JspC.setArgs([Ljava/lang/String;)V from class
org.apache.jasper.JspCompiler
at org.apache.jasper.JspCompiler.compileJsp(JspCompiler.java:25)
at edu.ucsd.som.jcms.JCMS.processRequest(JCMS.java:87)
at
edu.ucsd.som.jcms.j2ee.JCMSWebApplication.doGet(JCMSWebApplication.java:37)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)



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



Re: Freeing processors

2003-08-14 Thread Jon Wingfield
I think the connectionTimeout parameter controls how long the container 
waits before giving up on trying to obtain a request processor from the 
pool. Once the processor has been obtained a runaway/blocked process can 
stop the processor from being released.
One way to get around this would be, for example, use a worker thread :

doGet() {

final Object lock = new Object();
Thread worker = new Thread(new Runnable() {
public void run() {
// code to do CORBA stuff here
...
// CORBA stuff returned so kick the waiting servlet
synchronized (lock) {
lock.notify();
}
}
});
try {
synchronized (lock) {
worker.start();
lock.wait(20*1000); // times out in 20s or is notified
}
} catch (InterruptedException ie) {
}
// work out whether CORBA invocation worked and
// generate relevant response
...
}
Note: the code above was thrown together in 5mins for demonstration 
purposes. If i had to implement this I definitely wouldn't create a new 
Thread for each request; i would use a Thread pool to run Runnable 
objects. The Runnables would gather the data from the CORBA invocation 
for use later in the servlet.

Hope this gets you started on a solution,

Jon

Daniel Carlsson wrote:

Hi

The connectionTimeout parameter does not solve my problem. I don't know exactly what it does but it does not free a busy processor after some time. I will illustrate my problem with som source code. My servlet is sleeping 5 min to simulate that it is hanged/deadlocked. A wan't some way to automatcly kill/abort it after say 20s.

The servlets doGet method:

PrintWriter out = response.getWriter();
out.println("Start");
out.flush();
try {
Thread.currentThread().sleep(30); // Simulate hang
} catch(Exception x) {
x.printStackTrace();
}
out.println("Finish");
My server.xml





  






Is there a way to do this? If tomcat can't can I do it myself with some extra thread monitoring and releaseing? I have tried killing (with Thread.destroy()) the thread but this doesn't seem to work, I only run out of memory after a while becuase resource probably arent freed correctly. How do I free a processor from my code?



Med vänliga hälsningar

Daniel Carlsson 
Gimlisoft AB
Email: [EMAIL PROTECTED]
Tel: 0709-744570, 031-189024

-Ursprungligt meddelande-
Från: Mauricio Nuñez <[EMAIL PROTECTED]>
Skickat: 2003-08-07  16:51:56
Till: Tomcat Users List
Ämne: Re: Freeing processors


Hi

the HttpConnector haa a connectionTimeout parameter. Set this to a low 
razonable value, as 2 ( 20 seconds )

I was having a similar problem, using the JkConnector, but because my app 
wasn't releasing db connections to the dbcp pool. Then, the "run out of 
processors ..." is more a signal the leakaging in your app. (IMHO :-)

Check the timeout of your CORBA connections if available.
Att
MN

El Jue 07 Ago 2003 08:12, Daniel Carlsson escribió:

Hi

My problem is that tomcat runs out of processors and I see "No processor
available, rejecting this connection" in the log file. By reading earlier
posts a I understand that each processor is a thread and is not freed until
it is returned by my code, my code is hanging somewhere.
The problem is that my servlet (the only thing running in tomcat) only
"forwards" requests threw CORBA to a big app that I can't change, and its
in their the code hangs.
So, how can I solve this? The perfect solution would be if tomcat could
automaticly free processors after some timeout ( 60 s) but I have not found
such a feature/setting, does it exist? If not, could I do some small hack
in my servlet that monitors and somehow terminates (kills thread or
something) the request after 60s and therby freeing the processor?
I am running tomcat 4.1.12, java 1.4.0_04, redhat linux 9. I am using the
HttpConnector.
Thank you

Daniel Carlsson
Gimlisoft AB
Email: [EMAIL PROTECTED]
Tel: 0709-744570, 031-189024
-
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]





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


JNDI Realm

2003-08-14 Thread Scott Blanchard
I am having trouble setting up the JNDI Realm in tomcat (I am using
4.1.27).

I can bind  to the ldap server, authenticate the user, but when it goes
to checking roles, I am unsure how to organize my directory, and what
the application wants back when it does a filtered search.  My ldap
server is Novell Netware 6 eDirectory.  I want to test the JNDI for the
Admin and Manager functions of tomcat first, then set it up for my own
applicatons.

I have a context called ou=zpar,o=med that I have two users defined
cn=adminx,ou=zpar,o=med
cn=test,ou=zpar,o=med

I also have two groups setup that test is a member of:

cn=admin,ou=zpar,o=med
cn=manager,ou=zpar,o=med

This is my Realm definition in server.xml
ldap://192.168.1.23:389";
connectionName="cn=adminx,ou=zpar,o=med"
connectionPassword="zparpwd"
userPattern="cn={0},ou=zpar,o=med"
roleBase="ou=zpar,o=med"
roleName="cn"
roleSearch="(uniqueMember={0})"
/>

This is a snip of my ldap trace log from the ldap server when tomcat
connects:

DoSearch on connection 0xc9206aa0
Search request:
base: "ou=zpar,o=med"
scope:1  derefence:3  sizelimit:0  timelimit:0  attrsonly:0
filter: "(uniqueMember=cn=test,ou=zpar,o=med)"
attribute: "cn"
Sending search result entry "cn=manager,ou=zpar,o=med" to connection
0xc9206aa0
Sending search result entry "cn=admin,ou=zpar,o=med" to connection
0xc9206aa0
Sending operation result 0:"":"" to connection 0xc9206aa0

This is a snip from my catalina log (note: there is a bug that I
reported in JNDIRealm.java that crashes when using debug > 2 in the
getRoles() method), so I can't figure out what is setup right so I can
continue.  Any thoughts?

2003-08-07 22:23:16 JNDIRealm[Standalone]: lookupUser(test)
2003-08-07 22:23:16 JNDIRealm[Standalone]:   dn=cn=test,ou=zpar,o=med
2003-08-07 22:23:16 JNDIRealm[Standalone]:   validating credentials by
binding as the user
2003-08-07 22:23:16 JNDIRealm[Standalone]:   binding as
cn=test,ou=zpar,o=med
2003-08-07 22:23:16 JNDIRealm[Standalone]: Username test successfully
authenticated
2003-08-07 22:23:16 JNDIRealm[Standalone]:  
getRoles(cn=test,ou=zpar,o=med)
2003-08-07 22:23:16 JNDIRealm[Standalone]:   Searching role base
'ou=zpar,o=med' for attribute 'cn'
2003-08-07 22:23:16 JNDIRealm[Standalone]:   With filter expression
'(uniqueMember=cn=test,ou=zpar,o=med)'
2003-08-07 22:23:16 JNDIRealm[Standalone]:   retrieving values for
attribute cn
2003-08-07 22:23:16 JNDIRealm[Standalone]:   retrieving values for
attribute cn
2003-08-07 22:23:16 CoyoteAdapter An exception or error occurred in the
container during the request processing
java.lang.NullPointerException
at
org.apache.catalina.realm.JNDIRealm.getRoles(JNDIRealm.java:1282)
   ...more modules in the exception

Scott Blanchard
IT Manager
MED Institute, Inc.
West Lafayette, IN  47906
Ph: (765) 463-7537
FAX: (765) 497-0641

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



Re: Tomcat 5.0.2 and IIS

2003-08-14 Thread John Turner
If your JK connector port in server.xml is 8009, then that is the port 
you should use in your properties files.

Please understand that Tomcat works with JK and JK2 by default.  Right 
"out of the box", with no changes whatsoever to server.xml.  You don't 
"need" to change anything until you are ready to do so.  Don't change 
something because it "looks wrong".

John

vikas jain wrote:

I'm sorry about not telling you whole thing. But I was not aware of that.
I looked into my server.xml and it says JK2 port is 8009. It's something 
like this:


   
But should I change the port to 8443 in properties file as it is saying 
redirectport = 8443.

Thanks,




From: John Turner <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: Tomcat 5.0.2 and IIS
Date: Thu, 07 Aug 2003 12:08:57 -0400
Let's step back a little:

CoyoteConnector is the default class that handled connections to Tomcat.

By default, there are two connectors configured in server.xml.  Both 
use CoyoteConnector.  One is for HTTP and is on port 8080 by default.  
The other is for JK/JK2 and is on port 8009 by default.

To use a web server redirector, you need a JK/JK2 connector configured 
in server.xml, and you need your .properties files to use the correct 
port number.  Otherwise, nothing you do has a chance of working.

Perhaps if you told us what you wanted to do, and what you have done 
(changed from the default) we could be of more help, but right now you 
are only giving us little tidbits of info in each post, making it 
pretty difficult to help you quickly.

John



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


Re: Can I get an answer please -- Re: Why integrate Tomcat with aweb server?

2003-08-14 Thread John Turner
I did, last week.

In any case, if you have something to ask me directly, you can send me a 
message off-list.

John

Nathan Ward wrote:

Hello John, 

I hate to be pushy, but are you going to post a reply to this question at some point?

   Nathan
  - Original Message - 
  From: Nathan Ward 
  To: [EMAIL PROTECTED] ; Tomcat Users List 
  Sent: Monday, August 04, 2003 11:05 AM
  Subject: Why integrate Tomcat with a web server?

  I have a question for John Turner about a statement in the book Apache Tomcat Security. 

  Page 12 says: 
  "As discussed earlier, running publicly available web services as root or superuser is typically a bad idea, so the solution is to avoid using Tomcat as a stand-alone web server on port 80 by integrating it with a standard HTTP web server such as Apache, Microsoft's IIS, or Sun Microsystem's iPlanet."

  Question: Does this apply when running under Windows? The reference to "as discussed earlier" talks about running Tomcat as a service with more permissions than necessary. Windows defaults to running services as SYSTEM which has administrator privileges. Fine, but as also mentioned earlier, you can create a user account with less permissions and setup the service to run Tomcat under that account. So, how does the statement on page 12 relate to running Tomcat under windows, i.e. why run Tomcat with IIS rather than just run Tomcat? There may be performance reasons, but from a security point of view, is there increased security risks in running Tomcat without IIS when running as a service under Windows?

 Nathan



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


RE: Help! heavy traffic is crapping out our site every 5 min! DBCP exceptions

2003-08-14 Thread Barclay A. Dunn
ok, well, at least we have concrete proof of it.

now, given that i can confirm that i am closing connections (calling close()
on them, which returns them to the pool), can you suggest how i might locate
where those connections are not getting released? i have read some stuff
about dbcp not being entirely reliable in releasing connections. is that
true? argh.

thanks again,
barclay

-Original Message-
From: Angus Mezick [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 4:27 PM
To: Tomcat Users List
Subject: RE: Help! heavy traffic is crapping out our site every 5 min!
DBCP exceptions


Yup, and when nothing is happening, the # of active connections should
be 0.  If it isn't you aren't releasing connections properly.

> -Original Message-
> From: Barclay A. Dunn [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 08, 2003 4:19 PM
> To: Tomcat Users List
> Subject: RE: Help! heavy traffic is crapping out our site
> every 5 min! DBCP exceptions
>
>
> cool. that works for me. so, let's say i want to watch my sql server
> connections monitor and run this pool monitor from a jsp at
> the same time.
> shouldn't i expect to see the # of active + # of idle on the
> jsp add up to
> the # of connections that sql server knows about? (assuming
> tomcat is the
> only user of connections to this db)
>
> trying to check my assumptions here.
>
> barclay
>
> -Original Message-
> From: Angus Mezick [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 08, 2003 4:00 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Help! heavy traffic is crapping out our site every 5 min!
> DBCP exceptions
>
>
> Oh, here is the code that will work with a JNDI resource:
> javax.naming.Context initContext;
> try {
> initContext = new InitialContext();
> javax.naming.Context envContext =
> (javax.naming.Context)initContext.lookup("java:/comp/env");
> BasicDataSource ds =
> (BasicDataSource)envContext.lookup("jdbc/SessionDB");
> if(ds!=null){
> pageContext.getOut().println("
> jdbc/SessionDB:  Active:
> " + ds.getNumActive() + " Idle: " + ds.getNumIdle() + "");
> }
> } catch (NamingException e) {
> // TODO Auto-generated catch block
> //e.printStackTrace();
> }
>
> > -Original Message-
> > From: Angus Mezick
> > Sent: Friday, August 08, 2003 3:26 PM
> > To: 'Tomcat Users List'
> > Subject: RE: Help! heavy traffic is crapping out our site
> > every 5 min! DBCP exceptions
> >
> >
> > Here is a little snippet I use inside of a custom tag to
> > disply pool health:
> > private void printPoolStatus() throws IOException {
> > PoolingDriver driver = new PoolingDriver();
> > pageContext.getOut().println("Dbcp Pool
> > Data: ");
> > ObjectPool gop = driver.getPool("SessionManager");
> > if (gop != null) {
> > pageContext.getOut().println(" SessionManager:
> > Active: " + gop.getNumActive() + " Idle: " + gop.getNumIdle()
> > + "");
> > }
> > gop = driver.getPool("CommerceServer");
> > if (gop != null) {
> > pageContext.getOut().println(" CommerceServer:
> > Active: " + gop.getNumActive() + " Idle: " + gop.getNumIdle()
> > + "");
> > }
> > }
> >
> > You WILL need to change the getPool names.
> > --Angus
> >
> > > -Original Message-
> > > From: Barclay A. Dunn [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, August 08, 2003 2:47 PM
> > > To: Tomcat Users List
> > > Subject: RE: Help! heavy traffic is crapping out our site
> > > every 5 min! DBCP exceptions
> > >
> > >
> > > ah! there's the rub. i am also searching the archives of the
> > > jakarta-commons-users list for insight and must also post to
> > > that list if i
> > > can't figure it out myself, but we think no, they are not
> > > getting closed
> > > correctly. i can claim 100% of the time i am calling
> > > conn_.close(), but when
> > > we watch our db connections they go up but they never come
> > > down. so we think
> > > no.
> > >
> > > as i mentioned before, i do not fully grok the workings of
> > > dbcp and am thus
> > > in over my head. i could use a little step-by-step on how
> > to test this
> > > (other than the logical deduction my sysadmin and i are using
> > > right now).
> > >
> > > thanks a million everybody for trying to be so helpful.
> > >
> > > barclay
> > >
> > > -Original Message-
> > > From: Angus Mezick [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, August 08, 2003 2:23 PM
> > > To: Tomcat Users List
> > > Subject: RE: Help! heavy traffic is crapping out our site
> > every 5 min!
> > > DBCP exceptions
> > >
> > >
> > > All of these connections are being correctly closed, right?
> > > --Angus
> > >
> > > > -Original Message-
> > > > From: rob engstrom [mailto:[EMAIL PROTECTED]
> > > > Sent: Friday, August 08, 2003 2:08 PM
> > > > To: 'Tomcat Users List'
> > > > Subject: RE: Help! heavy traffic is crapping out our

Re: A good book about Tomcat

2003-08-14 Thread John Blanco
Wrox sucked anyway.  I hated the red, glaring cover 
with the geeks in the pictures. :)  If I wanted to see 
a geek, I'd go through my own photo album, thank you 
very much.

The TomCat book from O'Reilly is OK, but it 
left be scrambling to find the real way to do things 
so I can't recommend it as a perfect guide.  I'm sure 
a lot of stuff is out of date with 4.1, but it's one 
of the few O'Reilly books I can't recommend.  I look 
forward to an updated edition in the future.


On Thursday 14 August 2003 13:29, Mubaraka Arif wrote:
> Professional Apache Tomcat - Vivek Chopra, Ben
> Galbraith, Sing Li, Romin Irani... [Wrox
> Publication] is good one for TOmcat Administration
> and Configuration.
>
> ~ Mubaraka Arif
>Software Developer
>Administrative Technology & Information Services
>St Mary's University
>San Antonio, TX -78228
>
> On 2003.08.14 14:22 Alexander Vavilin wrote:
> > Hi all, can anybody advice me a good book about
> > Tomcat ???.
> >
> > --
> > Best regards,
> >  Alexander 
> > mailto:[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]

-- 
- John Blanco
- Code Guru @ Rapture In Venice
- http://members.bbnow.net/jblanco

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



TOMCAT x WSAD

2003-08-14 Thread Oscar \(Eccox\)
Title: Mensagem



Hi, 
List,
 
I'm using WSAD with 
TOMCAT... When I select 'Run On Server' in the WSAD menu, the TOMCAT starts in 
debug mode and the Navigator opens and points to my index.jsp page, for example. 
But, I receive the error:
 

HTTP Status 404 - /application/index.jsp


type 
Status report
message 
/application/index.jsp
description The requested resource (/application/index.jps) is not available.


Apache Tomcat/4.1.24
Looking in the 
$TOMCAT_HOME/conf/server.xml, I find this line:
 

 
path="/application" reloadable="true" source="application"/>
And, when I remove 
the slash in docBase, and then restart TOMCAT, mannualy, everything works 
fine...
This line is created 
automatically by WSAD in server.xml... Anybody knows why it creates the line 
with this error 
 
Thanks,
 
PS. In the project 
properties (WSAD), in the Web section, the 'Context Root' parameter is 'myweb', 
different from 'application'. WSAD is using the project name instead of context 
root for create the line in server.xml...
 


  
  
 
===José Oscar de Souza 
  EduardoCoordenador de Projetostel: 3047-4541fax: 
  3047-4550[EMAIL PROTECTED]=== 
  
 
 


Re: Https not working

2003-08-14 Thread Kurt Overberg
Neither of those urls are passing through you apache, unless you have it 
configured to run on port 8080 (which is usually the Tomcat port).  Not 
sure if you can configure Tomcat to use SSL directly, but I do know that 
just sticking an 'https' in front of it won't work.  You need to set up 
apache so it deals with the http/https side of things and configure a 
connector (the thing that allows apache to forward requests to Tomcat's 
AJP13 port).

/kurt

[EMAIL PROTECTED] wrote:
Greetings,
I'm running Tomcat primarily as a Servlet/JSP container behind Apache so I have
configure the primary web server to handle the SSL connections from users. So if
my apache box will negotiate all SSL-related functionality what do I have to do
in tomcat to get it to work?
If you go to http://placeanad.classifiedmarketplace.net:8080/AdWebster works
But https://placeanad.classifiedmarketplace.net:8080/AdWebster does not work
Thanks,
Bobbie
Bobbie Atristain
Internet Systems Administrator
Media General, INC.
804.649.6156
-
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: 404

2003-08-14 Thread rob engstrom
If I recall correctly, this should go in the web.xml


404
404.jsp  <-- whatever you named it & location.




---
robert engstrom 


-Original Message-
From: Boyles, Walter [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 1:32 PM
To: [EMAIL PROTECTED]
Subject: 404

Is there a way to override the default 404 page.  I know you can modify
the httpd.conf in Apache but didn't see or find anything like that in
tomcat.

Thanks,
Walter Boyles
AAA National
 
 
 

 
This communication (including all attachments) is intended solely for the
use of the person(s) to whom it is addressed and should be treated as a
confidential AAA communication.  If you are not the intended recipient, any
use, distribution, printing, or copying of this email is strictly
prohibited.  If you received this email in error, please immediately delete
it from your system and notify the originator.  Your cooperation is
appreciated.
 



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



Re: Tomcat 4.1 & https problem

2003-08-14 Thread 唐文民
Hou, Rowena,您好!
you may by change server.xml like this,try again. You will be sucessful.
   keystoreFile="mykeystore"
   keystorePass = "password"

=== 2003-08-06 16:23:00 您在来信中写道:===

>Hi,
>
>I've been running Tomcat as a standalone Web server for a while. My project
>run fine at http with sign applet. I want to switch from HTTP to HTTPS.
>I followed the directions in the document"
>http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html"; :
>
>   1. keytool -genkey -alias tomcat -keyalg RSA -keystore mykeystore
>   2. keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr -keystore
>mykeystore
>   and
>   3. uncommented the connector provided by the config file:
>port="8443" minProcessors="5" maxProcessors="75"
> enableLookups="true"
> acceptCount="10" debug="0" scheme="https" secure="true"
> useURIValidationHack="false">
>className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
>   clientAuth="false" protocol="TLS"
>   keystoreFile="full path to mykeystore"
>   keystorePass- "changeit"
>/>
> 
>
>However, it isn't working. I can't start Tomcat at all. I don't get any
>errors at prompt or in the logs; I tried to use command window run "start
>tomcat". It popup a command prompt and disappear. If I change className to
>which used in document. I can start Tomcat and get "http://localhost:8443";
>work but not https://localhost:8443 ( I commented out connector for http in
>server.xml file).
>I use jakarta-tomcat-4.1.12-LE-jdk14 which come with jbuilder 8. runing on
>Window 2000 and IE 6
>
>Question:
>1. How can I fix the problem.
>2. How can I find out error message? I tried to rum "catalina debug
>-security" from command prompt. Most of error message is unrecognized.
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

= = = = = = = = = = = = = = = = = = = =


致
礼!


唐文民
[EMAIL PROTECTED]
  2003-08-08




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



Re: tomcat and external provider

2003-08-14 Thread Maxime Colas des Francs
I resolve that with copying criptyx jar in $CATALINA_HOME/shared/lib

Smbdy can explain this ?

At 13:46 2003-08-07 -0400, you wrote:
Hi

I detect a stange comportement of my tomcat when using an external 
security provider

I want to use openpgp in my web application with cryptix provider

In a 'load-on-startup' servlet i add security provider like this :

java.security.Security.addProvider(new cryptix.jce.provider.CryptixCrypto());
java.security.Security.addProvider(new 
cryptix.openpgp.provider.CryptixOpenPGP());
and i read a public key for future pgp encryption ...

when i start or restart manually tomcat, it works fine .

But when tomcat use its "Servlet Auto Reloader" when i change some code,
it reload my 'load-on-startup' servlet automaticly, add my two provider 
like before
and ... crash during public key interpretation and write this in my 
catalina.out :

WebappClassLoader:   Resource '/WEB-INF/lib/mylib.jar' was modified; Date 
is now: Thu Aug 07 13:41:15 EDT 2003 Was: Thu Aug 07 13:39:04 EDT 2003
WebappClassLoader: Lifecycle error : CL stopped
java.security.NoSuchAlgorithmException: Cannot find any provider 
supporting ElGamal/ECB/PKCS#1
 + stack

so if i restart manually tomcat it works again ...

Smby can help me to fix this auto reload ?

thks by advance



-
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: url-pattern and realms security

2003-08-14 Thread Bill Barker
It's a Tomcat implementation detail, but I believe that 4.1.x does a
first-match (so moving "/*" to the end of the list should work).  The
Servlet 2.4 spec is much more specific about what to do in your case, so
Tomcat 5 and WebLogic should do the same thing when they come out.

"Madere, Colin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> So I looked at the servlet spec, but it doesn't specify (as far as I read)
> how hierarchical security constraints should work and Tomcat 4.1.27 seems
to
> not do hiarachical constraints :)  Also searching the list I didn't turn
up
> results of this type, although I swear I've seen this issue before...
>
> I want to secure "/*" with a standard role and then "/stuff1" with another
> role and "/stuff2" with yet another role.
>
> So I put in the web.xml:
>
> 
> 
>   General Secured content root
>   /*
>   GET
>   POST
> 
> 
>   standard
> 
> 
>
> 
> 
>   General Secured content root
>   /stuff1
>   GET
>   POST
> 
> 
>   usertype1
> 
> 
>
> 
> 
>   General Secured content root
>   /stuff2
>   GET
>   POST
> 
> 
>   usertype2
> 
> 
>
> But the second two seem to be overriden by the first.  (A link on a
WebLogic
> site shows the above to work, but I don't have WebLogic)
>
> Is this known behavior or did I miss something?




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



RES: Servlet Dispatcher is currently unavailable

2003-08-14 Thread Oscar \(Eccox\)
Yes... There were a few errors (applications that were not loaded)...
When I remove the errors, everything is OK...

Thanks...

===
José Oscar de Souza Eduardo
Coordenador de Projetos
tel: 3047-4541
fax: 3047-4550
[EMAIL PROTECTED]
=== 
 


-Mensagem original-
De: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 8 de agosto de 2003 15:54
Para: Tomcat Users List
Assunto: RE: Servlet Dispatcher is currently unavailable



Howdy,
Oh, very interesting.  It's been a long time since I've seen this one.

Are there any errors in the tomcat logs during startup?

Yoav Shapira
Millennium ChemInformatics

-Original Message-
From: Oscar (Eccox) [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 2:46 PM
To: Tomcat Users List
Subject: Servlet Dispatcher is currently unavailable

I'm using TOMCAT 4.1.24 on Linux RedHat 8...
 
When I try to reach http://localhost:8080/qc/main, I have the message:
 
HTTP Status 503 - Servlet dispatcher is currently unavailable
 
Any help ???
 
Thanks,

===
José Oscar de Souza Eduardo
Coordenador de Projetos
tel: 3047-4541
fax: 3047-4550
[EMAIL PROTECTED]
=== 
 
 



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]



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



dynamic install and reload

2003-08-14 Thread Steve Widmar
Greetings, all:

I'm looking for help with the following deployment scenarios:
1. Install a web app (.war) into a running tomcat 4.1.x
2. reload same web app after arbitrary changes to it

For both of these scenarios:
1. deployment activity driven from ant script 
2. ant script executed on host that is NOT the same host as the host that tomcat 4.1.x 
is running on; 
in other words, deploy from one host to another, or from 'off-host'.

My motivation:
This is driven by the desire to deploy essentially the same war to multiple 
environments (ie, staging, production) 
without having to hop around from host to host, lugging the war each time (and then 
still having to install or redeploy).

I've been researching this, including reviewing the how-to 
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html) 
and the mail archive, as well as trial and error (in 4.1.24 and 4.1.27) ... 

The closest I see I can get to my goal 
is off-host install of a war *manually* (ie, via browser, not via ant script) using 
manager app of target host 

Install using the provided custom ant task says it succeeds, 
and it shows up in the manager list of apps, but it isnt 'started' and I cant start it 
clicking 'start'; just seems to do nothing.

I assume that reload expects the stuff to be reloaded to be located on the target host 
itself, 
as theres no property like the @war to point at a war referenced in any of the docs, 
and the task java src doesnt seem to support it either...

Any help? 
If not, am I the only one with this goal - I mean, I doubt my motiviation is unique... 
anyone in a similar boat solving this in some way?
(It seems like theres already a lot of work done toward this end, and if anyone 
actually wanted to do what I'm trying to do the support would be there ...)

Regardless of the outcome I'd be happy to update the how-to (or whatever) to clarify 
this point for future people who may be curious like I was here;
just let me know if theres any interest.

Thanks,
Steve


RE: Help! heavy traffic is crapping out our site every 5 min! DBCPexceptions

2003-08-14 Thread Eric J. Pinnell
Sorry, I sent this a little to soon...

Get 5 or 10 thread dumps in a row real fast... just bam, bam, bam, etc...

>From that you can tell what the threads are doing.  They should be moving
through methods (or classes) very quickly.  If they are sticking they are
waiting on something and that's typically bad.

Find what they are sticking on and fix it. :)  Simple, eh?

-e

On Fri, 8 Aug 2003, Eric J. Pinnell wrote:

> Hi,
>
> You could get a thread dump and see where your connections are hanging.
>
> When you get your errors kill -QUIT the pid.
>
> -e
>
> On Fri, 8 Aug 2003, Barclay A. Dunn wrote:
>
> > ok, well, at least we have concrete proof of it.
> >
> > now, given that i can confirm that i am closing connections (calling close()
> > on them, which returns them to the pool), can you suggest how i might locate
> > where those connections are not getting released? i have read some stuff
> > about dbcp not being entirely reliable in releasing connections. is that
> > true? argh.
> >
> > thanks again,
> > barclay
> >
> > -Original Message-
> > From: Angus Mezick [mailto:[EMAIL PROTECTED]
> > Sent: Friday, August 08, 2003 4:27 PM
> > To: Tomcat Users List
> > Subject: RE: Help! heavy traffic is crapping out our site every 5 min!
> > DBCP exceptions
> >
> >
> > Yup, and when nothing is happening, the # of active connections should
> > be 0.  If it isn't you aren't releasing connections properly.
> >
> > > -Original Message-
> > > From: Barclay A. Dunn [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, August 08, 2003 4:19 PM
> > > To: Tomcat Users List
> > > Subject: RE: Help! heavy traffic is crapping out our site
> > > every 5 min! DBCP exceptions
> > >
> > >
> > > cool. that works for me. so, let's say i want to watch my sql server
> > > connections monitor and run this pool monitor from a jsp at
> > > the same time.
> > > shouldn't i expect to see the # of active + # of idle on the
> > > jsp add up to
> > > the # of connections that sql server knows about? (assuming
> > > tomcat is the
> > > only user of connections to this db)
> > >
> > > trying to check my assumptions here.
> > >
> > > barclay
> > >
> > > -Original Message-
> > > From: Angus Mezick [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, August 08, 2003 4:00 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: Help! heavy traffic is crapping out our site every 5 min!
> > > DBCP exceptions
> > >
> > >
> > > Oh, here is the code that will work with a JNDI resource:
> > > javax.naming.Context initContext;
> > > try {
> > > initContext = new InitialContext();
> > > javax.naming.Context envContext =
> > > (javax.naming.Context)initContext.lookup("java:/comp/env");
> > > BasicDataSource ds =
> > > (BasicDataSource)envContext.lookup("jdbc/SessionDB");
> > > if(ds!=null){
> > > pageContext.getOut().println("
> > > jdbc/SessionDB:  Active:
> > > " + ds.getNumActive() + " Idle: " + ds.getNumIdle() + "");
> > > }
> > > } catch (NamingException e) {
> > > // TODO Auto-generated catch block
> > > //e.printStackTrace();
> > > }
> > >
> > > > -Original Message-
> > > > From: Angus Mezick
> > > > Sent: Friday, August 08, 2003 3:26 PM
> > > > To: 'Tomcat Users List'
> > > > Subject: RE: Help! heavy traffic is crapping out our site
> > > > every 5 min! DBCP exceptions
> > > >
> > > >
> > > > Here is a little snippet I use inside of a custom tag to
> > > > disply pool health:
> > > > private void printPoolStatus() throws IOException {
> > > > PoolingDriver driver = new PoolingDriver();
> > > > pageContext.getOut().println("Dbcp Pool
> > > > Data: ");
> > > > ObjectPool gop = driver.getPool("SessionManager");
> > > > if (gop != null) {
> > > > pageContext.getOut().println(" SessionManager:
> > > > Active: " + gop.getNumActive() + " Idle: " + gop.getNumIdle()
> > > > + "");
> > > > }
> > > > gop = driver.getPool("CommerceServer");
> > > > if (gop != null) {
> > > > pageContext.getOut().println(" CommerceServer:
> > > > Active: " + gop.getNumActive() + " Idle: " + gop.getNumIdle()
> > > > + "");
> > > > }
> > > > }
> > > >
> > > > You WILL need to change the getPool names.
> > > > --Angus
> > > >
> > > > > -Original Message-
> > > > > From: Barclay A. Dunn [mailto:[EMAIL PROTECTED]
> > > > > Sent: Friday, August 08, 2003 2:47 PM
> > > > > To: Tomcat Users List
> > > > > Subject: RE: Help! heavy traffic is crapping out our site
> > > > > every 5 min! DBCP exceptions
> > > > >
> > > > >
> > > > > ah! there's the rub. i am also searching the archives of the
> > > > > jakarta-commons-users list for insight and must also post to
> > > > > that list if i
> > > > > can't figure it out myself, but we think no, they are not
> > > > > getting closed
> > > > > correctly. i can claim 100% of the time i am calling
> > > > > 

Re[2]: url-pattern and realms security

2003-08-14 Thread Alexander Vavilin
Hello Colin,

Of course, your /* directive will overwrite all. You should use more
concrete names and paths.

-- 
Best regards,
Alexander
mailto:[EMAIL PROTECTED]

Friday, August 15, 2003, 4:53:36 AM, you wrote:

MC> Sorry sorry,  elements are unique, just a copying error.

MC> -Original Message-
MC> From: Alexander Vavilin [mailto:[EMAIL PROTECTED] 
MC> Sent: Thursday, August 14, 2003 10:33 PM
MC> To: Tomcat Users List
MC> Subject: Re: url-pattern and realms security


MC> Hello Colin,

MC> I am not sure, but I think you cannot do this, first an 
MC> element means an UNIQUE name. Can you understand ? You must give it
MC> different names. Second thing, I never heard about  element.

MC> Hope it will help.


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



TC 5.0.6: Random errors when deploying/reloading webapps via ANT

2003-08-14 Thread Yann Cébron
Hi,

does anyone else experience random errors when deploying/reloading webapps
via ANT-tasks?

I don't have the stacktraces at hand right now, but e.g. one of the errors
was it couldn't find/access a .TLD inside a .JAR (Struts). IMHO this seems
like a timing problem when copying the required .JAR-files (TC is already
starting the webapp or I'm accessing a JSP page -  but not all required
files are already deployed/avaible in the webapp's directory).

Yann





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



Re: Tomcat 5.0.2 and IIS

2003-08-14 Thread vikas jain
Now I have changed the worker.properties file to this:
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
and uriworkermap.properties to:
/examples/*=ajp13
/examples/*.jsp=ajp13
/examples/servlet/*=ajp13
but not working :(

Vikas


From: John Turner <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: Tomcat 5.0.2 and IIS
Date: Thu, 07 Aug 2003 15:27:11 -0400
That last line in uriworkermap doesn't look right to me.

Also, I would refrain from changing the worker name.  I would call it 
ajp13, not "testWorker".  It shouldn't matter, but I have seen posts in the 
last year where JK and JK2 were picky sometimes about the worker name.

John

vikas jain wrote:

I haven't changed anything in these xml files except enableing invoker 
servlet and servlet reloading true. I was just trying to change 
worker.properties file and see if it works. But it's not working. what 
else could be wrong? I have following contents in worker.properties file

worker.list=testWorker
worker.testWorker.port=8009
worker.testWorker.host=localhost
worker.testWorker.type=ajp13
and in the uriworkermap.properties:
/examples/*=testWorker
/examples/*.jsp=testWorker
/examples/servlet/*=testWorker
/*.jsp=ajp13


From: John Turner <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: Tomcat 5.0.2 and IIS
Date: Thu, 07 Aug 2003 15:04:15 -0400
If your JK connector port in server.xml is 8009, then that is the port 
you should use in your properties files.

Please understand that Tomcat works with JK and JK2 by default.  Right 
"out of the box", with no changes whatsoever to server.xml.  You don't 
"need" to change anything until you are ready to do so.  Don't change 
something because it "looks wrong".

John

vikas jain wrote:

I'm sorry about not telling you whole thing. But I was not aware of 
that.
I looked into my server.xml and it says JK2 port is 8009. It's something 
like this:


   
But should I change the port to 8443 in properties file as it is saying 
redirectport = 8443.

Thanks,




From: John Turner <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: Tomcat 5.0.2 and IIS
Date: Thu, 07 Aug 2003 12:08:57 -0400
Let's step back a little:

CoyoteConnector is the default class that handled connections to 
Tomcat.

By default, there are two connectors configured in server.xml.  Both 
use CoyoteConnector.  One is for HTTP and is on port 8080 by default.  
The other is for JK/JK2 and is on port 8009 by default.

To use a web server redirector, you need a JK/JK2 connector configured 
in server.xml, and you need your .properties files to use the correct 
port number.  Otherwise, nothing you do has a chance of working.

Perhaps if you told us what you wanted to do, and what you have done 
(changed from the default) we could be of more help, but right now you 
are only giving us little tidbits of info in each post, making it 
pretty difficult to help you quickly.

John



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

-
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]
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Nightly Build - What's the /manager app's default username/password?

2003-08-14 Thread Joe Reger, Jr.

I just installed the 8/6 nightly.  What is the username/password by default
for the /manager app?  I usually set it in the installer but there wasn't an
installer this time.  Thanks,  Joe


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



RE: NetBeans Debug in JSP Tag Files

2003-08-14 Thread Angus Mezick
Don't mean to be annoying but this is EXTREMELY easy to do in eclipse.

> -Original Message-
> From: Carlos Cajina - Hotmail [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 6:19 PM
> To: Tomcat Users List
> Subject: Re: NetBeans Debug in JSP Tag Files
> 
> 
> Hi Shawn... Do you happen to have a How-To somewhere 
> about integrating
> Netbeans & Tomcat? :-) I don't want to use Netbeans' internal 
> Tomcat server
> and I've been struggling a little to use both together...
> 
> Regards,
> 
> Carlos
> 
> *** Oh, about your question, there's information at
> http://developers.sun.com/tools/javatools/tips/tip02-05-17.htm
l that I think
might be useful to you even if it's related to Forte for Java/Sun ONE
Studio
(you might also want to check out the viewlet)...

- Original Message - 
From: "Shawn Zernik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 08, 2003 12:40 PM
Subject: NetBeans Debug in JSP Tag Files


> Tomcat-Users:
>
> I have the tag lib working.  Thanks again.
>
> I was wondering if anyone could point me to a good tutorial on how to
use
> NetBeans with Tomcat that's running.  I can configure tomcat to allow
debug
> connections and connect using NetBeans, but once I'm online with the
server
> how do I trace through a JSP page?
>
> Shawn
>
>
> -
> 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]



Exception report

2003-08-14 Thread L. Karam
I am trying to configure an application of the TOMCAT 4.0 for the TOMCAT
4.1. E the following error happens:

javax.servlet.ServletException: Cannot allocate servlet instance for path
/ebs/servlet/servlets.servletEbs

 what it can be?

I only copied the folder for Tomcat 4.1.

Tks

Leandro


[1]... Sorry my english!


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



RE: Can I get an answer please -- Re: Why integrate Tomcat with a web server?

2003-08-14 Thread Noel J. Bergman
Nathan,

There are many facets to the subject, but if all you don't mind running all
of your domains in one process, have no need for load balancing, no need for
non-Tomcat features, etc., then running Tomcat directly is probably fine.
Historically (and structurally), Tomcat should prove more secure than an IIS
frontend.

--- Noel


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



RE: url-pattern and realms security

2003-08-14 Thread Madere, Colin
Sorry sorry,  elements are unique, just a copying error.

-Original Message-
From: Alexander Vavilin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2003 10:33 PM
To: Tomcat Users List
Subject: Re: url-pattern and realms security


Hello Colin,

I am not sure, but I think you cannot do this, first an 
element means an UNIQUE name. Can you understand ? You must give it
different names. Second thing, I never heard about  element.

Hope it will help.

-- 
Best regards,
Alexander
mailto:[EMAIL PROTECTED]

Friday, August 15, 2003, 1:38:17 AM, you wrote:

MC> So I looked at the servlet spec, but it doesn't specify (as far as I 
MC> read) how hierarchical security constraints should work and Tomcat 
MC> 4.1.27 seems to not do hiarachical constraints :)  Also searching 
MC> the list I didn't turn up results of this type, although I swear 
MC> I've seen this issue before...

MC> I want to secure "/*" with a standard role and then "/stuff1" with 
MC> another role and "/stuff2" with yet another role.

MC> So I put in the web.xml:

MC>   
MC>   
MC>   General Secured content
root  
MC>   /*  
MC>   GET  
MC>   POST  
MC>   
MC>   
MC>   standard  
MC> 
MC> 

MC>   
MC>   
MC>   General Secured content
root  
MC>   /stuff1  
MC>   GET  
MC>   POST  
MC>   
MC>   
MC>   usertype1  
MC> 
MC> 

MC>   
MC>   
MC>   General Secured content
root  
MC>   /stuff2  
MC>   GET  
MC>   POST  
MC>   
MC>   
MC>   usertype2  
MC> 
MC> 

MC> But the second two seem to be overriden by the first.  (A link on a 
MC> WebLogic site shows the above to work, but I don't have WebLogic)

MC> Is this known behavior or did I miss something?

MC> 
MC> -
MC> To unsubscribe, e-mail: [EMAIL PROTECTED]
MC> 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: Configuration of Customer Resource Factory in JNDI

2003-08-14 Thread jowenachua
I'm also working on a problem similar to this... anybody who has already 
worked on this ?

I came across this archive which I think is similar to this problem but to 
no avail.. i still can't make it work...






-Mensaje original-
De: Roberts, Eric [mailto:[EMAIL PROTECTED]
Enviado el: Jueves, 21 de Noviembre de 2002 10:27 a.m.
Para: Tomcat Users List
Asunto: Oracle Connection Pool - Global Naming Resource - HOW TO


I had problems earlier getting a Global Naming Resource database 
connection
pool to work with my Oracle db. The only reply I got was that someone else
had the same problem!

I now have it working, so for those interested, here is the HOW TO:

When defining the parameters for the db pool (say TESTdb) ensure that the
maxActive parameter is not set too high, i.e. that Oracle has enough
connections available for the pool (Oracle config parameter
max_connections). Mine was set to 100 in server.xml, and when the pool 
tried
to establish itself, it just sat and waited for 100 connections to become
available!

Every app that wants to use the connection pool should have a Context 
entry
in server.xml containing a ResourceLink to the name of the pool.



The application can then connect using:
 
Context ctx = null;
ctx = new InitialContext();
  Context envCtx = (Context) ctx.lookup("java:/comp/env/");
DataSource ds = (DataSource) envCtx.lookup("/testDb");
Connection conn = ds.getConnection();

No entries are required in the application web.xml to reference the
resource.

Have Fun!





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



Re: Question about ssl and tomcat

2003-08-14 Thread Bill Barker
You need to set the redirectPort attribute on the Connector to point to
Apache's SSL port.  However, since this defaults to 443, I'm guessing that
the real problem is that you don't have your JkMount statements defined in
your SSL VirtualHost.

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Greetings,
>
>  I'm hosting a ssl site with mod_ssl on the
>  apache server and I need to have it to connect to tomcat can't I
>  change one of the connector lines in server.xml to redirect the port?
>  Such as
>  redirectPort- If this Connector is supporting non-SSL requests, and a
>  request is received for which a matching 
>  requires SSL transport, Catalina will automatically redirect the
>  request to the port number specified here.
>
>  You see my website works fine going through 8080 but when I try to get
>  the https site to go through it - I get page can't be found or it
>  displays code instead of working.
>
>  Thanks,
>  Bobbie
>
> Bobbie Atristain
> Internet Systems Administrator
> Media General, INC.
> 804.649.6156




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



cannot resolve symbol

2003-08-14 Thread Bradberry, Rick
I have apache and tomcat up and running. Now I'm trying to compile mod_mk2
and get the following error.
Does any one know which jar file I'm missing?
 
[javac]
/export/home/jakarta-tomcat-connectors-4.1.27-src/util/java/org/apache/tomca
t/util/net/PoolTcpEndpoint.java:122: cannot resolve symbol
[javac] symbol  : class ThreadPoolRunnable 
[javac] location: class org.apache.tomcat.util.net.PoolTcpEndpoint
[javac] ThreadPoolRunnable listener;
[javac] ^
 
[javac]
/export/home/jakarta-tomcat-connectors-4.1.27-src/util/java/org/apache/tomca
t/util/net/SSLImplementation.java:114: cannot resolve symbol
[javac] symbol  : class JSSEImplementation 
[javac] location: package jsse
[javac] return new
org.apache.tomcat.util.net.jsse.JSSEImplementation();
 
Thnak for any help.
 
Rick


RE: moving from tomcat3 to tomcat4

2003-08-14 Thread Frank Cooley
Hi

My url is http://localhost:8080/workout/servlet/DbOpen  where the webapp is
workout. 

I pretty much just used the web.xml from tomcat3, and perhaps that is the
problem.  I didn't include any filters or resources or anything.

The logs show no errors and the manager shows the app as running.  

later
Your reply got me thinking about the url, and so I changed the servlet map
to /servlet/DbOpen, which seems to get to do the trick.  Thanks for your
help.

Frank
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 10:58 AM
To: Tomcat Users List
Subject: RE: moving from tomcat3 to tomcat4


Howdy,

>I'm a little late with this.  I have an app running under tomcat3 and
am
>trying to move it to tomcat4.1.18.

If you can, use 4.1.27.

>I moved the directory structure  to WEB-INF, added a context to
server.xml
>and a mapping to my web.xml file, but I get a file not found error when
I
>run the app and it tries the first servlet.  Here is a snippet of my
>web.xml

What URL are you using to access the servlet?  Are there any errors in
the tomcat logs?

Your web.xml and server.xml snippets look fine.  Is the web.xml
compliant with servlet specification 2.3 DTD?

Yoav Shapira



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]

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



Re: mod_jk-problem with rewritten urls

2003-08-14 Thread Bill Barker
This is supposed to be fixed in the upcoming mod_jk 1.2.5.  It's still being
evaluated, but you can get the early-access from
http://cvs.apache.org/~glenn/jakarta-tomcat-connectors-jk-1.2.5-src.tar.gz.



"Karsten Dello" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> dear list,
>
> i have a problem with the conjunctional use of mod_rewrite and mod_jk.
>
> i set up apache 2.0.40 and tomcat 4.1.27 and compiled mod_jk from source.
> i made them use the same webroot,
> and processing of jsp by tomcat works great as long as mod_rewrite is not
involved.
>
> but i have rewrite-rules which transform "static-looking" html-urls into
parameterized jsp-urls.
>
> in these cases, mod_rewrite seems to work, but the jsp isn't processed by
> tomcat,
> and instead its source is send to the client.
>
> an example: a client requests the url /fb-publikationen/60326.html
> which is supposed to be transformed to
/pd/viewdetail.jsp?db=60326&style=1,
> and afterwards to be processed by tomcat.
>
> the affected rewrite-rule is
> RewriteRule ^/fb-publikationen/([0-9]+).html$
/pd/viewdetail.jsp?db=$1&style=1 [PT]
>
> mod_rewite's log says:
> 160.45.94.239 - - [06/Aug/2003:03:38:19 +0200]
> [WEBSERVER/sid#8104640][rid#81ea9d8/initial] (2) init rewrite engine with
requested uri /fb-publikationen/60326.html
> 160.45.94.239 - - [06/Aug/2003:03:38:19 +0200]
> [WEBSERVER/sid#8104640][rid#81ea9d8/initial] (2)
rewrite/fb-publikationen/60326.html -> /pd/viewdetail.jsp?db=60326&style=1
> 160.45.94.239 - - [06/Aug/2003:03:38:19 +0200]
> [WEBSERVER/sid#8104640][rid#81ea9d8/initial] (2) forcing
'/pd/viewdetail.jsp' to get passed through to next API URI-to-filename
handler
>
> mod_jk's log says:
> [Wed Aug 06 03:38:19 2003]  [jk_uri_worker_map.c (501)]: Attempting to map
URI '/fb-publikationen/60326.html'
> [Wed Aug 06 03:38:19 2003]  [jk_uri_worker_map.c (623)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
>
> so it seems that the url is rewritten,
> but after that it is not send to tomcat again,
> as i can't find the transformed jsp-url  in the mod_jk-log.
>
> is this a conceptual problem,
> or a configuration error?
>
> any help would be appreciated,
>
> best regards
>
> karsten dello




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



Re: Anyone running jk2 with Stronghold 4.0?

2003-08-14 Thread Eric J. Pinnell
Hi,

I'm going to guess an say that you should try to install it just like the
instructions say to install JK2 on apache.

As I remember stronghold is apache with a proprietary ssl module.  I don't
see how that would prevent the apache from loading the JK2 module.

-e

On Fri, 8 Aug 2003, jherschel wrote:

> I emailed the list earlier in the week and was told that the WARP connector
> was deprecated and not much fun to use.  Unfortunately, we use Stronghold on
> our web servers here and WARP is the only connector provided.  Has anyone on
> this list gotten jk2 to run with Stronghold? How did you get it installed?
>
> I mailed the Stronghold list and have not gotten any kind of reply and
> Google doesn't turn anything up.
>
> Thanks!
>
> James
>
>
> -
> 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 vs. Apache Performance Comparison for static HTML

2003-08-14 Thread Jeff Tulley
It probably bears repeating the link to Craig's analysis of Apache vs
Tomcat standalone and the procedure for determining what is best FOR
YOUR APPLICATION:

http://marc.theaimsgroup.com/?l=tomcat-user&m=104874913017036&w=2

BTW - as somebody alluded to earlier, this link was found through the
FAQ, which describes at length the reasons why or why not to integrate
with Apache.

Jeff Tulley  ([EMAIL PROTECTED])
(801)861-5322
Novell, Inc., The Leading Provider of Net Business Solutions
http://www.novell.com

>>> [EMAIL PROTECTED] 8/8/03 11:01:01 AM >>>

Nice.  I'm bookmarking this post for the future.  'Nuf said.  Thanks,
Yoav!

John

Shapira, Yoav wrote:

> Howdy,
> 
> 
>>Of course not.  I'm only regergitating stuff I have read.  But I
have
> 
> seen
> 
>>it from several different sources, so I took it as truth.  Do you
have
>>benchmarks to prove otherwise?
> 
> 
> It could be the sources you read are outdated.  I don't question
their
> accuracy at the time they came out, although I don't even know what
> sources you're talking about (and it doesn't matter).

...

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



unexpected java.lang.NoClassDefFoundError: javax/management/MBeanRegistration

2003-08-14 Thread Dmitry Beransky
I'm trying to integrate a custom compiled Tomcat 4.1.27 with Intellj IDEA 
(using a third-party plugin allowing invocation of Tomcat 4.1 from inside 
IDEA).

Tomcat quits almost immediately with the following exception:

java.lang.reflect.InvocationTargetException
	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)
Caused by: java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
	at java.lang.ClassLoader.findBootstrapClass(Native Method)
	at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:723)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
	[...]

I know for a fact that MBeanRegistration class is available as part of 
mx4j-jmx.jar package.  Below is included the entire command line that IDEA 
uses to start Tomcat.

Any thoughts on what might be causing this?  I've found a post suggesting 
that the culprit might be "-Djava.endorsed.dirs".  Is there any merit to 
this claim?

Thanks
Dmitry
C:\java\j2sdk1.4.1_02\bin\javaw.exe 
-Djava.endorsed.dirs=c:\projects\jakarta-tomcat-4.1.27-src\build\bin;c:\projects\jakarta-tomcat-4.1.27-src\build\common\libc:\projects\jakarta-tomcat-4.1.27-src\build\common\endorsed 
-Dcatalina.base=C:\Documents and 
Settings\dberansky\.IntelliJIdea\system\tomcat_JCMS_bbf5da37 
-Dcatalina.home=c:\projects\jakarta-tomcat-4.1.27-src\build 
-Djava.io.tmpdir=c:\projects\jakarta-tomcat-4.1.27-src\build\temp 
-classpath 
C:\java\j2sdk1.4.1_02\lib\tools.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\bin\bootstrap.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\activation.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\ant.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\commons-collections.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\commons-dbcp.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\commons-logging-api.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\commons-pool.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jasper-compiler.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jasper-runtime.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jdbc2_0-stdext.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jndi.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\jta-spec1_0_1.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\mail.jar;c:\projects\jakarta-tomcat-4.1.2!
7-src\
b 
uild\common\lib\naming-common.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\naming-factory.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\naming-resources.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\common\lib\servlet.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\catalina-ant.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\catalina.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-beanutils.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-digester.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-fileupload-1.0.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-logging.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\commons-modeler.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\jaas.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\jakarta-regexp-1.2.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\mx4j-jmx.jar;c:\!
projec
t 
s\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-common.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-default.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-invoker.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-manager.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\servlets-webdav.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-coyote.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-http11.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-jk.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-jk2.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-util.jar;c:\projects\jakarta-tomcat-4.1.27-src\build\server\lib\tomcat-warp.jar 
org.apache.catalina.startup.Bootstrap start

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


Re: Re: Oracle connection pooling

2003-08-14 Thread 苗启广


ÔÚ 2003-08-09 00:07:00 ÄúдµÀ£º
>Hi,of you ? Could you tell me ? Thanks~~
>
>Firewalls, and I'm not speaking for all of them, as a rule of thumb close
>_idle_ connections after an hour.
>
>Your connections should be done well before that.
>
>-e
>
>On Fri, 8 Aug 2003, Cristopher Daniluk wrote:
>
>> We are running a fairly large ecommerce site consisting of 3 apache
>> 2.0.48 servers being balanced between using UltraMonkey/ldirector and 2
>> tomcat servers with AJP1.3. Everything is Linux except the back end
>> which is a fairly hefty and firewalled Sun running Oracle8i.
>>
>> The webapps build a connection pool to oracle via the oracle.jdbc.pool.*
>> connection pool. The pool instantiates fine and everything is great, but
>> gradually the pool begins to break down. Idle connections are closed by
>> Oracle (not sure if its oracle itself or the fw..), but the oracle pool
>> doesn't figure it out. If someone happens to get the dead connection,
>> Tomcat completely hangs on all threads until the session-timeout
>> expires. Even the session replication code stops and the apache servers
>> and the other tomcat in the cluster mark it offline. During the peak
>> traffic it isn't so bad but at the end of the day after load goes back
>> down, it's a big problem.
>>
>> We initially used DBCP but it didn't work for crap with Oracle. Is there
>> a better pool to use with Oracle and Tomcat in a cluster environment and
>> if not, is there a way we can get the Oracle pool to recycle some of
>> these bad connections without blowing up the server?
>>
>> Thanks,
>>
>> Cris Daniluk
>>
>> -
>> 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]
>
>
 mqg

- SOUVENIR --- .
| Souvenir of China |
| A Good Place for You  |
`--> http://www.souvenirchina.com -'
mailto:[EMAIL PROTECTED]




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



Installing IIS Certificates in Tomcat?

2003-08-14 Thread Robert J. Sanford, Jr.
I'm running Tomcat inside of jboss-3.2.1_tomcat-4.1.24 but I think the issue
will be the same independent of that. The platform is Win2K SP3. The plan is
to use Tomcat's HTTP server instead of IIS with the AJP ISAPI connector.
Since all requests are being handled by servlets with no static content why
even get IIS involved? Anyway...

I attempted to take an existing certificate whose request was generated by
IIS and import it into a keystore and use that as the basis for my SSL
crypto. When I attempted to connect via IE the connection failed (a site not
found error) and the exception tree at the bottom of this message was
generated. I spent a lot of time reading the JBoss SSL docs, reading the
Tomcat SSL docs, searching the Tomcat and JBoss archives, playing with my
configuration, trying to figure out what ciphers were installed, making sure
that the CA certificate (for testing we use an internal CA) was imported
into the keystore, etc., etc., etc. None of it worked. Everything resulted
in the exception chain below or something similar.

Finally I just decided to go through the instructions for generating a new
local key, a new certificate request, get the certificate from my internal
certificate authority and import everything into a new keystore. It worked
with a minor warning saying that the machine name on the certificate did not
match the actual machine name. I'm not sure how to resolve that immediately
but I don't see that as a major issue right now since this is only for
testing purposes.

My big questions are:
1) Is there any way that I can import an
   existing certificate that was generated
   based on a request originated in IIS
   into my keystore and have that be
   accepted by Tomcat?
2) Or, do I have to go to my IT manager
   and tell him that he needs to go to
   Verisign and get additional
   certificates for IP addresses that
   we already have certificates for?
3) Or, should I just use IIS and the
   existing certificates to front Tomcat?

Many thanks for the assist!

rjsjr

2003-08-07 14:22:55,919 DEBUG [org.apache.tomcat.util.net.PoolTcpEndpoint]
Handshake failed
javax.net.ssl.SSLHandshakeException: no cipher suites in common
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SunJSSE_aw.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.SunJSSE_aw.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SunJSSE_aw.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactor
y.java:290)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:540)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:536)

2003-08-07 14:22:55,939 DEBUG [org.apache.tomcat.util.net.PoolTcpEndpoint]
Handshake failed
javax.net.ssl.SSLException: Unsupported SSL v2.0 ClientHello
at com.sun.net.ssl.internal.ssl.InputRecord.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.handshake(JSSESocketFactor
y.java:290)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:540)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:536)


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



Re: Freeing processors

2003-08-14 Thread Daniel Carlsson
Hi

The connectionTimeout parameter does not solve my problem. I don't know exactly what 
it does but it does not free a busy processor after some time. I will illustrate my 
problem with som source code. My servlet is sleeping 5 min to simulate that it is 
hanged/deadlocked. A wan't some way to automatcly kill/abort it after say 20s.

The servlets doGet method:

PrintWriter out = response.getWriter();
out.println("Start");
out.flush();
try {
Thread.currentThread().sleep(30); // Simulate hang
} catch(Exception x) {
x.printStackTrace();
}
out.println("Finish");

My server.xml





  








Is there a way to do this? If tomcat can't can I do it myself with some extra thread 
monitoring and releaseing? I have tried killing (with Thread.destroy()) the thread but 
this doesn't seem to work, I only run out of memory after a while becuase resource 
probably arent freed correctly. How do I free a processor from my code?



Med vänliga hälsningar

Daniel Carlsson 
Gimlisoft AB
Email: [EMAIL PROTECTED]
Tel: 0709-744570, 031-189024

-Ursprungligt meddelande-
Från: Mauricio Nuñez <[EMAIL PROTECTED]>
Skickat: 2003-08-07  16:51:56
Till: Tomcat Users List
Ämne: Re: Freeing processors


> Hi
> 
> the HttpConnector haa a connectionTimeout parameter. Set this to a low 
> razonable value, as 2 ( 20 seconds )
> 
> I was having a similar problem, using the JkConnector, but because my app 
> wasn't releasing db connections to the dbcp pool. Then, the "run out of 
> processors ..." is more a signal the leakaging in your app. (IMHO :-)
>  
> Check the timeout of your CORBA connections if available.
> Att
> 
> MN
> 
> 
> El Jue 07 Ago 2003 08:12, Daniel Carlsson escribió:
> > Hi
> >
> > My problem is that tomcat runs out of processors and I see "No processor
> > available, rejecting this connection" in the log file. By reading earlier
> > posts a I understand that each processor is a thread and is not freed until
> > it is returned by my code, my code is hanging somewhere.
> >
> > The problem is that my servlet (the only thing running in tomcat) only
> > "forwards" requests threw CORBA to a big app that I can't change, and its
> > in their the code hangs.
> >
> > So, how can I solve this? The perfect solution would be if tomcat could
> > automaticly free processors after some timeout ( 60 s) but I have not found
> > such a feature/setting, does it exist? If not, could I do some small hack
> > in my servlet that monitors and somehow terminates (kills thread or
> > something) the request after 60s and therby freeing the processor?
> >
> > I am running tomcat 4.1.12, java 1.4.0_04, redhat linux 9. I am using the
> > HttpConnector.
> >
> >
> > Thank you
> >
> > Daniel Carlsson
> > Gimlisoft AB
> > Email: [EMAIL PROTECTED]
> > Tel: 0709-744570, 031-189024
> >
> > -
> > 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: url-pattern and realms security

2003-08-14 Thread Alexander Vavilin
Hello Colin,

I am not sure, but I think you cannot do this, first an
 element means an UNIQUE name. Can you
understand ? You must give it different names. Second thing, I never
heard about  element.

Hope it will help.

-- 
Best regards,
Alexander
mailto:[EMAIL PROTECTED]

Friday, August 15, 2003, 1:38:17 AM, you wrote:

MC> So I looked at the servlet spec, but it doesn't specify (as far as I read)
MC> how hierarchical security constraints should work and Tomcat 4.1.27 seems to
MC> not do hiarachical constraints :)  Also searching the list I didn't turn up
MC> results of this type, although I swear I've seen this issue before...

MC> I want to secure "/*" with a standard role and then "/stuff1" with another
MC> role and "/stuff2" with yet another role.

MC> So I put in the web.xml:

MC>   
MC>   
MC>   General Secured content root  
MC>   /*  
MC>   GET  
MC>   POST  
MC>   
MC>   
MC>   standard  
MC>   
MC> 

MC>   
MC>   
MC>   General Secured content root  
MC>   /stuff1  
MC>   GET  
MC>   POST  
MC>   
MC>   
MC>   usertype1  
MC>   
MC> 

MC>   
MC>   
MC>   General Secured content root  
MC>   /stuff2  
MC>   GET  
MC>   POST  
MC>   
MC>   
MC>   usertype2  
MC>   
MC> 

MC> But the second two seem to be overriden by the first.  (A link on a WebLogic
MC> site shows the above to work, but I don't have WebLogic)

MC> Is this known behavior or did I miss something?

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


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



Re: unexpected java.lang.NoClassDefFoundError: javax/management/MBeanRegistration

2003-08-14 Thread Dmitry Beransky
At 10:07 AM 8/8/2003, Jean-Francois Arcand wrote:

This plug-in is for which version?
The plugin itself is from Sean Taylor 
(http://www.objectorientedsoftware.com/projects/index.html).  I'm using 
IDEA v. 3.0.4

Can you post the entire stack trace?
Exception during startup processing
java.lang.reflect.InvocationTargetException
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)
Caused by: java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:723)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at 
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1097)
at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:579)
at 
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246)
at org.apache.catalina.startup.Catalina.start(Catalina.java:511)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
... 5 more 

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


jstl/sql

2003-08-14 Thread Daniel Herbison
I'm trying to use the sql tag in a simple jsp.  The sql tag seems to be
ignored!  I can see the query, below, on the web-page and the entire 
  COIDW Oracle Datasource
  jdbc/coidw
  javax.sql.DataSource
  Container
 
 
 
   http://java.sun.com/jstl/sql 

  /WEB-INF/taglibs/sql.tld
 
 
 
   http://java.sun.com/jstl/core 

  /WEB-INF/taglibs/c.tld
 
 
And my jsp page has this:
 

 SELECT * FROM app_user





  1   2   3   4   5   6   7   8   9   >