SSL doesn't work in Tomcat 4.01

2001-11-13 Thread Miao, Franco CAWS:EX

What I did:

used command "keytool -genkey -keyalg RSA  -alias tomcat" generate a
.keystore file, then copied it to C:\ , and modified the server.xml file as
following. But no luck with SSL test, pls advise, thanks!  


 


  





Franco

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Tomcat 3.2.3 - Image loading problem

2001-11-13 Thread Marko Sarunac

P.S. Apache is runnins as a webserver and Tomcat as an appserver and are
connected using mod_jk


-Original Message-
From: Marko Sarunac [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 8:15 PM
To: 'Tomcat Users List'
Subject: Tomcat 3.2.3 - Image loading problem


I have a problem where the first time a user visits a site images do not
show up...
However if they were to reload the page all images com up properly.
This is on session basis.
If i close my browser and re-open same thing happens


Any ideas?


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Tomcat 3.2.3 - Image loading problem

2001-11-13 Thread Marko Sarunac

I have a problem where the first time a user visits a site images do not
show up...
However if they were to reload the page all images com up properly.
This is on session basis.
If i close my browser and re-open same thing happens


Any ideas?


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: how to embed Javascript in Jsp?

2001-11-13 Thread Scott Walter

you could try:

<%
  out.println("");
%>

--- "Miao, Franco CAWS:EX"
<[EMAIL PROTECTED]> wrote:
> 
> 
> 
> Basically I would like to put javascript file .js
> inside <%%>,
> just don't know the syntax. thanks!
> 
> 
> Franco 
> 
> --
> To unsubscribe:  
> 
> For additional commands:
> 
> Troubles with the list:
> 
> 


=
~~~
Scott

__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




how to embed Javascript in Jsp?

2001-11-13 Thread Miao, Franco CAWS:EX




Basically I would like to put javascript file .js inside <%%>,
just don't know the syntax. thanks!


Franco 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: configuring JNDI resources in web.xml

2001-11-13 Thread Craig R. McClanahan



On Tue, 13 Nov 2001, Christos Karras wrote:

> Date: Tue, 13 Nov 2001 22:55:07 -0500
> From: Christos Karras <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: configuring JNDI resources in web.xml
>
> According to the Tomcat JNDI Resources HOWTO, if I want to use a JDBC
> connection pool, I need to add settings both in server.xml and
> WEB-INF/web.xml. Would it be possible to configure it entirely in
> web.xml?
>

No, there is no way to do this.  The web.xml deployment descriptor format
is portable to all servlet containers, and the separation of configuration
information lets you modify the details of the data source configuration
*without* modifying the web application itself.

If you are dead set on configuring data sources inside your web.xml file,
you should investigate using a connection pool that is configured based on
servlet connection properties.

Craig McClanahan


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




configuring JNDI resources in web.xml

2001-11-13 Thread Christos Karras

According to the Tomcat JNDI Resources HOWTO, if I want to use a JDBC connection pool, 
I need to add settings both in server.xml and 
WEB-INF/web.xml. Would it be possible to configure it entirely in web.xml? 

I would like to have something equivalent to the following example, but that would be 
stored in web.xml. That way my configuration would be independant of the servlet 
container, and it would make team development easier (where each developper has his 
own tomcat server) :
  
  

  user
  dbusername


  password
  dbpassword


  driverClassName
  org.hsql.jdbcDriver


  driverName
  jdbc:HypersonicSQL:database

  

Is it possible? 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: proxy server time outs

2001-11-13 Thread Craig R. McClanahan



On Tue, 13 Nov 2001, Tom Drake wrote:

> Date: Tue, 13 Nov 2001 18:11:04 -0800
> From: Tom Drake <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
>  Tom Drake <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: proxy server time outs
>
> Depending on the proxy server, there may be a configurable
> time-out.
>
> Your web-application should spit back the HTTP header and
> the beginning of your HTML document before you start the query.
> Make sure to flush the output stream.
>
> If this is not enough, and you are producing an HTML response,
> you could launch a thread in your servlet that
> kicks out a space ' ' to the servlet output stream every so often.
> When your query finally completes, do whatever is necessary
> to stop the thread, then close the output stream and return.
>

One approach that is common on long-running queries is to run them in an
independent thread on the server, and then create an initial response page
that says "Processing ... please wait".  At the top of the page, use a
meta tag to automatically refresh every ten seconds or so.

As each request comes in, the servlet checks if the query is complete yet.
If it's still running, return a "Still processing ..." page.  If it's
done, send the resulting report.

Of course, there are some much better options (IMHO):

* Redesign your application's queries so that they need to gather
  less information at a time, and are thus less prone to timeout.
  If you're having to retrieve 1000 rows for a big report, design
  things so that you can paginate the response 20 rows at a time.
  Users are *much* less likely to cancel and go elsewhere when the
  system is more responsive in this way.

* Work with your database administrator (DBA) to fine-tune the actual
  queries you are using to retrieve information.  I've seen 100x
  (two orders of magnitude) improvements in query response time from
  simple changes in the selection criteria, and/or additions of
  appropriate indexes to the database.

Craig McClanahan


>
> - Original Message -
> From: "Evan Swanson" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 13, 2001 5:30 PM
> Subject: proxy server time outs
>
>
> | I have an application that queries a very large database.
> | It takes a long time but there does not seem to be anyway around that.
> | This all works fine until I use it with a proxy server.
> |
> | The proxy server times out because there is such a slow response.
> |
> | Is there any way to tell the proxy server "Hold on, its comming"?
> |
> |
> | --
> | To unsubscribe:   
> | For additional commands: 
> | Troubles with the list: 
> |
> |
> |
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Tomcat 3.3 Selt-test failed when protocol is HTTP 1.1

2001-11-13 Thread kleung

Hi,
 
I run into a problem when I try to varifying the installation of Tomcat 3.3-3 and 
Apache 1.3.19 on the Red Hat Linux 7.1 box. The installation of Apache 1.3.19 before 
the installation  of Tomcat 3.3-3 worked. I was able to get statics page from it. Next 
I install the Tomcat 3.3-3. Here is a listing of modules I installed: 
tomcat 3.3-3, 
tomcat-webapps-3.3-3, 
tomcat-mod-3.3-1. 
 
I run the JSP test with HTTP/1.0  and HTTP:/1.1. The one with HTTP/1.0 is fined, But 
the test with HTTP protocol set to HTTP/1.1 failed all tests that required the HTTP 
1.1 setting. Please help me with this problem. I assume that this is configuration 
problem. But the way the Expected protocal pull down ways set to HTTP/1.0 after Submit 
Query buttom was pressed. Hence, the following listing ways show the HTTP/1.0 and the 
text "Running test-tomcat 8080 192.168.0.126 HTTP/1.1"
indicate the type of protocol was selected.
 
***  PASSING TESTS ***
Tomcat Self-test
This page will show the result of executing the sanity test suite. 
Target:  file params dispatch get requestMap post wrong_request restricted jsp 
unavailable headers security_chk_url security_chk aaa special tomcat-standalone 
tomcat-apache client 
Debug: 
Port:  
Host:  
Expected protocol:  HTTP/1.0 HTTP/1.1 ( use HTTP/1.1 when testing with Apache or a 1.1 
server connector ) 
 
init

Running test-tomcat 8080 192.168.0.126 HTTP/1.0 


jsp



Test Revision: 1.47 $
Executed in 11099 Milliseconds.

FAILED Tests
PASSED Tests
OK ( ) GET /test/jsp/special-name.foo.jsp HTTP/1.0 
OK ( ) GET /test/jsp/HelloWorld.jsp HTTP/1.0 
OK ( ) GET /test/doesNotExist.jsp HTTP/1.0 
OK ( Getting -- HTTP/1.0 302 Found ) GET /test/jsp HTTP/1.0 
OK ( ) GET /test/.jsp HTTP/1.0 
OK ( ) GET /test/jsp/HelloWorld.jsp?? HTTP/1.0 
OK ( ) GET /test/jsp/HelloWorld.jsp?a=b&c=d HTTP/1.0 
OK ( ) GET /test/jsp/HelloWorld.jsp?&& HTTP/1.0 
OK ( ) GET /test/jsp/declaration/IntegerOverflow.jsp HTTP/1.0 
OK ( ) GET /test/jsp/error/err.jsp HTTP/1.0 
OK ( ) GET /test/jsp/forward/forward.jsp HTTP/1.0 
OK ( ) GET /test/jsp/jsptoserv/jsptoservlet.jsp HTTP/1.0 
OK ( ) GET /test/jsp/initDestroy.jsp HTTP/1.0 
OK ( ) GET /test/jsp/classTest.jsp HTTP/1.0 
OK ( ) GET /test/jsp/import.jsp HTTP/1.0 
OK ( ) GET /test/jsp/buffer.jsp HTTP/1.0 
OK ( ) GET /test/jsp/buffer1.jsp HTTP/1.0 
OK ( ) GET /test/jsp/buffer2.jsp HTTP/1.0 
OK ( ) GET /test/jsp/buffer3.jsp HTTP/1.0 
OK ( ) GET /test/jsp/buffer4.jsp HTTP/1.0 
OK ( ) GET /test/jsp/comments.jsp HTTP/1.0 
OK ( ) GET /test/jsp/parse.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageInfo.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageLanguage.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageIsThreadSafe.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageSession.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageAutoFlush.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageError.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageExtends.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageIsErrorPage.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageContentType.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageImport2.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageImport.jsp HTTP/1.0 
OK ( ) GET /test/jsp/beanTest1.jsp HTTP/1.0 
OK ( ) GET /test/jsp/beanTest2.jsp HTTP/1.0 
OK ( ) GET /test/jsp/beanScopePage.jsp HTTP/1.0 
OK ( ) GET /test/jsp/beanScopeSession.jsp HTTP/1.0 
OK ( ) GET /test/jsp/implicitOut.jsp HTTP/1.0 
OK ( ) GET /test/jsp/implicitConfig.jsp HTTP/1.0 
OK ( ) GET /test/jsp/implicitException.jsp HTTP/1.0 
OK ( ) GET /test/jsp/implicitPageContext.jsp HTTP/1.0 
OK ( ) GET /test/jsp/implicitContext.jsp HTTP/1.0 
OK ( ) GET /test/jsp/implicitRequest.jsp HTTP/1.0 
OK ( ) GET /test/jsp/implicitResponse.jsp HTTP/1.0 
OK ( ) GET /test/jsp/implicitSession.jsp HTTP/1.0 
OK ( ) GET /test/jsp/implicitPageContext.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageInvalid.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageDouble.jsp HTTP/1.0 
OK ( ) GET /test/jsp/pageContent3.jsp HTTP/1.0 
OK ( ) GET /test/jsp/bigDeclaration.jsp HTTP/1.0 
OK ( ) GET /test/jsp/include/include.jsp HTTP/1.0 
OK ( ) GET /test/jsp/chinese.jsp HTTP/1.0 
OK ( ) GET /test/jsp/japanese.jsp HTTP/1.0 
OK ( ) GET /test/jsp/extends1.jsp HTTP/1.0 
OK ( ) GET /test/jsp/extends2.jsp HTTP/1.0 
OK ( ) GET /test/jsp/extends3.jsp HTTP/1.0 
OK ( ) GET /test/jsp/extends4.jsp HTTP/1.0 

   FAILING TESTS  
Tomcat Self-test
This page will show the result of executing the sanity test suite. 
Target:  file params dispatch get requestMap post wrong_request restricted jsp 
unavailable headers security_chk_url security_chk aaa special tomcat-standalone 
tomcat-apache client 
Debug: 
Port:  
Host:  
Expected protocol:  HTTP/1.0 HTTP/1.1 ( use HTTP/1.1 when testing with Apache or a 1.1 
server connector ) 
 
init

Running test-tomcat 8080 192.168.0.126 HTTP/1.1 
---

Are the docs in pdf format anywhere?

2001-11-13 Thread Rhugga


I absolutely despise cludgy web-based documentation. Are the tomcat docs
available in a txt/pdf/doc format anywhere?


Thanks,
CC


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: cannot execute binary file

2001-11-13 Thread Tom Drake

You should not have to unzip your classes12.zip file. This file is, for
all intents and purposes, a jar file.

Looking at your error message, I'm willing to bet that the problem is
in your security.policy file that tomcat is using. Most likely, it is not
allowing you to load classes that are in some other path. The quick
fix is to copy the classes12.zip into your tomcat/lib directory.

- Original Message -
From: "Eric Strain" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 5:36 PM
Subject: Re: cannot execute binary file


| Hi:
| I hate to be simplistic, but, is your classes12.zip file still compressed?
| If so just unzip it to a safe location and alter your classpath
|
|
| >From: "Noble Long" <[EMAIL PROTECTED]>
| >Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
| >To: <[EMAIL PROTECTED]>
| >Subject: cannot execute binary file
| >Date: Tue, 13 Nov 2001 14:41:47 -0600
| >
| >I am using the Oracle jdbc thin client in my application. I added it to
my
| >classpath /usr/local/classes12.zip , but when I start Tomcat I am
getting -
| >
| >bin/tomcat.sh: /usr/local/classes12.zip: cannot execute binary file
| >
| >I tried other jar, files, etc. and everyone I transefered either in
binary
| >mode or ascii via FTP, XMODEM or ZMODEM gives me the same message.
| >
| >Is my file being corrupted between windows and linux. I am working with a
| >remote telnet session so I can't exactly download from Oracle's website
to
| >that machine. Funny thing is ... I have the same Red Hat 6.2 environment
| >here except I'm using tomcat 3.2.3 instead of 3.2.1 (would it make a
| >difference?)
| >
| >Noble



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: proxy server time outs

2001-11-13 Thread Tom Drake

Depending on the proxy server, there may be a configurable
time-out.

Your web-application should spit back the HTTP header and
the beginning of your HTML document before you start the query.
Make sure to flush the output stream.

If this is not enough, and you are producing an HTML response,
you could launch a thread in your servlet that 
kicks out a space ' ' to the servlet output stream every so often.
When your query finally completes, do whatever is necessary
to stop the thread, then close the output stream and return.


- Original Message - 
From: "Evan Swanson" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 5:30 PM
Subject: proxy server time outs


| I have an application that queries a very large database. 
| It takes a long time but there does not seem to be anyway around that.
| This all works fine until I use it with a proxy server. 
| 
| The proxy server times out because there is such a slow response.
| 
| Is there any way to tell the proxy server "Hold on, its comming"?
| 
| 
| --
| To unsubscribe:   
| For additional commands: 
| Troubles with the list: 
| 
| 
| 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: cannot execute binary file

2001-11-13 Thread James Chuang

Oracle JDBC thin drivers are supposed to be used as .zip.  I've never had to
uncompress them, neither on NT, Solaris, or Linux.

The question is, why is tomcat trying to execute that file?  It sounds like
there is something wrong with the startup command.  How did you add it to
your classpath?  in TOMCAT_OPTS?

jchuang

- Original Message -
From: "Eric Strain" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 5:36 PM
Subject: Re: cannot execute binary file


> Hi:
> I hate to be simplistic, but, is your classes12.zip file still compressed?
> If so just unzip it to a safe location and alter your classpath
>
>
> >From: "Noble Long" <[EMAIL PROTECTED]>
> >Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Subject: cannot execute binary file
> >Date: Tue, 13 Nov 2001 14:41:47 -0600
> >
> >I am using the Oracle jdbc thin client in my application. I added it to
my
> >classpath /usr/local/classes12.zip , but when I start Tomcat I am
getting -
> >
> >bin/tomcat.sh: /usr/local/classes12.zip: cannot execute binary file
> >
> >I tried other jar, files, etc. and everyone I transefered either in
binary
> >mode or ascii via FTP, XMODEM or ZMODEM gives me the same message.
> >
> >Is my file being corrupted between windows and linux. I am working with a
> >remote telnet session so I can't exactly download from Oracle's website
to
> >that machine. Funny thing is ... I have the same Red Hat 6.2 environment
> >here except I'm using tomcat 3.2.3 instead of 3.2.1 (would it make a
> >difference?)
> >
> >Noble
>
>
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: cannot execute binary file

2001-11-13 Thread Eric Strain

Hi:
I hate to be simplistic, but, is your classes12.zip file still compressed? 
If so just unzip it to a safe location and alter your classpath


>From: "Noble Long" <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: cannot execute binary file
>Date: Tue, 13 Nov 2001 14:41:47 -0600
>
>I am using the Oracle jdbc thin client in my application. I added it to my 
>classpath /usr/local/classes12.zip , but when I start Tomcat I am getting -
>
>bin/tomcat.sh: /usr/local/classes12.zip: cannot execute binary file
>
>I tried other jar, files, etc. and everyone I transefered either in binary 
>mode or ascii via FTP, XMODEM or ZMODEM gives me the same message.
>
>Is my file being corrupted between windows and linux. I am working with a 
>remote telnet session so I can't exactly download from Oracle's website to 
>that machine. Funny thing is ... I have the same Red Hat 6.2 environment 
>here except I'm using tomcat 3.2.3 instead of 3.2.1 (would it make a 
>difference?)
>
>Noble


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




proxy server time outs

2001-11-13 Thread Evan Swanson

I have an application that queries a very large database. 
It takes a long time but there does not seem to be anyway around that.
This all works fine until I use it with a proxy server. 

The proxy server times out because there is such a slow response.

Is there any way to tell the proxy server "Hold on, its comming"?


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Where to put .properties so web app finds it

2001-11-13 Thread Denis Balazuc

We use property files to configure our framework when it gets loaded by
Tomcat through the WAR files.
The most convenient place we've found for those files is under
WEB-INF/classes as it is the root of the classpath of your WAR app
and you can retrieve your file using
ClassLoader.getResource("property.properties") without having to parse or
create any URL or the like...

So, it seems a convenient place to do so.
You could as well have an entry in web.xml telling your framework where the
property files are located, but you will have to find a mean to retrieve
this setting. It is not so good if your framework is not servlet-oriented
(in this case, you don't have direct access to ServletConfig, where the
setting will be located).

You can also use a -D on the Tomcat command line (by using TOMCAT_OPTS in
Tomcat's startup scripts) but this is the worst scenario as you have to
modify a file that does belong to Tomcat and not to your App.

Hope this helps.

Denis


- Original Message -
From: "MacDonald, Todd" <[EMAIL PROTECTED]>
To: "Tomcat-User (E-mail)" <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 5:59 PM
Subject: Where to put .properties so web app finds it


> I've got a .properties file for settings in the web app that might be
> configured differently depending on which server the .war might be
dropped.
>
> It obviously doesn't belong in the .war itself.  Where is the recommended
> place to put such configuration files in Tomcat 4 so that the app will
find
> it?
>
> I'm trying hard not to modify the default configuration of T4 much until I
> know more about it.
>
> -T
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Tomcat 3.2.3 and struts 1.1

2001-11-13 Thread Marko Sarunac

I got tomcat 3.2.3 running with struts 1.1 on linux without problems.

However, on NT, which sadly i have to use as my dev boxit doesn't 
start and it gives me the following...

Any help is greatelly appreciated!!!




D:\jakarta-tomcat-3.2.3\bin>tomcat run
Including all jars in D:\jakarta-tomcat-3.2.3\lib in your CLASSPATH.

Using CLASSPATH: D:\jakarta-tomcat-3.2.3\classes;D:\jakarta-tomcat-3.2.3
\lib\ant
.jar;D:\jakarta-tomcat-3.2.3\lib\jasper.jar;D:\jakarta-tomcat-3.2.3
\lib\jaxp.jar
;D:\jakarta-tomcat-3.2.3\lib\parser.jar;D:\jakarta-tomcat-3.2.3
\lib\servlet.jar;
D:\jakarta-tomcat-3.2.3\lib\webserver.jar;D:\jakarta-tomcat-3.2.3
\classes;D:\jak
arta-tomcat-3.2.3\lib\ant.jar;D:\jakarta-tomcat-3.2.3
\lib\jasper.jar;D:\jakarta-
tomcat-3.2.3\lib\jaxp.jar;D:\jakarta-tomcat-3.2.3
\lib\parser.jar;D:\jakarta-tomc
at-3.2.3\lib\servlet.jar;D:\jakarta-tomcat-3.2.3
\lib\webserver.jar;C:\jdk1.3.1_0
1\lib\tools.jar;C:\jdk1.3.1_01\lib\tools.jar

2001-11-13 13:59:43 - ContextManager: Adding context Ctx( /examples )
2001-11-13 13:59:43 - ContextManager: Adding context Ctx( /admin )
Starting tomcat. Check logs/tomcat.log for error messages
2001-11-13 13:59:53 - ContextManager: Adding context Ctx( /mysite )
2001-11-13 13:59:53 - ContextManager: Adding context Ctx(  )
2001-11-13 13:59:53 - ContextManager: Adding context Ctx( /test )
java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at org.apache.tomcat.loader.AdaptiveClassLoader12.doDefineClass
(Adaptive
ClassLoader12.java:93)
at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass
(AdaptiveClassL
oader.java:509)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at org.apache.struts.action.ActionServlet.initDigester
(ActionServlet.jav
a:)
at org.apache.struts.action.ActionServlet.initMapping
(ActionServlet.java
:1267)
at org.apache.struts.action.ActionServlet.init
(ActionServlet.java:461)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at org.apache.tomcat.core.ServletWrapper.doInit
(ServletWrapper.java:317)

at org.apache.tomcat.core.Handler.init(Handler.java:215)
at org.apache.tomcat.core.ServletWrapper.init
(ServletWrapper.java:296)
at 
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOn
StartupInterceptor.java:130)
at org.apache.tomcat.core.ContextManager.initContext
(ContextManager.java
:491)
at org.apache.tomcat.core.ContextManager.init
(ContextManager.java:453)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/commons/di
gester/Digester
at org.apache.struts.action.ActionServlet.initDigester
(ActionServlet.jav
a:)
at org.apache.struts.action.ActionServlet.initMapping
(ActionServlet.java
:1267)
at org.apache.struts.action.ActionServlet.init
(ActionServlet.java:461)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at org.apache.tomcat.core.ServletWrapper.doInit
(ServletWrapper.java:317)

at org.apache.tomcat.core.Handler.init(Handler.java:215)
at org.apache.tomcat.core.ServletWrapper.init
(ServletWrapper.java:296)
at 
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOn
StartupInterceptor.java:130)
at org.apache.tomcat.core.ContextManager.initContext
(ContextManager.java
:491)
at org.apache.tomcat.core.ContextManager.init
(ContextManager.java:453)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
D:\jakarta-tomcat-3.2.3\bin>

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Got him...

2001-11-13 Thread Pier Fumagalli

On 14/11/2001 01:01 am, "Pier Fumagalli" <[EMAIL PROTECTED]> wrote:

> On 14/11/2001 12:42 am, "Martin van den Bemt" <[EMAIL PROTECTED]> wrote:
> 
>> nice job ;))
>> Why don't you put the subcriber email address in by default (in the text
>> footer of the mail or something).. Saves you working late ;))
> 
> I don't think it's possible with EZMLM to modify the content per each
> subscriber... I'll see, though!

Oh... One more thing... That's kinda impossible also because messages are
prepared "once" and then sent to the email delivery service with one message
copy and a list of addresses... Changing this behavior would mean greatly
increasing the size of the queue, adding a bunch of overhead (since for
every subscriber, the message needs to be parsed and prepared individually),
and so on... Not a good idea...

Pier


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Got him...

2001-11-13 Thread Pier Fumagalli

On 14/11/2001 12:42 am, "Martin van den Bemt" <[EMAIL PROTECTED]> wrote:

> nice job ;))
> Why don't you put the subcriber email address in by default (in the text
> footer of the mail or something).. Saves you working late ;))

I don't think it's possible with EZMLM to modify the content per each
subscriber... I'll see, though!

Pier


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Got him...

2001-11-13 Thread Martin van den Bemt

nice job ;))
Why don't you put the subcriber email address in by default (in the text
footer of the mail or something).. Saves you working late ;))

Mvgr,
Martin

> -Original Message-
> From: Pier Fumagalli [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 14, 2001 1:43 AM
> To: Tomcat Users List
> Subject: Got him...
>
>
> Since most of you complained, just to let you know that I found him...
> <[EMAIL PROTECTED]>
>
> Pier :)
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Got him...

2001-11-13 Thread Pier Fumagalli

Since most of you complained, just to let you know that I found him...
<[EMAIL PROTECTED]>

Pier :)


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




[Fwd: mod_jk / Ajp13 config fix on heavily loaded system]

2001-11-13 Thread Greg Bailey

Wrong "To: " line; sorry about that..



--- Begin Message ---

I'm still using AJP12...  I've deployed some SOAP services (SOAP 2.2) and the Tomcat 
worker (v 3.2.3 RPMs) that
these requests get mapped to has occasionally locked up and has to be restarted 
manually.  Could this be a
potential problem for us, even though we're using AJP12?  Would the same workaround 
potentially solve this?
We're seeing the following in the mod_jk.log:

[jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter
[jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL 
parameters
[jk_ajp12_worker.c (601)]: ajpv12_handle_response, error writing back to server

[jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter
[jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL 
parameters
[jk_connect.c (143)]: jk_open_socket, connect() failed errno = 111
[jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1
[jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter
[jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL 
parameters

etc.

Thanks for any help with this!
Greg Bailey
[EMAIL PROTECTED]


> 
>
> Subject: mod_jk / Ajp13 config fix on heavily loaded system
> Date: Tue, 13 Nov 2001 23:45:22 +0100
> From: GOMEZ Henri <[EMAIL PROTECTED]>
> To: Tomcat Developers List <[EMAIL PROTECTED]>
> CC: [EMAIL PROTECTED]
>
> Hi to all,
>
> Some of you may have experienced problems on heavily
> loaded system with mod_jk and Tomcat 3.2/3.3 when using
> ajp13.
>
> As you may know, the Ajp13 connection is permanent
> and is created each time a WebServer task, for
> example an Apache child, have to forward a request
> to Tomcat.
>
> And in Apache server case, the child will stay alive,
> until the client requests load decrease, or when
> a child have passed 1000 requests (MaxRequestsPerChild 1000).
> And till the child close the connection, the Tomcat thread
> stay alive.
>
> By default Apache server support up to 150 childs :
> (MaxClients 150 in httpd.conf)
>
> But by default, the Ajp13 Interceptor won't use more
> than 100 threads, so you're stuck when the 101th Apache
> child want to forward a request and see the following
> infamous trace in mod_jk.log :
>
> [wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (196)]: In
> jk_endpoint_t::connect_to_tomcat, failed errno = 111
> [wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (635)]: Error connecting
> to the Tomcat process.
> [wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (848)]: In
> jk_endpoint_t::service, send_request failed in send loop 2
> [wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (228)]:
> connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed
> [wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (712)]: Error reading
> reply
> [wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (845)]: In
> jk_endpoint_t::service, get_reply failed in send loop 0
> [wed oct 31 11:03:21 2001]  [jk_connect.c (143)]: jk_open_socket,
> connect() failed errno = 111
> [wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (196)]: In
> jk_endpoint_t::connect_to_tomcat, failed errno = 111
> [wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (635)]: Error connecting
> to the Tomcat process.
>
> In some case, Apache could be able to connect, since Tomcat listening
> thread will accept incoming connection, but will drop it later if it
> fail to give the socket to a new thread. In that case you'll see
> only in log :
>
> [wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (848)]: In
> jk_endpoint_t::service, send_request failed in send loop 2
> [wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (228)]:
> connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed
> [wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (712)]: Error reading
> reply
>
> Fortunatly, the fix is easy, just configure Ajp13Connector in
> server.xml to support up to 150 threads (or whatever you define
> as MaxClients in Apache, didn't know how on IIS/iPlanet).
>
> maxThreads="150"
>maxSpareThreads="50"
>minSpareThreads="10" />
>
> Also you should take care of the number of descriptors
> opened in your webapplication, which is :
>
>   Tomcat used descriptors (sockets, files)
> + YouWebApp descriptors (files, sockets, jdbc...)
>
> The JVM, like any others process have a limit on the number
> of descriptors it could open (and of course on number of threads).
>
> So take care of closing no more used socket, files and so on.
>
> -
> Henri Gomez ___[_]
> EMAIL : [EMAIL PROTECTED](. .)
> PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
> PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6
>



--- End Message ---

--
To unsubscribe:   
For additional commands: 

Re: Apache-Soap and Tomcat 3.3

2001-11-13 Thread Tom Drake

David:

Another solution is to simply deploy the apache web-application into the
same context as your own. This means that you have to merge web.xml
files, but it's otherwise pretty straightforward.

This means that only your web-application will be able to respond to
SOAP requests, however.

I've implemented Apache SOAP both ways.

- Original Message -
From: "David Brunkow" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 3:35 PM
Subject: Apache-Soap and Tomcat 3.3


|
|
| Does anyone have Apache-Soap working with Tomcat 3.3? Unless you jar your
| app and put it in %TOMCAT_HOME%\lib\common\ I don't think it should work.
| I'm having all kinds or problems with classes could not be found on just
the
| samples.
|
| Thanks,
|
| Dave
|
| --
| To unsubscribe:   
| For additional commands: 
| Troubles with the list: 
|
|
|


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Probe is being sent out...

2001-11-13 Thread Pier Fumagalli

Folks... Since I can't figure out where the heck those @sprintpcs.com
messages are coming from, I'll have to send out a probe to each one of you
to try to catch the culprit... Sorry for the hassle.

BTW, no matter from what address you're posting from, the address contained
in the probe is _the_ address from which you are subscribed, so, keep it in
mind for when you want to unsubscribe (many of you reported that
unsubscription was not working, while you were simply posting from a
different address than the one you were subscribed to)...

Pier


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




mod_jk log entries are confusing me and spam the log-file

2001-11-13 Thread Jan Lange

Hi peoples,

I use the ajp13 Connector with mod_jk in Apache!

So I defined a Log File for mod_jk Log-Entries.

Every 3 seconds, I get Log-entries with "worker mappings"
that I aren't define in the httpd.conf and that were
very confusing me, what this could be.

Can help me anybody?

thx
Jan

Here a log-cutaway from my mod_jk Log-File:

[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/'
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/index.htm'
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/index.html'
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/default.htm'
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/default.html'
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/index.php'
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/index.php4'
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/index.php3'
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/index.phtml'
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/index.shtml'
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/HEADER'
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/README'
[Wed Nov 14 00:18:22 2001]  [jk_uri_worker_map.c (456)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Wed Nov 14 00:18:55 2001]  [jk_uri_worker_map.c (351)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Nov 14 00:18:55 2001]  [jk_uri_worker_map.c (368)]: Attempting to
map URI '/examples/servlet/SessionExample'
[Wed Nov 14 00:18:55 2001]  [jk_uri_worker_map.c (391)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 ->
/examples/servlet/
[Wed Nov 14 00:18:55 2001]  [jk_worker.c (123)]: Into
wc_get_worker_for_name ajp13
[Wed Nov 14 00:18:55 2001]  [jk_worker.c (127)]: wc_get_worker_for_name,
done  found a worker
[Wed Nov 14 00:18:55 2001]  [jk_ajp13_worker.c (865)]: Into
jk_worker_t::get_endpoint
[Wed Nov 14 00:18:55 2001]  [jk_ajp13_worker.c (775)]: Into
jk_endpoint_t::service
[Wed Nov 14 00:18:55 2001]  [jk_ajp13.c (403)]: Into
ajp13_marshal_into_msgb
[Wed Nov 14 00:18:55 2001]  [jk_ajp13.c (537)]: ajp13_marshal_into_msgb
- Done
[Wed Nov 14 00:18:55 2001]  [jk_connect.c (108)]: Into jk_open_soc

Apache-Soap and Tomcat 3.3

2001-11-13 Thread David Brunkow



Does anyone have Apache-Soap working with Tomcat 3.3? Unless you jar your
app and put it in %TOMCAT_HOME%\lib\common\ I don't think it should work.
I'm having all kinds or problems with classes could not be found on just the
samples.

Thanks,

Dave

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Error building Tomcat 4.0.1

2001-11-13 Thread Rhugga


I am trying to build Tomcat 4.0.1 on Solaris 2..8. I downloaded and
installed all packages listed in BUILDING.txt. I am using j2sdk1_3_1_01 and
j2sdkee1.3.

Here is what I get:
becka:/usr/local/src/Jakarta/jakarta-tomcat-4.0.1-src # ant -projecthelp
Buildfile: build.xml

BUILD FAILED

javax.xml.parsers.FactoryConfigurationError:
java.lang.ClassNotFoundException:
org.apache.crimson.jaxp.SAXParserFactoryImpl
at
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:150)
at
org.apache.tools.ant.ProjectHelper.getParserFactory(ProjectHelper.java:776)
at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:104)
at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:85)
at org.apache.tools.ant.Main.runBuild(Main.java:439)
at org.apache.tools.ant.Main.start(Main.java:153)
at org.apache.tools.ant.Main.main(Main.java:176)

Total time: 1 second
java.lang.ClassNotFoundException:
org.apache.crimson.jaxp.SAXParserFactoryImpl

I have jaxp installed into /usr/local/jaxp-1.1 and the build.properties file
reflects this. I verified that jaxp.jar is indeed at this location. For the
hell of it I unpacked jaxp.jar and verified that this class was included in
the jar file. I have included /usr/local/jaxp-1.1 in my CLASSPATH.

What am I missing?

Thanks,
Chuck



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Principal caching with authentication

2001-11-13 Thread Mika Goeckel

Yep, Craig, I forgot about servlets :-)

- Original Message -
From: "Mika Goeckel" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 14, 2001 12:23 AM
Subject: Re: Principal caching with authentication


> Chris,
>
> sessions are there by default, you can only avoid them by specifying in
your
> <%@ page session="false"> directive to disable them.
> Sessions are in use once you declare a  scope"session"> with session as scope.
>
> Cheers, Mika
> :wq
>
> - Original Message -
> From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 14, 2001 12:06 AM
> Subject: RE: Principal caching with authentication
>
>
> > How would I know if I was or wasn't using sessions? Maybe I don't
> understand
> > the use of the term correctly. What is the default? I can check the
config
> >
> > -Original Message-
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 13, 2001 5:48 PM
> > To: Tomcat Users List
> > Subject: Re: Principal caching with authentication
> >
> >
> >
> >
> > On Tue, 13 Nov 2001, Bongiorno, Christian wrote:
> >
> > > Date: Tue, 13 Nov 2001 17:49:40 -0500
> > > From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > > Subject: Principal caching with authentication
> > >
> > > Here is something else I am wrestling with. When a user hits a
protected
> > > page and authenticates, subsequent authentication requests for every
> page
> > > clicked on occurs. I have been reading that there is some sort of
> caching
> > > going on, but I still have my authenticate() method called even-though
> the
> > > user has been validated as having access roles for that session. So,
> maybe
> > > once again I am missing it, but, I could cache the credentials on my
own
> > if
> > > I could get a session timeout event and the Principal it was using for
> > that
> > > session. I could just do a quick lookup on the principal to see if I
> have
> > it
> > > already -- if so return it, else get a new one.
> > >
> > >
> > > Am I thinking correctly?
> > >
> >
> > In Tomcat 4, the standard Authenticators cache authenticated principals
in
> > the current session, ***if*** there is one (and assuming you do not turn
> > it off with configuration options).  In the absence of sessions, your
> > Realm.authenticate() method will get called on every request.
> >
> > It is also common to see your authenticate() method called twice, even
> > when using sessions, if the session hasn't been created yet when
> > authentication occurs.  But beyond that, as long as you're using
sessions,
> > the authenticated Principal will be cached and reused throughout the
life
> > of this session.
> >
> > > Chris
> > >
> >
> > Craig
> >
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Principal caching with authentication

2001-11-13 Thread Mika Goeckel

Chris,

sessions are there by default, you can only avoid them by specifying in your
<%@ page session="false"> directive to disable them.
Sessions are in use once you declare a  with session as scope.

Cheers, Mika
:wq

- Original Message -
From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, November 14, 2001 12:06 AM
Subject: RE: Principal caching with authentication


> How would I know if I was or wasn't using sessions? Maybe I don't
understand
> the use of the term correctly. What is the default? I can check the config
>
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 5:48 PM
> To: Tomcat Users List
> Subject: Re: Principal caching with authentication
>
>
>
>
> On Tue, 13 Nov 2001, Bongiorno, Christian wrote:
>
> > Date: Tue, 13 Nov 2001 17:49:40 -0500
> > From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > Subject: Principal caching with authentication
> >
> > Here is something else I am wrestling with. When a user hits a protected
> > page and authenticates, subsequent authentication requests for every
page
> > clicked on occurs. I have been reading that there is some sort of
caching
> > going on, but I still have my authenticate() method called even-though
the
> > user has been validated as having access roles for that session. So,
maybe
> > once again I am missing it, but, I could cache the credentials on my own
> if
> > I could get a session timeout event and the Principal it was using for
> that
> > session. I could just do a quick lookup on the principal to see if I
have
> it
> > already -- if so return it, else get a new one.
> >
> >
> > Am I thinking correctly?
> >
>
> In Tomcat 4, the standard Authenticators cache authenticated principals in
> the current session, ***if*** there is one (and assuming you do not turn
> it off with configuration options).  In the absence of sessions, your
> Realm.authenticate() method will get called on every request.
>
> It is also common to see your authenticate() method called twice, even
> when using sessions, if the session hasn't been created yet when
> authentication occurs.  But beyond that, as long as you're using sessions,
> the authenticated Principal will be cached and reused throughout the life
> of this session.
>
> > Chris
> >
>
> Craig
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Principal caching with authentication

2001-11-13 Thread Craig R. McClanahan



On Tue, 13 Nov 2001, Bongiorno, Christian wrote:

> Date: Tue, 13 Nov 2001 18:06:53 -0500
> From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: Principal caching with authentication
>
> How would I know if I was or wasn't using sessions? Maybe I don't understand
> the use of the term correctly. What is the default? I can check the config
>

I am speaking of sessions as defined by the javax.servlet.http.HttpSession
interface.  See the servlet spec for more details:

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

Tomcat never creates a session for you (unless you're using FORM
authentication.)  Therefore, your application needs to call:

  HttpSession session = request.getSession(;

If you are using JSP pages, you get sessions automatically unless you tell
the page *not* to do so.

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Where to put .properties so web app finds it

2001-11-13 Thread Craig R. McClanahan

On Tue, 13 Nov 2001, MacDonald, Todd wrote:

> Date: Tue, 13 Nov 2001 17:59:42 -0500
> From: "MacDonald, Todd" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: "Tomcat-User (E-mail)" <[EMAIL PROTECTED]>
> Subject: Where to put .properties so web app finds it
>
> I've got a .properties file for settings in the web app that might be
> configured differently depending on which server the .war might be dropped.
>
> It obviously doesn't belong in the .war itself.  Where is the recommended
> place to put such configuration files in Tomcat 4 so that the app will find
> it?
>
> I'm trying hard not to modify the default configuration of T4 much until I
> know more about it.
>

For configuration information that is external to the application, I would
use  elements to define them in server.xml.  For
configuration information, see:

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/context.html

and scroll down to "Environment Entries".

If you've defined an environment entry named "maxExemptions" that is an
Integer (as in the example in the docs), you can access it from your
program by code like this:

  InitialContext initCtx = new InitialContext();
  Context envCtx = (Context) initCtx.lookup("java:comp/env");
  Integer maxExemptionsObj = (Integer) envCtx.lookup("maxExemptions");
  int maxExemptions = maxExemptionsObj.intValue();

By the way, this is the design pattern used in J2EE application servers to
access externally configured information.  Another use for this approach
is to use externally configured JDBC connection pools -- see:

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html

> -T

Craig


> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Tomcat 3.2.3 and MS Access.

2001-11-13 Thread Martin van den Bemt

Best to check msn or technet on microsoft.com for this.. It seems like a
plain odbc error (too bad no errorcode is supplied), so something is
misconfigured for the user who runs tomcat as a service. If you search on
those things you probably end up with an answer..

Mvgr,
Martin

> -Original Message-
> From: Slava [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 14, 2001 12:04 AM
> To: Tomcat Users List
> Subject: RE: Tomcat 3.2.3 and MS Access.
>
>
> Thanks for reply.
> I change datasource from user to system but it doesn't work anyway.
> Same error message.
> Maybe something else?
> Any help welcome.
> Thanks.
>
>
> --- Martin van den Bemt <[EMAIL PROTECTED]> wrote:
> > As I remember from way back : datasources can be created a
> number of ways :
> > yours ir probably a user datasource and you need a system
> datasource (which
> > is as it says, known system wide). If you start tomcat.bat it
> will run as
> > you, if it starts as a service, it will start as whatever you
> defined, but I
> > guess it is not you ;))
> > You can get more feedback on this on a MS mailinglist..
> >
> > Mvgr,
> > Martin
> >
> > > -Original Message-
> > > From: Slava [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, November 13, 2001 11:37 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Tomcat 3.2.3 and MS Access.
> > >
> > >
> > > Hello,
> > > I'm accessing data base from login page.
> > > When I starting Tomcat from startup.but everything working fine.
> > > If I starting Tomcat from the Services I'm getting:
> > >
> > > See com.borland.dx.dataset.DataSetException error code:  BASE+66
> > > com.borland.dx.dataset.DataSetException: [Microsoft][ODBC Driver
> > > Manager] Data source name not
> > > found and no default driver specified
> > >   at com.borland.dx.dataset.DataSetException.a(Unknown Source)
> > >   at
> > > com.borland.dx.dataset.DataSetException.throwException(Unknown Source)
> > >   at
> > > com.borland.dx.dataset.DataSetException.SQLException(Unknown Source)
> > >   at
> > > com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)
> > >   at
> > > com.borland.dx.sql.dataset.Database.createPreparedStatement(Unknow
> > > n Source)
> > >   at com.borland.dx.sql.dataset.o.a(Unknown Source)
> > >   at com.borland.dx.sql.dataset.o.d(Unknown Source)
> > >   at com.borland.dx.sql.dataset.o.e(Unknown Source)
> > >   at com.borland.dx.sql.dataset.QueryProvider.h(Unknown Source)
> > >   at
> > > com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
> > >   at com.borland.dx.dataset.StorageDataSet.a(Unknown Source)
> > >   at com.borland.dx.dataset.DataSet.a(Unknown Source)
> > >   at com.borland.dx.dataset.DataSet.open(Unknown Source)
> > >   at payroll.HeaderServlet.doPost(HeaderServlet.java:90)
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >   at
> > >
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> > >   at org.apache.tomcat.core.Handler.service(Handler.java:287)
> > >   at
> > > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> > >   at
> > > org.apache.tomcat.core.ContextManager.internalService(ContextManag
> > > er.java:812)
> > >   at
> > > org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
> > >   at
> > > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.process
> > > Connection(Ajp12ConnectionHandler.java:166)
> > >   at
> > >
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> > >   at
> > >
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> > >   at java.lang.Thread.run(Thread.java:484)
> > >
> > > But Data Source Name is correct.
> > > Maybe I miss some setting?
> > > Can somebody help me?
> > > Thanks.
> > >
> > > __
> > > Do You Yahoo!?
> > > Find the one for you at Yahoo! Personals
> > > http://personals.yahoo.com
> > >
> > > --
> > > To unsubscribe:   
> > > For additional commands: 
> > > Troubles with the list: 
> > >
> > >
> >
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
>
>
> __
> Do You Yahoo!?
> Find the one for you at Yahoo! Personals
> http://personals.yahoo.com
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Where to put .properties so web app finds it

2001-11-13 Thread MacDonald, Todd

Thanks, but I'm looking less for what "works" and more for what's "right"
(if there is such a thing).  

-T

-Original Message-
From: Evan Swanson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 6:02 PM
To: 'Tomcat Users List'
Subject: RE: Where to put .properties so web app finds it


CATALINA_HOME is set by the Tomcat4.0 as a property.
Seems to work for me.

-Original Message-
From: MacDonald, Todd [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 3:00 PM
To: Tomcat-User (E-mail)
Subject: Where to put .properties so web app finds it


I've got a .properties file for settings in the web app that might be
configured differently depending on which server the .war might be dropped.

It obviously doesn't belong in the .war itself.  Where is the recommended
place to put such configuration files in Tomcat 4 so that the app will find
it?

I'm trying hard not to modify the default configuration of T4 much until I
know more about it.

-T

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Principal caching with authentication

2001-11-13 Thread Bongiorno, Christian

How would I know if I was or wasn't using sessions? Maybe I don't understand
the use of the term correctly. What is the default? I can check the config

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 5:48 PM
To: Tomcat Users List
Subject: Re: Principal caching with authentication




On Tue, 13 Nov 2001, Bongiorno, Christian wrote:

> Date: Tue, 13 Nov 2001 17:49:40 -0500
> From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: Principal caching with authentication
>
> Here is something else I am wrestling with. When a user hits a protected
> page and authenticates, subsequent authentication requests for every page
> clicked on occurs. I have been reading that there is some sort of caching
> going on, but I still have my authenticate() method called even-though the
> user has been validated as having access roles for that session. So, maybe
> once again I am missing it, but, I could cache the credentials on my own
if
> I could get a session timeout event and the Principal it was using for
that
> session. I could just do a quick lookup on the principal to see if I have
it
> already -- if so return it, else get a new one.
>
>
> Am I thinking correctly?
>

In Tomcat 4, the standard Authenticators cache authenticated principals in
the current session, ***if*** there is one (and assuming you do not turn
it off with configuration options).  In the absence of sessions, your
Realm.authenticate() method will get called on every request.

It is also common to see your authenticate() method called twice, even
when using sessions, if the session hasn't been created yet when
authentication occurs.  But beyond that, as long as you're using sessions,
the authenticated Principal will be cached and reused throughout the life
of this session.

> Chris
>

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: UnknownHostException thrown from SmtpClient

2001-11-13 Thread Craig R. McClanahan

On Tue, 13 Nov 2001, felix wrote:

> [snip]
>
> i have exim (http://www.exim.org) installed (it came with our dedicated
> server).  it appears to be more robust in terms of queuing, freezing,
> unfreezing, managing and retrying than classic sendmail.
>
> with xwindows you can open a manager to sort through the queue.
>
>
> of course i'm still getting this
>
> javax.servlet.ServletException: Sending failed;
>   nested exception is:
> javax.mail.MessagingException: 501 syntactically invalid HELO
> argument(s)
>
> though it should be an exact replacement.
>
> code is dirt simple:
>
> String FromAddress = "[EMAIL PROTECTED]";
> String ToAddress = "[EMAIL PROTECTED]";
> String Subject = "testttjavamail";
> String Body = " bodydddyyy";
>
> Properties p = System.getProperties();
> p.put("mail.host","209.41.200.16");
>
> MimeMessage message = new MimeMessage(Session.getInstance(p, null));
> message.setFrom(new InternetAddress(FromAddress));
> message.setRecipients(Message.RecipientType.TO,
> InternetAddress.parse(ToAddress));
> message.setSubject(Subject);
> message.setText(Body);
>
> Transport.send(message);
>

This sounds like a good question for the JavaMail interest mailing list,
once you verify that it happens to you in a stand-alone Java application
as well.  Since it's a javax.mail.MessagingException, it's not coming from
Tomcat directly.

You should be able to find a pointer to the mailing list on the JavaMail
page at java.sun.com.

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Tomcat 3.2.3 and MS Access.

2001-11-13 Thread Slava

Thanks for reply.
I change datasource from user to system but it doesn't work anyway.
Same error message.
Maybe something else?
Any help welcome.
Thanks.


--- Martin van den Bemt <[EMAIL PROTECTED]> wrote:
> As I remember from way back : datasources can be created a number of ways :
> yours ir probably a user datasource and you need a system datasource (which
> is as it says, known system wide). If you start tomcat.bat it will run as
> you, if it starts as a service, it will start as whatever you defined, but I
> guess it is not you ;))
> You can get more feedback on this on a MS mailinglist..
> 
> Mvgr,
> Martin
> 
> > -Original Message-
> > From: Slava [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 13, 2001 11:37 PM
> > To: [EMAIL PROTECTED]
> > Subject: Tomcat 3.2.3 and MS Access.
> >
> >
> > Hello,
> > I'm accessing data base from login page.
> > When I starting Tomcat from startup.but everything working fine.
> > If I starting Tomcat from the Services I'm getting:
> >
> > See com.borland.dx.dataset.DataSetException error code:  BASE+66
> > com.borland.dx.dataset.DataSetException: [Microsoft][ODBC Driver
> > Manager] Data source name not
> > found and no default driver specified
> > at com.borland.dx.dataset.DataSetException.a(Unknown Source)
> > at
> > com.borland.dx.dataset.DataSetException.throwException(Unknown Source)
> > at
> > com.borland.dx.dataset.DataSetException.SQLException(Unknown Source)
> > at
> > com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)
> > at
> > com.borland.dx.sql.dataset.Database.createPreparedStatement(Unknow
> > n Source)
> > at com.borland.dx.sql.dataset.o.a(Unknown Source)
> > at com.borland.dx.sql.dataset.o.d(Unknown Source)
> > at com.borland.dx.sql.dataset.o.e(Unknown Source)
> > at com.borland.dx.sql.dataset.QueryProvider.h(Unknown Source)
> > at
> > com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
> > at com.borland.dx.dataset.StorageDataSet.a(Unknown Source)
> > at com.borland.dx.dataset.DataSet.a(Unknown Source)
> > at com.borland.dx.dataset.DataSet.open(Unknown Source)
> > at payroll.HeaderServlet.doPost(HeaderServlet.java:90)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > at
> > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> > at org.apache.tomcat.core.Handler.service(Handler.java:287)
> > at
> > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> > at
> > org.apache.tomcat.core.ContextManager.internalService(ContextManag
> > er.java:812)
> > at
> > org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
> > at
> > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.process
> > Connection(Ajp12ConnectionHandler.java:166)
> > at
> > org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> > at
> > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> > at java.lang.Thread.run(Thread.java:484)
> >
> > But Data Source Name is correct.
> > Maybe I miss some setting?
> > Can somebody help me?
> > Thanks.
> >
> > __
> > Do You Yahoo!?
> > Find the one for you at Yahoo! Personals
> > http://personals.yahoo.com
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
> >
> 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 


__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Where to put .properties so web app finds it

2001-11-13 Thread Martin van den Bemt

We use our own configuration structure per server / host / virtual host. Se
maybe the home of that could be used for that. (more speciic : there are
only classes in our webapp, the rest (= about a 3000 files) our oustside the
webapp.. (excluding transactions).

Mvgr,
Martin

> -Original Message-
> From: MacDonald, Todd [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 14, 2001 12:00 AM
> To: Tomcat-User (E-mail)
> Subject: Where to put .properties so web app finds it
>
>
> I've got a .properties file for settings in the web app that might be
> configured differently depending on which server the .war might
> be dropped.
>
> It obviously doesn't belong in the .war itself.  Where is the recommended
> place to put such configuration files in Tomcat 4 so that the app
> will find
> it?
>
> I'm trying hard not to modify the default configuration of T4 much until I
> know more about it.
>
> -T
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Where to put .properties so web app finds it

2001-11-13 Thread Evan Swanson

CATALINA_HOME is set by the Tomcat4.0 as a property.
Seems to work for me.

-Original Message-
From: MacDonald, Todd [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 3:00 PM
To: Tomcat-User (E-mail)
Subject: Where to put .properties so web app finds it


I've got a .properties file for settings in the web app that might be
configured differently depending on which server the .war might be dropped.

It obviously doesn't belong in the .war itself.  Where is the recommended
place to put such configuration files in Tomcat 4 so that the app will find
it?

I'm trying hard not to modify the default configuration of T4 much until I
know more about it.

-T

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Principal caching with authentication

2001-11-13 Thread Craig R. McClanahan



On Tue, 13 Nov 2001, Bongiorno, Christian wrote:

> Date: Tue, 13 Nov 2001 17:49:40 -0500
> From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: Principal caching with authentication
>
> Here is something else I am wrestling with. When a user hits a protected
> page and authenticates, subsequent authentication requests for every page
> clicked on occurs. I have been reading that there is some sort of caching
> going on, but I still have my authenticate() method called even-though the
> user has been validated as having access roles for that session. So, maybe
> once again I am missing it, but, I could cache the credentials on my own if
> I could get a session timeout event and the Principal it was using for that
> session. I could just do a quick lookup on the principal to see if I have it
> already -- if so return it, else get a new one.
>
>
> Am I thinking correctly?
>

In Tomcat 4, the standard Authenticators cache authenticated principals in
the current session, ***if*** there is one (and assuming you do not turn
it off with configuration options).  In the absence of sessions, your
Realm.authenticate() method will get called on every request.

It is also common to see your authenticate() method called twice, even
when using sessions, if the session hasn't been created yet when
authentication occurs.  But beyond that, as long as you're using sessions,
the authenticated Principal will be cached and reused throughout the life
of this session.

> Chris
>

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Where to put .properties so web app finds it

2001-11-13 Thread MacDonald, Todd

I've got a .properties file for settings in the web app that might be
configured differently depending on which server the .war might be dropped.

It obviously doesn't belong in the .war itself.  Where is the recommended
place to put such configuration files in Tomcat 4 so that the app will find
it?

I'm trying hard not to modify the default configuration of T4 much until I
know more about it.

-T

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: UnknownHostException thrown from SmtpClient

2001-11-13 Thread felix



> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
>> on a related topic,
>> I've been trying to figure out if JavaMail threads / forks when it sends.

> Besides the fact that it's probably an insignificant effect on response
> time (unless you're sending large numbers of messages on one request),

that's what i wanted to hear. thanks!  its just a quick email send (to
another company), i just want to make the whole response as quick as
possible.

> By the way, Tomcat 4 offers support for a JavaMail resource that you can
> access from all of the servlets and JSP pages in your web app, without
> having to configure all of them for the appropriate SMTP host.  See
> Craig

bravo!  i was just thinking "why isn't javamail included if we should
definitely use it?"


on the other topic:

i have exim (http://www.exim.org) installed (it came with our dedicated
server).  it appears to be more robust in terms of queuing, freezing,
unfreezing, managing and retrying than classic sendmail.

with xwindows you can open a manager to sort through the queue.


of course i'm still getting this

javax.servlet.ServletException: Sending failed;
  nested exception is:
javax.mail.MessagingException: 501 syntactically invalid HELO
argument(s)

though it should be an exact replacement.

code is dirt simple:

String FromAddress = "[EMAIL PROTECTED]";
String ToAddress = "[EMAIL PROTECTED]";
String Subject = "testttjavamail";
String Body = " bodydddyyy";

Properties p = System.getProperties();
p.put("mail.host","209.41.200.16");

MimeMessage message = new MimeMessage(Session.getInstance(p, null));
message.setFrom(new InternetAddress(FromAddress));
message.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(ToAddress));
message.setSubject(Subject);
message.setText(Body);

Transport.send(message);



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Generating .keystore does not work

2001-11-13 Thread Richard Troy



Yes, I found that problem too, also on Solaris, when I installed TC 3.2.3.
It has _nothing_ to do with Tomcat. It was a known bug with JDK. I got
another release and it worked fine.  ...  I seem to recall I'm using
1.3.01.

Good luck,
RT

-- 
Richard Troy, Chief Scientist
Science Tools Corporation
[EMAIL PROTECTED], 510-567-9957, http://ScienceTools.com/

On Tue, 13 Nov 2001, Tanner, Don wrote:

> Date: Tue, 13 Nov 2001 10:34:17 -0800
> From: "Tanner, Don" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: Generating .keystore does not work
>
> Hi there!!
> We are using Tomcat 4.0.1 on Solaris 8.
> We have been attempting to get SSL to work on Tomcat by following the
> document @ http://jakarta.apache.org/tomcat/tomcat-4.0-doc/ssl-howto.html.
> When we run $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA this is
> what happens:
>
>  ./keytool -genkey -alias tomcat -keyalg RSA
> Enter keystore password:  changeit
> keytool error: KeyPairGenerator not available
>
> Any suggestions would be greatly appreciated
>
>
> The opinions expressed above are probably mine but not necessarily the
> opinions of my employers. In order to prevent possible injury to yourself,
> or your computer, and to ensure readability, please do not smoke, eat,
> drink, spindle, bend, fold, staple, or mutilate this e-mail message.
>
>
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Principal caching with authentication

2001-11-13 Thread Bongiorno, Christian

Here is something else I am wrestling with. When a user hits a protected
page and authenticates, subsequent authentication requests for every page
clicked on occurs. I have been reading that there is some sort of caching
going on, but I still have my authenticate() method called even-though the
user has been validated as having access roles for that session. So, maybe
once again I am missing it, but, I could cache the credentials on my own if
I could get a session timeout event and the Principal it was using for that
session. I could just do a quick lookup on the principal to see if I have it
already -- if so return it, else get a new one.


Am I thinking correctly?

Chris

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




mod_jk / Ajp13 config fix on heavily loaded system

2001-11-13 Thread GOMEZ Henri

Hi to all,

Some of you may have experienced problems on heavily 
loaded system with mod_jk and Tomcat 3.2/3.3 when using
ajp13.

As you may know, the Ajp13 connection is permanent
and is created each time a WebServer task, for
example an Apache child, have to forward a request
to Tomcat. 

And in Apache server case, the child will stay alive,
until the client requests load decrease, or when 
a child have passed 1000 requests (MaxRequestsPerChild 1000).
And till the child close the connection, the Tomcat thread
stay alive.

By default Apache server support up to 150 childs :
(MaxClients 150 in httpd.conf)

But by default, the Ajp13 Interceptor won't use more
than 100 threads, so you're stuck when the 101th Apache
child want to forward a request and see the following
infamous trace in mod_jk.log :

[wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (196)]: In
jk_endpoint_t::connect_to_tomcat, failed errno = 111
[wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (635)]: Error connecting
to the Tomcat process.
[wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (848)]: In
jk_endpoint_t::service, send_request failed in send loop 2
[wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (228)]:
connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed
[wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (712)]: Error reading
reply
[wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (845)]: In
jk_endpoint_t::service, get_reply failed in send loop 0
[wed oct 31 11:03:21 2001]  [jk_connect.c (143)]: jk_open_socket,
connect() failed errno = 111
[wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (196)]: In
jk_endpoint_t::connect_to_tomcat, failed errno = 111
[wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (635)]: Error connecting
to the Tomcat process.
 
In some case, Apache could be able to connect, since Tomcat listening
thread will accept incoming connection, but will drop it later if it
fail to give the socket to a new thread. In that case you'll see 
only in log :

[wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (848)]: In
jk_endpoint_t::service, send_request failed in send loop 2
[wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (228)]:
connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed
[wed oct 31 11:03:21 2001]  [jk_ajp13_worker.c (712)]: Error reading
reply

Fortunatly, the fix is easy, just configure Ajp13Connector in
server.xml to support up to 150 threads (or whatever you define
as MaxClients in Apache, didn't know how on IIS/iPlanet).



Also you should take care of the number of descriptors
opened in your webapplication, which is :

  Tomcat used descriptors (sockets, files) 
+ YouWebApp descriptors (files, sockets, jdbc...)

The JVM, like any others process have a limit on the number
of descriptors it could open (and of course on number of threads).

So take care of closing no more used socket, files and so on.


-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: UnknownHostException thrown from SmtpClient

2001-11-13 Thread Craig R. McClanahan



On Tue, 13 Nov 2001, Martin van den Bemt wrote:

> Date: Tue, 13 Nov 2001 22:49:12 +0100
> From: Martin van den Bemt <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: UnknownHostException thrown from SmtpClient
>
> I like the idea of a queue which holds the mails and tries until it works
> (didn't have time to do that myself, just catching everything and not
> throwing any exceptions, just logging to a mail log file if it doesn't
> succeed).

That's exactly what your local SMTP server (sendmail or whatever) does for
you.  Why reinvent the wheel?

> So it depends on your time you can invest in it I guess..
> I read somewhere that tomcat 4 has build in support for javamail and offers
> services to send mail via javamail. I think searching on javamail on the
> online backups of mailinglist backup might turn up some info. (eg
> http://marc.theaimsgroup.com/?l=tomcat-user&r=1&w=2)
>

See my previous response for a pointer to the Tomcat 4 docs about this.

> Have fun remodeling ;))
>
> Mvgr,
> Martin
>

Craig


>
> > -Original Message-
> > From: felix [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 13, 2001 10:43 PM
> > To: Tomcat Users List
> > Subject: Re: UnknownHostException thrown from SmtpClient
> >
> >
> >
> > Thanks, I think that's what needs to be done anyway.
> >
> > on a related topic,
> > I've been trying to figure out if JavaMail threads / forks when it sends.
> >
> > Or if its worth writing an Emailer (implements Runnable) that would just
> > take care of its business and let tomcat go on its merrry way.
> >
> > the user doesn't need to know what we are emailing or if it succeeds.
> >
> > anybody have any thoughts on that ?  extra thread overhead ? waste of my
> > time ?
> >
> >
> > > From: "Martin van den Bemt" <[EMAIL PROTECTED]>
> > > Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Date: Tue, 13 Nov 2001 22:21:23 +0100
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Subject: RE: UnknownHostException thrown from SmtpClient
> > >
> > > Use JavaMail instead.. The SmtpClient (at least if that is the one in
> > > com.sun or sun.) is as far as I know not even supported..
> > > Never had any problems with that, unless the jvm couldn't find
> > a host in the
> > > first place, it tends to never find it again.
> > >
> > > Mvgr,
> > > Martin
> >
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
> >
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Tomcat 3.2.3 and MS Access.

2001-11-13 Thread Martin van den Bemt

As I remember from way back : datasources can be created a number of ways :
yours ir probably a user datasource and you need a system datasource (which
is as it says, known system wide). If you start tomcat.bat it will run as
you, if it starts as a service, it will start as whatever you defined, but I
guess it is not you ;))
You can get more feedback on this on a MS mailinglist..

Mvgr,
Martin

> -Original Message-
> From: Slava [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 11:37 PM
> To: [EMAIL PROTECTED]
> Subject: Tomcat 3.2.3 and MS Access.
>
>
> Hello,
> I'm accessing data base from login page.
> When I starting Tomcat from startup.but everything working fine.
> If I starting Tomcat from the Services I'm getting:
>
> See com.borland.dx.dataset.DataSetException error code:  BASE+66
> com.borland.dx.dataset.DataSetException: [Microsoft][ODBC Driver
> Manager] Data source name not
> found and no default driver specified
>   at com.borland.dx.dataset.DataSetException.a(Unknown Source)
>   at
> com.borland.dx.dataset.DataSetException.throwException(Unknown Source)
>   at
> com.borland.dx.dataset.DataSetException.SQLException(Unknown Source)
>   at
> com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)
>   at
> com.borland.dx.sql.dataset.Database.createPreparedStatement(Unknow
> n Source)
>   at com.borland.dx.sql.dataset.o.a(Unknown Source)
>   at com.borland.dx.sql.dataset.o.d(Unknown Source)
>   at com.borland.dx.sql.dataset.o.e(Unknown Source)
>   at com.borland.dx.sql.dataset.QueryProvider.h(Unknown Source)
>   at
> com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
>   at com.borland.dx.dataset.StorageDataSet.a(Unknown Source)
>   at com.borland.dx.dataset.DataSet.a(Unknown Source)
>   at com.borland.dx.dataset.DataSet.open(Unknown Source)
>   at payroll.HeaderServlet.doPost(HeaderServlet.java:90)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>   at org.apache.tomcat.core.Handler.service(Handler.java:287)
>   at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
> org.apache.tomcat.core.ContextManager.internalService(ContextManag
> er.java:812)
>   at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
>   at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.process
> Connection(Ajp12ConnectionHandler.java:166)
>   at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>   at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>   at java.lang.Thread.run(Thread.java:484)
>
> But Data Source Name is correct.
> Maybe I miss some setting?
> Can somebody help me?
> Thanks.
>
> __
> Do You Yahoo!?
> Find the one for you at Yahoo! Personals
> http://personals.yahoo.com
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: How to bring back pop-up with BASIC authentication

2001-11-13 Thread Bongiorno, Christian

My bad. When in doubt, just look at the glare in the monitor to see who the
problem is.

:)

Thanks craig, you helped me to stop looking at your code and to start
looking harder at mine.

Chris

-Original Message-
From: Bongiorno, Christian [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 5:25 PM
To: 'Tomcat Users List'
Subject: RE: How to bring back pop-up with BASIC authentication


Here is a question: do I have to override every method of authenticate()? I
currently only override 
authenticate(String,String) and authenticate(String byte[]);  Would this
make a difference?

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: UnknownHostException thrown from SmtpClient

2001-11-13 Thread felix



Using JavaMail now (tedious download process, can't just wget )

and i get a more descriptive exception:


javax.servlet.ServletException: Sending failed;
  nested exception is:
javax.mail.MessagingException: 501 syntactically invalid HELO
argument(s)


So here is a good example for all of us why sun.net.smtp.SmtpClient should
be avoided.
it threw an UnknownHostException when the problem is completely different.

This is going to exim, not sendmail.




> 
>> From: "Martin van den Bemt" <[EMAIL PROTECTED]>

>> Use JavaMail instead.. The SmtpClient (at least if that is the one in
>> com.sun or sun.) is as far as I know not even supported..
>> Never had any problems with that, unless the jvm couldn't find a host in the
>> first place, it tends to never find it again.
>> 
>> Mvgr,
>> Martin
> 
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 
> 
> 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Tomcat 3.2.3 and MS Access.

2001-11-13 Thread Slava

Hello,
I'm accessing data base from login page.
When I starting Tomcat from startup.but everything working fine.
If I starting Tomcat from the Services I'm getting:

See com.borland.dx.dataset.DataSetException error code:  BASE+66
com.borland.dx.dataset.DataSetException: [Microsoft][ODBC Driver Manager] Data source 
name not
found and no default driver specified
at com.borland.dx.dataset.DataSetException.a(Unknown Source)
at com.borland.dx.dataset.DataSetException.throwException(Unknown Source)
at com.borland.dx.dataset.DataSetException.SQLException(Unknown Source)
at com.borland.dx.sql.dataset.Database.openConnection(Unknown Source)
at com.borland.dx.sql.dataset.Database.createPreparedStatement(Unknown Source)
at com.borland.dx.sql.dataset.o.a(Unknown Source)
at com.borland.dx.sql.dataset.o.d(Unknown Source)
at com.borland.dx.sql.dataset.o.e(Unknown Source)
at com.borland.dx.sql.dataset.QueryProvider.h(Unknown Source)
at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
at com.borland.dx.dataset.StorageDataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.a(Unknown Source)
at com.borland.dx.dataset.DataSet.open(Unknown Source)
at payroll.HeaderServlet.doPost(HeaderServlet.java:90)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)

But Data Source Name is correct.
Maybe I miss some setting?
Can somebody help me?
Thanks.

__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: upgrade b6 to 4.0.1

2001-11-13 Thread Brian K. Buckley

> No, but if the old classes are in the path by virtue of being in your apps
> WEB_INF/lib (for example) you may experience problems compiling.

Problem found!!  Thanks.

I had a bad jar in WEB_INF/lib  ( jasper-compiler.jar!!  Bad.  Don't ask how
it got there!).


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: How to bring back pop-up with BASIC authentication

2001-11-13 Thread Bongiorno, Christian

Here is a question: do I have to override every method of authenticate()? I
currently only override 
authenticate(String,String) and authenticate(String byte[]);  Would this
make a difference?

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: upgrade b6 to 4.0.1

2001-11-13 Thread Remy Maucherat

> On Tue, 13 Nov 2001, Brian K. Buckley wrote:
>
> > Date: Tue, 13 Nov 2001 16:12:32 -0500
> > From: Brian K. Buckley <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Re: upgrade b6 to 4.0.1
> >
> > > Do you have an old J2EE.jar in your classpath somewhere?
> >
> > I start Tomcat using the standard startup.bat in the bin directory.  Is
my
> > system classpath even used in the compiling of JSPs or anything else?  I
> > thought not.
> >
>
> The system classpath (i.e. the CLASSPATH environment variable) is not
> used, but Tomcat has all sorts of problems if you have a servlet.jar or
> j2ee.jar file in your Java system extensions directory
> ($JAVA_HOME/jre/lib/ext).

The 4.0.1 classloader is improved in that it will refuse to load
javax.servlet from the webapp's repository, but unfortunately, it will still
cause trouble with Jasper. We could make the Jasper classpath building more
robust in the future, but it will need a bit of work.

Remy


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




what is the default place for keystore file in Tomcat

2001-11-13 Thread Miao, Franco CAWS:EX

what is the  default place  for keystore file in Tomcat 4.01, I use keytool
generate it, but it is located in my profile folder. 

Franco 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: UnknownHostException thrown from SmtpClient

2001-11-13 Thread Martin van den Bemt

See below..

> On Tue, 13 Nov 2001, Martin van den Bemt wrote:
>
> > Date: Tue, 13 Nov 2001 22:49:12 +0100
> > From: Martin van den Bemt <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: RE: UnknownHostException thrown from SmtpClient
> >
> > I like the idea of a queue which holds the mails and tries
> until it works
> > (didn't have time to do that myself, just catching everything and not
> > throwing any exceptions, just logging to a mail log file if it doesn't
> > succeed).
>
> That's exactly what your local SMTP server (sendmail or whatever) does for
> you.  Why reinvent the wheel?
>

Sendmail is good at bouncing mails, and we need to know about that. Since
the return address is always someone external to our company (and don't even
know about) we need to handle bounces and retry again (sending it directly
btw). If after some time the mail still bounces, we need to be informed and
take appropiate action (which sendmail or qmail cannot handle, or I don't
like them to handle that..).

Mvgr,
Martin


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: [TC4] Sending redirect fails if OutputStream isn't closed ..

2001-11-13 Thread Remy Maucherat

> On Mon, 12 Nov 2001, Remy Maucherat wrote:
>
> | > I'm using this program called "loadsim" to get a simulation of a bunch
of
> | > users using my webapp. This is a java program utilizing the
> | > java.net.HttpConnection to simulate the clients, built using large
parts
> | > of a apache loadsimulation system, right?
>
> Make that "java.net.HttpURLConnection" (as the client).
>
> | > Why is that? Why do I have to get the outputstream, and then just
close it
> | > to get the sendRedirect away? Why isn't the stream closed on exit of
the
> | > doGet/Post method? Or whatever?
> |
> | The default servlet doesn't use the output stream at all, and appears to
> | behave correctly (verified using a telnet session). This looks like a
> | problem with the HTTP client you're using.
>
> I also mentioned this in the first post (Mozilla behaves properly), but
> why does it then work when I get and close the output stream as described?

I'm not 100% sure. I checked the result of a redirect sent by the default
servlet with a telnet session, and the result was valid.
If you open and close the stream in the servlet, I think you'll end up
sending a zero length document (with an empty response body), while in the
first case, a chunked error report will be sent (which is allowed on a 302
status).

> Here's the code from "loadsim" that does the sampling, just if you don't
> have much other to do today! (It's not that long, actually)..

Remy


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: How to bring back pop-up with BASIC authentication

2001-11-13 Thread Bongiorno, Christian

I return null for failed authentication. My test environment is in the
/examples webapp and is set to BASIC. It is also basic on our test box. I
will try configuring the MemoryRealm and look. If it is as straight-forward
as it seems return null vs. non-null then I don't see how I could fail
authentication the first time every time. Correct username and pass -- pass.
Bad username of pass -- immediate failure.

Maybe what would help me is if I knew how it is possible to actually fail
authentication on the first try. If I understand correctly then I should not
be able to do this. 

Chris

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 4:48 PM
To: Tomcat Users List
Subject: RE: How to bring back pop-up with BASIC authentication




On Tue, 13 Nov 2001, Bongiorno, Christian wrote:

> Date: Tue, 13 Nov 2001 16:52:43 -0500
> From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: How to bring back pop-up with BASIC authentication
>
> Still no luck looking through the logs. I turned authentication to 99 and
I
> get all sorts of info, but nothing that would suggest what is going on.
>
> Simply returning null from authenticate() should work?
>

Yep.  That's what all the standard Realm implementations do.

For further experimentation, I would suggest changing the standard
"/examples" webapp that comes with Tomcat to use BASIC authentication, but
leave it configured with the standard MemoryRealm (with debugging turned
up).  That way, you'll be able to see what the expected behavior is.

Craig

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: How to bring back pop-up with BASIC authentication

2001-11-13 Thread Craig R. McClanahan



On Tue, 13 Nov 2001, Bongiorno, Christian wrote:

> Date: Tue, 13 Nov 2001 16:52:43 -0500
> From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: How to bring back pop-up with BASIC authentication
>
> Still no luck looking through the logs. I turned authentication to 99 and I
> get all sorts of info, but nothing that would suggest what is going on.
>
> Simply returning null from authenticate() should work?
>

Yep.  That's what all the standard Realm implementations do.

For further experimentation, I would suggest changing the standard
"/examples" webapp that comes with Tomcat to use BASIC authentication, but
leave it configured with the standard MemoryRealm (with debugging turned
up).  That way, you'll be able to see what the expected behavior is.

Craig


> -Original Message-
> From: Bongiorno, Christian [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 3:41 PM
> To: 'Tomcat Users List'
> Subject: RE: How to bring back pop-up with BASIC authentication
>
>
> Thanks for responding. I am using TC 4.0.1. in web.xml under  I
> have BASIC. I created a custom Realm, that's all. I will crank the debug up
> and take a look.
>
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 3:18 PM
> To: Tomcat Users List
> Subject: RE: How to bring back pop-up with BASIC authentication
>
>
>
>
> On Tue, 13 Nov 2001, Bongiorno, Christian wrote:
>
> > Date: Tue, 13 Nov 2001 15:21:44 -0500
> > From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > Subject: RE: How to bring back pop-up with BASIC authentication
> >
> > You email gives good insight into some things. I am returning null in
> > Realm.authenticate() for a failure. This only brings up the access denied
> > page. So then, I need to change the authenticator for this webapp? I never
> > changed it to being with. You did explain that I need to respond with 401,
> > but how? Getting closer. I will look some more now giving new info
> >
>
> Let's step back a step and catch me up on the details.
>
> * Which Tomcat version are you using (just want to confirm
>   that we're talking about Tomcat 4)?
>
> * Which authenticator are you using?  I only described how
>   the standard BASIC Authenticator works, not what your
>   custom one might want to do.  (This choice is determined
>   by whatever you specified for  in web.xml.)
>
> * Have you turned up the level of debugging detail to help
>   figure out what is really going on?  You can do this in server.xml:
>
>   
>   
>
> The last will log a bunch more information about the processing actually
> being performed by the authenticator, and help you understand what is
> going on.  Check the output logs in the "logs" directory.
>
> > Chris
> >
>
> Craig
>
>
> > -Original Message-
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 13, 2001 2:55 PM
> > To: Tomcat Users List
> > Subject: Re: How to bring back pop-up with BASIC authentication
> >
> >
> > On Tue, 13 Nov 2001, Bongiorno, Christian wrote:
> >
> > > Date: Tue, 13 Nov 2001 13:48:17 -0500
> > > From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > > Subject: How to bring back pop-up with BASIC authentication
> > >
> > > Can someone explain to me how I can tell tomcat from with in my custom
> > realm
> > > to prompt the user again for login is their password should fail? The
> > built
> > > in realms all do this, but for the life of me I can't figure out how
> this
> > is
> > > being done in the code -- I have been over it several times.
> > >
> >
> > (This is the Tomcat 4 version of the answer.)  The key point - it's NOT
> > the Realm that prompts or reprompts the user -- it's the Authenticator
> > that does this.
> >
> > A Realm is simply a "user database".  The various Authenticators acquire
> > the username and password to be checked by some means specific to that
> > authenticator.  Then, they try to validate the user by calling
> > Realm.authenticate(username, password).  If the Realm returns null, that
> > means the user was not recognized.  What happens next is totally up to
> > that Authenticator.
> >
> > The Authenticator for BASIC is the easiest to understand
> > (org.apache.catalina.authenticator.BasicAuthenticator).  Once it is
> > determined that authentication is required, it does the following:
> >
> > * Have we authenticated a user already for the current
> >   session?  If so, just reuse that identity.  (This caching
> >   saves a lot of effort, especially when your Realm connects
> >   to a remote database or directory serer).
> >
> > * Were the username and password included with this request?
> >   If not, send back an HTTP 

Re: UnknownHostException thrown from SmtpClient

2001-11-13 Thread Kevin Barnes

Tomcat 4 comes with the necessary jar files (mail.jar and activation.jar) for
using javamail in the common\lib directory. If you download the javamail 1.2
API from Sun it comes with many examples of how to use it in it's demo
directory.

-kb

Martin van den Bemt wrote:

> I like the idea of a queue which holds the mails and tries until it works
> (didn't have time to do that myself, just catching everything and not
> throwing any exceptions, just logging to a mail log file if it doesn't
> succeed).
> So it depends on your time you can invest in it I guess..
> I read somewhere that tomcat 4 has build in support for javamail and offers
> services to send mail via javamail. I think searching on javamail on the
> online backups of mailinglist backup might turn up some info. (eg
> http://marc.theaimsgroup.com/?l=tomcat-user&r=1&w=2)
>
> Have fun remodeling ;))
>
> Mvgr,
> Martin
>
> > -Original Message-
> > From: felix [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 13, 2001 10:43 PM
> > To: Tomcat Users List
> > Subject: Re: UnknownHostException thrown from SmtpClient
> >
> >
> >
> > Thanks, I think that's what needs to be done anyway.
> >
> > on a related topic,
> > I've been trying to figure out if JavaMail threads / forks when it sends.
> >
> > Or if its worth writing an Emailer (implements Runnable) that would just
> > take care of its business and let tomcat go on its merrry way.
> >
> > the user doesn't need to know what we are emailing or if it succeeds.
> >
> > anybody have any thoughts on that ?  extra thread overhead ? waste of my
> > time ?
> >
> >
> > > From: "Martin van den Bemt" <[EMAIL PROTECTED]>
> > > Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Date: Tue, 13 Nov 2001 22:21:23 +0100
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Subject: RE: UnknownHostException thrown from SmtpClient
> > >
> > > Use JavaMail instead.. The SmtpClient (at least if that is the one in
> > > com.sun or sun.) is as far as I know not even supported..
> > > Never had any problems with that, unless the jvm couldn't find
> > a host in the
> > > first place, it tends to never find it again.
> > >
> > > Mvgr,
> > > Martin
> >
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
> >
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: upgrade b6 to 4.0.1

2001-11-13 Thread MacDonald, Todd

No, but if the old classes are in the path by virtue of being in your apps
WEB_INF/lib (for example) you may experience problems compiling.

-T

-Original Message-
From: Brian K. Buckley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 4:13 PM
To: Tomcat Users List
Subject: Re: upgrade b6 to 4.0.1


> Do you have an old J2EE.jar in your classpath somewhere?

I start Tomcat using the standard startup.bat in the bin directory.  Is my
system classpath even used in the compiling of JSPs or anything else?  I
thought not.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: UnknownHostException thrown from SmtpClient

2001-11-13 Thread Craig R. McClanahan



On Tue, 13 Nov 2001, felix wrote:

> Date: Tue, 13 Nov 2001 16:43:02 -0500
> From: felix <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: UnknownHostException thrown from SmtpClient
>
>
> Thanks, I think that's what needs to be done anyway.
>
> on a related topic,
> I've been trying to figure out if JavaMail threads / forks when it sends.
>

The standard implementation of SMTP sending does not.  You could certainly
write one that does.  (In one of my past lives, I wrote a JavaMail
"Transport" implementation that interfaced to a fax broadcast service, and
the calling application could be configured to use multiple threads -- it
mattered when we were sending thousands of faxes for a for-pay
subscription service.)

> Or if its worth writing an Emailer (implements Runnable) that would just
> take care of its business and let tomcat go on its merrry way.
>
> the user doesn't need to know what we are emailing or if it succeeds.
>
> anybody have any thoughts on that ?  extra thread overhead ? waste of my
> time ?
>

Besides the fact that it's probably an insignificant effect on response
time (unless you're sending large numbers of messages on one request),
using a separate thread here can be ***very*** dangerous if your thread
that creates the response needs access to the original request.  Once the
service() method of your servlet returns, it is not legal to reference the
request attributes -- so, if your message sending thread took longer than
the rest of the service() method, you'd be out of luck.

By the way, Tomcat 4 offers support for a JavaMail resource that you can
access from all of the servlets and JSP pages in your web app, without
having to configure all of them for the appropriate SMTP host.  See

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html

and read the section on "JavaMail Sessions" for configuration information
and a simple example.

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: UnknownHostException thrown from SmtpClient

2001-11-13 Thread Martin van den Bemt

I like the idea of a queue which holds the mails and tries until it works
(didn't have time to do that myself, just catching everything and not
throwing any exceptions, just logging to a mail log file if it doesn't
succeed).
So it depends on your time you can invest in it I guess..
I read somewhere that tomcat 4 has build in support for javamail and offers
services to send mail via javamail. I think searching on javamail on the
online backups of mailinglist backup might turn up some info. (eg
http://marc.theaimsgroup.com/?l=tomcat-user&r=1&w=2)

Have fun remodeling ;))

Mvgr,
Martin


> -Original Message-
> From: felix [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 10:43 PM
> To: Tomcat Users List
> Subject: Re: UnknownHostException thrown from SmtpClient
>
>
>
> Thanks, I think that's what needs to be done anyway.
>
> on a related topic,
> I've been trying to figure out if JavaMail threads / forks when it sends.
>
> Or if its worth writing an Emailer (implements Runnable) that would just
> take care of its business and let tomcat go on its merrry way.
>
> the user doesn't need to know what we are emailing or if it succeeds.
>
> anybody have any thoughts on that ?  extra thread overhead ? waste of my
> time ?
>
>
> > From: "Martin van den Bemt" <[EMAIL PROTECTED]>
> > Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Date: Tue, 13 Nov 2001 22:21:23 +0100
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Subject: RE: UnknownHostException thrown from SmtpClient
> >
> > Use JavaMail instead.. The SmtpClient (at least if that is the one in
> > com.sun or sun.) is as far as I know not even supported..
> > Never had any problems with that, unless the jvm couldn't find
> a host in the
> > first place, it tends to never find it again.
> >
> > Mvgr,
> > Martin
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: How to bring back pop-up with BASIC authentication

2001-11-13 Thread Bongiorno, Christian

Still no luck looking through the logs. I turned authentication to 99 and I
get all sorts of info, but nothing that would suggest what is going on.

Simply returning null from authenticate() should work? 

-Original Message-
From: Bongiorno, Christian [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 3:41 PM
To: 'Tomcat Users List'
Subject: RE: How to bring back pop-up with BASIC authentication


Thanks for responding. I am using TC 4.0.1. in web.xml under  I
have BASIC. I created a custom Realm, that's all. I will crank the debug up
and take a look.

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 3:18 PM
To: Tomcat Users List
Subject: RE: How to bring back pop-up with BASIC authentication




On Tue, 13 Nov 2001, Bongiorno, Christian wrote:

> Date: Tue, 13 Nov 2001 15:21:44 -0500
> From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: How to bring back pop-up with BASIC authentication
>
> You email gives good insight into some things. I am returning null in
> Realm.authenticate() for a failure. This only brings up the access denied
> page. So then, I need to change the authenticator for this webapp? I never
> changed it to being with. You did explain that I need to respond with 401,
> but how? Getting closer. I will look some more now giving new info
>

Let's step back a step and catch me up on the details.

* Which Tomcat version are you using (just want to confirm
  that we're talking about Tomcat 4)?

* Which authenticator are you using?  I only described how
  the standard BASIC Authenticator works, not what your
  custom one might want to do.  (This choice is determined
  by whatever you specified for  in web.xml.)

* Have you turned up the level of debugging detail to help
  figure out what is really going on?  You can do this in server.xml:

  
  

The last will log a bunch more information about the processing actually
being performed by the authenticator, and help you understand what is
going on.  Check the output logs in the "logs" directory.

> Chris
>

Craig


> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 2:55 PM
> To: Tomcat Users List
> Subject: Re: How to bring back pop-up with BASIC authentication
>
>
> On Tue, 13 Nov 2001, Bongiorno, Christian wrote:
>
> > Date: Tue, 13 Nov 2001 13:48:17 -0500
> > From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > Subject: How to bring back pop-up with BASIC authentication
> >
> > Can someone explain to me how I can tell tomcat from with in my custom
> realm
> > to prompt the user again for login is their password should fail? The
> built
> > in realms all do this, but for the life of me I can't figure out how
this
> is
> > being done in the code -- I have been over it several times.
> >
>
> (This is the Tomcat 4 version of the answer.)  The key point - it's NOT
> the Realm that prompts or reprompts the user -- it's the Authenticator
> that does this.
>
> A Realm is simply a "user database".  The various Authenticators acquire
> the username and password to be checked by some means specific to that
> authenticator.  Then, they try to validate the user by calling
> Realm.authenticate(username, password).  If the Realm returns null, that
> means the user was not recognized.  What happens next is totally up to
> that Authenticator.
>
> The Authenticator for BASIC is the easiest to understand
> (org.apache.catalina.authenticator.BasicAuthenticator).  Once it is
> determined that authentication is required, it does the following:
>
> * Have we authenticated a user already for the current
>   session?  If so, just reuse that identity.  (This caching
>   saves a lot of effort, especially when your Realm connects
>   to a remote database or directory serer).
>
> * Were the username and password included with this request?
>   If not, send back an HTTP 401 status, which triggers the
>   browser to put up the login dialog box.
>
> * Are the username and password valid?  This is checked by calling
>   Realm.authenticate().  If not, send back a 401 again (which
>   will cause the browser to reprompt the user).
>
> * Is there a session for this request?  If so, cache the
>   authenticated Principal so we can use it next time.
>
> * Update the current request so that getRemoteUser(), getUserPrincipal(),
>   and isUserInRole() will return the correct results based on the
>   authenticated user.
>
> (Warning -- don't try to understand the code in FormAuthenticator unless
> you want to go cross-eyed :-).
>
> Getting back to your original question, all your Realm should do is return
> null to the authenticate() call for an invalid username or password.  The
> Authenticator selected for this webapp will do the res

Re: upgrade b6 to 4.0.1

2001-11-13 Thread Craig R. McClanahan



On Tue, 13 Nov 2001, Brian K. Buckley wrote:

> Date: Tue, 13 Nov 2001 16:12:32 -0500
> From: Brian K. Buckley <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: upgrade b6 to 4.0.1
>
> > Do you have an old J2EE.jar in your classpath somewhere?
>
> I start Tomcat using the standard startup.bat in the bin directory.  Is my
> system classpath even used in the compiling of JSPs or anything else?  I
> thought not.
>

The system classpath (i.e. the CLASSPATH environment variable) is not
used, but Tomcat has all sorts of problems if you have a servlet.jar or
j2ee.jar file in your Java system extensions directory
($JAVA_HOME/jre/lib/ext).

Craig McClanahan


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: UnknownHostException thrown from SmtpClient

2001-11-13 Thread felix


Thanks, I think that's what needs to be done anyway.

on a related topic,
I've been trying to figure out if JavaMail threads / forks when it sends.

Or if its worth writing an Emailer (implements Runnable) that would just
take care of its business and let tomcat go on its merrry way.

the user doesn't need to know what we are emailing or if it succeeds.

anybody have any thoughts on that ?  extra thread overhead ? waste of my
time ?


> From: "Martin van den Bemt" <[EMAIL PROTECTED]>
> Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Date: Tue, 13 Nov 2001 22:21:23 +0100
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Subject: RE: UnknownHostException thrown from SmtpClient
> 
> Use JavaMail instead.. The SmtpClient (at least if that is the one in
> com.sun or sun.) is as far as I know not even supported..
> Never had any problems with that, unless the jvm couldn't find a host in the
> first place, it tends to never find it again.
> 
> Mvgr,
> Martin


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: upgrade b6 to 4.0.1

2001-11-13 Thread Brian K. Buckley

> Do you have an old J2EE.jar in your classpath somewhere?

I start Tomcat using the standard startup.bat in the bin directory.  Is my
system classpath even used in the compiling of JSPs or anything else?  I
thought not.


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: cannot execute binary file

2001-11-13 Thread Noble Long

yeah i did a chmod 777. I think it probably has to do with my connection. I
am using VPN to connect, then a Reflection telnet session into one machine
and then a telnet into another machine, then su root. I guess when you
transfer from that type of connection even though I am transfering from a
web available FTP site, it screws up your files. Where is Samba when you
need it?

I got it working by just extracting my Oracle driver classes into my classes
directory.

Thanks,
Noble

- Original Message -
From: "Martin van den Bemt" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 2:42 PM
Subject: RE: cannot execute binary file


> You don't have sufficient rights on the file
> It probabably only has read access , so do a chmod 555 or something like
> that (don't know your system, so you have to figure that out..)
>
> Mvgr,
> Martin
>
> > -Original Message-
> > From: Noble Long [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 13, 2001 9:42 PM
> > To: [EMAIL PROTECTED]
> > Subject: cannot execute binary file
> >
> >
> > I am using the Oracle jdbc thin client in my application. I added
> > it to my classpath /usr/local/classes12.zip , but when I start
> > Tomcat I am getting -
> >
> > bin/tomcat.sh: /usr/local/classes12.zip: cannot execute binary file
> >
> > I tried other jar, files, etc. and everyone I transefered either
> > in binary mode or ascii via FTP, XMODEM or ZMODEM gives me the
> > same message.
> >
> > Is my file being corrupted between windows and linux. I am
> > working with a remote telnet session so I can't exactly download
> > from Oracle's website to that machine. Funny thing is ... I have
> > the same Red Hat 6.2 environment here except I'm using tomcat
> > 3.2.3 instead of 3.2.1 (would it make a difference?)
> >
> > Noble
> >
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: UnknownHostException thrown from SmtpClient

2001-11-13 Thread felix


btw. i can open a socket (port 25) directly via i.p.


> From: felix <[EMAIL PROTECTED]>
> 
> 
> 
> Migrating some old code that uses the sun SmtpClient to a new server.
> 
> the SmtpClient throws an UnknownHostException, I'm using the i.p. address of
> the mail server, which is actually on the same box.
> 
> i tried 127.0.0.1 and localhost and the named host (but not yet dns
> transferred).
> 
> all the same exception.  the mailserver (exim) is not even being contacted.
> 
> i'm thinking its tomcat or jvm not knowing a dns host yet ?

since its not using dns anyway (i.p.), i don't know why sun SmtpClient would
throw an unknown host.

> 
> clues anyone ?
> 
> I found one person relating the same thing:
> 
> they moved stuff from one tomcat(nt) to tomcat(linux) using the same smtp
> server and it no longer worked. couldn't find the server.
> 
> 
> thanks!
> 
> 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: cryptography - slow starting????

2001-11-13 Thread Gerry Duhig

Brilliant - thank you!
- Original Message -
From: "Bo Xu" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 8:23 PM
Subject: Re: cryptography - slow starting


> - Original Message -
> From: "Gerry Duhig" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>; "David Wall"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, November 13, 2001 1:36 PM
> Subject: Re: cryptography - slow starting
>
>
> > I guessed as much! How do I force it to happen at startup?
> >
> > Gerry
> >[...]
>
>
> you can put the initialization of cryptography classes in the init(...)
> method of YourServlet, and in the "Servlet-declarition" of
> YourServlet in webapps/yourapp0/WEB-INF/web.xml, you can
> add something like the following:
> 1
>
> it will ask the container to initialize that "Servlet-declarition" of
> YourServlet
> at the starting-period of container.
>
> you also can use "random seed" to seach in:
> http://www.mail-archive.com/tomcat-user@jakarta.apache.org/
>
>
> haha :-)
> Bo
> Nov.13, 2001
>
>
>
>
> > - Original Message -
> > From: "David Wall" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Tuesday, November 13, 2001 6:08 PM
> > Subject: Re: cryptography - slow starting
> >
> >
> > > It's the SecureRandom initialization.  You could just force such an
> > > initialization at startup so that startup has a bit of a slowdown, but
> > then
> > > it runs fast the rest of the time.
> > >
> > > David
> > >
> > >
> > > - Original Message -
> > > From: "Gerry Duhig" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, November 13, 2001 10:02 AM
> > > Subject: cryptography - slow starting
> > >
> > >
> > > Hi!
> > >
> > > I have successfully built a servlet that uses JCE to encrypt data and
> > > deployed it under JBoss Tomcat 2.4.1-3.2.2.
> > >
> > > The very first access is VERY slow as the cryptography classes do some
> > sort
> > > of initialisation. I don't know what.
> > >
> > > Subsequent actions seem very quick.
> > >
> > > Is this to be expected? Can I speed it up? Can I get this
initialisation
> > to
> > > take place at start-up before a user accesses the servlet?
> > >
> > > Gerry
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe:   
> > > For additional commands: 
> > > Troubles with the list: 
> > >
> >
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
> >
>
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: UnknownHostException thrown from SmtpClient

2001-11-13 Thread Martin van den Bemt

Use JavaMail instead.. The SmtpClient (at least if that is the one in
com.sun or sun.) is as far as I know not even supported..
Never had any problems with that, unless the jvm couldn't find a host in the
first place, it tends to never find it again.

Mvgr,
Martin

> -Original Message-
> From: felix [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 10:14 PM
> To: Tomcat Users List
> Subject: UnknownHostException thrown from SmtpClient
>
>
>
>
> Migrating some old code that uses the sun SmtpClient to a new server.
>
> the SmtpClient throws an UnknownHostException, I'm using the i.p.
> address of
> the mail server, which is actually on the same box.
>
> i tried 127.0.0.1 and localhost and the named host (but not yet dns
> transferred).
>
> all the same exception.  the mailserver (exim) is not even being
> contacted.
>
> i'm thinking its tomcat or jvm not knowing a dns host yet ?
>
> clues anyone ?
>
> I found one person relating the same thing:
>
> they moved stuff from one tomcat(nt) to tomcat(linux) using the same smtp
> server and it no longer worked. couldn't find the server.
>
>
> thanks!
>
>
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Two Tomcats on one Server

2001-11-13 Thread Govind Agarwal


We are facing a problem with isapi redirection in our application.

Our application uses Tomcat3.2.2, IIS 5.0 and Win 2k Server.
There was no problem with the application till now.
We create an virtual directory in IIS, set an filter for JSP's to tomcat.

But now there is one more application on the server which is using
Tomcat(completely seperate tomcat.It uses it on server.xml,workers and other
config files).It creates it seperate redirector.


The problem is that now when we access the JSP the following error is
displayed.

Not Found (404)
Original request: /car_jakarta/car_isapi_redirect.dll

Not found request: /car_jakarta/car_isapi_redirect.dll

Now my question is can we have two difft Tomcat on the same server? If yes
are there some limitations or some Issues?

Can any body help in this regard

Thanks in Advance
Govind


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Sending all request to one servlet?

2001-11-13 Thread Frank Lawlor

Just the /generator/* mapping should be sufficient.

What is the full URL you are entering?  Should be
something like http://host:port/your_webapp/generator/TestView 

What do the logs say?  Turn on debugging for ContextManager
to see how it is trying to resolve the mapping.

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




UnknownHostException thrown from SmtpClient

2001-11-13 Thread felix



Migrating some old code that uses the sun SmtpClient to a new server.

the SmtpClient throws an UnknownHostException, I'm using the i.p. address of
the mail server, which is actually on the same box.

i tried 127.0.0.1 and localhost and the named host (but not yet dns
transferred).

all the same exception.  the mailserver (exim) is not even being contacted.

i'm thinking its tomcat or jvm not knowing a dns host yet ?

clues anyone ?

I found one person relating the same thing:

they moved stuff from one tomcat(nt) to tomcat(linux) using the same smtp
server and it no longer worked. couldn't find the server.


thanks!




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Re: Jakarta NT Service

2001-11-13 Thread Travis Schmid

Thanks for the thought but it is neither of those things. I was using the
-Xrs flag and was NOT encountering the shutdown bug.  The additional
services would shutdown immediately upon starting a second service.  I
didn't have to logout for the problem to occur.  
The services were installed using a batch script and each service had a
unique name.  The exact same configuration files were used successfully on
Win2k server.  Hence my conclusion that it has something to do with Win2k
Pro.
I'm no longer concerned that it doesn't work on Win2k Pro.  I'm now only
doing work on our Win2k Server development server where I don't have the
problem.  It was just my proof of concept environment on my laptop that I
had the problem.

Travis

-Original Message-
From: Frank Lawlor [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 12:47 PM
To: Tomcat (E-mail)
Subject: RE: Re: Jakarta NT Service


> I could install as many as I wanted but only one would run at a time.
Some possibilities:
 - you didn't give each a unique service name
 - you are encountering the JVM 3.0 service shutdown bug,
   (see other posts: search on -Xrs)

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: cannot execute binary file

2001-11-13 Thread Martin van den Bemt

You don't have sufficient rights on the file
It probabably only has read access , so do a chmod 555 or something like
that (don't know your system, so you have to figure that out..)

Mvgr,
Martin

> -Original Message-
> From: Noble Long [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 9:42 PM
> To: [EMAIL PROTECTED]
> Subject: cannot execute binary file
>
>
> I am using the Oracle jdbc thin client in my application. I added
> it to my classpath /usr/local/classes12.zip , but when I start
> Tomcat I am getting -
>
> bin/tomcat.sh: /usr/local/classes12.zip: cannot execute binary file
>
> I tried other jar, files, etc. and everyone I transefered either
> in binary mode or ascii via FTP, XMODEM or ZMODEM gives me the
> same message.
>
> Is my file being corrupted between windows and linux. I am
> working with a remote telnet session so I can't exactly download
> from Oracle's website to that machine. Funny thing is ... I have
> the same Red Hat 6.2 environment here except I'm using tomcat
> 3.2.3 instead of 3.2.1 (would it make a difference?)
>
> Noble
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Re: Jakarta NT Service

2001-11-13 Thread Frank Lawlor

> I could install as many as I wanted but only one would run at a time.
Some possibilities:
 - you didn't give each a unique service name
 - you are encountering the JVM 3.0 service shutdown bug,
   (see other posts: search on -Xrs)

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Tomcat as a remote server

2001-11-13 Thread Randy Layman


If you had provided the full text of the error message I could have
answered you better, but I believe one of two things are happening:
1.  Something else is trying to use the port that Tomcat wants (you
can use netstat -a to determine what ports are in use)
2.  You are trying to use a restricted port.  Generally UNIX
reserves ports 1024 and below for usage only by root.  If you are not using
one of these ports then its probably not the problem.

Randy


>  -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, November 13, 2001 3:04 PM
> To:   'Tomcat Users List'
> Subject:  Tomcat as a remote server
> 
> Being a "newbie" to tomcat and linux, I lost tons of hair to 
> integrated Apache1.3.22 and Tomcat 4.0.1.  Having that 
> completed I'd like to separate Apache and Tomcat to different boxes.  
> 
> I am running RH7.1 on both servers.  The server I want to 
> house tomcat is unwilling to start the tomcat-apache service 
> .  The error reported in catalina.out is:  Starting Service 
> Tomcat-Apache Apache Tomcat4.0.1 Standard server await: 
> create: java.net.BindException: Cannot assign requested 
> address
> 
> I suspect this to be because there is not a local 
> installation of apache.  I changed the tomcat-apache service 
> connector port to reflect " ApacheServer:8008 " to no avail.  
> 
> Any suggestions?
> 
> Thank you, in advance, for your time and efforts in responding.
> 
> Suzanne  
> 
>  << File: ATT05915.txt >> 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Jakarta NT Service

2001-11-13 Thread Frank Lawlor

It helps to look thru previous posts. 
Go to http://mikal.org/interests/java/tomcat/index.jsp
and look for "Catalina as an NT Service"

Look to see it there is anything in the logs directory.

It there is little or nothing there it is usually a 
problem with the specs in the wrapper.properties
file.  Be very sure the wrapper.tomcat_home and
wrapper.java_home are correct.

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: How to bring back pop-up with BASIC authentication

2001-11-13 Thread Bongiorno, Christian

Thanks for responding. I am using TC 4.0.1. in web.xml under  I
have BASIC. I created a custom Realm, that's all. I will crank the debug up
and take a look.

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 3:18 PM
To: Tomcat Users List
Subject: RE: How to bring back pop-up with BASIC authentication




On Tue, 13 Nov 2001, Bongiorno, Christian wrote:

> Date: Tue, 13 Nov 2001 15:21:44 -0500
> From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: How to bring back pop-up with BASIC authentication
>
> You email gives good insight into some things. I am returning null in
> Realm.authenticate() for a failure. This only brings up the access denied
> page. So then, I need to change the authenticator for this webapp? I never
> changed it to being with. You did explain that I need to respond with 401,
> but how? Getting closer. I will look some more now giving new info
>

Let's step back a step and catch me up on the details.

* Which Tomcat version are you using (just want to confirm
  that we're talking about Tomcat 4)?

* Which authenticator are you using?  I only described how
  the standard BASIC Authenticator works, not what your
  custom one might want to do.  (This choice is determined
  by whatever you specified for  in web.xml.)

* Have you turned up the level of debugging detail to help
  figure out what is really going on?  You can do this in server.xml:

  
  

The last will log a bunch more information about the processing actually
being performed by the authenticator, and help you understand what is
going on.  Check the output logs in the "logs" directory.

> Chris
>

Craig


> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 2:55 PM
> To: Tomcat Users List
> Subject: Re: How to bring back pop-up with BASIC authentication
>
>
> On Tue, 13 Nov 2001, Bongiorno, Christian wrote:
>
> > Date: Tue, 13 Nov 2001 13:48:17 -0500
> > From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > Subject: How to bring back pop-up with BASIC authentication
> >
> > Can someone explain to me how I can tell tomcat from with in my custom
> realm
> > to prompt the user again for login is their password should fail? The
> built
> > in realms all do this, but for the life of me I can't figure out how
this
> is
> > being done in the code -- I have been over it several times.
> >
>
> (This is the Tomcat 4 version of the answer.)  The key point - it's NOT
> the Realm that prompts or reprompts the user -- it's the Authenticator
> that does this.
>
> A Realm is simply a "user database".  The various Authenticators acquire
> the username and password to be checked by some means specific to that
> authenticator.  Then, they try to validate the user by calling
> Realm.authenticate(username, password).  If the Realm returns null, that
> means the user was not recognized.  What happens next is totally up to
> that Authenticator.
>
> The Authenticator for BASIC is the easiest to understand
> (org.apache.catalina.authenticator.BasicAuthenticator).  Once it is
> determined that authentication is required, it does the following:
>
> * Have we authenticated a user already for the current
>   session?  If so, just reuse that identity.  (This caching
>   saves a lot of effort, especially when your Realm connects
>   to a remote database or directory serer).
>
> * Were the username and password included with this request?
>   If not, send back an HTTP 401 status, which triggers the
>   browser to put up the login dialog box.
>
> * Are the username and password valid?  This is checked by calling
>   Realm.authenticate().  If not, send back a 401 again (which
>   will cause the browser to reprompt the user).
>
> * Is there a session for this request?  If so, cache the
>   authenticated Principal so we can use it next time.
>
> * Update the current request so that getRemoteUser(), getUserPrincipal(),
>   and isUserInRole() will return the correct results based on the
>   authenticated user.
>
> (Warning -- don't try to understand the code in FormAuthenticator unless
> you want to go cross-eyed :-).
>
> Getting back to your original question, all your Realm should do is return
> null to the authenticate() call for an invalid username or password.  The
> Authenticator selected for this webapp will do the rest.
>
> > Any help would be appreciated.
> >
> > Chris (new to the group)
> >
>
> Craig
>
>
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
> >
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 

cannot execute binary file

2001-11-13 Thread Noble Long

I am using the Oracle jdbc thin client in my application. I added it to my classpath 
/usr/local/classes12.zip , but when I start Tomcat I am getting -

bin/tomcat.sh: /usr/local/classes12.zip: cannot execute binary file

I tried other jar, files, etc. and everyone I transefered either in binary mode or 
ascii via FTP, XMODEM or ZMODEM gives me the same message.

Is my file being corrupted between windows and linux. I am working with a remote 
telnet session so I can't exactly download from Oracle's website to that machine. 
Funny thing is ... I have the same Red Hat 6.2 environment here except I'm using 
tomcat 3.2.3 instead of 3.2.1 (would it make a difference?)

Noble



Re: Invoking Servlet - trying to remove servlet prefix

2001-11-13 Thread Frank Lawlor

There are a couple of possible problem areas:

>  LoginServlet  
most classes are of the  form com.mycom.classname. 
The above says yours is just classname.

> i just want http://localhost:8080/login/login 
but you have defined the mapping /login, not /login/login.
If you look in the logs you should see some more infromation.
By turning on more debug info, esp. for the ContextManager,
you should see more mapping information which will help
you see how it is trying to resolve the URL.

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: How to bring back pop-up with BASIC authentication

2001-11-13 Thread Craig R. McClanahan



On Tue, 13 Nov 2001, Bongiorno, Christian wrote:

> Date: Tue, 13 Nov 2001 15:21:44 -0500
> From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: How to bring back pop-up with BASIC authentication
>
> You email gives good insight into some things. I am returning null in
> Realm.authenticate() for a failure. This only brings up the access denied
> page. So then, I need to change the authenticator for this webapp? I never
> changed it to being with. You did explain that I need to respond with 401,
> but how? Getting closer. I will look some more now giving new info
>

Let's step back a step and catch me up on the details.

* Which Tomcat version are you using (just want to confirm
  that we're talking about Tomcat 4)?

* Which authenticator are you using?  I only described how
  the standard BASIC Authenticator works, not what your
  custom one might want to do.  (This choice is determined
  by whatever you specified for  in web.xml.)

* Have you turned up the level of debugging detail to help
  figure out what is really going on?  You can do this in server.xml:

  
  

The last will log a bunch more information about the processing actually
being performed by the authenticator, and help you understand what is
going on.  Check the output logs in the "logs" directory.

> Chris
>

Craig


> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 2:55 PM
> To: Tomcat Users List
> Subject: Re: How to bring back pop-up with BASIC authentication
>
>
> On Tue, 13 Nov 2001, Bongiorno, Christian wrote:
>
> > Date: Tue, 13 Nov 2001 13:48:17 -0500
> > From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> > Subject: How to bring back pop-up with BASIC authentication
> >
> > Can someone explain to me how I can tell tomcat from with in my custom
> realm
> > to prompt the user again for login is their password should fail? The
> built
> > in realms all do this, but for the life of me I can't figure out how this
> is
> > being done in the code -- I have been over it several times.
> >
>
> (This is the Tomcat 4 version of the answer.)  The key point - it's NOT
> the Realm that prompts or reprompts the user -- it's the Authenticator
> that does this.
>
> A Realm is simply a "user database".  The various Authenticators acquire
> the username and password to be checked by some means specific to that
> authenticator.  Then, they try to validate the user by calling
> Realm.authenticate(username, password).  If the Realm returns null, that
> means the user was not recognized.  What happens next is totally up to
> that Authenticator.
>
> The Authenticator for BASIC is the easiest to understand
> (org.apache.catalina.authenticator.BasicAuthenticator).  Once it is
> determined that authentication is required, it does the following:
>
> * Have we authenticated a user already for the current
>   session?  If so, just reuse that identity.  (This caching
>   saves a lot of effort, especially when your Realm connects
>   to a remote database or directory serer).
>
> * Were the username and password included with this request?
>   If not, send back an HTTP 401 status, which triggers the
>   browser to put up the login dialog box.
>
> * Are the username and password valid?  This is checked by calling
>   Realm.authenticate().  If not, send back a 401 again (which
>   will cause the browser to reprompt the user).
>
> * Is there a session for this request?  If so, cache the
>   authenticated Principal so we can use it next time.
>
> * Update the current request so that getRemoteUser(), getUserPrincipal(),
>   and isUserInRole() will return the correct results based on the
>   authenticated user.
>
> (Warning -- don't try to understand the code in FormAuthenticator unless
> you want to go cross-eyed :-).
>
> Getting back to your original question, all your Realm should do is return
> null to the authenticate() call for an invalid username or password.  The
> Authenticator selected for this webapp will do the rest.
>
> > Any help would be appreciated.
> >
> > Chris (new to the group)
> >
>
> Craig
>
>
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
> >
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: cryptography - slow starting????

2001-11-13 Thread Bo Xu

- Original Message -
From: "Gerry Duhig" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>; "David Wall"
<[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 1:36 PM
Subject: Re: cryptography - slow starting


> I guessed as much! How do I force it to happen at startup?
>
> Gerry
>[...]


you can put the initialization of cryptography classes in the init(...)
method of YourServlet, and in the "Servlet-declarition" of
YourServlet in webapps/yourapp0/WEB-INF/web.xml, you can
add something like the following:
1

it will ask the container to initialize that "Servlet-declarition" of
YourServlet
at the starting-period of container.

you also can use "random seed" to seach in:
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/


haha :-)
Bo
Nov.13, 2001




> - Original Message -
> From: "David Wall" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 13, 2001 6:08 PM
> Subject: Re: cryptography - slow starting
>
>
> > It's the SecureRandom initialization.  You could just force such an
> > initialization at startup so that startup has a bit of a slowdown, but
> then
> > it runs fast the rest of the time.
> >
> > David
> >
> >
> > - Original Message -
> > From: "Gerry Duhig" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, November 13, 2001 10:02 AM
> > Subject: cryptography - slow starting
> >
> >
> > Hi!
> >
> > I have successfully built a servlet that uses JCE to encrypt data and
> > deployed it under JBoss Tomcat 2.4.1-3.2.2.
> >
> > The very first access is VERY slow as the cryptography classes do some
> sort
> > of initialisation. I don't know what.
> >
> > Subsequent actions seem very quick.
> >
> > Is this to be expected? Can I speed it up? Can I get this initialisation
> to
> > take place at start-up before a user accesses the servlet?
> >
> > Gerry
> >
> >
> >
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: How to bring back pop-up with BASIC authentication

2001-11-13 Thread Bongiorno, Christian

You email gives good insight into some things. I am returning null in
Realm.authenticate() for a failure. This only brings up the access denied
page. So then, I need to change the authenticator for this webapp? I never
changed it to being with. You did explain that I need to respond with 401,
but how? Getting closer. I will look some more now giving new info

Chris

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:55 PM
To: Tomcat Users List
Subject: Re: How to bring back pop-up with BASIC authentication


On Tue, 13 Nov 2001, Bongiorno, Christian wrote:

> Date: Tue, 13 Nov 2001 13:48:17 -0500
> From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: How to bring back pop-up with BASIC authentication
>
> Can someone explain to me how I can tell tomcat from with in my custom
realm
> to prompt the user again for login is their password should fail? The
built
> in realms all do this, but for the life of me I can't figure out how this
is
> being done in the code -- I have been over it several times.
>

(This is the Tomcat 4 version of the answer.)  The key point - it's NOT
the Realm that prompts or reprompts the user -- it's the Authenticator
that does this.

A Realm is simply a "user database".  The various Authenticators acquire
the username and password to be checked by some means specific to that
authenticator.  Then, they try to validate the user by calling
Realm.authenticate(username, password).  If the Realm returns null, that
means the user was not recognized.  What happens next is totally up to
that Authenticator.

The Authenticator for BASIC is the easiest to understand
(org.apache.catalina.authenticator.BasicAuthenticator).  Once it is
determined that authentication is required, it does the following:

* Have we authenticated a user already for the current
  session?  If so, just reuse that identity.  (This caching
  saves a lot of effort, especially when your Realm connects
  to a remote database or directory serer).

* Were the username and password included with this request?
  If not, send back an HTTP 401 status, which triggers the
  browser to put up the login dialog box.

* Are the username and password valid?  This is checked by calling
  Realm.authenticate().  If not, send back a 401 again (which
  will cause the browser to reprompt the user).

* Is there a session for this request?  If so, cache the
  authenticated Principal so we can use it next time.

* Update the current request so that getRemoteUser(), getUserPrincipal(),
  and isUserInRole() will return the correct results based on the
  authenticated user.

(Warning -- don't try to understand the code in FormAuthenticator unless
you want to go cross-eyed :-).

Getting back to your original question, all your Realm should do is return
null to the authenticate() call for an invalid username or password.  The
Authenticator selected for this webapp will do the rest.

> Any help would be appreciated.
>
> Chris (new to the group)
>

Craig


> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: upgrade b6 to 4.0.1

2001-11-13 Thread MacDonald, Todd

Do you have an old J2EE.jar in your classpath somewhere?

-T

-Original Message-
From: Brian K. Buckley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:42 PM
To: Tomcat Users List
Subject: Re: upgrade b6 to 4.0.1


> The most likely scenario is that you are somehow trying to use the
> generated source files (for your JSP pages) from the "b6" release in the
> 4.0.1 release.  This won't work.  To get rid of them, shut down Tomcat and
> delete the entire contents of the "work" directory.  Then, when you
> restart, the sources will get regenerated under the 4.0.1 compiler.

Your scenario certainly sounds like it is on track, but it didn't work.  I
deleted the work directory (of 4.0.1 and also b6 and prior too) but the
regenerated source has the same Tag/BodyTag package problem.  Any other
thoughts?

- Brian


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: session using URLrewriting

2001-11-13 Thread Craig R. McClanahan



On Tue, 13 Nov 2001, Raphael Mack wrote:

> Date: Tue, 13 Nov 2001 20:53:23 +0100
> From: Raphael Mack <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: session using URLrewriting
>
> Thanks, but that doesn't help. No cookies are sent, when I add this but
> the URL isn't rewritten.
>

Rewriting URLs is the *application's* responsibility, not the container.
Tomcat doesn't even look at the bytes in the response.

For example, if you're using JSP, you might write something like this to
create a hyperlink that includes a rewritten URL:

  Go to Foo

If cookies are in use, the URL will be left alone -- if not, it will be
rewritten.

> Rapha
>

Craig


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: how to deploy default context

2001-11-13 Thread Kevin Barnes

If you deploy your app in the root context and use mod_webapp aren't you
effectively going to be sending every request to Tomcat? f that's the
case you aren't going to be able to take advantage of Apache's ability to
serve static content. I recently had the same issue and ended up using
mod_jk instead of mod_webapp because it allows you to specify url
patterns to send to Tomcat and have Apache handle the static stuff (like
images).
Hope that helps
-kb

Jeff Ramin wrote:

> I'm trying to use Apache to serve the default Tomcat
> Context, and can't figure out how to make it work.
>
> I've compiled mod_webapp, and successfully configured
> Apache to talk to Tomcat via config statements like
> this:
>
>WebAppConnection warpConnection warp puffy:8008
>WebAppDeploy examples warpConnection /examples/
>
> These statements let me get at the examples webapp that
> comes with Tomcat.
>
> I want to replace the default context w/ my own application,
> as all the links are set up as the default (ie.  I need to
> be able to access it via localhost/index.jsp and not
> localhost//index.jsp).
>
> >From reading the docs, my only guess at the correct
> Apache directive would be this:
>
>WebAppDeploy "" warpConnection /
>
> But apachectl configtest says that's not valid.
>
> Suggestions?  This is Apache 1.3.7 and Tomcat 4.0.1
> on Redhat 6.2.
>
> Thanks.
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: upgrade b6 to 4.0.1

2001-11-13 Thread Brian K. Buckley

> The most likely scenario is that you are somehow trying to use the
> generated source files (for your JSP pages) from the "b6" release in the
> 4.0.1 release.  This won't work.  To get rid of them, shut down Tomcat and
> delete the entire contents of the "work" directory.  Then, when you
> restart, the sources will get regenerated under the 4.0.1 compiler.

Your scenario certainly sounds like it is on track, but it didn't work.  I
deleted the work directory (of 4.0.1 and also b6 and prior too) but the
regenerated source has the same Tag/BodyTag package problem.  Any other
thoughts?

- Brian


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: How to bring back pop-up with BASIC authentication

2001-11-13 Thread Craig R. McClanahan

On Tue, 13 Nov 2001, Bongiorno, Christian wrote:

> Date: Tue, 13 Nov 2001 13:48:17 -0500
> From: "Bongiorno, Christian" <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: 'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: How to bring back pop-up with BASIC authentication
>
> Can someone explain to me how I can tell tomcat from with in my custom realm
> to prompt the user again for login is their password should fail? The built
> in realms all do this, but for the life of me I can't figure out how this is
> being done in the code -- I have been over it several times.
>

(This is the Tomcat 4 version of the answer.)  The key point - it's NOT
the Realm that prompts or reprompts the user -- it's the Authenticator
that does this.

A Realm is simply a "user database".  The various Authenticators acquire
the username and password to be checked by some means specific to that
authenticator.  Then, they try to validate the user by calling
Realm.authenticate(username, password).  If the Realm returns null, that
means the user was not recognized.  What happens next is totally up to
that Authenticator.

The Authenticator for BASIC is the easiest to understand
(org.apache.catalina.authenticator.BasicAuthenticator).  Once it is
determined that authentication is required, it does the following:

* Have we authenticated a user already for the current
  session?  If so, just reuse that identity.  (This caching
  saves a lot of effort, especially when your Realm connects
  to a remote database or directory serer).

* Were the username and password included with this request?
  If not, send back an HTTP 401 status, which triggers the
  browser to put up the login dialog box.

* Are the username and password valid?  This is checked by calling
  Realm.authenticate().  If not, send back a 401 again (which
  will cause the browser to reprompt the user).

* Is there a session for this request?  If so, cache the
  authenticated Principal so we can use it next time.

* Update the current request so that getRemoteUser(), getUserPrincipal(),
  and isUserInRole() will return the correct results based on the
  authenticated user.

(Warning -- don't try to understand the code in FormAuthenticator unless
you want to go cross-eyed :-).

Getting back to your original question, all your Realm should do is return
null to the authenticate() call for an invalid username or password.  The
Authenticator selected for this webapp will do the rest.

> Any help would be appreciated.
>
> Chris (new to the group)
>

Craig


> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Tomcat as a remote server

2001-11-13 Thread Suzanne Reiner 8423

Being a "newbie" to tomcat and linux, I lost tons of hair to integrated Apache1.3.22 
and Tomcat 4.0.1.  Having that completed I'd like to separate Apache and Tomcat to 
different boxes.  

I am running RH7.1 on both servers.  The server I want to house tomcat is unwilling to 
start the tomcat-apache service .  The error reported in catalina.out is:  Starting 
Service Tomcat-Apache Apache Tomcat4.0.1 Standard server await: create: 
java.net.BindException: Cannot assign requested address

I suspect this to be because there is not a local installation of apache.  I changed 
the tomcat-apache service connector port to reflect " ApacheServer:8008 " to no avail. 
 

Any suggestions?

Thank you, in advance, for your time and efforts in responding.

Suzanne  




msg36785/bin0.bin
Description: application/ms-tnef

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


how to put self-made certificate for SSL

2001-11-13 Thread Miao, Franco CAWS:EX

Hi there, 


I have made a certificate with MS certicate server, want to put it into
Tomcat 4.01 for SSL website test, just wondering anyone has experience on
that, thanks!

Franco

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: session using URLrewriting

2001-11-13 Thread Raphael Mack

Thanks, but that doesn't help. No cookies are sent, when I add this but 
the URL isn't rewritten.

Rapha

Am Dienstag, 13. November 2001 20:22 schrieben Sie:
> For Tomcat 4.x, I believe you use the "cookies" attribute of
> the Context element in server.xml, i.e.:
>
> 
> For Tomcat 3.3, you use the "noCookies" atttribute of the
> SessionId module in server.xml, i.e.:
>
> 
> For Tomcat 3.2.x, you also use the "noCookies" attribute:
>
>  className="org.apache.tomcat.request.SessionInterceptor"
> noCookies="true" />
>
> Cheers,
> Larry
>
> > -Original Message-
> > From: Raphael Mack [mailto:[EMAIL PROTECTED]]
> > is it possible to force sessions to use URL-rewriting and not using
> > cockies and how?
> >
> > Thanks,
> > Raphael
-- 
procreo - Webseitenentwicklung und Individualsoftwarelösungen
 _
/ __  /  _/ __  / ___/  _/ / __  /  procreo GbR
   / /_/ / / / /_/ / /__/ / /  O__/ /_/ /   Kochgasse 1
  / /_/ /_//_/ /_/_/73630 Remshalden
 / /[EMAIL PROTECTED]
/_/  http://www.procreo.de

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: [servlets] Error when wrapping a response object

2001-11-13 Thread Jay Wright


Well I though you might have had it, but I've added a closeWriter method and
still no dice.  See anything I'm overlooking (some dumb mistake from too
many hours of staring at it)?

I'm using a controller servlet with handler classes.  In the handler for my
"submit" I have:

AtOnceServletResponse htmlWrapper =
new AtOnceServletResponse(response, client.getFilePath() + 
RequestDispatcher rd =
request.getRequestDispatcher(template.getTemplateName());
rd.include(request, htmlWrapper);
htmlWrapper.closeWriter();

The closeWriter() method simply calls the PrintWriter's close() method.

In the main servlet, it still throws an error when I try to do a redirect or
forward.

Frustrating.

> -Original Message-
> From: Martin van den Bemt [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 11:02 AM
> To: Tomcat Users List
> Subject: RE: [servlets] Error when wrapping a response object
>  
> Close the writer you have opened to write to the html stream 
> should (if I'm
> not mistaking) make this work.
> 
> Mvgr,
> Martin
> 
> > -Original Message-
> > From: Jay Wright [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 13, 2001 8:09 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: FW: [servlets] Error when wrapping a response object
> >
> >
> >
> > Has anyone using Tomcat seen a problem like this?  In short, I am
> > wrapping a
> > response object so I can write the HTML to a file.  Then, I 
> would like to
> > use the ReqeustDispatcher to forward the response or at the 
> very least use
> > the response objects sendRedirect to go to the next page.
> >
> > With Resin, this works fine.  In Tomcat, I get an error which
> > wont allow me
> > to do either becuase the response object is "committed."  The
> > attached email
> > explains further.
> >
> > Any one seen this before?
> >
> > Jay
> >
> > -Original Message-
> > From: Jay Wright [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 02, 2001 10:36 AM
> > To: Servlets
> > Subject: [servlets] Error when wrapping a response object
> >
> >
> >
> > Hi all,
> >
> > I am getting a servlet error which has something to do with 
> a wrapped
> > response object.
> >
> > With Resin, I have created a servlet that wraps a response 
> object for the
> > purpose of writing the response's html to a file.  This complete
> > successfully, then the RequestDispatcher forwards the 
> request to a jsp,
> > which in effect displays a thank you page.  It works wonderfully.
> >
> > When I deploy the same application to Tomcat, I get the 
> following error:
> >
> > java.lang.IllegalStateException: Cannot forward after 
> response has been
> > committed
> > at
> > org.apache.catalina.core.ApplicationDispatcher.doForward(Unknown
> > Source)
> > at 
> org.apache.catalina.core.ApplicationDispatcher.forward(Unknown
> > Source)
> > at atonce.mas.web.MainServlet.doGet(MainServlet.java:88)
> >
> > Apparently the two servlet containers handle this 
> differently.  As curious
> > as this is, I'm more concerned with getting the tomcat version
> > working.  Is
> > there anything I can do to "uncommit" the response?  I assume
> > not.  I could
> > use a sendRedirect, but would prefer to stick with the 
> RequestDispatchers
> > forward method to be consistent and standard with my servlet model.
> >
> > Any ideas?
> >
> > Thanks,
> > Jay
> >
> > ---
> > SIGS Conference for Java Development
> > Targeted, focused classes, expertise level classes
> > taught by Java gurus, rigorous tutorials, and
> > exhibit floor makes SIGS Conference for Java
> > Development a learning experience unlike any
> > other. Join over 10,000 developers and programmers
> > from across the U.S. and around the world who
> > have benefited from attending SIGS/101 Conferences.
> > http://www.javadevcon.com
> > ---
> > You are currently subscribed to servlets as: [EMAIL PROTECTED]
> > To unsubscribe send a blank email to 
> [EMAIL PROTECTED]
> >
> > --
> > To unsubscribe:   

> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Tomcat 4.0.1 + IIS

2001-11-13 Thread alessander

Hi
do somebody knows how to integrate Tomcat 4.0.1 and IIS 5 (W2k)?
I haven'' found any doc...

Thanks a lot


Alessander Fecchio
DIS/DISGE/TID - IESTEC
55 41 3314849


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: session using URLrewriting

2001-11-13 Thread Larry Isaacs

For Tomcat 4.x, I believe you use the "cookies" attribute of
the Context element in server.xml, i.e.:



Cheers,
Larry

> -Original Message-
> From: Raphael Mack [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 1:39 PM
> To: Tomcat Users List
> Subject: session using URLrewriting
> 
> 
> Hello,
> 
> is it possible to force sessions to use URL-rewriting and not using 
> cockies and how?
> 
> Thanks,
> Raphael
> 
> -- 
> procreo - Webseitenentwicklung und Individualsoftwarelösungen
>  _
> / __  /  _/ __  / ___/  _/ / __  /  procreo GbR
>/ /_/ / / / /_/ / /__/ / /  O__/ /_/ /   Kochgasse 1
>   / /_/ /_//_/ /_/_/73630 Remshalden
>  / /[EMAIL PROTECTED]
> /_/  http://www.procreo.de
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




how to deploy default context

2001-11-13 Thread Jeff Ramin


I'm trying to use Apache to serve the default Tomcat
Context, and can't figure out how to make it work.

I've compiled mod_webapp, and successfully configured
Apache to talk to Tomcat via config statements like
this:

   WebAppConnection warpConnection warp puffy:8008
   WebAppDeploy examples warpConnection /examples/

These statements let me get at the examples webapp that
comes with Tomcat.

I want to replace the default context w/ my own application,
as all the links are set up as the default (ie.  I need to
be able to access it via localhost/index.jsp and not
localhost//index.jsp).

>From reading the docs, my only guess at the correct
Apache directive would be this:

   WebAppDeploy "" warpConnection /

But apachectl configtest says that's not valid.

Suggestions?  This is Apache 1.3.7 and Tomcat 4.0.1
on Redhat 6.2.

Thanks.

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: intranet authentication with win2k

2001-11-13 Thread Bongiorno, Christian

Our realm is running under linux RH 7.1

-Original Message-
From: Mangi, Rick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:14 PM
To: 'Tomcat Users List'
Subject: RE: intranet authentication with win2k


Have you implemented this with tomcat running on *nix? Or only on win2k?

-Original Message-
From: Bongiorno, Christian [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:11 PM
To: 'Tomcat Users List'
Subject: RE: intranet authentication with win2k


What we have done is integrate NT authentication into a Tomcat realm. Using
WIN2k you can use either the com.sun.security.auth packages to Use
NTLoginModule (this only works on windows and only for the currently logged
in user). Or you can use the Krb5 security module same group ... OR... you
can use the fact that every WIN2k domain controller has an LDAP server in it
as well ( active directory), login to it with DOMAIN credentials and query a
custom attribute for roles. Be forwarned that Active Directory does not play
by the LDAP rules. What a suprise!

See

http://java.sun.com/j2se/1.4/docs/guide/security/jaas/spec/

-Original Message-
From: Mangi, Rick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:05 PM
To: 'Tomcat Users List'
Subject: RE: intranet authentication with win2k


yes, once the person is logged into the web application. The question is,
how do I get them logged into the web application without having to prompt
for a user/pass.

Rick


-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:57 PM
To: Tomcat Users List
Subject: Re: intranet authentication with win2k


I'm not as familiar w/ NT security either, but it sounds like (from a Java
programming standpoint) the getRemoteUser() method is your best bet.  If I
remember correctly, it returns the username *if* the user has logged in (in
this case through NT security) or null otherwise.
- Original Message -
From: "Mangi, Rick" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 9:49 AM
Subject: intranet authentication with win2k


> Greetings tomcat users!
>
> This question is 1/2 tomcat 1/2 apache. I'm developing an intranet site.
The
> users logon with NT authentication onto our local network. The intranet is
> running tomcat/apache on solaris. I'm wondering if anyone has a solution
for
> authenticating these users on the intranet without them having to log onto
a
> separate system. I know there is an apache module for tying apache
> authentication to NT security (and I assume it's easy enough to pass this
on
> to tomcat). But we're thinking of moving to the win2k "native security"
> system which I know nothing about.
>
> has anyone tackled this before? Any suggestions?
>
> Thanks,
>
> Rick
>
>
> Please pardon the long winded legal stuff below...
>
>
>
>
> This email and any attachments are confidential and may be
> legally privileged. No confidentiality or privilege is waived
> or lost by any transmission in error.  If you are not the
> intended recipient you are hereby notified that any use,
> printing, copying or disclosure is strictly prohibited.
> Please delete this email and any attachments, without
> printing, copying, forwarding or saving them and notify the
> sender immediately by reply e-mail.  Zurich Capital Markets
> and its affiliates reserve the right to monitor all e-mail
> communications through its networks.  Unless otherwise
> stated, any pricing information in this e-mail is indicative
> only, is subject to change and does not constitute an offer
> to enter into any transaction at such price and any terms in
> relation to any proposed transaction are indicative only and
> subject to express final confirmation.
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


This email and any attachments are confidential and may be 
legally privileged. No confidentiality or privilege is waived 
or lost by any transmission in error.  If you are not the 
intended recipient you are hereby notified that any use, 
printing, copying or disclosure is strictly prohibited.  
Please delete this email and any attachments, without 
printing, copying, forwarding or saving them and notify the 
sender immediately by reply e-mail.  Zurich Capital Markets 
and its affiliates reserve the right to monitor all e-mail 
communications through its networks.  Unless otherwise 
stated, any pricing information in this e-mail is indicative 
only, is subject to change and does not constitute an offer 
to enter into any transaction at such price and any terms in 
relation to any proposed transaction are indicative only and 
subject to express final confirmation.

--
To unsubscribe:   

RE: intranet authentication with win2k

2001-11-13 Thread Mangi, Rick

Have you implemented this with tomcat running on *nix? Or only on win2k?

-Original Message-
From: Bongiorno, Christian [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:11 PM
To: 'Tomcat Users List'
Subject: RE: intranet authentication with win2k


What we have done is integrate NT authentication into a Tomcat realm. Using
WIN2k you can use either the com.sun.security.auth packages to Use
NTLoginModule (this only works on windows and only for the currently logged
in user). Or you can use the Krb5 security module same group ... OR... you
can use the fact that every WIN2k domain controller has an LDAP server in it
as well ( active directory), login to it with DOMAIN credentials and query a
custom attribute for roles. Be forwarned that Active Directory does not play
by the LDAP rules. What a suprise!

See

http://java.sun.com/j2se/1.4/docs/guide/security/jaas/spec/

-Original Message-
From: Mangi, Rick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:05 PM
To: 'Tomcat Users List'
Subject: RE: intranet authentication with win2k


yes, once the person is logged into the web application. The question is,
how do I get them logged into the web application without having to prompt
for a user/pass.

Rick


-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:57 PM
To: Tomcat Users List
Subject: Re: intranet authentication with win2k


I'm not as familiar w/ NT security either, but it sounds like (from a Java
programming standpoint) the getRemoteUser() method is your best bet.  If I
remember correctly, it returns the username *if* the user has logged in (in
this case through NT security) or null otherwise.
- Original Message -
From: "Mangi, Rick" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 9:49 AM
Subject: intranet authentication with win2k


> Greetings tomcat users!
>
> This question is 1/2 tomcat 1/2 apache. I'm developing an intranet site.
The
> users logon with NT authentication onto our local network. The intranet is
> running tomcat/apache on solaris. I'm wondering if anyone has a solution
for
> authenticating these users on the intranet without them having to log onto
a
> separate system. I know there is an apache module for tying apache
> authentication to NT security (and I assume it's easy enough to pass this
on
> to tomcat). But we're thinking of moving to the win2k "native security"
> system which I know nothing about.
>
> has anyone tackled this before? Any suggestions?
>
> Thanks,
>
> Rick
>
>
> Please pardon the long winded legal stuff below...
>
>
>
>
> This email and any attachments are confidential and may be
> legally privileged. No confidentiality or privilege is waived
> or lost by any transmission in error.  If you are not the
> intended recipient you are hereby notified that any use,
> printing, copying or disclosure is strictly prohibited.
> Please delete this email and any attachments, without
> printing, copying, forwarding or saving them and notify the
> sender immediately by reply e-mail.  Zurich Capital Markets
> and its affiliates reserve the right to monitor all e-mail
> communications through its networks.  Unless otherwise
> stated, any pricing information in this e-mail is indicative
> only, is subject to change and does not constitute an offer
> to enter into any transaction at such price and any terms in
> relation to any proposed transaction are indicative only and
> subject to express final confirmation.
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


This email and any attachments are confidential and may be 
legally privileged. No confidentiality or privilege is waived 
or lost by any transmission in error.  If you are not the 
intended recipient you are hereby notified that any use, 
printing, copying or disclosure is strictly prohibited.  
Please delete this email and any attachments, without 
printing, copying, forwarding or saving them and notify the 
sender immediately by reply e-mail.  Zurich Capital Markets 
and its affiliates reserve the right to monitor all e-mail 
communications through its networks.  Unless otherwise 
stated, any pricing information in this e-mail is indicative 
only, is subject to change and does not constitute an offer 
to enter into any transaction at such price and any terms in 
relation to any proposed transaction are indicative only and 
subject to express final confirmation.

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with

RE: intranet authentication with win2k

2001-11-13 Thread Bongiorno, Christian

What we have done is integrate NT authentication into a Tomcat realm. Using
WIN2k you can use either the com.sun.security.auth packages to Use
NTLoginModule (this only works on windows and only for the currently logged
in user). Or you can use the Krb5 security module same group ... OR... you
can use the fact that every WIN2k domain controller has an LDAP server in it
as well ( active directory), login to it with DOMAIN credentials and query a
custom attribute for roles. Be forwarned that Active Directory does not play
by the LDAP rules. What a suprise!

See

http://java.sun.com/j2se/1.4/docs/guide/security/jaas/spec/

-Original Message-
From: Mangi, Rick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:05 PM
To: 'Tomcat Users List'
Subject: RE: intranet authentication with win2k


yes, once the person is logged into the web application. The question is,
how do I get them logged into the web application without having to prompt
for a user/pass.

Rick


-Original Message-
From: John M. Corro [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 2:57 PM
To: Tomcat Users List
Subject: Re: intranet authentication with win2k


I'm not as familiar w/ NT security either, but it sounds like (from a Java
programming standpoint) the getRemoteUser() method is your best bet.  If I
remember correctly, it returns the username *if* the user has logged in (in
this case through NT security) or null otherwise.
- Original Message -
From: "Mangi, Rick" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 9:49 AM
Subject: intranet authentication with win2k


> Greetings tomcat users!
>
> This question is 1/2 tomcat 1/2 apache. I'm developing an intranet site.
The
> users logon with NT authentication onto our local network. The intranet is
> running tomcat/apache on solaris. I'm wondering if anyone has a solution
for
> authenticating these users on the intranet without them having to log onto
a
> separate system. I know there is an apache module for tying apache
> authentication to NT security (and I assume it's easy enough to pass this
on
> to tomcat). But we're thinking of moving to the win2k "native security"
> system which I know nothing about.
>
> has anyone tackled this before? Any suggestions?
>
> Thanks,
>
> Rick
>
>
> Please pardon the long winded legal stuff below...
>
>
>
>
> This email and any attachments are confidential and may be
> legally privileged. No confidentiality or privilege is waived
> or lost by any transmission in error.  If you are not the
> intended recipient you are hereby notified that any use,
> printing, copying or disclosure is strictly prohibited.
> Please delete this email and any attachments, without
> printing, copying, forwarding or saving them and notify the
> sender immediately by reply e-mail.  Zurich Capital Markets
> and its affiliates reserve the right to monitor all e-mail
> communications through its networks.  Unless otherwise
> stated, any pricing information in this e-mail is indicative
> only, is subject to change and does not constitute an offer
> to enter into any transaction at such price and any terms in
> relation to any proposed transaction are indicative only and
> subject to express final confirmation.
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


This email and any attachments are confidential and may be 
legally privileged. No confidentiality or privilege is waived 
or lost by any transmission in error.  If you are not the 
intended recipient you are hereby notified that any use, 
printing, copying or disclosure is strictly prohibited.  
Please delete this email and any attachments, without 
printing, copying, forwarding or saving them and notify the 
sender immediately by reply e-mail.  Zurich Capital Markets 
and its affiliates reserve the right to monitor all e-mail 
communications through its networks.  Unless otherwise 
stated, any pricing information in this e-mail is indicative 
only, is subject to change and does not constitute an offer 
to enter into any transaction at such price and any terms in 
relation to any proposed transaction are indicative only and 
subject to express final confirmation.

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: [servlets] Error when wrapping a response object

2001-11-13 Thread Martin van den Bemt

Close the writer you have opened to write to the html stream should (if I'm
not mistaking) make this work.

Mvgr,
Martin

> -Original Message-
> From: Jay Wright [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 8:09 PM
> To: '[EMAIL PROTECTED]'
> Subject: FW: [servlets] Error when wrapping a response object
>
>
>
> Has anyone using Tomcat seen a problem like this?  In short, I am
> wrapping a
> response object so I can write the HTML to a file.  Then, I would like to
> use the ReqeustDispatcher to forward the response or at the very least use
> the response objects sendRedirect to go to the next page.
>
> With Resin, this works fine.  In Tomcat, I get an error which
> wont allow me
> to do either becuase the response object is "committed."  The
> attached email
> explains further.
>
> Any one seen this before?
>
> Jay
>
> -Original Message-
> From: Jay Wright [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 02, 2001 10:36 AM
> To: Servlets
> Subject: [servlets] Error when wrapping a response object
>
>
>
> Hi all,
>
> I am getting a servlet error which has something to do with a wrapped
> response object.
>
> With Resin, I have created a servlet that wraps a response object for the
> purpose of writing the response's html to a file.  This complete
> successfully, then the RequestDispatcher forwards the request to a jsp,
> which in effect displays a thank you page.  It works wonderfully.
>
> When I deploy the same application to Tomcat, I get the following error:
>
> java.lang.IllegalStateException: Cannot forward after response has been
> committed
> at
> org.apache.catalina.core.ApplicationDispatcher.doForward(Unknown
> Source)
> at org.apache.catalina.core.ApplicationDispatcher.forward(Unknown
> Source)
> at atonce.mas.web.MainServlet.doGet(MainServlet.java:88)
>
> Apparently the two servlet containers handle this differently.  As curious
> as this is, I'm more concerned with getting the tomcat version
> working.  Is
> there anything I can do to "uncommit" the response?  I assume
> not.  I could
> use a sendRedirect, but would prefer to stick with the RequestDispatchers
> forward method to be consistent and standard with my servlet model.
>
> Any ideas?
>
> Thanks,
> Jay
>
> ---
> SIGS Conference for Java Development
> Targeted, focused classes, expertise level classes
> taught by Java gurus, rigorous tutorials, and
> exhibit floor makes SIGS Conference for Java
> Development a learning experience unlike any
> other. Join over 10,000 developers and programmers
> from across the U.S. and around the world who
> have benefited from attending SIGS/101 Conferences.
> http://www.javadevcon.com
> ---
> You are currently subscribed to servlets as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




FW: [servlets] Error when wrapping a response object

2001-11-13 Thread Jay Wright


Has anyone using Tomcat seen a problem like this?  In short, I am wrapping a
response object so I can write the HTML to a file.  Then, I would like to
use the ReqeustDispatcher to forward the response or at the very least use
the response objects sendRedirect to go to the next page.

With Resin, this works fine.  In Tomcat, I get an error which wont allow me
to do either becuase the response object is "committed."  The attached email
explains further.

Any one seen this before?

Jay

-Original Message-
From: Jay Wright [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 10:36 AM
To: Servlets
Subject: [servlets] Error when wrapping a response object



Hi all,

I am getting a servlet error which has something to do with a wrapped
response object.

With Resin, I have created a servlet that wraps a response object for the
purpose of writing the response's html to a file.  This complete
successfully, then the RequestDispatcher forwards the request to a jsp,
which in effect displays a thank you page.  It works wonderfully.

When I deploy the same application to Tomcat, I get the following error:

java.lang.IllegalStateException: Cannot forward after response has been
committed
at org.apache.catalina.core.ApplicationDispatcher.doForward(Unknown
Source)
at org.apache.catalina.core.ApplicationDispatcher.forward(Unknown
Source)
at atonce.mas.web.MainServlet.doGet(MainServlet.java:88)

Apparently the two servlet containers handle this differently.  As curious
as this is, I'm more concerned with getting the tomcat version working.  Is
there anything I can do to "uncommit" the response?  I assume not.  I could
use a sendRedirect, but would prefer to stick with the RequestDispatchers
forward method to be consistent and standard with my servlet model.

Any ideas?

Thanks,
Jay

---
SIGS Conference for Java Development  
Targeted, focused classes, expertise level classes 
taught by Java gurus, rigorous tutorials, and 
exhibit floor makes SIGS Conference for Java
Development a learning experience unlike any 
other. Join over 10,000 developers and programmers 
from across the U.S. and around the world who
have benefited from attending SIGS/101 Conferences.
http://www.javadevcon.com
---
You are currently subscribed to servlets as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




  1   2   >