Re: mod_webapp and php

2002-01-22 Thread Nikola Milutinovic

  Thanks for clarification, Craig But then again, what if the static
  content (e.g. some html pages) resides inside web-app, is it than
  considered static? Will Apache serve it from there directly (I believe
  not, cause it could be on a different host) or will mod_webapp pre-cache
  it in some place Apache is aware of or will such content be served by
  Tomcat? (that is what I think for now)
 
 
 Your impression of how it works seems to be inaccurate.  There is no
 caching going on anywhere.
 
 Let's look at the Tomcat stand-alone case first, and then examine the
 combined case.
 
 Technically, from the point of view of Tomcat 4 (details are slightly
 different in 3.3), there is no such thing as static content -- all
 requests are handled by a servlet.  If you look in the
 $CATALINA_HOME/conf/web.xml file, which defines default configuration
 settings for all webapps, you will see a servlet named default that is
 mapped to the URL pattern /.  This pattern means, use the 'default'
 servlet whenever no other servlet is matched by a particular request URI.
 So, requests for things like index.html and logo.jpg don't match any
 of your application servlets or JSP pages, so they are handled by the
 default servlet -- which simply serves the contents of the corresponding
 file back to the client.

That was my understanding, too.

 Now, let's consider what happens when you put Apache and a web connector
 in front of Tomcat (the concepts apply equally to mod_jk and mod_webapp,
 only the configuration details differ).  Essentially, what people try to
 do is make Apache itself be the default file-serving servlet, instead of
 the one built in to Tomcat.

Because it is faster, yes.

 This is accomplished in your configuration directives, where you tell
 Apache which requests to forward (and by implication, all other requests
 are handled by Apache itself in the usual way).  Thus, when we add a
 diretive that says forward all *.jsp requests to Tomcat, we are telling
 Apache that any request that ends with .jsp MUST be forwarded to Tomcat
 for processing.  Apache acts like a proxy server for these requests -- it
 just calls Tomcat and then copies back the response Tomcat creates to the
 original client.
 
 If you do not have any such configuration directives for *.html and
 *.jpg patterns, then Apache serves them directly, based on your Apache
 configuration directives in httpd.conf.  It is NOT an issue of pre-caching
 or anything like that -- the request either gets forwarded to Tomcat or it
 doesn't.

This means, that if I'm developing a web application which uses static content, like 
GIFs and similar stuff, I have a slight problem. I would make source paths to such 
content in my JSP file a relative one and my web development tool (Dreamweaver in 
this case) will place them in the web-app directory. Upon deploying, I need to make 
copies to Apache's DocumentRoot tree.

I know I can use Ant for this, but it requires a login to the server in question. Not 
to mention that a configuration where Tomcat and Apache are not on the same host adds 
an additional layer of fun.

Is there a way to accopmlish upload and division of static/dynamic content 
autmagically? Web-DAV?

 Now, if you configure Apache so that the directory being served by the
 /foo request URI prefix is the same as the directory defined as the
 context root of the /foo web app in Tomcat, you've accomplished the goal
 -- Tomcat serves all the requests that Apache forwards to it, and Apache
 serves all the requests that it doesn't forward.  But your application
 code is identical in either case.

Yes, it's the uploading that worries my, not to mention packaging? Is ther a way to 
make *one* WAR that would deploy itself both to static and dynamic paths? Hmm, I don't 
think so, but a build.xml that would take a few parameters should do the trick...

 Keep in mind that the ACTUAL directory pathname of your webapp doesn't
 need to have anything at all to do with the /foo prefix on requiest
 URIs.  Both Apache (via the Alias directive) and Tomcat (via the
 docBase attribute of the Context element) let you map that prefix to
 whatever real directory you want -- the secret is to make sure they both
 point at the same place.
 
 Lastly, I want to emphasize again, NONE of this is new to mod_webapp --
 the mod_jserv and mod_jk connectors have worked this way for around five
 years.  The only new thing mod_webapp was supposed to bring to the table
 was automatic configuration of the httpd.conf directives that make all of
 this happen, instead of requiring the sysadmin to do it all yourself.

I wish it was someplace in capital letters, saying Dear newbie, this is the way we 
would recomend doing Tomcat/Apache setup

Nix.



Tomcat and Server Gated Crypto

2002-01-22 Thread Jason Barr

Hi there,

A first time poster, so hopefully the question is brief and to the
point and apologies if it has been answered already.

Does stand alone Tomcat support SGC 'technology?'

I see Tomcat can be used on top of IIS/Netscape/Apache and in these
instances I'm assuming that it should support SGC as it will use the
underlying crypto libraries, and support for SGC in stand alone mode
remains a grey area, so if anybody could make this clearer, that would
be great.

Thanks in advance for any replies. BTW, Tomcat is becoming very popular
with our clients.  : )
--
Jason Barr
Thawte Tech Support





smime.p7s
Description: S/MIME Cryptographic Signature


Re: web.xml Question

2002-01-22 Thread yilmaz

i think in the same way...
there should be a necessary reason to do so, that we are missing, otherwise
it seems illogical

- Original Message -
From: Nikola Milutinovic [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 3:56 PM
Subject: Re: web.xml Question


  Usually the web.xml file of a web application starts with the following:
 
  !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
  2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
 
  This URL referst to the dtd file on SUN's server. I think most XML
parsers
  like SAX need to read the dtd file to be able to parse the XML file.

 That would be a big problem. I'm no expert on the mnatter, but since
web-app DTD is something no Servlet container can work without, couldn't the
the container provide it to the parser? That URL is just an identifier,
saying yes, I'm build upon Sun's public DTD for web.xml. So, the container
could tell the parser look, here is that DTD, don't go fetching it.

 Maybe it's naive of me, but that's how I would do it. I've been using
Tomcat for some time now and it never complained on web.xml. I'm behind a
firewall and Tomcat is not even aware of that.

 Nix.




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




How to give tomcat's JVM more heap space ?

2002-01-22 Thread Rizki Wicaksono



I have a server for runnig Tomcat 4.0.1, and sometimes it's catalina.out 
said printed java.lang.OutOfMemoryError.

And i know from java manual pages, we can set the memory allocation for 
JVM with option -Xmsn -Xmxn etc.

The problem is, where we put this option in Tomcat 4.0.1 configuration 
file ?

Thank you.



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Asynchronous messages from servlets

2002-01-22 Thread Ronald Wildenberg

Hi,

I have the following problem. A simple form submits data
to a servlet. The servlet sends a message via JMS to
another application (in another JVM). Once the message
has been sent, the 'service' method of the servlet ends.
After a while, say five seconds, the other application would
like to send back a response. How do I show this response
to the user?

Since the 'service' method has finished after sending the
message, I have lost control over the output from the other
application.

What I need is a way to push the response to the browser. I
would like the server to take the initiative in updating the browser
window, not the user. Is this possible in any way?

Thanks in advance,
Ronald Wildenberg



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Problem when creating mod_webapp under hpux11

2002-01-22 Thread Jeff Ong

Hi all,

i am currently try to integrate tomcat with apache. I am using tomcat 4.0.1
and apache 1.3.22. Both of the apache and tomcat run smoothly. When i surf
to port 80 and 8080, both gave me the expected result.

However, when i tried to create mod_webapp, it always hangs in a process.


# ./configure --with-apxs=/usr/local/apache/bin/apxs
loading cache ./config.cache
checking for test... /usr/bin/test
/usr/bin/test[7]: test: Specify a parameter with this command.
checking for true... /usr/bin/true
/usr/bin/test[7]: test: Specify a parameter with this command.
checking for echo... /usr/bin/echo
/usr/bin/test[7]: test: Specify a parameter with this command.
checking for grep... /usr/bin/grep
/usr/bin/test[7]: test: Specify a parameter with this command.
checking for cat... /usr/bin/cat
/usr/bin/test[7]: test: Specify a parameter with this command.
checking for sed... /usr/bin/sed
/usr/bin/test[7]: test: Specify a parameter with this command.
checking for ln... /usr/bin/ln
/usr/bin/test[7]: test: Specify a parameter with this command.
checking for rm... /usr/bin/rm
checking host system type... hppa1.1-hp-hpux11.00
checking for sources directory... /var/jeff/webapp-module-1.0-tc40
checking for targets directory... /var/jeff/webapp-module-1.0-tc40

C-Language compilation tools
/usr/bin/test[7]: test: Specify a parameter with this command.
checking for ar... /usr/bin/ar
/usr/bin/test[7]: test: Specify a parameter with this command.
checking for ranlib... /usr/bin/ranlib
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
/usr/bin/test[7]: test: Specify a parameter with this command.
checking for gcc... /opt/gcc/bin/gcc
checking whether /opt/gcc/bin/gcc and cc understand -c and -o together...
yes
checking how to run the C preprocessor... /opt/gcc/bin/gcc -E
checking for debug build... no

JAVA-Language compilation tools
checking for java support... no

API documentation generation
checking for C API documentation... no
checking for Java API documentation... no

Target web-server
checking for Apache apxs... yes
/usr/bin/test[7]: test: Specify a parameter with this command.
/usr/bin/test[7]: test: Specify a parameter with this command.
checking target module... apache-1.3
/usr/bin/test[7]: test: Specify a parameter with this command.

Finishing up
checking for APR compilation flags... /usr/bin/test[7]: test: Specify a
parameter with this command.
ok
(IT ALWAYS HANGs HERE )


anyone know what is happening? I have tried to compile
webapp-module-1.0.1-tc401-src.tar.gz and
webapp-module-1.0.1-tc40-src.tar.gz but both of them gave me same
problems.



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: web.xml Question

2002-01-22 Thread Tom Bednarz

OK, I just wanted to know how this works. My development environment is not 
the same as an environment in a large company which usually has a lot of 
restrictions regarding accessing the internet.

I have made a simple test and unplugged the network cable of my 
workstation. TOMCAT still started without a problem. So it seems that the 
DTD's are somehow embedded in the source code.

Thanks for your information.

Thomas

At 22.01.2002 16:44, you wrote:
i think in the same way...
there should be a necessary reason to do so, that we are missing, otherwise
it seems illogical

- Original Message -
From: Nikola Milutinovic [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 3:56 PM
Subject: Re: web.xml Question


   Usually the web.xml file of a web application starts with the following:
  
   !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
   2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
  
   This URL referst to the dtd file on SUN's server. I think most XML
parsers
   like SAX need to read the dtd file to be able to parse the XML file.
 
  That would be a big problem. I'm no expert on the mnatter, but since
web-app DTD is something no Servlet container can work without, couldn't the
the container provide it to the parser? That URL is just an identifier,
saying yes, I'm build upon Sun's public DTD for web.xml. So, the container
could tell the parser look, here is that DTD, don't go fetching it.
 
  Maybe it's naive of me, but that's how I would do it. I've been using
Tomcat for some time now and it never complained on web.xml. I'm behind a
firewall and Tomcat is not even aware of that.
 
  Nix.
 



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Problem when creating mod_webapp under hpux11

2002-01-22 Thread Jeff Ong

Anyone own the mod_webapp for hpux11? can you please send it to me if you
dont mind?


- Original Message -
From: Jeff Ong [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 4:52 PM
Subject: Problem when creating mod_webapp under hpux11


 Hi all,

 i am currently try to integrate tomcat with apache. I am using tomcat
4.0.1
 and apache 1.3.22. Both of the apache and tomcat run smoothly. When i surf
 to port 80 and 8080, both gave me the expected result.

 However, when i tried to create mod_webapp, it always hangs in a process.


 # ./configure --with-apxs=/usr/local/apache/bin/apxs
 loading cache ./config.cache
 checking for test... /usr/bin/test
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for true... /usr/bin/true
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for echo... /usr/bin/echo
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for grep... /usr/bin/grep
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for cat... /usr/bin/cat
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for sed... /usr/bin/sed
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for ln... /usr/bin/ln
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for rm... /usr/bin/rm
 checking host system type... hppa1.1-hp-hpux11.00
 checking for sources directory... /var/jeff/webapp-module-1.0-tc40
 checking for targets directory... /var/jeff/webapp-module-1.0-tc40

 C-Language compilation tools
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for ar... /usr/bin/ar
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for ranlib... /usr/bin/ranlib
 checking for gcc... gcc
 checking whether the C compiler (gcc  ) works... yes
 checking whether the C compiler (gcc  ) is a cross-compiler... no
 checking whether we are using GNU C... yes
 checking whether gcc accepts -g... yes
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for gcc... /opt/gcc/bin/gcc
 checking whether /opt/gcc/bin/gcc and cc understand -c and -o together...
 yes
 checking how to run the C preprocessor... /opt/gcc/bin/gcc -E
 checking for debug build... no

 JAVA-Language compilation tools
 checking for java support... no

 API documentation generation
 checking for C API documentation... no
 checking for Java API documentation... no

 Target web-server
 checking for Apache apxs... yes
 /usr/bin/test[7]: test: Specify a parameter with this command.
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking target module... apache-1.3
 /usr/bin/test[7]: test: Specify a parameter with this command.

 Finishing up
 checking for APR compilation flags... /usr/bin/test[7]: test: Specify a
 parameter with this command.
 ok
 (IT ALWAYS HANGs HERE )


 anyone know what is happening? I have tried to compile
 webapp-module-1.0.1-tc401-src.tar.gz and
 webapp-module-1.0.1-tc40-src.tar.gz but both of them gave me same
 problems.



 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: mod_webapp and php

2002-01-22 Thread Anton Brazhnyk

Hi and thank you very much, Craig.

Actually I didn't expect such an complete answer.
I think it could replace that FIXME in (...)/tomcat-docs/config/warp.html

Would you answer one more question, please?
I have posted it here recently and then in dev-list.
It was about Client connection closing.

I believe that situation is mentioned in 
RFC 2616 HTTP 1.1 protocol
and both sides of connection should watch if 
the connection is still alive.
As far as I understand server programmers should 
be able to detect connection closing (e.g. Stop button
in browser was pressed).
Did I get it right or, if not, where is my mistake?

BTW, I'm considering to do it myself and if it seems
useful to Tomcat users and developers I'd like to
discuss the way such feature should be done since
I don't see a way to find a place for it in the present specs.


 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 21, 2002 7:58 PM
 To: Tomcat Users List
 Subject: RE: mod_webapp and php
 
 
 
  Thanks for clarification, Craig But then again, what if the static
  content (e.g. some html pages) resides inside web-app, is it than
  considered static? Will Apache serve it from there directly (I believe
  not, cause it could be on a different host) or will mod_webapp pre-cache
  it in some place Apache is aware of or will such content be served by
  Tomcat? (that is what I think for now)
 
 
 Your impression of how it works seems to be inaccurate.  There is no
 caching going on anywhere.
 
 Let's look at the Tomcat stand-alone case first, and then examine the
 combined case.
 
 Technically, from the point of view of Tomcat 4 (details are slightly
 different in 3.3), there is no such thing as static content -- all
 requests are handled by a servlet.  If you look in the
 $CATALINA_HOME/conf/web.xml file, which defines default configuration
 settings for all webapps, you will see a servlet named default that is
 mapped to the URL pattern /.  This pattern means, use the 'default'
 servlet whenever no other servlet is matched by a particular request URI.
 So, requests for things like index.html and logo.jpg don't match any
 of your application servlets or JSP pages, so they are handled by the
 default servlet -- which simply serves the contents of the corresponding
 file back to the client.
 
 Now, let's consider what happens when you put Apache and a web connector
 in front of Tomcat (the concepts apply equally to mod_jk and mod_webapp,
 only the configuration details differ).  Essentially, what people try to
 do is make Apache itself be the default file-serving servlet, instead of
 the one built in to Tomcat.
 
 This is accomplished in your configuration directives, where you tell
 Apache which requests to forward (and by implication, all other requests
 are handled by Apache itself in the usual way).  Thus, when we add a
 diretive that says forward all *.jsp requests to Tomcat, we are telling
 Apache that any request that ends with .jsp MUST be forwarded to Tomcat
 for processing.  Apache acts like a proxy server for these requests -- it
 just calls Tomcat and then copies back the response Tomcat creates to the
 original client.
 
 If you do not have any such configuration directives for *.html and
 *.jpg patterns, then Apache serves them directly, based on your Apache
 configuration directives in httpd.conf.  It is NOT an issue of pre-caching
 or anything like that -- the request either gets forwarded to Tomcat or it
 doesn't.
 
 Now, if you configure Apache so that the directory being served by the
 /foo request URI prefix is the same as the directory defined as the
 context root of the /foo web app in Tomcat, you've accomplished the goal
 -- Tomcat serves all the requests that Apache forwards to it, and Apache
 serves all the requests that it doesn't forward.  But your application
 code is identical in either case.
 
 Keep in mind that the ACTUAL directory pathname of your webapp doesn't
 need to have anything at all to do with the /foo prefix on requiest
 URIs.  Both Apache (via the Alias directive) and Tomcat (via the
 docBase attribute of the Context element) let you map that prefix to
 whatever real directory you want -- the secret is to make sure they both
 point at the same place.
 
 Lastly, I want to emphasize again, NONE of this is new to mod_webapp --
 the mod_jserv and mod_jk connectors have worked this way for around five
 years.  The only new thing mod_webapp was supposed to bring to the table
 was automatic configuration of the httpd.conf directives that make all of
 this happen, instead of requiring the sysadmin to do it all yourself.
 
 Craig
 
 


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: How to give tomcat's JVM more heap space ?

2002-01-22 Thread Tom Bednarz

In the catalina.bat or catalina.sh set the variable CATALINA_OPTS

On Windows I would do:

set CATALINA_OPTS=-Xms64M -Xmx256M

to set a minimum of 64 MB and a maximum of 256 MB RAM. You should do this 
at the beginning of the file.

HTH

Thomas

At 22.01.2002 15:50, you wrote:


I have a server for runnig Tomcat 4.0.1, and sometimes it's catalina.out
said printed java.lang.OutOfMemoryError.

And i know from java manual pages, we can set the memory allocation for
JVM with option -Xmsn -Xmxn etc.

The problem is, where we put this option in Tomcat 4.0.1 configuration
file ?

Thank you.



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: IIS or Apache

2002-01-22 Thread Justin Rowles

 One of the problems i've run into with open source servers on 
 Windows is 
 getting binaries for many of the common tools, servers and 
 dlls required 
 for Win32, such as connectors for Tomcat, OpenSSL for SSL on 
 Apache, etc.

snip

 If you can complile the binaries yourself, your OK.. but i'm finding 
 it's kind of hit and miss when you depend on others to compile the 
 latest versions for you.

What difficulty is there in compiling yourself?  gcc and make do almost
everything.  Personally I vastly prefer to work from source and have never
had any problems.

I recommend you 'get your hands dirty' - it's lovely once you're in!

J.
-- 
You're only jealous cos the little penguins are talking to me. 



***
For more information on Ordnance Survey products and services,
visit our web site at http://www.ordnancesurvey.co.uk
***




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




problem with getting a connection to tomcat

2002-01-22 Thread Birgit Greiffenberg

Hi,
just found the mailinglist :-))
I have a problem with the connection to Tomcat. I am using Tomcat 3.2.3
as a standalone solution.
System: win2000
I want to start a servlet not from a webapplication but from a
conventional java application.
I have a simple frame with a button to start the servlet, it works fine.

But if I have an application with a loginservice, that connects to a
database (in combination with a trustedlogin from the NT-server to which
I connect), I can't connect to  Tomcat.
I don't get any exception, my application just crashes and will not come
back any more...
does anybody know whats going on?
thanks
Birgit



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


Re: Urgent Disable Directory browse

2002-01-22 Thread Galbayar

i'm changed web.xml but tomcat error
how to disable this error?

Apache Tomcat/4.0.1 - HTTP Status 404 - /




type Status report

message /

description The requested resource (/) is not available.


- Original Message -
From: Reynir Hübner [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, January 19, 2002 21:04
Subject: RE: Urgent Disable Directory browse


well just change the global web.xml (in your tomcat/conf/ directory).

change the mapping for default servlet so listings are false:

servlet
servlet-namedefault/servlet-name

servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-clas
s
init-param
  param-namedebug/param-name
  param-value0/param-value
/init-param
init-param
  param-namelistings/param-name
  param-valuefalse/param-value
/init-param
load-on-startup1/load-on-startup
/servlet

hope it helps
[EMAIL PROTECTED]


-Original Message-
From: Galbayar [mailto:[EMAIL PROTECTED]]
Sent: 19. janúar 2002 04:47
To: Tomcat Users List
Subject: Urgent Disable Directory browse


Hello All !

How to disable directory browse on Tomcat?
if i rename webapps/ROOT/index.jsp to webapps/ROOT/index2.jsp Tomcat
browse ROOT directory.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]






--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Tomcat4 Ajp12

2002-01-22 Thread Skondras P.

Hi i would like to know if
tomcat4 works ok with ajp12
or it needs only ajp13



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


RE: Tomcat4 Ajp12

2002-01-22 Thread Reynir Hubner

I think only ajp1.3
it does not work with ajp 1.2

-hope it helps
[EMAIL PROTECTED]



-Original Message-
From: Skondras P. [mailto:[EMAIL PROTECTED]]
Sent: 22. januar 2002 10:24
To: [EMAIL PROTECTED]
Subject: Tomcat4 Ajp12


Hi i would like to know if
tomcat4 works ok with ajp12
or it needs only ajp13


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




How to configure IIS5 with Tomcat 4.0

2002-01-22 Thread Peter Cimring

Please advise me on how to configure IIS5 with Tomcat.

I found an article at:
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/tomcat-iis-howto.html - the
article refers to Tomcat 3.2. Is the procedure the same for Tomcat 4.0?

Help!?

Thanks
Pete


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: How to configure IIS5 with Tomcat 4.0

2002-01-22 Thread Reynir Hübner


try reading the article at following url :

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

it should help
-hope so.
[EMAIL PROTECTED]


-Original Message-
From: Peter Cimring [mailto:[EMAIL PROTECTED]]
Sent: 22. janúar 2002 10:54
To: [EMAIL PROTECTED]
Subject: How to configure IIS5 with Tomcat 4.0


Please advise me on how to configure IIS5 with Tomcat.

I found an article at:
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/tomcat-iis-howto.html -
the
article refers to Tomcat 3.2. Is the procedure the same for Tomcat 4.0?

Help!?

Thanks
Pete


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Asynchronous messages from servlets

2002-01-22 Thread Hans Schlenker

Ronald Wildenberg wrote:
 
 What I need is a way to push the response to the browser. I
 would like the server to take the initiative in updating the browser
 window, not the user. Is this possible in any way?
 
No way. HTTP is a pull-mechanism: information is always requested by the
client. Solutions: push a mail to the user or let the generated HTML
page repeatedly update itself. 

The latter is an HTTP/HTML feature that is not part of the W3C standards
but works quite well with most standard browsers, nevertheless. Add
meta http-equiv=refresh content=5; URL=http://selfhtml.teamone.de/;
to your HTML page header, and the browser will replace the page after
five seconds by the one specified in the URL.

Regards,

Hans

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




re: canno startup Tomcat 4.0.1

2002-01-22 Thread David Hewlett



Despite the good advice to carefully go through the documentation again the 
'problem' still persists :  It appears neither to start nor to fail?
glibc version is 2.2.4-21
jdk is 1.3.1

i have set: ulimit -s 2048
and: export LD_ASSUME_KERNEL=2.2.5

I see i am not alone as two others report similar problem. 
Yet a colleague of mine on, i am quite sure, the same level of suse 7.3 jdk 
etc has succeeded immediately. The only known difference is that my colleague 
has made a clean install while mine was an upgrade from 7.2  Q. Can there be 
a remnant from an older installation of tomcat that could be the cause?

The log for the startup gives just a one line comment as follows: 

2002-01-22 09:55:43 HttpConnector Opening server socket on all host IP 
addresses

but their is no reported failure! Indeed an active process is created.

but despite the implication tht it is listening on the specified port an http 
request cannot connect to the port. (Other ports are working fine. e.g 
apache/jserv)

I have also tried setting another unused port other than 8080 to no avail...
The problem appears to be something more basic?

Regards,

David.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: web.xml Question

2002-01-22 Thread John Wadkin

I'm no expert on XML, but I do write documents in XML which are then
parsed/interpreted by a servlet (which I didn't write).

As far as I know, any XML document will parse without a DTD. A DTD just
provides the syntax - e.g. tag names, tag attributes, tag structures (list
of tags that a tag can contain). Without a DTD, the document is just checked
for well-formedness - e.g. that all start tags have an end tag. It should
be possible to store the web.xml DTD locally and modify the identifier to
point to it. Don't ask me what the syntax of the identifier is - all I know
is that it's different for DTDs that are local! Look in a good XML book
(e.g. New Riders, Inside XML).

I guess that having the DTD locally would also help when creating server.xml
and web.xml files: you'd be able to use an XML editor with the DTD and
therefore guarantee that all your service, engine, etc. tags where in
the right order, with the right attributes.

Thanks,
 
John
 
Quote for the week:
 
The men with the muck-rakes are often indispensable to the well-being of
society; but only if they know when to stop raking the muck.
 
Theodore Roosevelt, Speech in New York, 11 Nov. 1902
 


-Original Message-
From: Tom Bednarz [mailto:[EMAIL PROTECTED]]
Sent: 22 January 2002 07:49
To: [EMAIL PROTECTED]
Subject: web.xml Question


Hi everybody,

Usually the web.xml file of a web application starts with the following:

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

This URL referst to the dtd file on SUN's server. I think most XML parsers 
like SAX need to read the dtd file to be able to parse the XML file.

Questions:

What happens if I deploy an application on an Intranet which allows access 
to the internet only through a proxy server (with username / password 
authentication)? The dtd cannot be accessed and must be someware on the 
local disk.

I found that TOMCAT has a web.xml in its conf directory. Could anybody 
explain me, which XML files I need to change and where do I need to put the 
downloaded web-app_2_3.dtd file?  Is the web.xml in the conf directory like 
a parent to all web.xml files found under webapps\application\WEB-INF? 
(Something like the defaults for all web apps)?

Could anybody help me out of this XML jungle?

Many thanks!

Thomas


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Asynchronous messages from servlets

2002-01-22 Thread David Hewlett

On Tuesday 22 January 2002 8:50 am, you wrote:
 Hi,

 I have the following problem. A simple form submits data
 to a servlet. The servlet sends a message via JMS to
 another application (in another JVM). Once the message
 has been sent, the 'service' method of the servlet ends.
 After a while, say five seconds, the other application would
 like to send back a response. How do I show this response
 to the user?

 Since the 'service' method has finished after sending the
 message, I have lost control over the output from the other
 application.

 What I need is a way to push the response to the browser. I
 would like the server to take the initiative in updating the browser
 window, not the user. Is this possible in any way?

 Thanks in advance,
 Ronald Wildenberg
You could do the following. If the client has JVM and permissions can be 
arranged to listen on a specific port (and any firewalls are going to allow 
the traffic etc)  then:
When sending your small form include a java applet that creates a task that 
simply listens on  a specific port.
Your asynchronous process can then return a message to that port. 

This has been done. (with IBM MQSeries java API)

Good Luck  regards,

David.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: New ROOT

2002-01-22 Thread Guillermo Labatte

John Kolvereid wrote:

Hi GL,
I tried it again.  This time it worked.  Now, instead of tricking Tom,
how can I simply change the default directory from webapps/ROOT to (say)
/home/httpd/jsp.  And then how can I address jsp files from non-jsp files.
Do I have to
a href=http://hostname/a.jsp:8080

The URL should be http://hostname:8080/a.jsp


And if so, how do I return.  Must I then
a href=http://hostname/a.htm
Any thoughts.  Please advise.  Thanks.

That's right.

Now, I think it is better to maintain all content (static and non 
static) under the same roof (i.e. use the same URL space)

After all, you are building a web application. That application consists 
of dynamic content (.jsp, servlets) and static content (html, images). 
Why separate them? If you keep your application together it would be 
easier to manage it (backups, version control, relocation, etc.)

Tomcat can serve static content by itself, so you can put all .html and 
image files alongside your .jsp files. You can also instruct Tomcat to 
use the port 80. This would be the simplest setup and you would not have 
to worry about that :8080 in URLS. Here at work we use this setup for 
individual developer's PCs. So each developer has his own Tomcat server 
in his own PC.

We deploy our application in an intranet server. Since that server also 
uses Apache, there is a conflict with port 80. So we added another IP 
address to that server and make Apache use one of the IP, and Tomcat the 
other. So our webapp still uses port 80 and we do not have to worry 
about the URLs. This setup is still fairly simple.

If you cannot add a IP address to your server, or find Tomcat too slow 
for static content, you can still integrate Tomcat and Apache (using 
mod_jk), and make Apache serve the static content, and Tomcat the 
dynamic content using the same URL space. Since this setup proved to be 
cumbersome (at least for me) we sticked to the previous setup, since we 
did not encounter any performance problem serving our (relativelly 
small) static content with Tomcat.













--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: wacky HTTPS-HTTP re-direct problem w/apache and tomcat 4

2002-01-22 Thread Dave North

Hi Denny,
Just tried that - no joy.  It then complains about the
webAppDeploy lines being an invalid serverName.

Cheers

Dave

-Original Message-
From: Denny Chambers [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 4:52 PM
To: Tomcat Users List
Subject: Re: wacky HTTPS-HTTP re-direct problem w/apache and tomcat 4


Have you tried it with out the ServerName directive set in the
VirtualHost _default_:443 directive?


Chambers, Norman (Denny) wrote:
 
 If tomcat and apache are running on the try using localhost:8080 here:
 
 WebAppConnection myconn warp ottas13a.ott.signiant.com:8008
 
 Also do you have the ServerName and Port directive set in the
 httpd.conf? The directives are required by SSL.
 
 Dave North wrote:
 
  sure.  Actually, back in the mailing list archive I just found
someone
  who had the exact same problem...no solution alas.
 
  The server.xml file is the bog standard one with no changes from a
  tomcat install.
 
  My httpd.conf info (basically the standard mod_ssl config with the
  webAppDeploy stuff bolted in):
 
  ##
  ## SSL Virtual Host Context
  ##
 
  VirtualHost _default_:443
 
  #  General setup for the virtual host
  DocumentRoot /usr/local/apache/htdocs
  ServerName ottas13a.ott.signiant.com
  ServerAdmin [EMAIL PROTECTED]
  ErrorLog /usr/local/apache/logs/error_log
  TransferLog /usr/local/apache/logs/access_log
 
  #   SSL Engine Switch:
  #   Enable/Disable SSL for this virtual host.
  SSLEngine on
 
  #   SSL Cipher Suite:
  #   List the ciphers that the client is permitted to negotiate.
  #   See the mod_ssl documentation for a complete list.
  SSLCipherSuite
  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
 
  #   Server Certificate:
  #   Point SSLCertificateFile at a PEM encoded certificate.  If
  #   the certificate is encrypted, then you will be prompted for a
  #   pass phrase.  Note that a kill -HUP will prompt again. A test
  #   certificate can be generated with `make certificate' under
  #   built time. Keep in mind that if you've both a RSA and a DSA
  #   certificate you can configure both in parallel (to also allow
  #   the use of DSA ciphers, etc.)
  SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
  #SSLCertificateFile /usr/local/apache/conf/ssl.crt/server-dsa.crt
 
  #   Server Private Key:
  #   If the key is not combined with the certificate, use this
  #   directive to point at the key file.  Keep in mind that if
  #   you've both a RSA and a DSA private key you can configure
  #   both in parallel (to also allow the use of DSA ciphers, etc.)
  SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
  #SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server-dsa.key
 
  #   Server Certificate Chain:
  #   Point SSLCertificateChainFile at a file containing the
  #   concatenation of PEM encoded CA certificates which form the
  #   certificate chain for the server certificate. Alternatively
  #   the referenced file can be the same as SSLCertificateFile
  #   when the CA certificates are directly appended to the server
  #   certificate for convinience.
  #SSLCertificateChainFile /usr/local/apache/conf/ssl.crt/ca.crt
 
  #   Certificate Authority (CA):
  #   Set the CA certificate verification path where to find CA
  #   certificates for client authentication or alternatively one
  #   huge file containing all of them (file must be PEM encoded)
  #   Note: Inside SSLCACertificatePath you need hash symlinks
  # to point to the certificate files. Use the provided
  # Makefile to update the hash symlinks after changes.
  #SSLCACertificatePath /usr/local/apache/conf/ssl.crt
  #SSLCACertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle.crt
 
  #   Certificate Revocation Lists (CRL):
  #   Set the CA revocation path where to find CA CRLs for client
  #   authentication or alternatively one huge file containing all
  #   of them (file must be PEM encoded)
  #   Note: Inside SSLCARevocationPath you need hash symlinks
  # to point to the certificate files. Use the provided
  # Makefile to update the hash symlinks after changes.
  #SSLCARevocationPath /usr/local/apache/conf/ssl.crl
  #SSLCARevocationFile /usr/local/apache/conf/ssl.crl/ca-bundle.crl
 
  #   Client Authentication (Type):
  #   Client certificate verification type and depth.  Types are
  #   none, optional, require and optional_no_ca.  Depth is a
  #   number which specifies how deeply to verify the certificate
  #   issuer chain before deciding the certificate is not valid.
  #SSLVerifyClient require
  #SSLVerifyDepth  10
 
  #   Access Control:
  #   With SSLRequire you can do per-directory access control based
  #   on arbitrary complex boolean expressions containing server
  #   variable checks and other lookup directives.  The syntax is a
  #   mixture between C and Perl.  See the mod_ssl documentation
  #   for more details.
  #Location /
  #SSLRequire (%{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
  #  

RE: IIS or Apache

2002-01-22 Thread Martin van den Bemt

Don't worry about me dude ;). I only use open source for my efforts and I
don't have a boss ;) . Just don't forget that a lot of companies (especially
bigger ones) don't make a technical decision, but a political, which leads
to the story you are telling me.. I'm seeing a huge increase at customers
for choosing .net which is still beta quality, and all those decisisions
MUST be based on politics or emotions, not on what their company requires
(talking about companies with eg windows, solaris, mainframe and as/400
combined in 1 environment).
But yeah, we can fill a huge newsgroup with this topic I guess...

Mvgr,
Martin

 -Original Message-
 From: Cressatti, Dominique [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 21, 2002 18:31
 To: Tomcat Users List
 Subject: RE: IIS or Apache


 Ever heard of managers ;)
 yes and what do they pay you for?
 tell you how to do your job or letting
 you do your job ie finding the best web server.

 If he willing to put his butt on the line for
 deploying the worth web server and take full
 responsibilities for breaking into your site,
 fine.

 Again do your job, compare which of apache and IIS
 had the most bug/securities hols issues which
 one tie you up to a specific platform ,which one
 makes it difficult to replicate/migrate to a different
 PC.

 As well if you go for IIS you gonna have to patch and
 keep up with them fairly frequently (look at how many
 patches had been released for IIS in the last year),
 therefore it means more down time.

 Apache is open source = if you find a bug that prevent
 your site to stay up or compromise it, providing that
 can code in C you can fix it there and then.
 With IIS pray that MS 1) can be asked to fix it 2) they
 do it quickly.

 If apache/Linux is good enough for amazon.com to commit
 there business on it why can't it be good enough for your
 boss?

 Dom
 -Original Message-
 From: Martin van den Bemt [mailto:[EMAIL PROTECTED]]
 Sent: 21 January 2002 17:09
 To: Tomcat Users List
 Subject: RE: IIS or Apache


 Ever heard of managers ;)

  -Original Message-
  From: Cressatti, Dominique [mailto:[EMAIL PROTECTED]]
  Sent: Monday, January 21, 2002 18:08
  To: Tomcat Users List
  Subject: RE: IIS or Apache
 
 
  From stability/bugs/security point of view the choice is easy,
  use apache.
  Why on earth anyone would run IIS? given it track record (code
  red, nimba, etc...).
  apache is portable, try to replicate a config on another platform
  using IIS,
  even on another MS platform it's not that easy.
  With Apache on the other hand you bearly need to copy the structure and
  httpd.conf
 
  Apache has 60% market share and IIS about 20%
  yet IIS is top notch when it comes to the amount of bugs/security
  holls uncovered, apache bearly none.
 
  Again why on earth anyone with a bit of common sense would consider
  running IIS.
 
  Dom
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 21 January 2002 16:51
  To: [EMAIL PROTECTED]
  Subject: IIS or Apache
 
 
  Hi,
  I have a JSP application (with java classes) to run on Windows 2000
  server. For JSP i am using tomcat container. Can anyone please
 let me know
  should I use Microsoft IIS web server or Apache web server for my
  application. Please tell me which is better IIS or Apache on
 the following
  basis:
  1. Stability
  2. Speed
  3. Load
  4. Overall (considering any other parameters)
 
  Sumit.
  The information contained in this e-mail and any files
 transmitted with it
  may be privileged and confidential.  If the reader of this message,
  regardless of the address or routing, is not an intended
  recipient, you are
  hereby notified that you have received this transmittal in error and any
  review, use, distribution, dissemination or copying is strictly
  prohibited.
  If you have received this message in error, please delete this
 e-mail and
  all files transmitted with it from your system and notify the sender by
  reply e-mail or by calling 1-888-338-6076.
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 
 


 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Problem when creating mod_webapp under hpux11

2002-01-22 Thread PELOQUIN,JEFFREY (Non-HP-Boise,ex1)

Jeff,

the problem you are experiening results from the fact the Korn shell on
HP-UX does not keep zero length strings in memory as far as I can tell,
MYVAR =  is null for all practical purposes. The configure file sets a
number of variables to  for one purpose or another.  However then the
configure file tries to use these variables in test statements, which is why
you get the /usr/bin/test[7]: test: Specify a parameter with this command
errors.  I am currently trying to rewrite the file and others for HP-UX.

I have had mod_webapp working for the past five days and will send it to you
in a separate email.  
Anybody else want it?

Jeff

-Original Message-
From: Jeff Ong [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 1:58 AM
To: Tomcat Users List
Subject: Re: Problem when creating mod_webapp under hpux11


Anyone own the mod_webapp for hpux11? can you please send it to me if you
dont mind?


- Original Message -
From: Jeff Ong [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 4:52 PM
Subject: Problem when creating mod_webapp under hpux11


 Hi all,

 i am currently try to integrate tomcat with apache. I am using tomcat
4.0.1
 and apache 1.3.22. Both of the apache and tomcat run smoothly. When i surf
 to port 80 and 8080, both gave me the expected result.

 However, when i tried to create mod_webapp, it always hangs in a process.


 # ./configure --with-apxs=/usr/local/apache/bin/apxs
 loading cache ./config.cache
 checking for test... /usr/bin/test
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for true... /usr/bin/true
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for echo... /usr/bin/echo
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for grep... /usr/bin/grep
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for cat... /usr/bin/cat
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for sed... /usr/bin/sed
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for ln... /usr/bin/ln
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for rm... /usr/bin/rm
 checking host system type... hppa1.1-hp-hpux11.00
 checking for sources directory... /var/jeff/webapp-module-1.0-tc40
 checking for targets directory... /var/jeff/webapp-module-1.0-tc40

 C-Language compilation tools
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for ar... /usr/bin/ar
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for ranlib... /usr/bin/ranlib
 checking for gcc... gcc
 checking whether the C compiler (gcc  ) works... yes
 checking whether the C compiler (gcc  ) is a cross-compiler... no
 checking whether we are using GNU C... yes
 checking whether gcc accepts -g... yes
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking for gcc... /opt/gcc/bin/gcc
 checking whether /opt/gcc/bin/gcc and cc understand -c and -o together...
 yes
 checking how to run the C preprocessor... /opt/gcc/bin/gcc -E
 checking for debug build... no

 JAVA-Language compilation tools
 checking for java support... no

 API documentation generation
 checking for C API documentation... no
 checking for Java API documentation... no

 Target web-server
 checking for Apache apxs... yes
 /usr/bin/test[7]: test: Specify a parameter with this command.
 /usr/bin/test[7]: test: Specify a parameter with this command.
 checking target module... apache-1.3
 /usr/bin/test[7]: test: Specify a parameter with this command.

 Finishing up
 checking for APR compilation flags... /usr/bin/test[7]: test: Specify a
 parameter with this command.
 ok
 (IT ALWAYS HANGs HERE )


 anyone know what is happening? I have tried to compile
 webapp-module-1.0.1-tc401-src.tar.gz and
 webapp-module-1.0.1-tc40-src.tar.gz but both of them gave me same
 problems.



 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Problem when creating mod_webapp under hpux11

2002-01-22 Thread Jeff Ong

thanks jeffrey, hope to get the file from u soon .


- Original Message -
From: PELOQUIN,JEFFREY (Non-HP-Boise,ex1) [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 8:12 PM
Subject: RE: Problem when creating mod_webapp under hpux11


 Jeff,

 the problem you are experiening results from the fact the Korn shell on
 HP-UX does not keep zero length strings in memory as far as I can tell,
 MYVAR =  is null for all practical purposes. The configure file sets a
 number of variables to  for one purpose or another.  However then the
 configure file tries to use these variables in test statements, which is
why
 you get the /usr/bin/test[7]: test: Specify a parameter with this command
 errors.  I am currently trying to rewrite the file and others for HP-UX.

 I have had mod_webapp working for the past five days and will send it to
you
 in a separate email.
 Anybody else want it?

 Jeff

 -Original Message-
 From: Jeff Ong [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 1:58 AM
 To: Tomcat Users List
 Subject: Re: Problem when creating mod_webapp under hpux11


 Anyone own the mod_webapp for hpux11? can you please send it to me if you
 dont mind?


 - Original Message -
 From: Jeff Ong [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, January 22, 2002 4:52 PM
 Subject: Problem when creating mod_webapp under hpux11


  Hi all,
 
  i am currently try to integrate tomcat with apache. I am using tomcat
 4.0.1
  and apache 1.3.22. Both of the apache and tomcat run smoothly. When i
surf
  to port 80 and 8080, both gave me the expected result.
 
  However, when i tried to create mod_webapp, it always hangs in a
process.
 
 
  # ./configure --with-apxs=/usr/local/apache/bin/apxs
  loading cache ./config.cache
  checking for test... /usr/bin/test
  /usr/bin/test[7]: test: Specify a parameter with this command.
  checking for true... /usr/bin/true
  /usr/bin/test[7]: test: Specify a parameter with this command.
  checking for echo... /usr/bin/echo
  /usr/bin/test[7]: test: Specify a parameter with this command.
  checking for grep... /usr/bin/grep
  /usr/bin/test[7]: test: Specify a parameter with this command.
  checking for cat... /usr/bin/cat
  /usr/bin/test[7]: test: Specify a parameter with this command.
  checking for sed... /usr/bin/sed
  /usr/bin/test[7]: test: Specify a parameter with this command.
  checking for ln... /usr/bin/ln
  /usr/bin/test[7]: test: Specify a parameter with this command.
  checking for rm... /usr/bin/rm
  checking host system type... hppa1.1-hp-hpux11.00
  checking for sources directory... /var/jeff/webapp-module-1.0-tc40
  checking for targets directory... /var/jeff/webapp-module-1.0-tc40
 
  C-Language compilation tools
  /usr/bin/test[7]: test: Specify a parameter with this command.
  checking for ar... /usr/bin/ar
  /usr/bin/test[7]: test: Specify a parameter with this command.
  checking for ranlib... /usr/bin/ranlib
  checking for gcc... gcc
  checking whether the C compiler (gcc  ) works... yes
  checking whether the C compiler (gcc  ) is a cross-compiler... no
  checking whether we are using GNU C... yes
  checking whether gcc accepts -g... yes
  /usr/bin/test[7]: test: Specify a parameter with this command.
  checking for gcc... /opt/gcc/bin/gcc
  checking whether /opt/gcc/bin/gcc and cc understand -c and -o
together...
  yes
  checking how to run the C preprocessor... /opt/gcc/bin/gcc -E
  checking for debug build... no
 
  JAVA-Language compilation tools
  checking for java support... no
 
  API documentation generation
  checking for C API documentation... no
  checking for Java API documentation... no
 
  Target web-server
  checking for Apache apxs... yes
  /usr/bin/test[7]: test: Specify a parameter with this command.
  /usr/bin/test[7]: test: Specify a parameter with this command.
  checking target module... apache-1.3
  /usr/bin/test[7]: test: Specify a parameter with this command.
 
  Finishing up
  checking for APR compilation flags... /usr/bin/test[7]: test: Specify a
  parameter with this command.
  ok
  (IT ALWAYS HANGs HERE )
 
 
  anyone know what is happening? I have tried to compile
  webapp-module-1.0.1-tc401-src.tar.gz and
  webapp-module-1.0.1-tc40-src.tar.gz but both of them gave me same
  problems.
 
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 


 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Custom Authentication

2002-01-22 Thread Ricardo Ramalho

Hi all! ;)

I have to migrate a Web Application from Allaire JRun to Tomcat 4.0.1.

I have a custom Authentication created by us. How can i use it under TomCat
4.0.1? Information is very non-existant or I'm just to dumb to find it!
:))

Another question: Do i have a InitialContext ? If i have so... where is
it? If it doesn't exist, it's no problemat all. I'll simply use the usual
method to access the MySQL database without aquiring the DataSources from
InitialContext (wich maybe it's something from J2EE).

Sorry for my poor English.

Thanks for any help you can give me! :)

Ricardo Ramalho
Carcavelos Lisbon Portugal
E-Works
http://www.eworks.pt



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Jasper error

2002-01-22 Thread RSEQUEIRA







Debby Dart [EMAIL PROTECTED] on 01/21/2002 07:08:32 PM

Please respond to Tomcat Users List [EMAIL PROTECTED]

To:   'Tomcat Users List' [EMAIL PROTECTED]
cc:

Subject:  Jasper error


I'm a newbie to Tomcat and JSP and fairly new to Java.  While running a
test
script with Tomcat 4.0, I get the following error:

...
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 3 in the jsp file: /SaveName.jsp

Generated servlet error:
C:\java-apps\Apache Tomcat 4.0\work\localhost\testapp\SaveName$jsp.java:65:
Class org.apache.jsp.UserData not found.
UserData user = null;
...

Line 3 in the script is :
jsp:useBean id=user class=UserData scope=session/

I thought all I needed to do was to place the file UserData.class into the
webapps\testapp\Web-inf\classes directory, but apparently I'm missing
something.

The WEB-INF should be in uppercase rather than mixed case.

I have looked at most of the documentation I can find and tried to use
web.xml - going to this list with such a basic question is a last resort.

Thanks for your patience and all help you can provide.


Hope this helps.
Thanks.
RS

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]









--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




applet deployment/access

2002-01-22 Thread cazza

I have a servlet that generates html which contains a reference to the
applet class under tomcat (the tomcat location is webapps/myapp/applet/)

I understand that MyApplet.class cannot be under the web-inf directory for
security reasons, but I have two questions;
1) The applet class relies on other classes that are under the
web-inf/classes directory.  How should my applet get access to these
classes?

2) MyApplet.class is also part of a package, which therefore builds under
Tomcat to webapps/myapp/applet/com/companyname/packagename/MyApplet.class.
I would like to set up a filter in the web.xml so that any reference to
/applet loads the applet class.  Do I do it as follows?
filter
filter-nameApplet Filter/filter-name
filter-classcom.companyname.packagename.MyApplet.class/filter-class
/filter
filter-mapping
filter-nameApplet Filter/filter-name
url-pattern/applet/url-pattern
/filter-mapping



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Config/Startup problem contextInit() not running

2002-01-22 Thread Larry Isaacs

If there aren't any System.out.println's or log output being
generated by your CustomRealm, you can try temporarily removing
the myapp.tomcat.CustomRealm class from your installation and
see if Tomcat complains.  It should complain if it is acting on
your CustomRealm / entry but can't find the class.  An
alternative is to modify modules-myapp.xml to specify
an incorrect class name.

Cheers,
Larry

 -Original Message-
 From: Adam Paeth [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 21, 2002 5:05 PM
 To: Tomcat Users List
 Subject: RE: Config/Startup problem contextInit() not running
 
 
 That is a great question, how do I check since I can't find 
 anything in a
 log file?
 
 Thanks,
 Adam
 
  -Original Message-
  From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
  Sent: Monday, January 21, 2002 3:53 PM
  To: 'Tomcat Users List'
  Subject: RE: Config/Startup problem contextInit() not running
 
 
  I'll investigate for Tomcat 3.3a/3.3.1-dev.  Do you know if your
  CustomRealm / is being loaded, as opposed to being ignored?
 
  Cheers,
  Larry
 
   -Original Message-
   From: Adam Paeth [mailto:[EMAIL PROTECTED]]
   Sent: Monday, January 21, 2002 4:10 PM
   To: Tomcat User List
   Subject: Config/Startup problem contextInit() not running
  
  
  
   I'm going crazy trying to figure this out...
  
   I've re-written a customized realm that we used for our
   Tomcat 3.2.1 (now
   for 3.3).  For some reason the debug messages that I've 
 put into the
   contextInit() method are not showing up on the console or any
   log files.  It
   doesn't appear that the method is running.  Can anyone tell
   me why this is
   happening and the best approach to fixing it?
  
   After getting some advice from a previous post I setup the
   config files as
   such:
  
   apps-myapp.xml
   --
   ?xml version=1.0 encoding=ISO-8859-1?
   webapps
  Context path=/myapp
   docBase=webapps/myapp
   debug=1
   reloadable=true 
 CustomRealm /
 LogSetter name=myapp_tc.log 
 path=logs/myapp.log /
 LogSetter name=myapp_servlet_log
path=logs/servlet_myapp.log
servletLogger=true/
 /Context
  
   /webapps
  
   modules-myapp.xml
   -
   ?xml version=1.0 encoding=UTF-8?
   modules
 module name=CustomRealm 
 javaClass=myapp.tomcat.CustomRealm/
   /modules
  
   Thanks,
   Adam Paeth
  
  
   --
   To unsubscribe:   
 mailto:[EMAIL PROTECTED]
   For additional commands: 
 mailto:[EMAIL PROTECTED]
   Troubles with the list: 
 mailto:[EMAIL PROTECTED]
  
 
  --
  To unsubscribe:   
 mailto:[EMAIL PROTECTED]
  For additional commands: 
 mailto:[EMAIL PROTECTED]
  Troubles with the list: 
 mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Jasper error

2002-01-22 Thread dderry

Debby,

You need to import org.apache.jsp.UserData to use it in that manner. (%@
page import=org.apache.jsp.UserData %).

the useBean declaration creates a scripting variable named user, and does
not require the import. But at line 3 (UserData user = null;) you are
declaring a different variable (which will mask the variable created by
useBean). If you really intend to set the bean to null then just do an
assignment rather than a declaration (user = null;).

Dave Derry


- Original Message -
From: Debby Dart [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, January 21, 2002 8:08 PM
Subject: Jasper error


 ...
 org.apache.jasper.JasperException: Unable to compile class for JSP

 An error occurred at line: 3 in the jsp file: /SaveName.jsp

 Generated servlet error:
 C:\java-apps\Apache Tomcat
4.0\work\localhost\testapp\SaveName$jsp.java:65:
 Class org.apache.jsp.UserData not found.
 UserData user = null;
 ...

 Line 3 in the script is :
 jsp:useBean id=user class=UserData scope=session/

 I thought all I needed to do was to place the file UserData.class into the
 webapps\testapp\Web-inf\classes directory, but apparently I'm missing
 something.





--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Removing whitespace.

2002-01-22 Thread Larry Isaacs

The JSP spec, including JSP 1.2, states that whitespace should
be preserved.  Though the patch won't be implemented, you can
check Bug 5560:

http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=5560

for a suggested patch to remove the whitespace.  You are welcome
to customize Jasper if it suits your needs.


Cheers,
Larry

 -Original Message-
 From: Steve Mactaggart [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 21, 2002 10:28 PM
 To: Tomcat Users List
 Subject: Removing whitespace.
 
 
 Hi all,
   I have some jsp's that are generate some larger html 
 files.  One of the
 reasons is the indenting of the code to manage development.  
 I was wondering
 if there is an option for tomcat to remove all whitespace 
 before it sent the
 data.  I know that the old Enhydra servlet server used to do 
 this and in my
 case this would save a large amount of size from the 
 generated html files.
 
 I don't want to un-indent the code as it will be too hard to maintain.
 
 FYI,
   using Tomcat 3.3-dev on Win2000 and Linux but would be 
 happy to hear if it
 is a feature of 4.
 
 Thanks for your help
 
 
 Steve Mactaggart
 Senior Java Developer /
 Team Leader
 
 303 Sport
 BH: 9620 7477
 FAX 9620 7377
 
 
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: applet deployment/access

2002-01-22 Thread Anton Brazhnyk

Hi,

 -Original Message-
 From: cazza [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 3:27 PM
 To: [EMAIL PROTECTED]
 Subject: applet deployment/access
 
 
 I have a servlet that generates html which contains a reference to the
 applet class under tomcat (the tomcat location is webapps/myapp/applet/)
 
 I understand that MyApplet.class cannot be under the web-inf directory for
 security reasons, but I have two questions;

I don't know any security reasons for applets to be not allowed in WEB-INF,
there is only one reason for them: User won't be able to access them there.
Applets are executed on client side, so browser's JVM should download .class

 1) The applet class relies on other classes that are under the
 web-inf/classes directory.  How should my applet get access to these
 classes?
 

You should consider packing classes your applet needs and applet itself
to .jar and using appropriate syntax in Applet

 2) MyApplet.class is also part of a package, which therefore builds under
 Tomcat to webapps/myapp/applet/com/companyname/packagename/MyApplet.class.
 I would like to set up a filter in the web.xml so that any reference to
 /applet loads the applet class.  Do I do it as follows?
 filter
 filter-nameApplet Filter/filter-name
 
 filter-classcom.companyname.packagename.MyApplet.class/filter-class
 /filter
 filter-mapping
 filter-nameApplet Filter/filter-name
 url-pattern/applet/url-pattern
 /filter-mapping
 
 

Why it should be filter, it looks like you need servlet or even just let Tomcat
serve it for you with default servlet (see answer on first question).
And you'd better use class name without .class in filter-class anyway. :)

Anton.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: Jasper error

2002-01-22 Thread Ralph Einfeldt

Wrong!

What happens, is that UserData belongs to no package.
So the compiler tries to find it in the package for 
the generated servlet (which is org.apache.jsp for 
tomcat and may be any name with other jsp engines).

To use a bean that belongs to no package (not a good 
practice anyway) you have to import it like
%@ page import=UserData %

(Not shure if that really works, because I never 
used a bean without a package.)

 -Ursprüngliche Nachricht-
 Von: dderry [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 22. Januar 2002 12:56
 An: Tomcat Users List; [EMAIL PROTECTED]
 Betreff: Re: Jasper error
 
 
 Debby,
 
 You need to import org.apache.jsp.UserData to use it in that 
 manner. (%@
 page import=org.apache.jsp.UserData %).
 
 the useBean declaration creates a scripting variable named 
 user, and does
 not require the import. But at line 3 (UserData user = null;) you are
 declaring a different variable (which will mask the variable 
 created by
 useBean). If you really intend to set the bean to null then just do an
 assignment rather than a declaration (user = null;).
 
 Dave Derry

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Please help! Unit test fails for Tomcat

2002-01-22 Thread kynn



When I try 'ant test' (after getting past 'ant dist'), it fails
eventually with:

test-dir-context:
 [echo] Running FileDirContext tests
 [java] .F...
 [java] Time: 0.164
 [java] There was 1 failure:
 [java] 1) 
testGetAttributesWebInf(org.apache.naming.resources.FileDirContextTestCase)junit.framework.AssertionFailedError:
 WEB-INF attribute 'resourcetype' is expected
 [java] at 
org.apache.naming.resources.BaseDirContextTestCase.checkWebInfAttributes(BaseDirContextTestCase.java:452)
 [java] at 
org.apache.naming.resources.FileDirContextTestCase.testGetAttributesWebInf(FileDirContextTestCase.java:162)
 [java]
 [java] FAILURES!!!
 [java] Tests run: 8,  Failures: 1,  Errors: 0
 [java]

BUILD FAILED

/home1/berriz/build/tomcat/jakarta-tomcat-4.0.1-src/catalina/build.xml:566: Java 
returned: -1

Total time: 4 seconds



Any suggestions as to what to do to fix this would be most welcome.

KJ

P.S.  Please Cc me in your response.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Custom Authentication

2002-01-22 Thread Sergei Batiuk

Hello,


If you mean a 'Login API', it doesn't exist in Tomcat You need to use
form-based login instead.


There is InitialContext in Tomcat. This is how I used it to set up
DataSource ( Tomcat 4.1.0) :

Context path=/test docBase=jakarta
 debug=0 privileged=false

  Resource name=jdbc/OdbcDS auth=SERVLET
type=javax.sql.DataSource/
  ResourceParams name=jdbc/OdbcDS

parameternameuser/namevalueyour_login/value/parameter

parameternamepassword/namevalueyour_password/value/parameter
parameternamedriverClassName/name
  valuesun.jdbc.odbc.JdbcOdbcDriver/value/parameter
parameternamedriverName/name
  valuejdbc:odbc:OkeanTest/value/parameter
  /ResourceParams

/Context


Sincerely,
Sergei Batiuk.



-Original Message-
From: Ricardo Ramalho [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 2:25 PM
To: Tomcat Users List
Cc: casa; [EMAIL PROTECTED]
Subject: Custom Authentication


Hi all! ;)

I have to migrate a Web Application from Allaire JRun to Tomcat 4.0.1.

I have a custom Authentication created by us. How can i use it under TomCat
4.0.1? Information is very non-existant or I'm just to dumb to find it!
:))

Another question: Do i have a InitialContext ? If i have so... where is
it? If it doesn't exist, it's no problemat all. I'll simply use the usual
method to access the MySQL database without aquiring the DataSources from
InitialContext (wich maybe it's something from J2EE).

Sorry for my poor English.

Thanks for any help you can give me! :)

Ricardo Ramalho
Carcavelos Lisbon Portugal
E-Works
http://www.eworks.pt



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Apache-tomcat configuration

2002-01-22 Thread Tamim, Samir

Hi all,
 
Still trying to let Apache SSL  / Tomcat with Warp Connector to Work on
Solaris 8. 
 
JDK 1.3.1_02 / Apache 1.3.22 / Tomcat 4.0.1 
 
So still having the following  :
 
[Fri Jan 18 15:27:44 2002] [error] Cannot receive handshake WARP packet
[Fri Jan 18 15:27:44 2002] [error] Cannot read packet (pr_warp_config.c:139)
[Fri Jan 18 15:27:44 2002] [error] Cannot configure connection conn
[Fri Jan 18 15:27:47 2002] [notice] child pid 4883 exit signal Segmentation
Fault (11)
[Fri Jan 18 15:27:47 2002] [notice] child pid 4882 exit signal Segmentation
Fault (11)
..
Any help will appreciated.
 
Thanks
 
Sam
 



Re: web.xml Question

2002-01-22 Thread jeff . guttadauro


It's included in $CATALINA_HOME/common/lib/servlet.jar.



   

Tom Bednarz

list@bednarzTo: [EMAIL PROTECTED]

.ch cc:   

 Subject: web.xml Question 

01/22/02   

01:48 AM   

Please 

respond to 

Tomcat Users  

List  

   

   





Hi everybody,

Usually the web.xml file of a web application starts with the following:

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

This URL referst to the dtd file on SUN's server. I think most XML parsers
like SAX need to read the dtd file to be able to parse the XML file.

Questions:

What happens if I deploy an application on an Intranet which allows access
to the internet only through a proxy server (with username / password
authentication)? The dtd cannot be accessed and must be someware on the
local disk.

I found that TOMCAT has a web.xml in its conf directory. Could anybody
explain me, which XML files I need to change and where do I need to put the
downloaded web-app_2_3.dtd file?  Is the web.xml in the conf directory like
a parent to all web.xml files found under webapps\application\WEB-INF?
(Something like the defaults for all web apps)?

Could anybody help me out of this XML jungle?

Many thanks!

Thomas


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]






--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Please help! Unit test fails for Tomcat

2002-01-22 Thread Bruce Perryman

Did you download the correct JNDI package (JNDI 1.2.1
Reference Implementation)? Is it being picked up from
the correct location in build.properties ({tomcat
installation directory}/build.properties). Check the
build.properties file and make sure that it is being
refence properly. Are there any error msgs displayed
during the build?

--- [EMAIL PROTECTED] wrote:
 
 
 When I try 'ant test' (after getting past 'ant
 dist'), it fails
 eventually with:
 
 test-dir-context:
[echo] Running FileDirContext tests
[java] .F...
[java] Time: 0.164
[java] There was 1 failure:
[java] 1)

testGetAttributesWebInf(org.apache.naming.resources.FileDirContextTestCase)junit.framework.AssertionFailedError:
 WEB-INF attribute 'resourcetype' is expected
[java] at

org.apache.naming.resources.BaseDirContextTestCase.checkWebInfAttributes(BaseDirContextTestCase.java:452)
[java] at

org.apache.naming.resources.FileDirContextTestCase.testGetAttributesWebInf(FileDirContextTestCase.java:162)
[java]
[java] FAILURES!!!
[java] Tests run: 8,  Failures: 1,  Errors: 0
[java]
 
 BUILD FAILED
 


/home1/berriz/build/tomcat/jakarta-tomcat-4.0.1-src/catalina/build.xml:566:
 Java returned: -1
 
 Total time: 4 seconds
 
 
 
 Any suggestions as to what to do to fix this would
 be most welcome.
 
 KJ
 
 P.S.  Please Cc me in your response.
 
 --
 To unsubscribe:  
 mailto:[EMAIL PROTECTED]
 For additional commands:
 mailto:[EMAIL PROTECTED]
 Troubles with the list:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Custom Authentication

2002-01-22 Thread Ricardo Ramalho

Hi ppl! Again

It looks like i wasn't very accurate in my first question here...
What i wanted to do is something like this: (hope you guys can help) This is
my actual Athentication class, with uses BASIC login.


import java.lang.*;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.security.*;
import allaire.jrun.util.*;
import allaire.jrun.security.*;

public class Autentica implements AuthenticationInterface
{
/**
 * Initialize the authentication service
 * @param props The properties for the service
 */
public void init(OrderedProperties props) throws Exception
{
//Não se faz nada aki
}

/**
 * Destroy the service
 */
public void destroy()
{
//Não se faz nada aki
}

/**
 * Authenticate the given user with the given credentials (such
 * as a password).
 * @param req The servlet request
 * @param username The username to authenticate
 * @param method The type of authentication method (BASIC, DIGEST, FORM,
 * or CLIENT-CERT)
 * @param credentials Password and/or other credentials necessary
 * in authenticating the user
 * @return The Principal associated with the given username, or null
 * if authentication failed
 */
public Principal authenticate(HttpServletRequest req, String username,
String password) {
Principal principal = null;
  //tipos para a ligação à base de dados
  Connection dbCon = null;
  Statement dbStat = null;
  String sqlStat = null;
  ResultSet dbRes = null;

// If we have a password, attempt to validate it
if (password != null) {
try {
String dbPass = null;
//Acesso à base de dados - apanhar uma
conecção da pool de conexoes do JRun
   InitialContext ctx = new InitialContext();
   DataSource ds =
(DataSource)ctx.lookup(java:comp/env/jdbc/test_db);
   dbCon = ds.getConnection();
   dbStat = dbCon.createStatement();
sqlStat = SELECT passwd FROM users WHERE
user=' + username + ';
dbRes = dbStat.executeQuery(sqlStat);
dbRes.next();
dbPass = dbRes.getString(1);
if (dbPass.equals(password)) {
principal = new
AuthenticatedPrincipal(username);
}
} catch (Exception e) {
e.printStackTrace();
}
}
return principal;
}

/**
 * Determines if the given principal (user) has been granted the
 * given role within this authentication realm.
 * @param principal The principal (user) to verify
 * @param role The role to verify
 * @return true if the principal is part of the given role
 */
public boolean isPrincipalInRole(Principal principal, String role)
{
return true;
}
}


Thank you for any help in advance

-
Ricardo Ramalho
Carcavelos Lisbon Portugal
EWorks Consulting
-



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: wacky HTTPS-HTTP re-direct problem w/apache and tomcat 4

2002-01-22 Thread Denny Chambers

This is really strange. I have the same setup. I set the Server Name
directive once in the main portion of the httpd.conf. My VirtualHost
_default_:443 context is very similar to yours, except I don't have the
Server Name defined with in it. My WebAppConnection and WebAppDeploy
line are similar as well, I use localhost as my server name in the
WebAppConnection directive. What about your server.xml, let's see what
that looks like. I kind of running out of suggestions. sorry!

Dave North wrote:
 
 Hi Denny,
 Just tried that - no joy.  It then complains about the
 webAppDeploy lines being an invalid serverName.
 
 Cheers
 
 Dave
 
 -Original Message-
 From: Denny Chambers [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 21, 2002 4:52 PM
 To: Tomcat Users List
 Subject: Re: wacky HTTPS-HTTP re-direct problem w/apache and tomcat 4
 
 Have you tried it with out the ServerName directive set in the
 VirtualHost _default_:443 directive?
 
 Chambers, Norman (Denny) wrote:
 
  If tomcat and apache are running on the try using localhost:8080 here:
 
  WebAppConnection myconn warp ottas13a.ott.signiant.com:8008
 
  Also do you have the ServerName and Port directive set in the
  httpd.conf? The directives are required by SSL.
 
  Dave North wrote:
  
   sure.  Actually, back in the mailing list archive I just found
 someone
   who had the exact same problem...no solution alas.
  
   The server.xml file is the bog standard one with no changes from a
   tomcat install.
  
   My httpd.conf info (basically the standard mod_ssl config with the
   webAppDeploy stuff bolted in):
  
   ##
   ## SSL Virtual Host Context
   ##
  
   VirtualHost _default_:443
  
   #  General setup for the virtual host
   DocumentRoot /usr/local/apache/htdocs
   ServerName ottas13a.ott.signiant.com
   ServerAdmin [EMAIL PROTECTED]
   ErrorLog /usr/local/apache/logs/error_log
   TransferLog /usr/local/apache/logs/access_log
  
   #   SSL Engine Switch:
   #   Enable/Disable SSL for this virtual host.
   SSLEngine on
  
   #   SSL Cipher Suite:
   #   List the ciphers that the client is permitted to negotiate.
   #   See the mod_ssl documentation for a complete list.
   SSLCipherSuite
   ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  
   #   Server Certificate:
   #   Point SSLCertificateFile at a PEM encoded certificate.  If
   #   the certificate is encrypted, then you will be prompted for a
   #   pass phrase.  Note that a kill -HUP will prompt again. A test
   #   certificate can be generated with `make certificate' under
   #   built time. Keep in mind that if you've both a RSA and a DSA
   #   certificate you can configure both in parallel (to also allow
   #   the use of DSA ciphers, etc.)
   SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
   #SSLCertificateFile /usr/local/apache/conf/ssl.crt/server-dsa.crt
  
   #   Server Private Key:
   #   If the key is not combined with the certificate, use this
   #   directive to point at the key file.  Keep in mind that if
   #   you've both a RSA and a DSA private key you can configure
   #   both in parallel (to also allow the use of DSA ciphers, etc.)
   SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
   #SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server-dsa.key
  
   #   Server Certificate Chain:
   #   Point SSLCertificateChainFile at a file containing the
   #   concatenation of PEM encoded CA certificates which form the
   #   certificate chain for the server certificate. Alternatively
   #   the referenced file can be the same as SSLCertificateFile
   #   when the CA certificates are directly appended to the server
   #   certificate for convinience.
   #SSLCertificateChainFile /usr/local/apache/conf/ssl.crt/ca.crt
  
   #   Certificate Authority (CA):
   #   Set the CA certificate verification path where to find CA
   #   certificates for client authentication or alternatively one
   #   huge file containing all of them (file must be PEM encoded)
   #   Note: Inside SSLCACertificatePath you need hash symlinks
   # to point to the certificate files. Use the provided
   # Makefile to update the hash symlinks after changes.
   #SSLCACertificatePath /usr/local/apache/conf/ssl.crt
   #SSLCACertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle.crt
  
   #   Certificate Revocation Lists (CRL):
   #   Set the CA revocation path where to find CA CRLs for client
   #   authentication or alternatively one huge file containing all
   #   of them (file must be PEM encoded)
   #   Note: Inside SSLCARevocationPath you need hash symlinks
   # to point to the certificate files. Use the provided
   # Makefile to update the hash symlinks after changes.
   #SSLCARevocationPath /usr/local/apache/conf/ssl.crl
   #SSLCARevocationFile /usr/local/apache/conf/ssl.crl/ca-bundle.crl
  
   #   Client Authentication (Type):
   #   Client certificate verification type and depth.  Types are
   #   none, optional, 

Re: Apache / Tomcat 4.01/ Virtualhost

2002-01-22 Thread Ashish kulkarni

Hi,
I have done configured virtual host with apache 1.3.22
and tomcat 4.0.1 , on windows 2000 with mod_jk module,
here are the steps, hope it helps

#***
1) Tomcat 4.0 :
- Be carefull to do not install TC4 in a path with
spaces   !
otherwise you should use the 8.3 directory names to
configure TC
- In the server/lib subdirectory of TC4 add the
ajp.jar and the
tomcat-util.jar
- in the conf subdirectory copy the workers.properties
from a TC 3.2. Edit
it and fill the lines :

workers.tomcat_home=C:\Programs\Tomcat4.0
workers.java_home=C:\Programs\jdk1.3.1

with your own configuration.
- Edit the server.xml and add the AJP connector like
this :

!-- Connector for AJP 1.3 --
Connector
className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8009 minProcessors=5
maxProcessors=75
   acceptCount=10 debug=0
connectionTimeout=0 /

Now the tomcat server is ready

2) Apache
- firstly copy the mod_jk.dll from the TC3 distrib in
the apache modules
subdirectory
- Configure Apache
Contrary to TC3, TC4 do not generate the Apache
configuration. So you should
do it yourself.

At the end of your httpd.conf file you should add (and
adapt)

# TC 4.0 settings

#
# The following line instructs Apache to load the jk
module
#
LoadModule jk_module modules/mod_jk.dll

JkWorkersFile
C:/Programs/Tomcat4.0/conf/workers.properties
JkLogFile C:/Programs/Tomcat4.0/logs/mod_jk.log

#
# Log level to be used by mod_jk
#
JkLogLevel error

#
# Root context mounts for Tomcat
#
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13

Then for each Context you had created in tomcat you
should had a paragraph
like this (it's the same thong as in TC3):
Here my context is /pfe
and the directory of the web-app is
C:/Work/Dev/pfe/stock/gui/dist/pfe-gui

#
# The following line makes apache aware of the
location of the /pfe context
# Alias /pfe C:/Work/Dev/pfe/stock/gui/dist/pfe-gui
Directory C:/Work/Dev/pfe/stock/gui/dist/pfe-gui
Options Indexes FollowSymLinks
/Directory

#
# The following line mounts all JSP files and the
/servlet/ uri to tomcat #
JkMount /pfe/servlet/* ajp13 JkMount /pfe/*.jsp ajp13
JkMount /pfe/*.do
ajp13

#
# The following line prohibits users from directly
accessing WEB-INF #
Location /pfe/WEB-INF/
AllowOverride None
deny from all
/Location
#
# Use Directory too. On Windows, Location doesn't work
unless case matches #
Directory
C:/Work/Dev/pfe/stock/gui/dist/pfe-gui/WEB-INF/
AllowOverride None
deny from all
/Directory

#
# The following line prohibits users from directly
accessing META-INF #
Location /pfe/META-INF/
AllowOverride None
deny from all
/Location
#
# Use Directory too. On Windows, Location doesn't work
unless case matches #
Directory
C:/Work/Dev/pfe/stock/gui/dist/pfe-gui/META-INF/
AllowOverride None
deny from all
/Directory


You can also do the same type of things to deploy the
web-app directly as
the root of apache.

Ashish
--- [EMAIL PROTECTED] wrote:
 
 I have looked all over the place and I have tried to
 duplicate
 what I did on earlier versions of Tomcat.  But I am
 getting
 anywhere.
 
 Where is there a doc that tells me how to integrate
 Apache, Tomcat 4 with
 virtual hosts on Unix (Linux).
 
 Thanks for any help.
 
 Thanks,
 -Steve
 
 
 
 --
 To unsubscribe:  
 mailto:[EMAIL PROTECTED]
 For additional commands:
 mailto:[EMAIL PROTECTED]
 Troubles with the list:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Tomcat 3.2.4, Java 1.3.1, linux, and process usage

2002-01-22 Thread Brandon Cruz


I am using the configuration above, and whenever someone accesses a jsp
page, it seems that several processes are created.  I am not an expert with
linux, but it seems that multiple processes are created, which are each
taking up the exact same amount of memory (around 14%).  Is this normal, and
does it mean that 3 processes taking 14% are using up 42% of my memory every
time someone accesses a jsp on my machine?

Thanks in advance for any information!

Brandon






--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




multiple mod_webapp connections?

2002-01-22 Thread Chris Newland

Hi All,

I would like to set up multiple tomcat 4.0.1 instances (each running a cocoon 
webapp) all behind a single Apache server and use mod_webapp to connect 
between a URL path and a specific tomcat instance.

E.g. 

http://www.server.com/foo --- localhost:8080/cocoon (first tomcat instance)
http://www.server.com/bar --- localhost:8081/cocoon (second tomcat instance)

I've suceeded in getting the apache-mod_webapp-tomcat process to work fine 
with 1 instance of tomcat, but I don't know how to configure Apache to 
support 2 mod_webapp connectors. I can't find any information about this in 
the docs so I was wondering if it is even possible?

Has anybody suceeded in this configuration?

Thanks,

Chris
 


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




multiple instance of tomcat4.0

2002-01-22 Thread Ashish kulkarni

Hi,
I have tomcat4.0 on my win2000k and winnt server, i
want to run multiple instance of it, like one instance
for production, other for development, and the 3 for
testing.
so how can i do it??
do i have to modify server.xml???
if yes how?? 
i would appreciate if some one has an example
server.xml file for this purpose

Ashish

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]





Re: Tomcat 3.2.4, Java 1.3.1, linux, and process usage

2002-01-22 Thread Denny Chambers

They are not really seperate processes. They are threads off of a
running process. Linux just shows them as process. Use this command here
( ps -faux | grep java )and you can see who is the parent and who is the
child. As far as the memory usage, all of these threads are sharing this
14% of memory, so each one is not using that amount seperately.



Brandon Cruz wrote:
 
 I am using the configuration above, and whenever someone accesses a jsp
 page, it seems that several processes are created.  I am not an expert with
 linux, but it seems that multiple processes are created, which are each
 taking up the exact same amount of memory (around 14%).  Is this normal, and
 does it mean that 3 processes taking 14% are using up 42% of my memory every
 time someone accesses a jsp on my machine?
 
 Thanks in advance for any information!
 
 Brandon
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

-- 
Denny Chambers
Quantum Corporation, Inc.
Network Attached Storage Division
Java Linux Engineer
Phone: 251-478-5730
Cell: 251-605-3446
IM: [EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: JBUilder and connectionn pool

2002-01-22 Thread Emerson

At 08:51 22/1/2002 +0100, you wrote:
One question, which version of JBuilder is that? Professional or
Enterprize and how do you debug your web apps?
It's JBuilder Enterprise 5, and you create a  web app, so the ide simulates
a (one) context inside jbuilder, letting you even debug the JSP pages. Very
useful indeed. That´s why I don't wanna loose these feature using
centralized pool.


Nix.


Emerson Cargnin
TRE-SC
Setor de Desenvolvimento 
Tel: (48) 251-3700 - Ramal 3134

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat 3.2.4, Java 1.3.1, linux, and process usage

2002-01-22 Thread David Cassidy

If your OS has it have a try with pstree
its very illustrative on this ...


Denny Chambers wrote:

 They are not really seperate processes. They are threads off of a
 running process. Linux just shows them as process. Use this command here
 ( ps -faux | grep java )and you can see who is the parent and who is the
 child. As far as the memory usage, all of these threads are sharing this
 14% of memory, so each one is not using that amount seperately.

 Brandon Cruz wrote:
 
  I am using the configuration above, and whenever someone accesses a jsp
  page, it seems that several processes are created.  I am not an expert with
  linux, but it seems that multiple processes are created, which are each
  taking up the exact same amount of memory (around 14%).  Is this normal, and
  does it mean that 3 processes taking 14% are using up 42% of my memory every
  time someone accesses a jsp on my machine?
 
  Thanks in advance for any information!
 
  Brandon
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 Denny Chambers
 Quantum Corporation, Inc.
 Network Attached Storage Division
 Java Linux Engineer
 Phone: 251-478-5730
 Cell: 251-605-3446
 IM: [EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: [ANNOUNCEMENT] Tomcat 4.0.2 beta 2 released

2002-01-22 Thread Emerson

One question...

The 4.0.1 didn't generate the mod_jk.conf-auto file automatically (that's
why I didn't use it in production), does this new version auto generate??

At 13:38 21/1/2002 -0800, you wrote:
The Tomcat Team is proud to announce the second beta release of Tomcat
4.0.2.

Highligts for this release include:
- updated AJP native connector
- new release of the webapp native connector
- bugfixes, including a fix for problems shutting down Tomcat

Downloads (source and binaries):
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.2-b2/
Note: RPMs and native connectors builds for the JK and WARP protocols will
be made available shortly.

Release notes and full changelog:
http://cvs.apache.org/viewcvs.cgi/~checkout~/jakarta-tomcat-4.0/Attic/RELEAS
E-NOTES-4.0.2-B2.txt?rev=1.1.2.6

Remy


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


Emerson Cargnin
TRE-SC
Setor de Desenvolvimento 
Tel: (48) 251-3700 - Ramal 3134

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Custom Authentication

2002-01-22 Thread Dan Kha


Hi Ricardo,

See if these help:
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg35338.html
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg41747.html

--
Dan Kha
Development Team
Computing  Network Services
York University, Toronto, Canada

On Tue, 22 Jan 2002, Ricardo Ramalho wrote:

 Hi ppl! Again

 It looks like i wasn't very accurate in my first question here...
 What i wanted to do is something like this: (hope you guys can help) This is
 my actual Athentication class, with uses BASIC login.


 import java.lang.*;
 import java.sql.*;
 import javax.sql.*;
 import javax.naming.*;
 import java.io.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 import java.util.*;
 import java.security.*;
 import allaire.jrun.util.*;
 import allaire.jrun.security.*;

 public class Autentica implements AuthenticationInterface
 {
 /**
  * Initialize the authentication service
  * @param props The properties for the service
  */
 public void init(OrderedProperties props) throws Exception
 {
 //Não se faz nada aki
 }

 /**
  * Destroy the service
  */
 public void destroy()
 {
 //Não se faz nada aki
 }

 /**
  * Authenticate the given user with the given credentials (such
  * as a password).
  * @param req The servlet request
  * @param username The username to authenticate
  * @param method The type of authentication method (BASIC, DIGEST, FORM,
  * or CLIENT-CERT)
  * @param credentials Password and/or other credentials necessary
  * in authenticating the user
  * @return The Principal associated with the given username, or null
  * if authentication failed
  */
 public Principal authenticate(HttpServletRequest req, String username,
 String password) {
 Principal principal = null;
   //tipos para a ligação à base de dados
   Connection dbCon = null;
   Statement dbStat = null;
   String sqlStat = null;
   ResultSet dbRes = null;

 // If we have a password, attempt to validate it
 if (password != null) {
 try {
 String dbPass = null;
 //Acesso à base de dados - apanhar uma
 conecção da pool de conexoes do JRun
InitialContext ctx = new InitialContext();
DataSource ds =
 (DataSource)ctx.lookup(java:comp/env/jdbc/test_db);
dbCon = ds.getConnection();
dbStat = dbCon.createStatement();
 sqlStat = SELECT passwd FROM users WHERE
 user=' + username + ';
 dbRes = dbStat.executeQuery(sqlStat);
 dbRes.next();
 dbPass = dbRes.getString(1);
 if (dbPass.equals(password)) {
 principal = new
 AuthenticatedPrincipal(username);
 }
 } catch (Exception e) {
 e.printStackTrace();
 }
 }
 return principal;
 }

 /**
  * Determines if the given principal (user) has been granted the
  * given role within this authentication realm.
  * @param principal The principal (user) to verify
  * @param role The role to verify
  * @return true if the principal is part of the given role
  */
 public boolean isPrincipalInRole(Principal principal, String role)
 {
 return true;
 }
 }


 Thank you for any help in advance

 -
 Ricardo Ramalho
 Carcavelos Lisbon Portugal
 EWorks Consulting
 -



 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Who starts tomcat??

2002-01-22 Thread Emerson

If I want to let users of a linux machine to have a unique context each,
and deploying and restart each app independently, is this possible???

At 15:21 21/1/2002 -0500, you wrote:

In Linux...

  Manually:
 Start  stop it via the startup.sh  shutdown.sh scripts in
../Tomcat/bin.

  Automatically:
 Create a script in /etc/rc.d/init.d which invokes the scripts mentioned
above
based on a single argument (start or stop) (pattern it after an
existing one 
such as httpd)
Create links to it in the various directories for each run-level.
  /etc/rc.d/rcX.d  where X is 0-6  (do a man init for info on the
various levels)

   Note: This script is executed as root, therefore Tomcat will run as root,
if this
is not desired use a command similar to the following:

 su tomcatUser -c$TOMCAT_HOME/bin/startup.sh

  This will start it as user 'tomcatUser'.  Since your root, the
user's
   password won't be needed.

HTH,
Ron

 -Original Message-
 From:Emerson [SMTP:[EMAIL PROTECTED]]
 Sent:Monday, January 21, 2002 3:14 PM
 To:  Tomcat Users List
 Subject: Re: Who starts tomcat??
 
 but how do you start, automatically? where?
 
 At 18:09 21/1/2002 +, you wrote:
  --- Emerson [EMAIL PROTECTED] wrote:  How you
 guys start tomcat in linux??? as root??? in
  the initialization with
  apache
  
 
 
 Well, during development phase its better to use
 plain tomcat without an apache.(unless you want to
 test apache's functionality too).
 
 Apache, since it binds to port 80, needs root.
 tomcat listens at 8080 and hence it doesnt need root.
 
 HTH,
 eb!
 
 __
 Do You Yahoo!?
 Everything you'll ever need on one web page
 from News and Sport to Email and Music Charts
 http://uk.my.yahoo.com
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
 Emerson Cargnin
 TRE-SC
 Setor de Desenvolvimento 
 Tel: (48) 251-3700 - Ramal 3134
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


Emerson Cargnin
TRE-SC
Setor de Desenvolvimento 
Tel: (48) 251-3700 - Ramal 3134

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Jasper error

2002-01-22 Thread Justin Rowles

 I have looked at most of the documentation I can find and tried to use
 web.xml - going to this list with such a basic question is a 
 last resort.

Firstly well done - a decent effort with the docs is something to be
congratulated upon.

 Class org.apache.jsp.UserData not found.

This is the line you need to pay attention to.  The line-fragment
'Class=UserData' doesn't tell the compiler enough.  You need to tell it
more information about where to find the class, such as the package, or it
assumes it is in the same package as the thing it is compiling - in this
case org.apache.jsp.*

Justin.
-- 
You're only jealous cos the little penguins are talking to me. 



***
For more information on Ordnance Survey products and services,
visit our web site at http://www.ordnancesurvey.co.uk
***




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Invoking a process on the server from a servlet

2002-01-22 Thread Stephen Clarke

I have the following code in my servlet, where 'out' is the
HttpServletResponse object.

  Runtime t = Runtime.getRuntime();

  try {

   Process proc = t.exec( c:\\TaskInfo.exe );

   out.write( invoked  );

  } catch ( java.io.IOException ioe ) {

   out.write( ioe.toString() );

  }

What I'm getting is invoked in the browser window, but nothing visibly
happens on my local machine( ie. server). I was hoping TaskInfo would start
up. What I really want to do is open a file in notepad to tell me a visitor
has just arrived. Am I barking up the wrong tree altogether. Should I
generate an event and listen for it in another app running as a listener in
the background, or is there just no way of invoking a process on localhost
from a servlet.

Thanks.

If this is the wrong place to be asking these questions, please let me know.

--
cf



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: multiple instance of tomcat4.0

2002-01-22 Thread Anton Brazhnyk

Hi,

 -Original Message-
 From: Ashish kulkarni [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 5:17 PM
 To: [EMAIL PROTECTED]
 Subject: multiple instance of tomcat4.0 
 
 
 Hi,
 I have tomcat4.0 on my win2000k and winnt server, i
 want to run multiple instance of it, like one instance
 for production, other for development, and the 3 for
 testing.
 so how can i do it??
 do i have to modify server.xml???

AFAIK, server.xml is config file for instance 
(and the root Server there is singlton).
You should look through CATALINA_HOME and CATALINA_BASE
(try CATALINA_HOME/RUNNING.txt --- (4) Advanced configuration)
in your scripts (.bat files) or create several nt-services.


 if yes how?? 
 i would appreciate if some one has an example
 server.xml file for this purpose
 
 Ashish
 

Anton.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Invoking a process on the server from a servlet

2002-01-22 Thread Wagoner, Mark

The problem is due to NT (or 2000) not allowing the Tomcat service to
interact with the desktop.  If you bring up Task Manager, you will probably
see your invoked process running, but it can't create window.  In fact, the
only way you will now be able to get rid of it will be to kill it in Task
Manager.

I don't know of any way around this.

-Original Message-
From: Stephen Clarke [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 10:42 AM
To: tomcat
Subject: Invoking a process on the server from a servlet


I have the following code in my servlet, where 'out' is the
HttpServletResponse object.

  Runtime t = Runtime.getRuntime();

  try {

   Process proc = t.exec( c:\\TaskInfo.exe );

   out.write( invoked  );

  } catch ( java.io.IOException ioe ) {

   out.write( ioe.toString() );

  }

What I'm getting is invoked in the browser window, but nothing visibly
happens on my local machine( ie. server). I was hoping TaskInfo would start
up. What I really want to do is open a file in notepad to tell me a visitor
has just arrived. Am I barking up the wrong tree altogether. Should I
generate an event and listen for it in another app running as a listener in
the background, or is there just no way of invoking a process on localhost
from a servlet.

Thanks.

If this is the wrong place to be asking these questions, please let me know.

--
cf



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Invoking a process on the server from a servlet

2002-01-22 Thread Brian Adams

Mark is correct.  If you want you can have the servlet write to a file every
time you get a visitor and then write a seperate program that runs in your
tooltray. The other program should read the file and when a new line is
written then popup what ever it is you want to see.
 If it is in the your tooltray then the program will only work when you
login. :)
the servlet will just write to a special log file that is read by your new
little monitoring program.
goodluck,
Brian

-Original Message-
From: Wagoner, Mark [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 9:46 AM
To: 'Tomcat Users List'
Subject: RE: Invoking a process on the server from a servlet


The problem is due to NT (or 2000) not allowing the Tomcat service to
interact with the desktop.  If you bring up Task Manager, you will probably
see your invoked process running, but it can't create window.  In fact, the
only way you will now be able to get rid of it will be to kill it in Task
Manager.

I don't know of any way around this.

-Original Message-
From: Stephen Clarke [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 10:42 AM
To: tomcat
Subject: Invoking a process on the server from a servlet


I have the following code in my servlet, where 'out' is the
HttpServletResponse object.

  Runtime t = Runtime.getRuntime();

  try {

   Process proc = t.exec( c:\\TaskInfo.exe );

   out.write( invoked  );

  } catch ( java.io.IOException ioe ) {

   out.write( ioe.toString() );

  }

What I'm getting is invoked in the browser window, but nothing visibly
happens on my local machine( ie. server). I was hoping TaskInfo would start
up. What I really want to do is open a file in notepad to tell me a visitor
has just arrived. Am I barking up the wrong tree altogether. Should I
generate an event and listen for it in another app running as a listener in
the background, or is there just no way of invoking a process on localhost
from a servlet.

Thanks.

If this is the wrong place to be asking these questions, please let me know.

--
cf



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Custom Authentication

2002-01-22 Thread Luke Studley

You need to write your own Realm implementation. Look at the source for the
JDBC Realm.

On another issue to do with Login - Does anyone know how to pass multiple
credentials using a FORM login.
E.g. the user needs to input a password and a passphrase - But the Realm
only get the j_password field.

Is it possible to get access to the HttpRequest in the Realm to check for
other parameters?

Cheers

Luke


-Original Message-
From: Ricardo Ramalho [mailto:[EMAIL PROTECTED]] 
Sent: 22 January 2002 14:51
To: Tomcat Users List
Subject: Custom Authentication

Hi ppl! Again

It looks like i wasn't very accurate in my first question here...
What i wanted to do is something like this: (hope you guys can help) This is
my actual Athentication class, with uses BASIC login.


import java.lang.*;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.security.*;
import allaire.jrun.util.*;
import allaire.jrun.security.*;

public class Autentica implements AuthenticationInterface
{
/**
 * Initialize the authentication service
 * @param props The properties for the service
 */
public void init(OrderedProperties props) throws Exception
{
//Não se faz nada aki
}

/**
 * Destroy the service
 */
public void destroy()
{
//Não se faz nada aki
}

/**
 * Authenticate the given user with the given credentials (such
 * as a password).
 * @param req The servlet request
 * @param username The username to authenticate
 * @param method The type of authentication method (BASIC, DIGEST, FORM,
 * or CLIENT-CERT)
 * @param credentials Password and/or other credentials necessary
 * in authenticating the user
 * @return The Principal associated with the given username, or null
 * if authentication failed
 */
public Principal authenticate(HttpServletRequest req, String username,
String password) {
Principal principal = null;
  //tipos para a ligação à base de dados
  Connection dbCon = null;
  Statement dbStat = null;
  String sqlStat = null;
  ResultSet dbRes = null;

// If we have a password, attempt to validate it
if (password != null) {
try {
String dbPass = null;
//Acesso à base de dados - apanhar uma
conecção da pool de conexoes do JRun
   InitialContext ctx = new InitialContext();
   DataSource ds =
(DataSource)ctx.lookup(java:comp/env/jdbc/test_db);
   dbCon = ds.getConnection();
   dbStat = dbCon.createStatement();
sqlStat = SELECT passwd FROM users WHERE
user=' + username + ';
dbRes = dbStat.executeQuery(sqlStat);
dbRes.next();
dbPass = dbRes.getString(1);
if (dbPass.equals(password)) {
principal = new
AuthenticatedPrincipal(username);
}
} catch (Exception e) {
e.printStackTrace();
}
}
return principal;
}

/**
 * Determines if the given principal (user) has been granted the
 * given role within this authentication realm.
 * @param principal The principal (user) to verify
 * @param role The role to verify
 * @return true if the principal is part of the given role
 */
public boolean isPrincipalInRole(Principal principal, String role)
{
return true;
}
}


Thank you for any help in advance

-
Ricardo Ramalho
Carcavelos Lisbon Portugal
EWorks Consulting
-



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Does isapi_redirect support chunked data?

2002-01-22 Thread Rida Ligurs



After digging through the source code of isapi_redirect.dll, I've discovered
the following:

1. Transfer-Encoding isn't a supported header entry. Chunked data isn't
preserved as chunked data. 
2. I still don't know why the content-length of dechunked data isn't
getting stored in the response header.
2. isap_redirect doesn't support messages larger than 8K.

Are any of these issues scheduled to be address in the next release?  

My intent was to integrate with IIS in order to be able to restrict access
to a fixed set of IP addresses.  Due to the above limitations, I need to
look for another solution.  Is there any way to do this in standalone
Tomcat?


Rida

-Original Message-
From: Rida Ligurs 
Sent: Monday, January 21, 2002 11:52 AM
To: Tomcat-User (E-mail)
Subject: Does isapi_redirect support chunked data?


I have a servlet that returns a SOAP document in its output stream.

I have a Java client that posts a request using sockets and expects to read
the response (SOAP document) from the socket's input stream.

Everything works fine if I'm posting directly to Tomcat.  I get the
following data from the input stream:

HTTP/1.1 200 OK
Content-Type:text/xml
Date:Mon, 21 Jan 2002 15:19:54 GMT
Transfer-Encoding:chunked
Server:Apache Tomcat/4.0.1 (HTTP/1.1 Connector)

44  // chunk size
SOAP data chunk
23  // chunk size.
SOAP data chunk
0

But when I post to IIS running with isapi_redirect,  the input stream
contains the following:

HTTP/1.1 200 OK
Server:Microsoft-IIS/5.0
Date:Mon, 21 Jan 2002 15:25:54 GMT
Connection:Close
Content-Type:text/xml

SOAP data

Is chunked data supposed to get handled this way?





--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Invoking a process on the server from a servlet

2002-01-22 Thread Randy Layman


A few other thoughts of accomplishing the same thing:
1.  You could enable Interact with desktop in the service that would
allow it to open windows (but open huge security holes).  Also if your site
gets popular this will consume lots of memory when you can't close the
windows as fast as they are opening.
2.  Instead of opening a process you could send a message (via TCP)
to an application that would catch it and display the message
3.  Instead of opening a process you could update some internal list
and then have a web page (access restricted if you want) that would display
the results.  Then you could do an auto-refresh header if you desired.
4.  Make Tomcat SNMP enabled and then pass messages to the monitor
interface.  Then have your corporate management application listen for the
events and display messages accordingly.

 -Original Message-
 From: Brian Adams [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 10:34 AM
 To: 'Tomcat Users List'
 Subject: RE: Invoking a process on the server from a servlet
 
 
 Mark is correct.  If you want you can have the servlet write 
 to a file every
 time you get a visitor and then write a seperate program that 
 runs in your
 tooltray. The other program should read the file and when a 
 new line is
 written then popup what ever it is you want to see.
  If it is in the your tooltray then the program will only 
 work when you
 login. :)
 the servlet will just write to a special log file that is 
 read by your new
 little monitoring program.
 goodluck,
 Brian
 
 -Original Message-
 From: Wagoner, Mark [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 9:46 AM
 To: 'Tomcat Users List'
 Subject: RE: Invoking a process on the server from a servlet
 
 
 The problem is due to NT (or 2000) not allowing the Tomcat service to
 interact with the desktop.  If you bring up Task Manager, you 
 will probably
 see your invoked process running, but it can't create window. 
  In fact, the
 only way you will now be able to get rid of it will be to 
 kill it in Task
 Manager.
 
 I don't know of any way around this.
 
 -Original Message-
 From: Stephen Clarke [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 10:42 AM
 To: tomcat
 Subject: Invoking a process on the server from a servlet
 
 
 I have the following code in my servlet, where 'out' is the
 HttpServletResponse object.
 
   Runtime t = Runtime.getRuntime();
 
   try {
 
Process proc = t.exec( c:\\TaskInfo.exe );
 
out.write( invoked  );
 
   } catch ( java.io.IOException ioe ) {
 
out.write( ioe.toString() );
 
   }
 
 What I'm getting is invoked in the browser window, but 
 nothing visibly
 happens on my local machine( ie. server). I was hoping 
 TaskInfo would start
 up. What I really want to do is open a file in notepad to 
 tell me a visitor
 has just arrived. Am I barking up the wrong tree altogether. Should I
 generate an event and listen for it in another app running as 
 a listener in
 the background, or is there just no way of invoking a process 
 on localhost
 from a servlet.
 
 Thanks.
 
 If this is the wrong place to be asking these questions, 
 please let me know.
 
 --
 cf
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Some problems

2002-01-22 Thread Archie Cameron

Hey... I may have spammed some/all of you.  My current config is messed up.
I have stopped it so y'all are safe from me once again.   

I am installing Windchill Infoengine from PTC.  It utilizes Apache and
Tomcat and Java 2.  

Later
Arch

Archie G Cameron
Polaris Industries Inc
IS Dept
218.463.4620



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Invoking a process on the server from a servlet

2002-01-22 Thread Stephen Clarke

- Original Message -
From: Wagoner, Mark [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 3:45 PM
Subject: RE: Invoking a process on the server from a servlet


 The problem is due to NT (or 2000) not allowing the Tomcat service to
 interact with the desktop.  If you bring up Task Manager, you will
probably
 see your invoked process running, but it can't create window.  In fact,
the
 only way you will now be able to get rid of it will be to kill it in Task
 Manager.

 I don't know of any way around this.

OK. Can you tell me for sure that trying to generate an event and 'hear' it
in another infinitely looping application won't work?

Personally, I've never generated my own events before so I am guessing
wildly.

Thanks,

sc


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: wacky HTTPS-HTTP re-direct problem w/apache and tomcat 4

2002-01-22 Thread Dave North

I'm beginning to think it is in the server.xml.  here ya go.  I don't
think I've made any changes here but.

The relevant stuff is at the end I guess (the warp connector)

!-- Example Server Configuration File --
!-- Note that component elements are nested corresponding to their
 parent-child relationships with each other --

!-- A Server is a singleton element that represents the entire JVM,
 which may contain one or more Service instances.  The Server
 listens for a shutdown command on the indicated port.

 Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves or Loggers at this level.
 --

Server port=8005 shutdown=SHUTDOWN debug=0


  !-- A Service is a collection of one or more Connectors that
share
   a single Container (and therefore the web applications visible
   within that Container).  Normally, that Container is an Engine,
   but this is not required.

   Note:  A Service is not itself a Container, so you may not
   define subcomponents such as Valves or Loggers at this level.
   --

  !-- Define the Tomcat Stand-Alone Service --
  Service name=Tomcat-Standalone

!-- A Connector represents an endpoint by which requests are
received
 and responses are returned.  Each Connector passes requests on
to the
 associated Container (normally an Engine) for processing.

 By default, a non-SSL HTTP/1.1 Connector is established on port
8080.
 You can also enable an SSL HTTP/1.1 Connector on port 8443 by
 following the instructions below and uncommenting the second
Connector
 entry.  SSL support requires the following steps (see the SSL
Config
 HOWTO in the Tomcat 4.0 documentation bundle for more detailed
 instructions):
 * Download and install JSSE 1.0.2 or later, and put the JAR
files
   into $JAVA_HOME/jre/lib/ext.
 * Execute:
 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
(Windows)
 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA
(Unix)
   with a password value of changeit for both the certificate
and
   the keystore itself.

 By default, DNS lookups are enabled when a web application
calls
 request.getRemoteHost().  This can have an adverse impact on
 performance, so you can disable it by setting the
 enableLookups attribute to false.  When DNS lookups are
disabled,
 request.getRemoteHost() will return the String version of the
 IP address of the remote client.
--

!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --
Connector
className=org.apache.catalina.connector.http.HttpConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=6/
!-- Note : To disable connection timeouts, set connectionTimeout
value
 to -1 --

!-- Define an SSL HTTP/1.1 Connector on port 8443 --
!--
Connector
className=org.apache.catalina.connector.http.HttpConnector
   port=8443 minProcessors=5 maxProcessors=75
   enableLookups=true
   acceptCount=10 debug=0 scheme=https secure=true
  Factory
className=org.apache.catalina.net.SSLServerSocketFactory
   clientAuth=false protocol=TLS/
/Connector
--

!-- Define an AJP 1.3 Connector on port 8009 --
!--
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8009 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0/
--

!-- Define a Proxied HTTP/1.1 Connector on port 8081 --
!-- See proxy documentation for more information about using this.
--
!--
Connector
className=org.apache.catalina.connector.http.HttpConnector
   port=8081 minProcessors=5 maxProcessors=75
   enableLookups=true
   acceptCount=10 debug=0 connectionTimeout=6
   proxyPort=80/
--

!-- Define a non-SSL HTTP/1.0 Test Connector on port 8082 --
!--
Connector
className=org.apache.catalina.connector.http10.HttpConnector
   port=8082 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0/
--

!-- An Engine represents the entry point (within Catalina) that
processes
 every request.  The Engine implementation for Tomcat stand
alone
 analyzes the HTTP headers included with the request, and passes
them
 on to the appropriate Host (virtual host). --

!-- Define the top level container in our container hierarchy --
Engine name=Standalone defaultHost=localhost debug=0

  !-- The request dumper valve dumps useful debugging information
about
   the request headers and cookies that were received, and the
response
   headers and cookies that were sent, for all 

RE: Invoking a process on the server from a servlet

2002-01-22 Thread Wagoner, Mark

If you want the messages to appear real-time, I think the previous
suggestion to send a TCP message to a waiting listener app would be you best
bet.  This app could just sit there with an open window that scrolls any
messages that it receives.

-Original Message-
From: Stephen Clarke [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 11:08 AM
To: Tomcat Users List
Subject: Re: Invoking a process on the server from a servlet


- Original Message -
From: Wagoner, Mark [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 3:45 PM
Subject: RE: Invoking a process on the server from a servlet


 The problem is due to NT (or 2000) not allowing the Tomcat service to
 interact with the desktop.  If you bring up Task Manager, you will
probably
 see your invoked process running, but it can't create window.  In fact,
the
 only way you will now be able to get rid of it will be to kill it in Task
 Manager.

 I don't know of any way around this.

OK. Can you tell me for sure that trying to generate an event and 'hear' it
in another infinitely looping application won't work?

Personally, I've never generated my own events before so I am guessing
wildly.

Thanks,

sc


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Invoking a process on the server from a servlet

2002-01-22 Thread Brian Adams

Good points.
I would NOT use interactive desktop at all.  the program will die when you
log out.
don't do it! :)

-Original Message-
From: Randy Layman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 9:21 AM
To: Tomcat Users List
Subject: RE: Invoking a process on the server from a servlet



A few other thoughts of accomplishing the same thing:
1.  You could enable Interact with desktop in the service that would
allow it to open windows (but open huge security holes).  Also if your site
gets popular this will consume lots of memory when you can't close the
windows as fast as they are opening.
2.  Instead of opening a process you could send a message (via TCP)
to an application that would catch it and display the message
3.  Instead of opening a process you could update some internal list
and then have a web page (access restricted if you want) that would display
the results.  Then you could do an auto-refresh header if you desired.
4.  Make Tomcat SNMP enabled and then pass messages to the monitor
interface.  Then have your corporate management application listen for the
events and display messages accordingly.

 -Original Message-
 From: Brian Adams [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 10:34 AM
 To: 'Tomcat Users List'
 Subject: RE: Invoking a process on the server from a servlet
 
 
 Mark is correct.  If you want you can have the servlet write 
 to a file every
 time you get a visitor and then write a seperate program that 
 runs in your
 tooltray. The other program should read the file and when a 
 new line is
 written then popup what ever it is you want to see.
  If it is in the your tooltray then the program will only 
 work when you
 login. :)
 the servlet will just write to a special log file that is 
 read by your new
 little monitoring program.
 goodluck,
 Brian
 
 -Original Message-
 From: Wagoner, Mark [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 9:46 AM
 To: 'Tomcat Users List'
 Subject: RE: Invoking a process on the server from a servlet
 
 
 The problem is due to NT (or 2000) not allowing the Tomcat service to
 interact with the desktop.  If you bring up Task Manager, you 
 will probably
 see your invoked process running, but it can't create window. 
  In fact, the
 only way you will now be able to get rid of it will be to 
 kill it in Task
 Manager.
 
 I don't know of any way around this.
 
 -Original Message-
 From: Stephen Clarke [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 10:42 AM
 To: tomcat
 Subject: Invoking a process on the server from a servlet
 
 
 I have the following code in my servlet, where 'out' is the
 HttpServletResponse object.
 
   Runtime t = Runtime.getRuntime();
 
   try {
 
Process proc = t.exec( c:\\TaskInfo.exe );
 
out.write( invoked  );
 
   } catch ( java.io.IOException ioe ) {
 
out.write( ioe.toString() );
 
   }
 
 What I'm getting is invoked in the browser window, but 
 nothing visibly
 happens on my local machine( ie. server). I was hoping 
 TaskInfo would start
 up. What I really want to do is open a file in notepad to 
 tell me a visitor
 has just arrived. Am I barking up the wrong tree altogether. Should I
 generate an event and listen for it in another app running as 
 a listener in
 the background, or is there just no way of invoking a process 
 on localhost
 from a servlet.
 
 Thanks.
 
 If this is the wrong place to be asking these questions, 
 please let me know.
 
 --
 cf
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Invoking a process on the server from a servlet

2002-01-22 Thread Stephen Clarke

OK. Thanks to all. The thread got discombobulated in my reader.

Anyway, I think I'll just write to a file and check it manually, or with a
perl doo dad.

TCP is a whole nother project. {:=o

Thanks again to all who replied.

--
Best,
sc


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




running jar files

2002-01-22 Thread Cressatti, Dominique

I have some jar files, swingall.jar and lansa.jar
How do I do the equivalent of:
java -cp ./:./lansa.jar:./swingall.jar com.lansa.web.admin.WebAbmin
which basically run manually  the WebAdmin applet.
I know it's an applet but there is a servlet equivalent.
 
Sorry if this is too much of a basic question but after 3 days
of trying just about every combination under the sun, am still getting nowhere,
all I ever get is java.lang.NoClassDefFoundError... com/lansa/web/servlet
  
Dom




Keystore format

2002-01-22 Thread Jason Barr

Hi all,

Is one able to use a non-JKS type keystore with Tomcat? The docs don't
get very specific about this and mention that only JKS type keystores
can be used.

Has anyone figured out a way to extract a private key from a JKS (or for
that matter, a pkcs12) type keystore?

Cheers,
--
Jason Barr
Vendor Manager
Thawte Tech Support
www.thawte.com/cgi/support/contents.exe




smime.p7s
Description: S/MIME Cryptographic Signature


RE: Custom Authentication

2002-01-22 Thread jerry . fang


You can try to extend the FormAuthenticator to add your extra thing. The class is 
declared as final. But it is very easy to make a turn around.

-Jerry


-Original Message-
From: Luke Studley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 10:02 AM
To: 'Tomcat Users List'
Subject: RE: Custom Authentication


You need to write your own Realm implementation. Look at the source for the
JDBC Realm.

On another issue to do with Login - Does anyone know how to pass multiple
credentials using a FORM login.
E.g. the user needs to input a password and a passphrase - But the Realm
only get the j_password field.

Is it possible to get access to the HttpRequest in the Realm to check for
other parameters?

Cheers

Luke


-Original Message-
From: Ricardo Ramalho [mailto:[EMAIL PROTECTED]] 
Sent: 22 January 2002 14:51
To: Tomcat Users List
Subject: Custom Authentication

Hi ppl! Again

It looks like i wasn't very accurate in my first question here...
What i wanted to do is something like this: (hope you guys can help) This is
my actual Athentication class, with uses BASIC login.


import java.lang.*;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.security.*;
import allaire.jrun.util.*;
import allaire.jrun.security.*;

public class Autentica implements AuthenticationInterface
{
/**
 * Initialize the authentication service
 * @param props The properties for the service
 */
public void init(OrderedProperties props) throws Exception
{
//Não se faz nada aki
}

/**
 * Destroy the service
 */
public void destroy()
{
//Não se faz nada aki
}

/**
 * Authenticate the given user with the given credentials (such
 * as a password).
 * @param req The servlet request
 * @param username The username to authenticate
 * @param method The type of authentication method (BASIC, DIGEST, FORM,
 * or CLIENT-CERT)
 * @param credentials Password and/or other credentials necessary
 * in authenticating the user
 * @return The Principal associated with the given username, or null
 * if authentication failed
 */
public Principal authenticate(HttpServletRequest req, String username,
String password) {
Principal principal = null;
  //tipos para a ligação à base de dados
  Connection dbCon = null;
  Statement dbStat = null;
  String sqlStat = null;
  ResultSet dbRes = null;

// If we have a password, attempt to validate it
if (password != null) {
try {
String dbPass = null;
//Acesso à base de dados - apanhar uma
conecção da pool de conexoes do JRun
   InitialContext ctx = new InitialContext();
   DataSource ds =
(DataSource)ctx.lookup(java:comp/env/jdbc/test_db);
   dbCon = ds.getConnection();
   dbStat = dbCon.createStatement();
sqlStat = SELECT passwd FROM users WHERE
user=' + username + ';
dbRes = dbStat.executeQuery(sqlStat);
dbRes.next();
dbPass = dbRes.getString(1);
if (dbPass.equals(password)) {
principal = new
AuthenticatedPrincipal(username);
}
} catch (Exception e) {
e.printStackTrace();
}
}
return principal;
}

/**
 * Determines if the given principal (user) has been granted the
 * given role within this authentication realm.
 * @param principal The principal (user) to verify
 * @param role The role to verify
 * @return true if the principal is part of the given role
 */
public boolean isPrincipalInRole(Principal principal, String role)
{
return true;
}
}


Thank you for any help in advance

-
Ricardo Ramalho
Carcavelos Lisbon Portugal
EWorks Consulting
-



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: running jar files

2002-01-22 Thread Reynir Hübner

To execute a Jar file I would do 
 c:\ java -jar jarfile.jar
 if I was trying to execute a specific class in a jar file I would do : 
 c:\ java -cp jarfile1.jar;jarfile2.jar; com.lansa.web.admin.WebAdmin

If that doesn´t work I would check if this class really exists in the
jarfiles I have, and if I have the correct path.
Anyways it seems that you are executing the correct class, but it does
not get to another class that should be in the jarfiles that you have in
your classpath.  So, I would check if I had this class
com.lansa.web.servlet in my jarfiles (the ones in my classpath). 
maybe it isn´t there, then you should head back to the download page or
something. 
I dont know this product and I´ve never used it. It seems like you´re
haveing problems with basic java stuff, really just pretty much off
topic for this list.

 hope it helps, 
  regards, 
[EMAIL PROTECTED]



 


-Original Message-
From: Cressatti, Dominique [mailto:[EMAIL PROTECTED]]
Sent: 22. janúar 2002 16:25
To: Tomcat Users List
Subject: running jar files


I have some jar files, swingall.jar and lansa.jar
How do I do the equivalent of:
java -cp ./:./lansa.jar:./swingall.jar com.lansa.web.admin.WebAbmin
which basically run manually  the WebAdmin applet.
I know it's an applet but there is a servlet equivalent.
 
Sorry if this is too much of a basic question but after 3 days
of trying just about every combination under the sun, am still getting
nowhere,
all I ever get is java.lang.NoClassDefFoundError...
com/lansa/web/servlet
  
Dom


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Please help! Unit test fails for Tomcat

2002-01-22 Thread kynn



   Date: Tue, 22 Jan 2002 06:18:33 -0800 (PST)
   From: Bruce Perryman [EMAIL PROTECTED]
   Subject: Re: Please help!  Unit test fails for Tomcat

   Did you download the correct JNDI package (JNDI 1.2.1
   Reference Implementation)?

I downloaded jndi1_2_1.zip from
http://java.sun.com/products/jndi/#DOWNLOAD12 (following the Download
JNDI 1.2.1  More button).  I unzipped this file into
${base.path}/jndi-1.2.1:

  % ls jndi-1.2.1
  COPYRIGHT  README-LDAP.txt  README.txt  doc  examples  jndi1_2_1.zip  lib  schema

   Is it being picked up from
   the correct location in build.properties ({tomcat
   installation directory}/build.properties).

My build.properties file reads:

   # - Java Naming and Directory Interface (JNDI), version 1.2 or later -
   jndi.home=${base.path}/jndi-1.2.1
   jndi.lib=${jndi.home}/lib
   jndi.jar=${jndi.lib}/jndi.jar
   ldap.jar=${jndi.lib}/ldap.jar

   Are there any error msgs displayed
   during the build?

'ant -projecthelp' proceeds without a problem.  The first time I run
'ant dist' it fails, but (inexplicably) it succeeds the second time.
This behavior is reproducible:

   % ant clean
  OK 
   % ant dist
  fails 
   % ant dist
  OK 

The error message 'ant dist' produces the first time around is:

   tomcat-docs:
   
   build-prepare:
   [mkdir] Created dir: 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs
   
   build-static:
[copy] Copying 3 files to 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs
[copy] Copying 1 file to 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs/WEB-INF
[copy] Copying 2 files to 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs/appdev
[copy] Copying 6 files to 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs/appdev/sample
[copy] Copying 1 file to 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs/appdev/sample
   [mkdir] Created dir: 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs/catalina/funcspecs
   [mkdir] Created dir: 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs/images
[copy] Copying 2 files to 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs/images
   
   build-main:
   [style] Transforming into 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs
   [style] Transforming into 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs
   [style] Loading stylesheet 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/tomcat-docs/tomcat-docs.xsl
   [style] Transforming into 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs
   [style] Transforming into 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs
   [style] Transforming into 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs
   [style] Transforming into 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs
   [style] Transforming into 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs
   [style] Transforming into 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/build/tomcat-docs
   [style] Failed to process 
/usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/tomcat-docs/realm-howto.xml
   
   BUILD FAILED
   
   /usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/webapps/tomcat-docs/build.xml:80: 
javax.xml.transform.TransformerException: java.lang.NullPointerException
   
   Total time: 27 seconds


Thanks!

kynn

P.S.  Please Cc me in your response.



   --- [EMAIL PROTECTED] wrote:


When I try 'ant test' (after getting past 'ant
dist'), it fails
eventually with:

test-dir-context:
[echo] Running FileDirContext tests
[java] .F...
[java] Time: 0.164
[java] There was 1 failure:
[java] 1)
   
   
testGetAttributesWebInf(org.apache.naming.resources.FileDirContextTestCase)junit.framework.AssertionFailedError:
WEB-INF attribute 'resourcetype' is expected
[java] at
   
   
org.apache.naming.resources.BaseDirContextTestCase.checkWebInfAttributes(BaseDirContextTestCase.java:452)
[java] at
   
   
org.apache.naming.resources.FileDirContextTestCase.testGetAttributesWebInf(FileDirContextTestCase.java:162)
[java]
[java] FAILURES!!!
[java] Tests run: 8,  Failures: 1,  Errors: 0
[java]

BUILD FAILED

   
   
   /usr/local/build/tomcat/jakarta-tomcat-4.0.1-src/catalina/build.xml:566:
Java returned: -1

Total time: 4 seconds



Any suggestions as to what to do to fix this would
be most welcome.

KJ

P.S.  Please Cc me in your response.

--
To 

Running Microsoft Stress Tool (WAS) with Tomcat

2002-01-22 Thread Sanjeev Joshi

Hi all,

On running  this stress tool with Tomcat I get these errors ;

2002-01-22 22:11:31 - Ctx( /uii-example ): Exception in: R( /uii-example
+ /index.jsp + null) -
 java.lang.IllegalArgumentException: Cookie name Path is a reserved
token
at javax.servlet.http.Cookie.init(Cookie.java:185)
at
org.apache.tomcat.util.RequestUtil.processCookies(RequestUtil.java:189)
at
org.apache.tomcat.core.RequestImpl.getCookieCount(RequestImpl.java:510)
at
org.apache.tomcat.session.StandardSessionInterceptor.requestMap(StandardSessionInter

ceptor.java:145)
at
org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:835)

at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:786)

at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectio

nHandler.java:213)
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)


The result in the Stress Tool show as   500 Inrenal Server Error !!!

Any ideas  what  is the reason ?? Is it a Bug with Tomcat   ( not able
to handle multiple requests ! )

-Joshi



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RES: Running Microsoft Stress Tool (WAS) with Tomcat

2002-01-22 Thread Jose Euclides da Silva Junior - DIGR.O

It seems to have a bug in your code, at a glance. Could you send this slice
of code! 
Euclides.

-Mensagem original-
De: Sanjeev Joshi [mailto:[EMAIL PROTECTED]]
Enviada em: terça-feira, 22 de janeiro de 2002 14:46
Para: Tomcat Users List
Assunto: Running Microsoft Stress Tool (WAS) with Tomcat 


Hi all,

On running  this stress tool with Tomcat I get these errors ;

2002-01-22 22:11:31 - Ctx( /uii-example ): Exception in: R( /uii-example
+ /index.jsp + null) -
 java.lang.IllegalArgumentException: Cookie name Path is a reserved
token
at javax.servlet.http.Cookie.init(Cookie.java:185)
at
org.apache.tomcat.util.RequestUtil.processCookies(RequestUtil.java:189)
at
org.apache.tomcat.core.RequestImpl.getCookieCount(RequestImpl.java:510)
at
org.apache.tomcat.session.StandardSessionInterceptor.requestMap(StandardSess
ionInter

ceptor.java:145)
at
org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:835
)

at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:78
6)

at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectio

nHandler.java:213)
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)


The result in the Stress Tool show as   500 Inrenal Server Error !!!

Any ideas  what  is the reason ?? Is it a Bug with Tomcat   ( not able
to handle multiple requests ! )

-Joshi



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Running Microsoft Stress Tool (WAS) with Tomcat

2002-01-22 Thread David Cassidy

what does the source code of the affected page look like ?

Does this happen with a 'HelloWorld.jsp' type page ?

D

Sanjeev Joshi wrote:

 Hi all,

 On running  this stress tool with Tomcat I get these errors ;

 2002-01-22 22:11:31 - Ctx( /uii-example ): Exception in: R( /uii-example
 + /index.jsp + null) -
  java.lang.IllegalArgumentException: Cookie name Path is a reserved
 token
 at javax.servlet.http.Cookie.init(Cookie.java:185)
 at
 org.apache.tomcat.util.RequestUtil.processCookies(RequestUtil.java:189)
 at
 org.apache.tomcat.core.RequestImpl.getCookieCount(RequestImpl.java:510)
 at
 org.apache.tomcat.session.StandardSessionInterceptor.requestMap(StandardSessionInter

 ceptor.java:145)
 at
 org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:835)

 at
 org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:786)

 at
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
 at
 org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectio

 nHandler.java:213)
 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)

 The result in the Stress Tool show as   500 Inrenal Server Error !!!

 Any ideas  what  is the reason ?? Is it a Bug with Tomcat   ( not able
 to handle multiple requests ! )

 -Joshi

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Keystore format

2002-01-22 Thread pixel


~Scott

Jason Barr wrote:

Hi all,

Is one able to use a non-JKS type keystore with Tomcat? The docs don't
get very specific about this and mention that only JKS type keystores
can be used.

Not sure about this one. From what I understand, Tomcat usess JSSE, 
which only supports the Java keystore format. See

http://java.sun.com/products/jsse/index.html

for full details on JSSE.



Has anyone figured out a way to extract a private key from a JKS (or for
that matter, a pkcs12) type keystore?

Here is a site that explains how to import a private / public key and 
certificate in .der format. There is example code, [import.java] which 
might provide some insight as to extracting the key instead. 

http://comu.de/docs/tomcat_ssl.htm

~Scott


Cheers,
--
Jason Barr
Vendor Manager
Thawte Tech Support
www.thawte.com/cgi/support/contents.exe





--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




tomcat4.0 + apache1.3.22 + questions

2002-01-22 Thread Ashish kulkarni

Hi,
I have configured tomcat4.0 with apache 1.3.22, using
mod_jk as well as mod_web modules,
Does any one have any information about which one is
good for production purpose so i can conitnue using
it.
Also I have 3 directories on my win2000 and winnt
server, first is c:\prodution second is c:\testing and
third is c:\development.
now i have to create 3 virtual host which will server
3 web applications in these directories.
like. http://my.prod will get the jsp and servlets
from c:\production and http://my.test will get every
thing from c:\testing.
so what is the best way of doing it, i would like to
have 3 instance of tomcat so that i don have to stop
one while playing with the other, also i think there
will be only 1 instance of apache serving all request
from different tomcat server instance,
I think i should modify catalina_base varaible to
point at different directories. and have 3 nt services
but does anyone have an example which i can refer to
setup my system
Regards
Ashish


__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Running Microsoft Stress Tool (WAS) with Tomcat

2002-01-22 Thread Sanjeev Joshi

There is no problem with the code .  Using the Browser  the pages are rendered without 
any
problem. Also the Same   web-app when deployed with Jrun  and WAS is run on that works
just fine 

-Joshi

David Cassidy wrote:

 what does the source code of the affected page look like ?

 Does this happen with a 'HelloWorld.jsp' type page ?

 D

 Sanjeev Joshi wrote:

  Hi all,
 
  On running  this stress tool with Tomcat I get these errors ;
 
  2002-01-22 22:11:31 - Ctx( /uii-example ): Exception in: R( /uii-example
  + /index.jsp + null) -
   java.lang.IllegalArgumentException: Cookie name Path is a reserved
  token
  at javax.servlet.http.Cookie.init(Cookie.java:185)
  at
  org.apache.tomcat.util.RequestUtil.processCookies(RequestUtil.java:189)
  at
  org.apache.tomcat.core.RequestImpl.getCookieCount(RequestImpl.java:510)
  at
  
org.apache.tomcat.session.StandardSessionInterceptor.requestMap(StandardSessionInter
 
  ceptor.java:145)
  at
  org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:835)
 
  at
  org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:786)
 
  at
  org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
  at
  
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectio
 
  nHandler.java:213)
  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)
 
  The result in the Stress Tool show as   500 Inrenal Server Error !!!
 
  Any ideas  what  is the reason ?? Is it a Bug with Tomcat   ( not able
  to handle multiple requests ! )
 
  -Joshi
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Keystore format

2002-01-22 Thread Joaquín Sánchez Jiménez

Hi:

To do this you must create your own SSLSocketFactory. See 
org.apache.tomcat.net.SSLSocketFactory class from TOMCAT source.
You will see why you can only have JKS store type.
Once you have create it, you must config server.xml file:
Connector className=org.apache.tomcat.service.PoolTcpConnector

Parameter name=handler 
value=org.apache.tomcat.service.http.HttpConnectionHandler/

Parameter name=port value=8443/

Parameter name=socketFactory value=mypackage.MySSLSocketFactory /

/Connector


To get PrivateKey you can use this lines:

// JKS format.
KeyStore ks = KeyStore.getInstance(JKS);
// PKCS12 format using JSSE 1.0.2.
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
KeyStore ks = KeyStore.getInstance(PKCS12);

ks.load(new FileInputStream(PATH_TO_KEY_STORE), storepass.toCharArray());
PrivateKey pk = (PrivateKey)ks.getKey(certificateAlias, keypass.toCharArray());


- Original Message - 
From: Jason Barr [EMAIL PROTECTED]
To: tomcat [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 5:41 PM
Subject: Keystore format


 Hi all,
 
 Is one able to use a non-JKS type keystore with Tomcat? The docs don't
 get very specific about this and mention that only JKS type keystores
 can be used.
 
 Has anyone figured out a way to extract a private key from a JKS (or for
 that matter, a pkcs12) type keystore?
 
 Cheers,
 --
 Jason Barr
 Vendor Manager
 Thawte Tech Support
 www.thawte.com/cgi/support/contents.exe
 
 



RE: Jasper error

2002-01-22 Thread Debby Dart

Thanks for all the great response - but I'm still confused about what the
WEB-INF\classes directory is for if packages have to be used.

Debby

-Original Message-
From: Justin Rowles [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 5:21 AM
To: 'Tomcat Users List'
Subject: RE: Jasper error


 I have looked at most of the documentation I can find and tried to use
 web.xml - going to this list with such a basic question is a
 last resort.

Firstly well done - a decent effort with the docs is something to be
congratulated upon.

 Class org.apache.jsp.UserData not found.

This is the line you need to pay attention to.  The line-fragment
'Class=UserData' doesn't tell the compiler enough.  You need to tell it
more information about where to find the class, such as the package, or it
assumes it is in the same package as the thing it is compiling - in this
case org.apache.jsp.*

Justin.
--
You're only jealous cos the little penguins are talking to me.



***
For more information on Ordnance Survey products and services,
visit our web site at http://www.ordnancesurvey.co.uk
***




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: running jar files

2002-01-22 Thread Cressatti, Dominique

May be I wasn't too clear.

actually something like:
 c:\ java -cp jarfile1.jar;jarfile2.jar; com.lansa.web.admin.WebAdmin
works very well and am just trying to reproduce that under
tomcat4.

I've even extracted all the content of lansa.jar and swingall.jar
and copied it under /webapps/lansa/WEB-INF/classes
but no matter I always seem to get the dependency issue.
I believe there's no classes missing cos I know those jar files
work using jserve but it seem that tomcat can't find the required
classes.

Thanks
Dom

-Original Message-
From: Reynir Hübner [mailto:[EMAIL PROTECTED]]
Sent: 22 January 2002 16:36
To: Tomcat Users List
Subject: RE: running jar files


To execute a Jar file I would do 
 c:\ java -jar jarfile.jar
 if I was trying to execute a specific class in a jar file I would do : 
 c:\ java -cp jarfile1.jar;jarfile2.jar; com.lansa.web.admin.WebAdmin

If that doesn´t work I would check if this class really exists in the
jarfiles I have, and if I have the correct path.
Anyways it seems that you are executing the correct class, but it does
not get to another class that should be in the jarfiles that you have in
your classpath.  So, I would check if I had this class
com.lansa.web.servlet in my jarfiles (the ones in my classpath). 
maybe it isn´t there, then you should head back to the download page or
something. 
I dont know this product and I´ve never used it. It seems like you´re
haveing problems with basic java stuff, really just pretty much off
topic for this list.

 hope it helps, 
  regards, 
[EMAIL PROTECTED]



 


-Original Message-
From: Cressatti, Dominique [mailto:[EMAIL PROTECTED]]
Sent: 22. janúar 2002 16:25
To: Tomcat Users List
Subject: running jar files


I have some jar files, swingall.jar and lansa.jar
How do I do the equivalent of:
java -cp ./:./lansa.jar:./swingall.jar com.lansa.web.admin.WebAbmin
which basically run manually  the WebAdmin applet.
I know it's an applet but there is a servlet equivalent.
 
Sorry if this is too much of a basic question but after 3 days
of trying just about every combination under the sun, am still getting
nowhere,
all I ever get is java.lang.NoClassDefFoundError...
com/lansa/web/servlet
  
Dom


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Config/Startup problem contextInit() not running

2002-01-22 Thread Adam Paeth

OK, I have more clues, but no answer yet.  Here's what I did:

1 Change javaClass in modules-myapp.xml to a non-existant class.
   Result: no error messages.

2 change modules-myapp.xml to _modules-myapp.xml in an attempt to make TC
think there is no such file
   Result: no error messages.

3 change CustomRealm / to BadClass / in apps-myapp.xml
   Result: no error messages.

It appears to be ignoring my apps-myapp.xml file all together.  TOMCAT_HOME
is set properly to /opt/local/tomcat.  I'm not sure what is happening.  I
feel completely lost at this point.

AP

 -Original Message-
 From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 7:35 AM
 To: 'Tomcat Users List'
 Subject: RE: Config/Startup problem contextInit() not running


 If there aren't any System.out.println's or log output being
 generated by your CustomRealm, you can try temporarily removing
 the myapp.tomcat.CustomRealm class from your installation and
 see if Tomcat complains.  It should complain if it is acting on
 your CustomRealm / entry but can't find the class.  An
 alternative is to modify modules-myapp.xml to specify
 an incorrect class name.

 Cheers,
 Larry

  -Original Message-
  From: Adam Paeth [mailto:[EMAIL PROTECTED]]
  Sent: Monday, January 21, 2002 5:05 PM
  To: Tomcat Users List
  Subject: RE: Config/Startup problem contextInit() not running
 
 
  That is a great question, how do I check since I can't find
  anything in a
  log file?
 
  Thanks,
  Adam
 
   -Original Message-
   From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
   Sent: Monday, January 21, 2002 3:53 PM
   To: 'Tomcat Users List'
   Subject: RE: Config/Startup problem contextInit() not running
  
  
   I'll investigate for Tomcat 3.3a/3.3.1-dev.  Do you know if your
   CustomRealm / is being loaded, as opposed to being ignored?
  
   Cheers,
   Larry
  
-Original Message-
From: Adam Paeth [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 4:10 PM
To: Tomcat User List
Subject: Config/Startup problem contextInit() not running
   
   
   
I'm going crazy trying to figure this out...
   
I've re-written a customized realm that we used for our
Tomcat 3.2.1 (now
for 3.3).  For some reason the debug messages that I've
  put into the
contextInit() method are not showing up on the console or any
log files.  It
doesn't appear that the method is running.  Can anyone tell
me why this is
happening and the best approach to fixing it?
   
After getting some advice from a previous post I setup the
config files as
such:
   
apps-myapp.xml
--
?xml version=1.0 encoding=ISO-8859-1?
webapps
   Context path=/myapp
docBase=webapps/myapp
debug=1
reloadable=true 
  CustomRealm /
  LogSetter name=myapp_tc.log
  path=logs/myapp.log /
  LogSetter name=myapp_servlet_log
 path=logs/servlet_myapp.log
 servletLogger=true/
  /Context
   
/webapps
   
modules-myapp.xml
-
?xml version=1.0 encoding=UTF-8?
modules
  module name=CustomRealm
  javaClass=myapp.tomcat.CustomRealm/
/modules
   
Thanks,
Adam Paeth
   
   
--
To unsubscribe:
  mailto:[EMAIL PROTECTED]
For additional commands:
  mailto:[EMAIL PROTECTED]
Troubles with the list:
  mailto:[EMAIL PROTECTED]
   
  
   --
   To unsubscribe:
  mailto:[EMAIL PROTECTED]
   For additional commands:
  mailto:[EMAIL PROTECTED]
   Troubles with the list:
  mailto:[EMAIL PROTECTED]
  
  
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Jasper error

2002-01-22 Thread Randy Layman


First, packages don't have to be used, but since not using packages
can lead to problems (name collision and difficulty of finding anything),
they are strongly discouraged.

WEB-INF\classes is where you put your individual class files (as in
not your JAR files).  For most applications this directory will have a few
other directories that will be the top level package.  Also any unpackaged
classes can go in this directory.  For example, if you had an unpackaged
class called UserData and a packaged class com.doradosoftware.UserData, your
classes directory would have a directory called com and a file
UserData.class.

In your JSP, practically speaking you must somehow import every
class that your JSP page will use.  If the classes are in a package you can
do a com.doradosoftware.*, but if they aren't in a package then you must
specifically import each class individually.

Randy

PS For the purpose of this email, packaged and unpackaged mean whether or
not the class file uses the package statement, not how the file might or
might not be bundled.


 -Original Message-
 From: Debby Dart [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 12:15 PM
 To: 'Tomcat Users List'
 Subject: RE: Jasper error
 
 
 Thanks for all the great response - but I'm still confused 
 about what the
 WEB-INF\classes directory is for if packages have to be used.
 
 Debby
 
 -Original Message-
 From: Justin Rowles [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 5:21 AM
 To: 'Tomcat Users List'
 Subject: RE: Jasper error
 
 
  I have looked at most of the documentation I can find and 
 tried to use
  web.xml - going to this list with such a basic question is a
  last resort.
 
 Firstly well done - a decent effort with the docs is something to be
 congratulated upon.
 
  Class org.apache.jsp.UserData not found.
 
 This is the line you need to pay attention to.  The line-fragment
 'Class=UserData' doesn't tell the compiler enough.  You 
 need to tell it
 more information about where to find the class, such as the 
 package, or it
 assumes it is in the same package as the thing it is 
 compiling - in this
 case org.apache.jsp.*
 
 Justin.
 --
 You're only jealous cos the little penguins are talking to me.
 
 
 
 ***
 For more information on Ordnance Survey products and services,
 visit our web site at http://www.ordnancesurvey.co.uk
 ***
 
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Running Microsoft Stress Tool (WAS) with Tomcat

2002-01-22 Thread David Cassidy

your cookie isn't called 'path' by any chance ?

  Cookie name Path is a reserved token



Sanjeev Joshi wrote:

 There is no problem with the code .  Using the Browser  the pages are rendered 
without any
 problem. Also the Same   web-app when deployed with Jrun  and WAS is run on that 
works
 just fine 

 -Joshi

 David Cassidy wrote:

  what does the source code of the affected page look like ?
 
  Does this happen with a 'HelloWorld.jsp' type page ?
 
  D
 
  Sanjeev Joshi wrote:
 
   Hi all,
  
   On running  this stress tool with Tomcat I get these errors ;
  
   2002-01-22 22:11:31 - Ctx( /uii-example ): Exception in: R( /uii-example
   + /index.jsp + null) -
java.lang.IllegalArgumentException: Cookie name Path is a reserved
   token
   at javax.servlet.http.Cookie.init(Cookie.java:185)
   at
   org.apache.tomcat.util.RequestUtil.processCookies(RequestUtil.java:189)
   at
   org.apache.tomcat.core.RequestImpl.getCookieCount(RequestImpl.java:510)
   at
   
org.apache.tomcat.session.StandardSessionInterceptor.requestMap(StandardSessionInter
  
   ceptor.java:145)
   at
   org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:835)
  
   at
   org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:786)
  
   at
   org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
   at
   
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectio
  
   nHandler.java:213)
   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)
  
   The result in the Stress Tool show as   500 Inrenal Server Error !!!
  
   Any ideas  what  is the reason ?? Is it a Bug with Tomcat   ( not able
   to handle multiple requests ! )
  
   -Joshi
  
   --
   To unsubscribe:   mailto:[EMAIL PROTECTED]
   For additional commands: mailto:[EMAIL PROTECTED]
   Troubles with the list: mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]

 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Config/Startup problem contextInit() not running

2002-01-22 Thread Larry Isaacs

More likely there is something going wrong with modules-myapp.xml.
Perhaps there is an problem reading a separate modules file and
context local modules. I recall something like this happening to
me a while back, but I forget exact problem and cause.  I'll try
investigating.  In the mean time, try adding the CustomRealm
declaration directly in modules.xml instead of using
modules-myapp.xml and see what happens.

Cheers,
Larry

 -Original Message-
 From: Adam Paeth [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 12:21 PM
 To: Tomcat Users List
 Subject: RE: Config/Startup problem contextInit() not running
 
 
 OK, I have more clues, but no answer yet.  Here's what I did:
 
 1 Change javaClass in modules-myapp.xml to a non-existant class.
Result: no error messages.
 
 2 change modules-myapp.xml to _modules-myapp.xml in an 
 attempt to make TC
 think there is no such file
Result: no error messages.
 
 3 change CustomRealm / to BadClass / in apps-myapp.xml
Result: no error messages.
 
 It appears to be ignoring my apps-myapp.xml file all 
 together.  TOMCAT_HOME
 is set properly to /opt/local/tomcat.  I'm not sure what is 
 happening.  I
 feel completely lost at this point.
 
 AP
 
  -Original Message-
  From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, January 22, 2002 7:35 AM
  To: 'Tomcat Users List'
  Subject: RE: Config/Startup problem contextInit() not running
 
 
  If there aren't any System.out.println's or log output being
  generated by your CustomRealm, you can try temporarily removing
  the myapp.tomcat.CustomRealm class from your installation and
  see if Tomcat complains.  It should complain if it is acting on
  your CustomRealm / entry but can't find the class.  An
  alternative is to modify modules-myapp.xml to specify
  an incorrect class name.
 
  Cheers,
  Larry
 
   -Original Message-
   From: Adam Paeth [mailto:[EMAIL PROTECTED]]
   Sent: Monday, January 21, 2002 5:05 PM
   To: Tomcat Users List
   Subject: RE: Config/Startup problem contextInit() not running
  
  
   That is a great question, how do I check since I can't find
   anything in a
   log file?
  
   Thanks,
   Adam
  
-Original Message-
From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 3:53 PM
To: 'Tomcat Users List'
Subject: RE: Config/Startup problem contextInit() not running
   
   
I'll investigate for Tomcat 3.3a/3.3.1-dev.  Do you know if your
CustomRealm / is being loaded, as opposed to being ignored?
   
Cheers,
Larry
   
 -Original Message-
 From: Adam Paeth 
 [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 21, 2002 4:10 PM
 To: Tomcat User List
 Subject: Config/Startup problem contextInit() not running



 I'm going crazy trying to figure this out...

 I've re-written a customized realm that we used for our
 Tomcat 3.2.1 (now
 for 3.3).  For some reason the debug messages that I've
   put into the
 contextInit() method are not showing up on the console or any
 log files.  It
 doesn't appear that the method is running.  Can anyone tell
 me why this is
 happening and the best approach to fixing it?

 After getting some advice from a previous post I setup the
 config files as
 such:

 apps-myapp.xml
 --
 ?xml version=1.0 encoding=ISO-8859-1?
 webapps
Context path=/myapp
 docBase=webapps/myapp
 debug=1
 reloadable=true 
   CustomRealm /
   LogSetter name=myapp_tc.log
   path=logs/myapp.log /
   LogSetter name=myapp_servlet_log
  path=logs/servlet_myapp.log
  servletLogger=true/
   /Context

 /webapps

 modules-myapp.xml
 -
 ?xml version=1.0 encoding=UTF-8?
 modules
   module name=CustomRealm
   javaClass=myapp.tomcat.CustomRealm/
 /modules

 Thanks,
 Adam Paeth


 --
 To unsubscribe:
   mailto:[EMAIL PROTECTED]
 For additional commands:
   mailto:[EMAIL PROTECTED]
 Troubles with the list:
   mailto:[EMAIL PROTECTED]

   
--
To unsubscribe:
   mailto:[EMAIL PROTECTED]
For additional commands:
   mailto:[EMAIL PROTECTED]
Troubles with the list:
   mailto:[EMAIL PROTECTED]
   
   
  
  
   --
   To unsubscribe:   
 mailto:[EMAIL PROTECTED]
   For additional commands: 
 mailto:[EMAIL PROTECTED]
   Troubles with the list: 
 mailto:[EMAIL PROTECTED]
  
 
  --
  To unsubscribe:   
 mailto:[EMAIL PROTECTED]
  For additional commands: 
 mailto:[EMAIL PROTECTED]
  Troubles with the list: 
 mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL 

Re: question on form login

2002-01-22 Thread Craig R. McClanahan



On Tue, 22 Jan 2002, Arion Yu wrote:

 Date: Tue, 22 Jan 2002 11:09:13 +0800
 From: Arion Yu [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: question on form login

 Hi!

 Would the world becomes better if we can have this situation defineds in
 the next servlet specification?


If you want to see that happen, please provide feedback on the servlet
spec to [EMAIL PROTECTED].  Otherwise, nobody in the
servlet spec expert group (JSR-154) will know that someone cares about
this.

 Thanks

 Arion


Craig


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: How to capture authentication errors

2002-01-22 Thread Craig R. McClanahan

On Tue, 22 Jan 2002, Andrea Cervellati wrote:

 Date: Tue, 22 Jan 2002 08:36:41 +0100 (MET)
 From: Andrea Cervellati [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED],
  Andrea Cervellati [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: How to capture authentication errors

 Hi,

 I'm using JBoss and Tomcat to develop my web application.

 I have a security domain and the user must authenticate itself to access the
 restricted area.

 I'm using the DatabaseServer login module and I have defined the necessary
 tables.

 I want to display an error page when the user is not allowed to access instead
 of the HTTP-403 error message.

 The error.jsp page starts with the following:

 %@ page language=java session=false isThreadSafe=false info=Error Page
 isErrorPage=true %

 In my jboss-web.xml I've specified that the security domain to be used is the
 same of the Jboss EJB container:

 jboss-web security-domainjava:/jaas/modulojdbc/security-domain
 /jboss-web

 I've tried to add the following lines in the web.xml:

 error-page
  error-code403/error-code
  location/error.jsp/location
 /error-page


This is the right way to do what you want.

 but I keep having the HTTP-403 message displaied.


Tomcat 4.0 and 4.0.1 did not support user-defined error pages for
authentication errors.  Could you please try this with Tomcat 4.0.2b2
instead?


 I've also tried to use the form-error-page tag like this:

 login-config
 auth-methodFORM/auth-method
 form-login-config
 form-login-page/login.jsp/form-login-page
 form-error-page/error.jsp/form-error-page
 /form-login-config
 /login-config

 , but still have the problem


That's because the form error page is only used when the username/pasword
combination is not recognized (essentially, it replaces a 401 status).
The 403 error means that the container figured out who the user was --
that person just doesn't have one of the required roles to access the
requested resource.

 What can I do?
 Should I add anything else in the jboss-web.xml?

 I've posted rhis question even in the Java Forums and someone answered me that
 he had to change the Tomcat source to fix the problem.

 Please help!

Thanks in advance


Craig McClanahan


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: web.xml Question

2002-01-22 Thread Craig R. McClanahan



On Tue, 22 Jan 2002, Tom Bednarz wrote:

 Date: Tue, 22 Jan 2002 08:48:40 +0100
 From: Tom Bednarz [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: web.xml Question

 Hi everybody,

 Usually the web.xml file of a web application starts with the following:

 !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;

 This URL referst to the dtd file on SUN's server. I think most XML parsers
 like SAX need to read the dtd file to be able to parse the XML file.

 Questions:

 What happens if I deploy an application on an Intranet which allows access
 to the internet only through a proxy server (with username / password
 authentication)? The dtd cannot be accessed and must be someware on the
 local disk.


It's actually inside the servlet.jar file.  Tomcat registers a local copy
of the DTDs it uses, so as long as you spell the public identifier
correctly the internal copy will be used.

I use this mode of operation all the time, to run Tomcat on a disconnected
laptop.  The only other reason it might not work is if you are using an
XML parser that does not properly implement the SAX EntityResolver APIs.

 I found that TOMCAT has a web.xml in its conf directory. Could anybody
 explain me, which XML files I need to change and where do I need to put the
 downloaded web-app_2_3.dtd file?  Is the web.xml in the conf directory like
 a parent to all web.xml files found under webapps\application\WEB-INF?
 (Something like the defaults for all web apps)?

 Could anybody help me out of this XML jungle?

 Many thanks!

 Thomas


Craig


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




help me please, mod_webapp.so not created.

2002-01-22 Thread Gabriel Lopez Millan

  Hi all.

   I have redhat 7.2 with apache 2.0.28 and tomcat-4.0.1
   I have download webapp-module-1.0.1-tc401-src.tar.gz

   In Readme.txt say:

1)
cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
   (Logging in to [EMAIL PROTECTED] )
   CVS password: anoncvs
   cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic \
   checkout jakarta-tomcat-connectors/webapp

   OK

2)
 cd ./jakarta-tomcat-connectors/webapp
   cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic \
   checkout apr
   OK

3) ./support/buildconf.sh
   OK

4)
./configure --with-apxs=/usr/local/apache2/bin/apxs 
--with-tomcat=/usr/local/jakarta-tomcat-4.0.1/
--with-java=/usr/local/jdk/

   OK

5) make
IT SAY:
*** Warning: This library needs some functionality provided by -lwebapp.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module mod_webapp.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.

in /usr/src/jakarta-tomcat-connectors/webapp/apache-2.0 have:
mod_webapp.c
-rw-r--r--1 root root  654 ene 21 17:05 mod_webapp.la
-rw-r--r--1 root root90196 ene 21 17:05 mod_webapp.lo
-rw-r--r--1 root root89980 ene 21 17:05 mod_webapp.o
-rw-r--r--1 root root0 ene 21 17:05 mod_webapp.slo

but thereisn't a mod_webapp.so file ¡¡

Can anybody tell me where is the fail¡¡

   Thanks in advance 
   



-- 
-
Gabriel Lopez Millan - Grupo ANTS-CIRCuS
Facultad de Informática
Universidad de Murcia (España) Tfo: +34 968367645



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Config/Startup problem contextInit() not running

2002-01-22 Thread Adam Paeth

I added the CustomRealm declaration into the modules.xml and now I get a
CNFE(ClassNotFound Exception).  This is a step in the right direction, I
know that at least my config directory is being read.  The class is in a
.jar file that is in /opt/local/tomcat/lib.  Is there something that I need
to do with the classpath somewhere to have this jar file included?

Thanks,
Adam Paeth

 -Original Message-
 From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 11:40 AM
 To: 'Tomcat Users List'
 Subject: RE: Config/Startup problem contextInit() not running


 More likely there is something going wrong with modules-myapp.xml.
 Perhaps there is an problem reading a separate modules file and
 context local modules. I recall something like this happening to
 me a while back, but I forget exact problem and cause.  I'll try
 investigating.  In the mean time, try adding the CustomRealm
 declaration directly in modules.xml instead of using
 modules-myapp.xml and see what happens.

 Cheers,
 Larry

  -Original Message-
  From: Adam Paeth [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, January 22, 2002 12:21 PM
  To: Tomcat Users List
  Subject: RE: Config/Startup problem contextInit() not running
 
 
  OK, I have more clues, but no answer yet.  Here's what I did:
 
  1 Change javaClass in modules-myapp.xml to a non-existant class.
 Result: no error messages.
 
  2 change modules-myapp.xml to _modules-myapp.xml in an
  attempt to make TC
  think there is no such file
 Result: no error messages.
 
  3 change CustomRealm / to BadClass / in apps-myapp.xml
 Result: no error messages.
 
  It appears to be ignoring my apps-myapp.xml file all
  together.  TOMCAT_HOME
  is set properly to /opt/local/tomcat.  I'm not sure what is
  happening.  I
  feel completely lost at this point.
 
  AP
 
   -Original Message-
   From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, January 22, 2002 7:35 AM
   To: 'Tomcat Users List'
   Subject: RE: Config/Startup problem contextInit() not running
  
  
   If there aren't any System.out.println's or log output being
   generated by your CustomRealm, you can try temporarily removing
   the myapp.tomcat.CustomRealm class from your installation and
   see if Tomcat complains.  It should complain if it is acting on
   your CustomRealm / entry but can't find the class.  An
   alternative is to modify modules-myapp.xml to specify
   an incorrect class name.
  
   Cheers,
   Larry
  
-Original Message-
From: Adam Paeth [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 21, 2002 5:05 PM
To: Tomcat Users List
Subject: RE: Config/Startup problem contextInit() not running
   
   
That is a great question, how do I check since I can't find
anything in a
log file?
   
Thanks,
Adam
   
 -Original Message-
 From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 21, 2002 3:53 PM
 To: 'Tomcat Users List'
 Subject: RE: Config/Startup problem contextInit() not running


 I'll investigate for Tomcat 3.3a/3.3.1-dev.  Do you know if your
 CustomRealm / is being loaded, as opposed to being ignored?

 Cheers,
 Larry

  -Original Message-
  From: Adam Paeth
  [mailto:[EMAIL PROTECTED]]
  Sent: Monday, January 21, 2002 4:10 PM
  To: Tomcat User List
  Subject: Config/Startup problem contextInit() not running
 
 
 
  I'm going crazy trying to figure this out...
 
  I've re-written a customized realm that we used for our
  Tomcat 3.2.1 (now
  for 3.3).  For some reason the debug messages that I've
put into the
  contextInit() method are not showing up on the console or any
  log files.  It
  doesn't appear that the method is running.  Can anyone tell
  me why this is
  happening and the best approach to fixing it?
 
  After getting some advice from a previous post I setup the
  config files as
  such:
 
  apps-myapp.xml
  --
  ?xml version=1.0 encoding=ISO-8859-1?
  webapps
 Context path=/myapp
  docBase=webapps/myapp
  debug=1
  reloadable=true 
CustomRealm /
LogSetter name=myapp_tc.log
path=logs/myapp.log /
LogSetter name=myapp_servlet_log
   path=logs/servlet_myapp.log
   servletLogger=true/
/Context
 
  /webapps
 
  modules-myapp.xml
  -
  ?xml version=1.0 encoding=UTF-8?
  modules
module name=CustomRealm
javaClass=myapp.tomcat.CustomRealm/
  /modules
 
  Thanks,
  Adam Paeth
 
 
  --
  To unsubscribe:
mailto:[EMAIL PROTECTED]
  For additional commands:
mailto:[EMAIL PROTECTED]
  Troubles with the list:
mailto:[EMAIL 

RE: Running Microsoft Stress Tool (WAS) with Tomcat

2002-01-22 Thread Larry Isaacs

This looks like Tomcat 3.2.x.  Bugs:

http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=231

and

http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=1114

report this problem. Bug 1114 indicates this was fixed in
Tomcat 3.2.4. However, I believe the fix is that it doesn't
throw an exception, but simply ignores the cookie so the
request can continue.  I have vague recollections of this
error being reported as occurring when no one set the
cookie name to the reserved token.  We were never able to
duplicate this error and trace its cause.

Cookie handling was refactored in Tomcat 3.3 and I don't recall
this problem being reported against 3.3.  You might try
a newer version of Tomcat, 3.3.x or 4.x and see if this
problem is still present.

Cheers,
Larry

 -Original Message-
 From: David Cassidy [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 12:29 PM
 To: Tomcat Users List
 Subject: Re: Running Microsoft Stress Tool (WAS) with Tomcat
 
 
 your cookie isn't called 'path' by any chance ?
 
   Cookie name Path is a reserved token
 
 
 
 Sanjeev Joshi wrote:
 
  There is no problem with the code .  Using the Browser  the 
 pages are rendered without any
  problem. Also the Same   web-app when deployed with Jrun  
 and WAS is run on that works
  just fine 
 
  -Joshi
 
  David Cassidy wrote:
 
   what does the source code of the affected page look like ?
  
   Does this happen with a 'HelloWorld.jsp' type page ?
  
   D
  
   Sanjeev Joshi wrote:
  
Hi all,
   
On running  this stress tool with Tomcat I get these errors ;
   
2002-01-22 22:11:31 - Ctx( /uii-example ): Exception 
 in: R( /uii-example
+ /index.jsp + null) -
 java.lang.IllegalArgumentException: Cookie name Path 
 is a reserved
token
at javax.servlet.http.Cookie.init(Cookie.java:185)
at

 org.apache.tomcat.util.RequestUtil.processCookies(RequestUtil.
 java:189)
at

 org.apache.tomcat.core.RequestImpl.getCookieCount(RequestImpl.
 java:510)
at

 org.apache.tomcat.session.StandardSessionInterceptor.requestMa
 p(StandardSessionInter
   
ceptor.java:145)
at

 org.apache.tomcat.core.ContextManager.processRequest(ContextMa
 nager.java:835)
   
at

 org.apache.tomcat.core.ContextManager.internalService(ContextM
 anager.java:786)
   
at

 org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at

 org.apache.tomcat.service.http.HttpConnectionHandler.processCo
 nnection(HttpConnectio
   
nHandler.java:213)
at

 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
 t.java:416)
   
at

 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
 ol.java:501)
   
at java.lang.Thread.run(Thread.java:484)
   
The result in the Stress Tool show as   500 Inrenal 
 Server Error !!!
   
Any ideas  what  is the reason ?? Is it a Bug with 
 Tomcat   ( not able
to handle multiple requests ! )
   
-Joshi
   
--
To unsubscribe:   
 mailto:[EMAIL PROTECTED]
For additional commands: 
 mailto:[EMAIL PROTECTED]
Troubles with the list: 
 mailto:[EMAIL PROTECTED]
  
   --
   To unsubscribe:   
 mailto:[EMAIL PROTECTED]
   For additional commands: 
 mailto:[EMAIL PROTECTED]
   Troubles with the list: 
 mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe:   
 mailto:[EMAIL PROTECTED]
  For additional commands: 
 mailto:[EMAIL PROTECTED]
  Troubles with the list: 
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Asynchronous messages from servlets

2002-01-22 Thread Craig R. McClanahan

On Tue, 22 Jan 2002, Ronald Wildenberg wrote:

 Date: Tue, 22 Jan 2002 09:50:14 +0100
 From: Ronald Wildenberg [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Asynchronous messages from servlets

 Hi,

 I have the following problem. A simple form submits data
 to a servlet. The servlet sends a message via JMS to
 another application (in another JVM). Once the message
 has been sent, the 'service' method of the servlet ends.
 After a while, say five seconds, the other application would
 like to send back a response. How do I show this response
 to the user?

 Since the 'service' method has finished after sending the
 message, I have lost control over the output from the other
 application.

 What I need is a way to push the response to the browser. I
 would like the server to take the initiative in updating the browser
 window, not the user. Is this possible in any way?

 Thanks in advance,
 Ronald Wildenberg


There are two pieces to the answer for this kind of thing -- getting the
data back from the other JVM (I assume you are using asynchronous JMS
calls, right?), and displaying the data back to the user.

For the first step, doing an asynchronous JMS call in the other direction
(to a JMS receiver in the same JVM as Tomcat) could then receive the
results, and make them available as a servlet context or session
attribute.

For the second, I've seen people set up a page that uses the meta-refresh
capability in HTML to automatically keep sending a request every XX
seconds.  The servlet that receives this request will check to see if the
results are back yet - if they are, they are displayed, if they are not it
shows a Request in Progress ... please wait page with the meta refresh
tag.

The key thing is that you won't be able to respond on the original HTTP
request, since that has already been sent and your service() method has
returned.

Craig


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Config/Startup problem contextInit() not running

2002-01-22 Thread Larry Isaacs

I think the most appropriate directory for a module is
tomcat/lib/container, which is where most of the module
classes live.  A second possibility is tomcat/lib/common.
tomcat/lib won't work, even after adding your class to the
classpath manually, because it can't see the BaseInterceptor
class in tomcat/lib/common.  For details of the classloader
hierarchy, see:

http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#configuring_classes

Cheers,
Larry

 -Original Message-
 From: Adam Paeth [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 12:57 PM
 To: Tomcat Users List
 Subject: RE: Config/Startup problem contextInit() not running
 
 
 I added the CustomRealm declaration into the modules.xml and 
 now I get a
 CNFE(ClassNotFound Exception).  This is a step in the right 
 direction, I
 know that at least my config directory is being read.  The 
 class is in a
 .jar file that is in /opt/local/tomcat/lib.  Is there 
 something that I need
 to do with the classpath somewhere to have this jar file included?
 
 Thanks,
 Adam Paeth
 
  -Original Message-
  From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, January 22, 2002 11:40 AM
  To: 'Tomcat Users List'
  Subject: RE: Config/Startup problem contextInit() not running
 
 
  More likely there is something going wrong with modules-myapp.xml.
  Perhaps there is an problem reading a separate modules file and
  context local modules. I recall something like this happening to
  me a while back, but I forget exact problem and cause.  I'll try
  investigating.  In the mean time, try adding the CustomRealm
  declaration directly in modules.xml instead of using
  modules-myapp.xml and see what happens.
 
  Cheers,
  Larry
 
   -Original Message-
   From: Adam Paeth [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, January 22, 2002 12:21 PM
   To: Tomcat Users List
   Subject: RE: Config/Startup problem contextInit() not running
  
  
   OK, I have more clues, but no answer yet.  Here's what I did:
  
   1 Change javaClass in modules-myapp.xml to a non-existant class.
  Result: no error messages.
  
   2 change modules-myapp.xml to _modules-myapp.xml in an
   attempt to make TC
   think there is no such file
  Result: no error messages.
  
   3 change CustomRealm / to BadClass / in apps-myapp.xml
  Result: no error messages.
  
   It appears to be ignoring my apps-myapp.xml file all
   together.  TOMCAT_HOME
   is set properly to /opt/local/tomcat.  I'm not sure what is
   happening.  I
   feel completely lost at this point.
  
   AP
  
-Original Message-
From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 7:35 AM
To: 'Tomcat Users List'
Subject: RE: Config/Startup problem contextInit() not running
   
   
If there aren't any System.out.println's or log output being
generated by your CustomRealm, you can try temporarily removing
the myapp.tomcat.CustomRealm class from your installation and
see if Tomcat complains.  It should complain if it is acting on
your CustomRealm / entry but can't find the class.  An
alternative is to modify modules-myapp.xml to specify
an incorrect class name.
   
Cheers,
Larry
   
 -Original Message-
 From: Adam Paeth 
 [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 21, 2002 5:05 PM
 To: Tomcat Users List
 Subject: RE: Config/Startup problem contextInit() not running


 That is a great question, how do I check since I can't find
 anything in a
 log file?

 Thanks,
 Adam

  -Original Message-
  From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
  Sent: Monday, January 21, 2002 3:53 PM
  To: 'Tomcat Users List'
  Subject: RE: Config/Startup problem contextInit() 
 not running
 
 
  I'll investigate for Tomcat 3.3a/3.3.1-dev.  Do you 
 know if your
  CustomRealm / is being loaded, as opposed to 
 being ignored?
 
  Cheers,
  Larry
 
   -Original Message-
   From: Adam Paeth
   [mailto:[EMAIL PROTECTED]]
   Sent: Monday, January 21, 2002 4:10 PM
   To: Tomcat User List
   Subject: Config/Startup problem contextInit() not running
  
  
  
   I'm going crazy trying to figure this out...
  
   I've re-written a customized realm that we used for our
   Tomcat 3.2.1 (now
   for 3.3).  For some reason the debug messages that I've
 put into the
   contextInit() method are not showing up on the 
 console or any
   log files.  It
   doesn't appear that the method is running.  Can 
 anyone tell
   me why this is
   happening and the best approach to fixing it?
  
   After getting some advice from a previous post I setup the
   config files as
   such:
  
   apps-myapp.xml
   --
   ?xml version=1.0 encoding=ISO-8859-1?
   webapps
  Context path=/myapp
   

source for mod_jk ??

2002-01-22 Thread Thad Humphries

Where can I download the latest source for mod_jk.so?

I once build mod_jk.so for Solaris to use with Tomcat 3.2.1.  I'm
testing an application in three Tomcat versions--3.2.4, 3.3a, and 4.01. 
I would like to build the latest version of mod_jk.so for 3.3a but I
cannot find the source.  I assume there are some difference between
3.2.x and 3.3a as the file sized under Linux are different.
-- 

Thad Humphries  ...no religious test shall ever be required
Web Development Manager  as a qualification to any office or public
Phone: 540/675-3015, x225trust under the United States. -Article VI


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: applet deployment/access

2002-01-22 Thread Craig R. McClanahan



On Tue, 22 Jan 2002, Anton Brazhnyk wrote:

 Date: Tue, 22 Jan 2002 15:50:33 +0200
 From: Anton Brazhnyk [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: RE: applet deployment/access

 Hi,

  -Original Message-
  From: cazza [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, January 22, 2002 3:27 PM
  To: [EMAIL PROTECTED]
  Subject: applet deployment/access
 
 
  I have a servlet that generates html which contains a reference to the
  applet class under tomcat (the tomcat location is webapps/myapp/applet/)
 
  I understand that MyApplet.class cannot be under the web-inf directory for
  security reasons, but I have two questions;

 I don't know any security reasons for applets to be not allowed in WEB-INF,
 there is only one reason for them: User won't be able to access them there.
 Applets are executed on client side, so browser's JVM should download .class


The security reason is that no client request (applet or not) is allowed
to access any resources under /WEB-INF (see Section 9.6 of the Servlet
2.3 spec, which you can get from
http://java.sun.com/products/servlet/download.html).

Applet developers must arrange that all files needed by the applet
(including the class or JAR files themselves) are available from someplace
in the web application *other* than the WEB-INF directory.

Craig McClanahan


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Object streaming from applet to servlet - bad read from ajp13

2002-01-22 Thread Wigzell, Cathy

I'm running Catalina (TC4) as a servlet engine with IIS and I'm having
problems with object streaming. On the client side I have multiple threads
sending POST messages to the server, and on the server side I have a servlet
with a doPost catching the messages - all very standard. However, I often
get IOExceptions thrown on the client at out.close() and the message
'[Ajp13] bad read: -103' appears in the Catalina command window. I can't
find any information on the ajp bad read in the Tomcat documentation nor on
the web. The servlet doesn't implement SingleThreadModel so, theoretically,
a new servlet instance should be loaded for each doPost.

What is causing the bad read and why should out.close() throw an
IOException?

Many thanks for your help,
Cathy

Client:
private InputStream sendPostMessage(URL i_url) throws IOException
{
URLConnection con = i_url.openConnection();

// Prepare for both input and output
con.setDoInput(true);
con.setDoOutput(true);

// Turn off caching
con.setUseCaches(false);

// Set the content type to be java-internal/classname
con.setRequestProperty(Content-Type, java-internal/ +
getClass().getName());

// Write the serialized object as post data
ObjectOutputStream out = new ObjectOutputStream(con.getOutputStream());
out.writeObject(this);
out.flush();
out.close();

return con.getInputStream();
}

Server:
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
ObjectInputStream in = new ObjectInputStream(request.getInputStream());
ObjectOutputStream out = new
ObjectOutputStream(response.getOutputStream());
MyObject obj = (APICall)in.readObject();
// do stuff with obj
}

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




how to separate SSL and non-SSL applications

2002-01-22 Thread Henry Lu

Now I setup the SSL with Tomcat 4.0 but there are number of applications running
tomcat-home/webapps/root
tomcat-home/webapps/examples
tomcat-home/webapps/my_project
tomcat-home/webapps/test
...

What I'd like to do is that I want tomcat-home/webapps/my_project is under SSL and 
rest of them are not,
or
All are under SSL.

What should I do?

Thanks, Henry


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Asynchronous messages from servlets

2002-01-22 Thread Bo Xu

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 1:04 PM
Subject: Re: Asynchronous messages from servlets


 On Tue, 22 Jan 2002, Ronald Wildenberg wrote:

  Date: Tue, 22 Jan 2002 09:50:14 +0100
  From: Ronald Wildenberg [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Asynchronous messages from servlets
 
  Hi,
 
  I have the following problem. A simple form submits data
  to a servlet. The servlet sends a message via JMS to
  another application (in another JVM). Once the message
  has been sent, the 'service' method of the servlet ends.
  After a while, say five seconds, the other application would
  like to send back a response. How do I show this response
  to the user?
 
  Since the 'service' method has finished after sending the
  message, I have lost control over the output from the other
  application.
 
  What I need is a way to push the response to the browser. I
  would like the server to take the initiative in updating the browser
  window, not the user. Is this possible in any way?
 
  Thanks in advance,
  Ronald Wildenberg
 

 There are two pieces to the answer for this kind of thing -- getting the
 data back from the other JVM (I assume you are using asynchronous JMS
 calls, right?), and displaying the data back to the user.

 For the first step, doing an asynchronous JMS call in the other direction
 (to a JMS receiver in the same JVM as Tomcat) could then receive the
 results, and make them available as a servlet context or session
 attribute.

 For the second, I've seen people set up a page that uses the meta-refresh
 capability in HTML to automatically keep sending a request every XX
 seconds.  The servlet that receives this request will check to see if the
 results are back yet - if they are, they are displayed, if they are not it
 shows a Request in Progress ... please wait page with the meta refresh
 tag.

 The key thing is that you won't be able to respond on the original HTTP
 request, since that has already been sent and your service() method has
 returned.

 Craig
[...]


Thanks for your info!  if the processing of asynchronous JMS calls will be
responsed  in short time by JMS-Thread, is the following(half-synchronous
way) also possible?
- use javax.servlet.ServletResponse.flushBuffer() to show a
  info(please wait...) to client
- make a asynchronous JMS calls
- block this Servlet-Thread, wait for a event sent by JMS
- when the event comes, the blocking ends, then the results
  are responsed  to client, and the Servlet-Thread ends.

I am not sure about:
- can javax.servlet.ServletResponse.flushBuffer() always response
  info to client before the Servlet-Thread ends(so the client can get
please wait...
   info)?  in my testing, it works, but some emails say that sometimes it
can not
  work.
- is this half-synchronous way a good Servlet-DesignPattern if I can be sure
  that the blocking will  not need a long-time? or it is not good?

Thanks in advance!

Bo
Jan222002



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: Custom Authentication

2002-01-22 Thread Craig R. McClanahan



On Sat, 22 Jan 2000, Sergei Batiuk wrote:

 Date: Sat, 22 Jan 2000 16:04:25 +0200
 From: Sergei Batiuk [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: RE: Custom Authentication

 Hello,

 
 If you mean a 'Login API', it doesn't exist in Tomcat You need to use
 form-based login instead.

Or write your own custom Realm implementation, using Tomcat's internal
APIs.  You'll need to download the Tomcat sources and look at the
org.apache.catalina.Realm interface (plus the existing implementations in
the org.apache.catalina.realm package).


 
 There is InitialContext in Tomcat. This is how I used it to set up
 DataSource ( Tomcat 4.1.0) :

The general docs for this are at:

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

Craig


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Asynchronous messages from servlets

2002-01-22 Thread Craig R. McClanahan



On Tue, 22 Jan 2002, Bo Xu wrote:

 Date: Tue, 22 Jan 2002 13:41:10 -0500
 From: Bo Xu [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: Asynchronous messages from servlets

 - Original Message -
 From: Craig R. McClanahan [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, January 22, 2002 1:04 PM
 Subject: Re: Asynchronous messages from servlets


  On Tue, 22 Jan 2002, Ronald Wildenberg wrote:
 
   Date: Tue, 22 Jan 2002 09:50:14 +0100
   From: Ronald Wildenberg [EMAIL PROTECTED]
   Reply-To: Tomcat Users List [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Asynchronous messages from servlets
  
   Hi,
  
   I have the following problem. A simple form submits data
   to a servlet. The servlet sends a message via JMS to
   another application (in another JVM). Once the message
   has been sent, the 'service' method of the servlet ends.
   After a while, say five seconds, the other application would
   like to send back a response. How do I show this response
   to the user?
  
   Since the 'service' method has finished after sending the
   message, I have lost control over the output from the other
   application.
  
   What I need is a way to push the response to the browser. I
   would like the server to take the initiative in updating the browser
   window, not the user. Is this possible in any way?
  
   Thanks in advance,
   Ronald Wildenberg
  
 
  There are two pieces to the answer for this kind of thing -- getting the
  data back from the other JVM (I assume you are using asynchronous JMS
  calls, right?), and displaying the data back to the user.
 
  For the first step, doing an asynchronous JMS call in the other direction
  (to a JMS receiver in the same JVM as Tomcat) could then receive the
  results, and make them available as a servlet context or session
  attribute.
 
  For the second, I've seen people set up a page that uses the meta-refresh
  capability in HTML to automatically keep sending a request every XX
  seconds.  The servlet that receives this request will check to see if the
  results are back yet - if they are, they are displayed, if they are not it
  shows a Request in Progress ... please wait page with the meta refresh
  tag.
 
  The key thing is that you won't be able to respond on the original HTTP
  request, since that has already been sent and your service() method has
  returned.
 
  Craig
 [...]


 Thanks for your info!  if the processing of asynchronous JMS calls will be
 responsed  in short time by JMS-Thread, is the following(half-synchronous
 way) also possible?
 - use javax.servlet.ServletResponse.flushBuffer() to show a
   info(please wait...) to client
 - make a asynchronous JMS calls
 - block this Servlet-Thread, wait for a event sent by JMS
 - when the event comes, the blocking ends, then the results
   are responsed  to client, and the Servlet-Thread ends.

 I am not sure about:
 - can javax.servlet.ServletResponse.flushBuffer() always response
   info to client before the Servlet-Thread ends(so the client can get
 please wait...
info)?  in my testing, it works, but some emails say that sometimes it
 can not
   work.
 - is this half-synchronous way a good Servlet-DesignPattern if I can be sure
   that the blocking will  not need a long-time? or it is not good?

 Thanks in advance!

 Bo
 Jan222002


Whether the please wait message will be visible or not is client
dependent.  I would still model this kind of thing as a separate request
with the meta refresh, as I outlined above (you'll need to do the JMS
query in a separate thread for this to work).

Craig


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Please help! Unit test fails for Tomcat

2002-01-22 Thread kynn



   Date: Tue, 22 Jan 2002 09:52:46 -0800 (PST)
   From: Bruce Perryman [EMAIL PROTECTED]
   Content-Type: text/plain; charset=us-ascii

   Hi,

   We must verify that the correct versions of all the
   libs and their locations are correct.

   Are you using ant1.4?

Yes.

   Did you copy the
   ant1.4-optional.jar to the correct location?

Yes.  I copied it to ${ant.home}/lib.

   Did you
   copy xalan.jar to ${ant.home}/lib?

Yes.

   Did you follow each
   step in building.txt?

As closely as possible.  The only things I did differently are:

1. I could find only JAXP/1.2, not JAXP/1.1

2. I found it necessary to copy jaxp.jar to ${ant.home}/lib,
   otherwise 'ant -projecthelp' failed.

3. I downloaded xerces-1.4.4, instead of 1.4.3

4. The instructions do not say what to do with the
   jdbc2_0-stdext.jar.  I put it under ${base.path}/jdbc2_0-stdext.

5. The instructions say little about the meaning of the various
   variables in build.properties.  I made my best guesses at various
   points.  I include my build.properties file below.



   What jdk are you using?

1.3.1.

Thanks!

KJ

P.S.  This is my build.properties file.  For the listing here, I
indented every line by two spaces, and marked with a '*' the four
lines that differ from their corresponding lines in
build.properties.sample.


  # - Compile Control Flags -
  compile.debug=on
  compile.deprecation=off
  compile.optimize=on
  
  
  # - Build Control Flags
* full.dist=on
  #build.sysclasspath=ignore
  #flags.hide=on
  
  
  # - Default Base Path for Dependent Packages -
* base.path=/usr/local/build/tomcat
  
  
  # - Jakarta Tomcat Connectors path -
  jakarta-tomcat-connector.home=../../jakarta-tomcat-connectors
  
  
  # - Tomcat utils -
  tomcat-util.jar=../lib/tomcat-util.jar
  
  
  # - JK 1.3 connector for Tomcat 4.0 -
  tomcat-ajp.jar=../lib/tomcat-ajp.jar
  
  
  # - Jakarta Regular Expressions Library, version 1.2 -
  regexp.jar=../lib/jakarta-regexp-1.2.jar
  
  
  # - Jakarta Servlet API Classes (Servlet 2.3 / JSP 1.2) -
  servlet.home=${base.path}/jakarta-servletapi-4
  servlet.lib=${servlet.home}/lib
  servlet.jar=${servlet.lib}/servlet.jar
  
  
  # - Java Activation Framework (JAF), version 1.0.1 or later -
  activation.home=${base.path}/jaf-1.0.1
  activation.lib=${activation.home}
  activation.jar=${activation.lib}/activation.jar
  
  
  # - Java API for XML Processing (JAXP), version 1.1 or later -
* jaxp.home=${base.path}/jaxp-1.2
  jaxp.lib=${jaxp.home}
  crimson.jar=${jaxp.lib}/crimson.jar
  jaxp.jar=${jaxp.lib}/jaxp.jar
  xalan.jar=${jaxp.lib}/xalan.jar
  
  
  # - Java Database Connectivity (JDBC) Optional Package, version 2.0 -
  jdbc20ext.home=${base.path}/jdbc2_0-stdext
  jdbc20ext.lib=${jdbc20ext.home}
  jdbc20ext.jar=${jdbc20ext.lib}/jdbc2_0-stdext.jar
  
  
  # - Java Mail, version 1.2 or later -
  mail.home=${base.path}/javamail-1.2
  mail.lib=${mail.home}
  mail.jar=${mail.lib}/mail.jar
  
  
  # - Java Management Extensions (JMX) RI, version 1.0.1 or later -
  jmx.home=${base.path}/jmx-ri_1.0.1/jmx
  jmx.lib=${jmx.home}/lib
  jmxri.jar=${jmx.lib}/jmxri.jar
  
  
  # - Java Naming and Directory Interface (JNDI), version 1.2 or later -
  jndi.home=${base.path}/jndi-1.2.1
  jndi.lib=${jndi.home}/lib
  jndi.jar=${jndi.lib}/jndi.jar
  ldap.jar=${jndi.lib}/ldap.jar
  
  
  # - Java Secure Sockets Extension (JSSE), version 1.0.2 or later -
  jsse.home=${base.path}/jsse-1.0.2
  jsse.lib=${jsse.home}/lib
  jcert.jar=${jsse.lib}/jcert.jar
  jnet.jar=${jsse.lib}/jnet.jar
  jsse.jar=${jsse.lib}/jsse.jar
  
  
  # - Java Transaction API (JTA), version 1.0.1 or later -
  jta.home=${base.path}/jta-spec1_0_1
  jta.lib=${jta.home}
  jta.jar=${jta.lib}/jta-spec1_0_1.jar
  
  
  # - JUnit Unit Test Suite, version 3.7 or later -
  junit.home=${base.path}/junit3.7
  junit.lib=${junit.home}
  junit.jar=${junit.lib}/junit.jar
  
  
  # - Tyrex Data Source, version 0.9.7 -
  tyrex.home=${base.path}/tyrex-0.9.7.0
  tyrex.lib=${tyrex.home}
  tyrex.jar=${tyrex.lib}/tyrex-0.9.7.0.jar
  
  
  # - Xerces XML Parser, version 1.4.3 or later -
* xerces.home=${base.path}/xerces-1_4_4
  xerces.lib=${xerces.home}
  xerces.jar=${xerces.lib}/xerces.jar
  

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Tomcat 4.0, + apache 1.3.22 + web_mod configuration

2002-01-22 Thread Ashish kulkarni

Hi,

If i have to configure tomcat4.0 with apache1.3.22
using web_mod 
1 . I have to add these lines in httpd.conf of apache
WebAppConnection conn  warp  pfizer-maps:8018
WebAppDeploy examples conn  /examples

does examples have to be in webapps directory of
apache tomcat4.0, or can be anywhere else in the the
directory structure of my win2000 server
2. which is better to use for production mod_jk or
web_mod???

Thanx for help
Ashish


__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




  1   2   >