Re: http/1.1 pipelined request processing order

2002-12-02 Thread Bill Barker

"Michael Yates" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> From some testing I have done it appears Tomcat ensures that pipelined
> requests (HTTP/1.1) are handled in order by only handing off request #2
> after request #1 has completely finished processing. This adds quite a
delay
> in processing a sequence of lengthy requests.
>
> Say 2 requests arrive in a HTTP/1.1 pipeline very close together. And each
> request takes 10 seconds to process.
> The behavior I have seen is that:
> * Request 1 is handed to the servlet and allowed to process
> * Response 1 is written out on the wire
> * Request 2 is handed to the servlet to process
> * Response 2 is written out on the wire.
>
> This takes a total of just over 20 seconds.
>
> However if the client had NOT used pipelining (which should be more
> efficient) and opened two connections to the server then request 1 and
> request 2 would have both been processed in a total (start to end time)
over
> just over 10 seconds - although using more sockets and more packets.
>
> Is there a way Tomcat can be configured whereby as soon as requests arrive
> they are handed to the servlet for processing? (Obviously as separate
> threads).
>
> Has anyone written any custom code to ensure the responses going back out
on
> the wire are in the same order as the requests coming in (as is required
in
> HTTP/1.1).
>
> If this functionality isn't currently implemented in Tomcat 4 where would
be
> the best place (in the code) to go about adding this for our custom
> solution?

It isn't currently implemented in Tomcat 4.  The place that this is handled
is j-t-c/http11/src/java/org/apache/coyote/http11/Http11Processor.java.
However, I have serious doubts that you can make it work better (at least
without knowing many details about your webapp).  You're traffic-cop will
end up blocking most of your threads until it is their turn to write.  It
would also have to handle error-conditions that would force the rest of the
requests to stop processing.  For this reason, Apache/httpd works much the
same way that Tomcat does.

That being said, if you do manage to solve this (and are willing to donate
the code to Apache), I'd be very interested in seeing it.


>
> Regards,
> Michael
>





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Betr.: FreeBSD 4.7 Apache2.0.43 tomcat 4.1.12 - problem withmod_jk2.so

2002-12-02 Thread Jacco Braat
Build Apache with -DWITH_THREADS option. Is not default on FreeBSD.

>>> [EMAIL PROTECTED] 29-11-2002 16:08:19 >>>
Hi.

I have installed apache2 - no problem.  It works fine.
I have installed tomcat4.1 from binaries - no problem. This too works
fine
for standalone.

The problem I am having is when I try to build the mod_jk2.so module
for
apache.

I am using ant to build the connector (jdk1.3.1).

When I first built the connector, apache complained about undefined
symbols
for apr.  I changed the build.xml file to link against the apr
libraries
that came with apache2.  The next problem I found was that I needed to
then
rebuild apr using --enable-threads as a configure option.  I also
passed
LIBS=-lc_r to the configuration script.

Now with the current apr libraries, when I start apache.  
/usr/local/apache2/bin/apachectl start
/usr/libexec/ld-elf.so.1: /usr/local/apache2/lib/libapr-0.so.9:
Undefined
symbol "pthread_mutexattr_init"

platform is:
uname -a
FreeBSD  4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct 9
15:08:34 GMT
2002
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC i386

Any help on how to build the mod_jk2.so module for this platform would
be
greatly appreciated.  

Many thanks in advance.
Michael

(ps.  I also received the same error message when I tried the prebuilt
mod_jk.so module that I downloaded for FreeBSD)


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JNDI Datasource question

2002-12-02 Thread Ron Smits
Jake,

thanks, this is a great answer and answers my question exactly. :)
Especially the "META-INF/context.xml". was somthing that I must have
overlooked 

Ron

On Mon, 2002-12-02 at 11:09, Jacob Kjome wrote:
> 
> Hi Ron,
> 
> That is referring to a context configuration file.  You *always* need to 
> set up your DataSources through the proprietary server configuration.  The 
> stuff in the web.xml only defines the interface.  For instance, if you set 
> up DBCP specific stuff in the web.xml file, your app would be dependent on 
> running under Tomcat and be incompatible with every other app server.  JNDI 
> is meant to provide a standard interface while allowing the vendor to 
> provide a proprietary implementation.  That way, you get to code to a 
> standard and you get to pick the vendor who provides the best 
> implementation (by your own definition).  That provides for both standards 
> *and* market competition.  Neat, eh?
> 
> See the following for context configuration files:
> 
>http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automatic%20Application%20Deployment
> 
> Also, look at admin.xml and manager.xml in CATALINA_HOME/webapps for reference.
> 
> I addition, Craig R. McClanahan pointed out the following when deploying 
> via the manager app:
> 
> 
> For the deploy command, simply include your context confgiuration file in
> the WAR at "META-INF/context.xml".
> 
> In Tomcat 4.1, you can dynamically deploy a "context configuration file"
> instead of, or along with your webapp.  Such a file can contain the
>  element, and all nested subelements, from what you would
> normally put in server.xml, so you can indeed dynamically deploy an app
> with a custom realm.
> 
> 
> Jake



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: HELP!! Tomcat crashes on me!

2002-12-02 Thread Bill Barker
In Tomcat's own (very verbose, but who said cats are quiet :) way, it's
saying that there are errors in your  declarations.  In particular,
the XML is not well-formed (e.g. your elements aren't properly nested).
This is usually caused by forgetting a closing-tag, or writing  when
you meant .  Without seeing your server.xml, I really can't tell you
much more.  However it looks like the error is somewhere around line 369.

"Steve R Burrus" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Bill, I am about to go to bed, but I couldn't help but displaying the
"screen
> dump" to u from executing the "catalina run" command:
>
>  "C:\jakarta-tomcat-4.1.12\bin>catalina run
> Using CATALINA_BASE:   ..
> Using CATALINA_HOME:   ..
> Using CATALINA_TMPDIR: ..\temp
> Using JAVA_HOME:   C:\j2sdk1.4.1_01\
> Dec 2, 2002 1:21:41 AM org.apache.commons.modeler.Registry loadRegis
> INFO: Loading registry information
> Dec 2, 2002 1:21:42 AM org.apache.commons.modeler.Registry getRegist
> INFO: Creating new Registry instance
> Dec 2, 2002 1:21:43 AM org.apache.commons.modeler.Registry getServer
> INFO: Creating MBeanServer
> Dec 2, 2002 1:21:45 AM org.apache.commons.digester.Digester fatalErr
> SEVERE: Parse Fatal Error at line 369 column 14: The element type "C
>  be terminated by the matching end-tag "".
> org.xml.sax.SAXParseException: The element type "Context" must be te
> the matching end-tag "".
> at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParse
> rorHandlerWrapper.java:232)
> at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Err
> pper.java:213)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLEr
> java:366)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLEr
> java:296)
> at org.apache.xerces.impl.XMLScanner.reportFatalError(XMLSca
> 69)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.han
> t(XMLDocumentFragmentScannerImpl.java:1133)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.sca
> XMLDocumentFragmentScannerImpl.java:987)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fra
> Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.sca
> LDocumentFragmentScannerImpl.java:333)
> at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfi
> a:524)
> at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfi
> a:580)
> at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Abstrac
> ava:1169)
> at org.apache.commons.digester.Digester.parse(Digester.java:
> at org.apache.catalina.startup.Catalina.start(Catalina.java:
> at org.apache.catalina.startup.Catalina.execute(Catalina.jav
> at org.apache.catalina.startup.Catalina.process(Catalina.jav
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Metho
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodA
> java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegatin
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java
> Catalina.start: org.xml.sax.SAXParseException: The element type "Con
> e terminated by the matching end-tag "".
> org.xml.sax.SAXParseException: The element type "Context" must be te
> the matching end-tag "".
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Abstrac
> ava:1183)
> at org.apache.commons.digester.Digester.parse(Digester.java:
> at org.apache.catalina.startup.Catalina.start(Catalina.java:
> at org.apache.catalina.startup.Catalina.execute(Catalina.jav
> at org.apache.catalina.startup.Catalina.process(Catalina.jav
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Metho
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodA
> java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegatin
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java
>
> C:\jakarta-tomcat-4.1.12\bin>"
>
> I DEFY you to make any kind of "rhyme or reason" out of this error
message! What
> does all of this mean?
>
> __
> Do you Yahoo!?
> Yahoo! News - Today's headlines
> http://news.yahoo.com





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Retrieving username and password from url??

2002-12-02 Thread Abhishek Srivastava
Hi,
Is there a way that I can retrieve the username and password from the url
given as below using a servlet.
https://username:password@hostname/servletname/servlet


Regards,
Abhishek








--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Retrieving username and password from url??

2002-12-02 Thread Peng Tuck Kwok
You could use a regular expression to get the items you want or Tokenize 
the string until you get what you want.

There are several regular expression packages that you can use, which is 
available under the jakarta project or if you are so inclined you can 
use the one that comes with jdk1.4

Abhishek Srivastava wrote:
Hi,
Is there a way that I can retrieve the username and password from the url
given as below using a servlet.
https://username:password@hostname/servletname/servlet


Regards,
Abhishek








--
To unsubscribe, e-mail:   
For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Retrieving username and password from url??

2002-12-02 Thread Abhishek Srivastava
I think my question was a little unclear, I mean I'm accessing a servlet
from the web using this URL, and on tomcat side, is there a method exposed
by Httpservlet or any alternative which returns me the username and password
send by the browser like we have the "getParameters()" to get the parameters
from the url.

regards,
Abhishek

-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 2:15 PM
To: Tomcat Users List
Subject: Re: Retrieving username and password from url??


You could use a regular expression to get the items you want or Tokenize
the string until you get what you want.

There are several regular expression packages that you can use, which is
available under the jakarta project or if you are so inclined you can
use the one that comes with jdk1.4

Abhishek Srivastava wrote:
> Hi,
> Is there a way that I can retrieve the username and password from the url
> given as below using a servlet.
> https://username:password@hostname/servletname/servlet
>
>
> Regards,
> Abhishek
>
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Java.util.zip.ZipException : Error openning Zip File

2002-12-02 Thread Richard Johnstone
Hi

When I try and start tomcat I am getting this error.
Does anyone know what causes it?

Rich

The information contained in this communication is intended solely for the use of the 
individual or entity to whom it is addressed and others authorized to receive it.  It 
may contain confidential or legally privileged information.  If you are not the 
intended recipient you are hereby notified that any disclosure, copying, distribution 
or taking any action in reliance on the contents of this information is strictly 
prohibited and may be unlawful. If you received this communication in error, please 
notify us immediately by responding to this email and then delete it from your system.
Appleyard Finance Holdings Ltd or its subsidiaries are neither liable for the proper 
and complete transmission of the information contained in this communication nor for 
any delay in its receipt.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: Retrieving username and password from url??

2002-12-02 Thread Reynir Hübner
Hi, 

Depending on the browser and authentication scheme this will may try to authenticate 
against tomcat. 
There for you should be able to do request.getRemoteUser() on (at least) the first 
request that has the authenticative username:password. 
request.getRemoteUser() only returns the username, you can get the Authentication 
header wich is formed like this in BASIC authentication scheme: 
String user_Password = login+ ":"+ password;
String encoding  = new String (Base64.encode(user_Password.getBytes()));
String Authentication = "Basic " + encoding;

You might be able to do that backwards somehow

Hope it helps
-reynir


> -Original Message-
> From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]] 
> Sent: 2. desember 2002 08:30
> To: [EMAIL PROTECTED]
> Cc: Sunu Joseph
> Subject: Retrieving username and password from url??
> 
> 
> Hi,
> Is there a way that I can retrieve the username and password 
> from the url given as below using a servlet. 
> https://username:password@hostname/servletname> /servlet
> 
> 
> 
> Regards,
> Abhishek
> 
> 
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, 
> e-mail:   
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How do I access files above and below \web-inf folder?

2002-12-02 Thread Reynir Hübner
Hi...
things that come to mind...

What you mention as \web-inf is always uppercase WEB-INF (java is case sensitive).
The slash should be made with a java.io.File.seperator it's / in unix and \\ in 
windows. 
\web-inf will leave you with eb-inf as a single backslash \ is an escape char. 

Hope it helps
-reynir




> -Original Message-
> From: Peter Lee [mailto:[EMAIL PROTECTED]] 
> Sent: 2. desember 2002 07:45
> To: [EMAIL PROTECTED]
> Subject: How do I access files above and below \web-inf folder?
> 
> 
> How do I access files above and below \web-inf folder  from a 
> JSP/html file that is above 
> the \web-inf folder ? I am now using getRealpath() in my jsp 
> code, but it did not work. 
> Any ideas? I am stuck now..  
> Thanks 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




CoyoteConnector: What means the attribute 'useURIValidationHack'

2002-12-02 Thread Wolfgang Stein
as Catalina 4.1.12 shows in server.xml:

...




...


Thanks in advance,
Wolfgang Stein

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How do I access files above and below \web-inf folder?

2002-12-02 Thread Mehdi . Nejad

I use the getRealPath,

String pathToPropsFile = config.getServletContext().getRealPath
("WEB-INF/properties/");

use "/", as this also works on win platforms, and does not need escaping.
You should be able to use a relative going up the tree, in the argument
("../foo/bar");

cheers,

Mehdi



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




how do Apache2 and Tomcat4 talk ?

2002-12-02 Thread type_o
I have bothc tomcat4 and apache2 on the same computer.
I want to configure both to talk not through tcp connections.only processes.

can it be done ?

__
Get your FREE personalized e-mail at http://www.canada.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Propogate security

2002-12-02 Thread Charlene Mitchell
Hi all,

I'm trying to get a servlet running in Tomcat4.1.12
standalone to contact an Application Server
(JBoss3.0.3 /WebLogic 7) - [integrated TomCat is not
an option].

I authenticate ok in TomCat against LDAP before I can
access the Servlet.

The Servlet's JNDI Remote Lookup works (I found out
about the -nonaming switch in the archives, thanks for
that), but then I get a security authentication
exception in the app. server because "principal=null".

Has anyone had success propogating security to an
application server, such as JBoss?

I'm under the impression (from JBoss forums mainly)
that this cannot be done. Can someone confirm this?

Thanks

Charlene

__
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, e-mail:   
For additional commands, e-mail: 




URL-Rewriting + SSL under Tomcat 4.1.12

2002-12-02 Thread Thilo Krawietz
Hi folks,

i've got a problem with the usage of SSL and URL-rewriting together. I 
am using Tomcat 4.1.12 and whenever i use an SSL-enabled connector under 
port 443, the method encodeURL() does not append the sessionID any more 
to the links in the HTML pages. When i instead use a normal http 
connector under port 80, everything works fine and the jsessionid is 
appended correctly. Under 4.0.6. this error does not occur.

Did anybody face this problem too? What can i do do workaround this 
(except the possibility too change to 4.0.6., of course :-) ?

Thanks in advance,

Greetings,

Thilo


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



modifications to web.xml

2002-12-02 Thread sab
Sir,
When I want to create an application and call a servlet from html page,
what essential modification I have to made to web.xml file?


warm regards,
Ch. Sasi Bhushan.

CGMAERSK INFO. TECH.  PVT. LTD.,
ALEXANDER SQUARE, 1ST FLOOR,
SP ROAD, GUINDY, CHENNAI.
Ph: 044-2300053 #2602



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: modifications to web.xml

2002-12-02 Thread m batsis
I usually give an alias to the servlet and give this alias as the target 
of the HTML form:

   
   MyServlet
   MyServlet
   packageName.ServletClassName
   
   
   MyServlet
   /MyAlias
   

and in the HTML:




hth,

Manos





[EMAIL PROTECTED] wrote:

Sir,
When I want to create an application and call a servlet from html page,
what essential modification I have to made to web.xml file?


warm regards,
Ch. Sasi Bhushan.

CGMAERSK INFO. TECH.  PVT. LTD.,
ALEXANDER SQUARE, 1ST FLOOR,
SP ROAD, GUINDY, CHENNAI.
Ph: 044-2300053 #2602



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




jsessionid and Apache

2002-12-02 Thread Miguel Angel Medina Lopez
Hi all:

I'm using Tomcat 3.3.1 and Apache 1.3.x using mod_jdk and JDBCRealm in the
authentication method. The problem is that I redirect to a HTML file when
the user isn't authenticated and tomcat write the next URL:

/registro/clientes.html;jsessionid=r72e6ttq21

Then, when Apache try to resolve that URL it doesn't find it and produce a
404 error.

Can you help me? Thank you in advance

Regards

-
Miguel Ángel Medina López
Logic Factory: www.logic-factory.com
Granada - España




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




SV: SV: SV: Problems running VeriSign trial sertificate in Tomcat.

2002-12-02 Thread Morten Tollefsen
Hi!

I figured it out this weekend, and your sollution is absolute correct!

Thanks for helping me!

Morten

-Opprinnelig melding-
Fra: Joseph Stephen [mailto:[EMAIL PROTECTED]] 
Sendt: 30. november 2002 19:34
Til: Tomcat Users List; [EMAIL PROTECTED]
Emne: Re: SV: SV: Problems running VeriSign trial sertificate in Tomcat.


I don't think you should not delete the self signed certificate. i.e.
you can skip the step 
keytool -delete -alias tomcat
keytool establishes a certificate chain in the
keystore, each one validating the parent (or is it the
child). So the chain to establish the chain import the
cacert file as the root (alias root). the self signed certificate (alias
tomcat) and finally the reply from verisign (alias tomcat). When you
import the reply you should see the message imported "reply".

Let me know if you still face problems

Regards,
Joseph

 --- Morten Tollefsen <[EMAIL PROTECTED]>
wrote: > Thanks, but I still got problems.
> 
> Here is all I've done (tried it once again...):
> 
> * Generate key (self-signed sertificate):
> 
> keytool -genkey -alias tomcat -keysize 1024
> -validity 365 -keyalg RSA
>  
>  * Generate CSR:
>  
> keytool -certreq -alias tomcat -file tomcat.csr
> 
> * Submittet CSR - VeriSign
> 
> * Submitted user information to VeriSign
> 
> * Installed Test CA Root in browser
> 
> * Imported Test CA Root in keystore cacerts in 
> JAVA_HOME\jre\lib\security
> 
> keytool -import -trustcacerts -file getcacert.cer
> -keystore
> c:\jdk1.3.1\jre\lib\security\cacerts
> 
> * Received signed sertificated from VeriSign, copy
> to file tomcat.cer
> 
> * Deleted self-signed sertificate:
> 
> keytool -delete -alias tomcat
> 
> * Imported signed sertificate from VeriSign:
> 
> keytool -import -alias tomcat -file tomcat.cer
> 
> * Restarted Tomcat, and keep get the following
> error:
> 
> javax.net.ssl.SSLException: Unrecognized SSL
> handshake.
> 
> Ideas?
> 
> Morten T.
> 
> -Opprinnelig melding-
> Fra: Joseph Stephen
> [mailto:[EMAIL PROTECTED]]
> Sendt: 28. november 2002 22:39
> Til: Tomcat Users List
> Emne: Re: SV: Problems running VeriSign trial
> sertificate in Tomcat.
> 
> 
> You need to import the verisign test ca root
> certificate in to the java cacerts found under 
> java_home/lib/security/cacerts.. THe test ca root certificate can be
> downloaded from
> www.verisign.com/trial/server/faq/index.html or
> something like that
> 
>  --- "Morten mot. Tollefsen" <[EMAIL PROTECTED]> wrote:
> >
> Any ideas?
> >  
> > Please help me with this problem!
> >  
> > Morten Tollefsen
> > 
> > -Opprinnelig melding-
> > Fra: Morten Tollefsen
> > [mailto:[EMAIL PROTECTED]]
> > Sendt: 25. november 2002 12:03
> > Til: '[EMAIL PROTECTED]'
> > Emne: Problems running VeriSign trial sertificate
> in
> > Tomcat.
> > 
> > 
> > Problem with running Tomcat using VeriSign trial certificate.
> >  
> > Can anyone please help me with this problem? Have
> > searched for hours,
> > but can't find any sollutions...
> >  
> > I'm running:
> >  
> > Windows 2000
> > JDK 1.3
> > JSSE 1.0.3
> > Tomcat 3.2.3
> >  
> > Have done:
> >  
> > - Created self-signed certificate using keytool,
> OK.
> > - Tomcat SSL setup, running with self-signed
> > certificate, OK.
> > - Created the CSR and sent it to VeriSign, OK.
> > - Imported the trial certificate from VeriSign
> using
> > 'keytool -import
> > -alias tomcat -keystore verisign -file tomcat.cer'
> >   Have also tried to change keystore name and
> > password.
> >  
> > Tomcat error message:
> > javax.net.ssl.SSLException: Unrecognized SSL
> > handshake.
> >  
> > My connector parameters in server.xml:
> >  
> >  >
>
className="org.apache.tomcat.service.PoolTcpConnector">
> >>
>
value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
> >   
> >> value="org.apache.tomcat.net.SSLSocketFactory" />
> >   
> >   
> >   
> >   
> > 
> >  
> > Have tried to change secure and clientauth
> > parameters without success.
> >  
> > Any ideas???
> >  
> > Greetings
> > Morten Tollefsen
> > Integrasjonssystemer AS
> > [EMAIL PROTECTED] 
> > 33036066 / 97178250 
> >  
> > 
> >  
> 
>

> Missed your favourite TV serial last night? Try the
> new, Yahoo! TV.
>visit http://in.tv.yahoo.com
> 
> --
> To unsubscribe, e-mail: 
> 
> For additional commands, e-mail: 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>  


Missed your favourite TV serial last night? Try the new, Yahoo! TV.
   visit http://in.tv.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: filter jsp:include servletPath?

2002-12-02 Thread Cox, Charlie
no, filters are only applied on the original request.

Charlie

> -Original Message-
> From: AAron nAAs [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 28, 2002 12:45 PM
> To: [EMAIL PROTECTED]
> Subject: Re: filter jsp:include servletPath?
> 
> 
> Due to the complexity of the question and probably vendor 
> specific-ness of 
> the answer, I've altered course and solved the problem.
> 
> I wrote my own small taglib to implement the jsp:include 
> functionality. I 
> just need to change the  tags into 
> 
> 
> I'm still interested in knowing if a jsp:include intercept is 
> possible, but 
> I'm not waiting for the answer anymore. If there are any die hard 
> coders/detail-ists out there, let me know if it's even 
> possible without 
> modifying Tomcat itself.
> 
> -AAron
> 
> >From: "AAron nAAs" <[EMAIL PROTECTED]>
> >Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: filter jsp:include servletPath?
> >Date: Wed, 27 Nov 2002 22:43:28 -0500
> >
> >Hi all,
> >
> >This is more clarification about my attempts to 
> automatically intercept and 
> >modify a .jsp request's servletPath as well as all the embedded 
> > files.
> >
> >Examples:
> >http://blah.com/index.jsp would run /blah/index.jsp or 
> >/default/index.jsp based on which was first found to exist.
> > would use 
> /blah/include.html 
> >or /default/include.html based on which was first 
> found to exist.
> >
> >I'm choosing a directory for the requested .jsp file based 
> on the hostname 
> >specified in the request. I've gotten that to work perfectly 
> by adding a 
> >filter to my web.xml file, and wrapping the request object 
> before passing 
> >on to the next doFilter(). By overriding the request 
> getServletPath() I can 
> >change the servlet or JSP file that gets invoked.
> >
> >Now I want the jsp:include files to also use an alternate 
> directory. So 
> >refering to "/myfile.jsp" in the include would be 
> intercepted and changed 
> >to another directory based on the hostname in the original request.
> >
> >Another view is that I'm creating a "path" to search through 
> to find the 
> >requested (or included) file. If the requested file isn't 
> found in the 
> >alternate expected directory, it checks in the default 
> directory which will 
> >always have the file for request (or include).
> >
> >The code shows that once the request is filtered, all the 
> jsp:include's are 
> >not.
> >
> >Private method ApplicationDispatcher.invoke() says:
> > * IMPLEMENTATION NOTE: This implementation assumes
> > * that no filters are applied to a forwarded or 
> included resource,
> > * because they were already done for the original request.
> >
> >Anyway, I'll let you read my original post below for more 
> details on what 
> >I've found.
> >
> >BTW, I've searched long and hard for anyone doing this sort 
> of thing. But, 
> >I'm certainly open to the embarassment of "Oh, just do this" 
> if I've missed 
> >the obvious :-)
> >
> >Thanks,
> >-AAron
> >
> >My original post:
> >
> >I'm trying to intercept a jsp:include so that I can adjust 
> the requested 
> >file (ie: "/include.html") to a different directory/file (ie: 
> >"/otherdir/otherfile.html"). If there is an easy way (Filter, Valve, 
> >Listener, ...) just let me know. NOTE: I've already created 
> and installed a 
> >request filter in my web.xml to filter the initial request, but this 
> >doesn't get invoked for jsp:include references.
> >
> >Current idea:
> >I want to change the "javax.servlet.include.servlet_path" 
> request attribute 
> >so the DefaultServlet.getRelativePath() finds the new file. 
> I can see that 
> >the ApplicationDispatcher fires off a list of 
> InstanceEvent's before the 
> >DefaultServlet.service() is called.
> >
> >After days of exploration, I can't figure out how to add to get my 
> >InstanceEvent into the InstanceSupport's list (ie: cause a 
> call to the 
> >support.addInstanceListener). Is there a configuration that 
> will add my 
> >class to my application Context?
> >
> >Thanks,
> >-AAron ([EMAIL PROTECTED])
> >
> >
> >_
> >The new MSN 8: smart spam protection and 2 months FREE*  
> >http://join.msn.com/?page=features/junkmail
> >
> >
> >--
> >To unsubscribe, e-mail:   
> >
> >For additional commands, e-mail: 
> >
> 
> 
> _
> The new MSN 8: smart spam protection and 2 months FREE*  
> http://join.msn.com/?page=features/junkmail
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: error while running servlet undet tomcat in Linux Red Hat

2002-12-02 Thread Shapira, Yoav
Howdy,
How many servlet.jar files do you have loaded? ;)  You probably have an
extra one somewhere, e.g. in your /WEB-INF/lib.  You should remove
those, and only keep the one that comes with tomcat.  Moreover, it looks
like your extra servlet.jar file is v2.2 (or maybe older)...

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Abhijat Thakur [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, November 27, 2002 7:01 PM
>To: [EMAIL PROTECTED]
>Subject: error while running servlet undet tomcat in Linux Red Hat
>
>Hi,
>
>I wrote a small test servlet(TestingServlet.java) and tried to run the
>servlet under tomcat(4.1.12) on Linux Red Hat. I get the underlying
error.
>The doGet Method of TestingServlet is also enclosed. What is going
wrong
>here. The line 37 is in bold.
>
>public void doGet(HttpServletRequest req, HttpServletResponse res){
>HttpSession session = null;
>System.out.println("In doGet");
>session = req.getSession(true);
>if(session != null){
>session.setAttribute("testingTesting","Session
Works!!");//line
>37
>System.out.println("Session Id in servlet:"+
session.getId());
>}
>else {
>System.out.println("Session in servlet is null!");
>}
>res.setContentType("text/html");
>PrintWriter out  = null;
>try{
>out = res.getWriter();
>}
>catch(java.io.IOException excep){}
>out.println("test");
>out.println("");
>out.println("");
>}
>
>javax.servlet.ServletException: Servlet execution threw an exception
>   at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
atio
>nFilterChain.java:269)
>   at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terC
>hain.java:193)
>   at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.j
>ava:260)
>   at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>   at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>   at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.j
>ava:191)
>   at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>   at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>   at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23
96)
>   at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:18
>0)
>   at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>   at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
alve
>.java:170)
>   at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:641)
>   at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:17
>2)
>   at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:641)
>   at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>   at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.jav
>a:174)
>   at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>   at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>   at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>   at
>org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>   at
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:4
05)
>   at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Conn
>ection(Http11Protocol.java:380)
>   at
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
08)
>   at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.ja
>va:533)
>   at java.lang.Thread.run(Thread.java:484)
>root cause
>java.lang.NoSuchMethodError
>   at
>org.apache.catalina.session.StandardSession.setAttribute(StandardSessio
n.ja
>va:1262)
>   at
>org.apache.catalina.session.StandardSessionFacade.setAttribute(Standard
Sess
>ionFacade.java:191)
>   at
>org.apache.catalina.session.StandardSessionFacade.setAttribute(Standard
Sess
>ionFacade.java:191)
>   at
com.bdna.pl.servlet.TestingServlet.doGet(TestingServlet.java:37)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>   at javax.servlet.http.Ht

RE: how to set server.xml to show all info on Tomcat Server?

2002-12-02 Thread Shapira, Yoav
Hi,
Do you mean log more verbosely?  You can set debug="99" wherever
debug="0" in server.xml and check you logs.  You can enable the
RequestDumper and AccessLog valves as well.

If you mean to expose server.xml to webapps, you probably don't really
want to do this ;)  So please clarify your question ;)

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: James HU [mailto:[EMAIL PROTECTED]]
>Sent: Friday, November 29, 2002 11:24 AM
>To: [EMAIL PROTECTED]
>Subject: how to set server.xml to show all info on Tomcat Server?
>
>
>
>
>
>
>
>_
>MSN 8 with e-mail virus protection service: 2 months FREE*
>http://join.msn.com/?page=features/virus
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Help!?! Tomcat & Xindice

2002-12-02 Thread Fred O Shea




Hi,

Could someone recommended any sources which give a description on how to 
connect to Xindice (Apaches native XML database) through Tomcat.  What 
modifications do you have to make to the environment settings in Tomcat 
(web.xml, server.xml etc)?  I want to make use of the servlet programming 
capabilities of Tomcat and manipulate the XML documents i have stored in 
Xindice.  I'd appreciate any advice you might be able to give me.

Many thanks,

David


_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: multiple execution of a 'load-on-startup'

2002-12-02 Thread Shapira, Yoav
Hi,
A couple of things:

- Please post your log4j config.  If you look in that list, you'll see a
lot of "why am I getting [n] copies of my logging statements" questions.
This is because all log4j loggers are additive by default, so if you
define n appenders at a level matching your logger, you'll get n copies
of logging statements out.

- There have been questions in the past on this list regarding servlets
and filters being initialized twice, and the bugs were addressed by
developers and marked as resolved.  You may wish to search the list
archives at
http://marc.theaimsgroup.com/?l=tomcat-user&r=1&w=2

- You're using 4.1.12 (not LE, right?) with what version of java?

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Maxime Colas des Francs [mailto:[EMAIL PROTECTED]]
>Sent: Friday, November 29, 2002 10:01 AM
>To: Tomcat Users List
>Subject: multiple execution of a 'load-on-startup'
>
>Hello ,
>
>A strange thing about 'load-on-startup' servlet.
>
>I use tomcat 4.1.12 with multi-host, and log4j 1.2.7
>
>in my web.xml i wrote these lines :
>
>
>  Setup
>  init.SetupServlet
> 
>
>
>and i put an information log at the end of the servlet init() method
>
>at tomcat startup, we can read in the log :
>
>INFO  2002-11-29 09:28:50,084 [Thread-7] init.SetupServlet : end of
>initialisation setup.
>INFO  2002-11-29 09:28:55,352 [HostConfig[myhost]] init.SetupServlet :
end
>of initialisation setup.
>INFO  2002-11-29 09:28:56,943 [HostConfig[myhost]] init.SetupServlet :
end
>of initialisation setup.
>INFO  2002-11-29 09:29:17,647 [main] init.SetupServlet : end of
>initialisation setup.
>INFO  2002-11-29 09:29:20,501 [main] init.SetupServlet : end of
>initialisation setup.
>
>five execution for this servlet ??
>(what an initialisation !)
>
>if i remove the two other host definitions in my server.xml, and
restart
>tomcat,
>this log appear "only" 2 times , execute by a thread main ...
>
>INFO  2002-11-29 09:42:53,267 [main] init.SetupServlet : end of
>initialisation setup.
>INFO  2002-11-29 09:42:56,144 [main] init.SetupServlet : end of
>initialisation setup.
>
>Smby can explain this ??
>Why 5 or 2 executions of a load-on-startup servlet ?
>Why when i remove other host in tomcat configuration file,
>3 lines dissepear in the log of an application on the first ??
>
>thks !
>_
>M
>
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Exception in R error

2002-12-02 Thread Richard Jackson
What is the cause of this tomcat 3.3.1 dump trace?  It occurs on the first
request.

2002-12-02 07:02:36 - Ctx() : Exception in R(  + /itu/index.jsp + null) - javax.
servlet.ServletException
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at javax.servlet.ServletException.(Compiled Code)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(Compile
d Code)
at itu.index_1._jspService(Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.facade.ServletHandler.doService(Compiled Code)
at org.apache.tomcat.core.Handler.invoke(Compiled Code)
at org.apache.tomcat.core.Handler.service(Compiled Code)
at org.apache.tomcat.facade.ServletHandler.service(Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
Compiled Code)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compile
d Code)
at java.lang.Thread.run(Thread.java:479)
Root cause:
java.lang.NullPointerException
at ituNews.dbUtil.getDBResults(Compiled Code)
at ituNews.content.getCurrentContentTitles(Compiled Code)
at itu.index_1._jspService(Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.facade.ServletHandler.doService(Compiled Code)
at org.apache.tomcat.core.Handler.invoke(Compiled Code)
at org.apache.tomcat.core.Handler.service(Compiled Code)
at org.apache.tomcat.facade.ServletHandler.service(Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
Compiled Code)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compile
d Code)
at java.lang.Thread.run(Thread.java:479)
-- 
Regards,   /~\ The ASCII
Richard Jackson\ / Ribbon Campaign
Computer Systems Engineer,  X  Against HTML
Information Technology Unit, Technology Systems Division   / \ Email! 
Enterprise Servers and Operations Department
George Mason University, Fairfax, Virginia

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Exception in R error

2002-12-02 Thread Tim Funk
Look at your trace:
Root cause:
java.lang.NullPointerException
at ituNews.dbUtil.getDBResults(Compiled Code)
at ituNews.content.getCurrentContentTitles(Compiled Code)
at itu.index_1._jspService(Compiled Code)

You have code which is throwing a NPE. To get lines numbers, run java in 
 interpretated mode only: CATALINA_OPTS="-Xint"

-Tim

Richard Jackson wrote:
What is the cause of this tomcat 3.3.1 dump trace?  It occurs on the first
request.

2002-12-02 07:02:36 - Ctx() : Exception in R(  + /itu/index.jsp + null) - javax.
servlet.ServletException
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at javax.servlet.ServletException.(Compiled Code)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(Compile
d Code)
at itu.index_1._jspService(Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.facade.ServletHandler.doService(Compiled Code)
at org.apache.tomcat.core.Handler.invoke(Compiled Code)
at org.apache.tomcat.core.Handler.service(Compiled Code)
at org.apache.tomcat.facade.ServletHandler.service(Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
Compiled Code)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compile
d Code)
at java.lang.Thread.run(Thread.java:479)
Root cause:
java.lang.NullPointerException
at ituNews.dbUtil.getDBResults(Compiled Code)
at ituNews.content.getCurrentContentTitles(Compiled Code)
at itu.index_1._jspService(Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.facade.ServletHandler.doService(Compiled Code)
at org.apache.tomcat.core.Handler.invoke(Compiled Code)
at org.apache.tomcat.core.Handler.service(Compiled Code)
at org.apache.tomcat.facade.ServletHandler.service(Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
Compiled Code)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compile
d Code)
at java.lang.Thread.run(Thread.java:479)



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tomcat classloads

2002-12-02 Thread Shapira, Yoav
Hi,

>I am wondering if there is any "short-cut" into seeing how much memory
each
>webapp in tomcat is taking at runtime ?
>I know it's possible to wrap the classloader object for
webapplications,
>and make it count the numbers of objects instanciated, aproxiate the
memory
>taken by each object by counting the fields each object has, and store
in
>week-reference object storage (such as week hashmap), and count down
when
>object gets garbagecollected.

This is basically what profilers do ;)

>The idea is some kind of a "profiling feature" for webapplications and
I
>think a nice feature to have.

It would be a nice feature to have, I agree.

>Does anyone have thoughts or ideas on this subject ?

Like most really nice features, this is a pain to implement.
Hierarchical memory usage is very very difficult to quantify.  For
example, you can see that there are n String objects in the heap, and
you can approximate (but being exact is very difficult here, and I do
think it comes to a point where we have to be exact) how much memory
they take up collectively.  You can go a step further using the JVMPI
and get allocation backtraces, e.g. x of these n strings were allocated
by this method.  And you can then some those up with by webapp using
your approach, to get some idea of the memory usage by a webapp.

So this solution, which is not trivial to implement will be:
- Unlikely to give accurate results, only approximations of varying
precision (according to data type and other variables).
- Likely to significantly decrease performance of the running webapp,
enough so that it couldn't be used in production.

I'm not saying it's a bad idea: I'm just sharing my thoughts as
requested ;)  It'd a be a cool feature to have and I think we
collectively need to do more in terms of providing profiling and
benchmarking tools, options, and data to our users.  But it's not an
easy domain to work in ;)

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Why does Tomcat not set HTTP_Referer?

2002-12-02 Thread Shapira, Yoav
Howdy,
Please refer to RFC 2616, section 14.36, for an explanation of the
referrer (misspelled) header.  It is not set by the server, e.g. tomcat
in your case.  It is set by the client, probably a browser in your case
(but could be a cell phone, mock objects, whatever).

There are known bugs in all major browsers (although I'm not sure about
very recent versions, I haven't checked for a while) with regards to
setting of http referrer.  For example, IE 5.x doesn't set referrers
from popup windows.  

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, November 05, 2002 10:14 PM
>To: [EMAIL PROTECTED]
>Subject: Why does Tomcat not set HTTP_Referer?
>
>I'm trying to setup some links that jump to another site. That other
site
>checks the header for the HTTP_Referer environment variable. When I
jump
>from my servlet in Tomcat to this other site this variable is empty.
Why
>does Tomcat not set this variable? Am I just doing something wrong?
Help.
>
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Exception in R error

2002-12-02 Thread Richard Jackson
Thank you Tim.  I have already sent email to the developer of the application.

Richard

Tim Funk writes:
> 
> Look at your trace:
> Root cause:
> java.lang.NullPointerException
>  at ituNews.dbUtil.getDBResults(Compiled Code)
>  at ituNews.content.getCurrentContentTitles(Compiled Code)
>  at itu.index_1._jspService(Compiled Code)
> 
> You have code which is throwing a NPE. To get lines numbers, run java in 
>   interpretated mode only: CATALINA_OPTS="-Xint"
> 
> -Tim
> 
> Richard Jackson wrote:
> > What is the cause of this tomcat 3.3.1 dump trace?  It occurs on the first
> > request.
> > 
> > 2002-12-02 07:02:36 - Ctx() : Exception in R(  + /itu/index.jsp + null) - javax.
> > servlet.ServletException
> > at java.lang.Throwable.fillInStackTrace(Native Method)
> > at java.lang.Throwable.fillInStackTrace(Compiled Code)
> > at java.lang.Throwable.(Compiled Code)
> > at java.lang.Exception.(Compiled Code)
> > at javax.servlet.ServletException.(Compiled Code)
> > at org.apache.jasper.runtime.PageContextImpl.handlePageException(Compile
> > d Code)
> > at itu.index_1._jspService(Compiled Code)
> > at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
> > at javax.servlet.http.HttpServlet.service(Compiled Code)
> > at org.apache.tomcat.facade.ServletHandler.doService(Compiled Code)
> > at org.apache.tomcat.core.Handler.invoke(Compiled Code)
> > at org.apache.tomcat.core.Handler.service(Compiled Code)
> > at org.apache.tomcat.facade.ServletHandler.service(Compiled Code)
> > at org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
> > at org.apache.tomcat.core.ContextManager.service(Compiled Code)
> > at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
> > Compiled Code)
> > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled Code)
> > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compile
> > d Code)
> > at java.lang.Thread.run(Thread.java:479)
> > Root cause:
> > java.lang.NullPointerException
> > at ituNews.dbUtil.getDBResults(Compiled Code)
> > at ituNews.content.getCurrentContentTitles(Compiled Code)
> > at itu.index_1._jspService(Compiled Code)
> > at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
> > at javax.servlet.http.HttpServlet.service(Compiled Code)
> > at org.apache.tomcat.facade.ServletHandler.doService(Compiled Code)
> > at org.apache.tomcat.core.Handler.invoke(Compiled Code)
> > at org.apache.tomcat.core.Handler.service(Compiled Code)
> > at org.apache.tomcat.facade.ServletHandler.service(Compiled Code)
> > at org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
> > at org.apache.tomcat.core.ContextManager.service(Compiled Code)
> > at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
> > Compiled Code)
> > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled Code)
> > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compile
> > d Code)
> > at java.lang.Thread.run(Thread.java:479)
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 
> 


-- 
Regards,   /~\ The ASCII
Richard Jackson\ / Ribbon Campaign
Computer Systems Engineer,  X  Against HTML
Information Technology Unit, Technology Systems Division   / \ Email! 
Enterprise Servers and Operations Department
George Mason University, Fairfax, Virginia

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: filter jsp:include servletPath?

2002-12-02 Thread AAron nAAs
FYI, through more digging in google groups, I found out that the Java Server 
spec is vague on this issue. The new Java Server spec is going to explicitly 
allow two options. The default option will be that only the initial request 
is filtered. The other option will filter includes and forwards as well.

-AAron

From: "Cox, Charlie" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: 'Tomcat Users List' <[EMAIL PROTECTED]>
Subject: RE: filter jsp:include servletPath?
Date: Mon, 2 Dec 2002 07:50:48 -0500

no, filters are only applied on the original request.

Charlie

> -Original Message-
> From: AAron nAAs [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 28, 2002 12:45 PM
> To: [EMAIL PROTECTED]
> Subject: Re: filter jsp:include servletPath?
>
>
> Due to the complexity of the question and probably vendor
> specific-ness of
> the answer, I've altered course and solved the problem.
>
> I wrote my own small taglib to implement the jsp:include
> functionality. I
> just need to change the  tags into
> 
>
> I'm still interested in knowing if a jsp:include intercept is
> possible, but
> I'm not waiting for the answer anymore. If there are any die hard
> coders/detail-ists out there, let me know if it's even
> possible without
> modifying Tomcat itself.
>
> -AAron
>
> >From: "AAron nAAs" <[EMAIL PROTECTED]>
> >Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: filter jsp:include servletPath?
> >Date: Wed, 27 Nov 2002 22:43:28 -0500
> >
> >Hi all,
> >
> >This is more clarification about my attempts to
> automatically intercept and
> >modify a .jsp request's servletPath as well as all the embedded
> > files.
> >
> >Examples:
> >http://blah.com/index.jsp would run /blah/index.jsp or
> >/default/index.jsp based on which was first found to exist.
> > would use
> /blah/include.html
> >or /default/include.html based on which was first
> found to exist.
> >
> >I'm choosing a directory for the requested .jsp file based
> on the hostname
> >specified in the request. I've gotten that to work perfectly
> by adding a
> >filter to my web.xml file, and wrapping the request object
> before passing
> >on to the next doFilter(). By overriding the request
> getServletPath() I can
> >change the servlet or JSP file that gets invoked.
> >
> >Now I want the jsp:include files to also use an alternate
> directory. So
> >refering to "/myfile.jsp" in the include would be
> intercepted and changed
> >to another directory based on the hostname in the original request.
> >
> >Another view is that I'm creating a "path" to search through
> to find the
> >requested (or included) file. If the requested file isn't
> found in the
> >alternate expected directory, it checks in the default
> directory which will
> >always have the file for request (or include).
> >
> >The code shows that once the request is filtered, all the
> jsp:include's are
> >not.
> >
> >Private method ApplicationDispatcher.invoke() says:
> > * IMPLEMENTATION NOTE: This implementation assumes
> > * that no filters are applied to a forwarded or
> included resource,
> > * because they were already done for the original request.
> >
> >Anyway, I'll let you read my original post below for more
> details on what
> >I've found.
> >
> >BTW, I've searched long and hard for anyone doing this sort
> of thing. But,
> >I'm certainly open to the embarassment of "Oh, just do this"
> if I've missed
> >the obvious :-)
> >
> >Thanks,
> >-AAron
> >
> >My original post:
> >
> >I'm trying to intercept a jsp:include so that I can adjust
> the requested
> >file (ie: "/include.html") to a different directory/file (ie:
> >"/otherdir/otherfile.html"). If there is an easy way (Filter, Valve,
> >Listener, ...) just let me know. NOTE: I've already created
> and installed a
> >request filter in my web.xml to filter the initial request, but this
> >doesn't get invoked for jsp:include references.
> >
> >Current idea:
> >I want to change the "javax.servlet.include.servlet_path"
> request attribute
> >so the DefaultServlet.getRelativePath() finds the new file.
> I can see that
> >the ApplicationDispatcher fires off a list of
> InstanceEvent's before the
> >DefaultServlet.service() is called.
> >
> >After days of exploration, I can't figure out how to add to get my
> >InstanceEvent into the InstanceSupport's list (ie: cause a
> call to the
> >support.addInstanceListener). Is there a configuration that
> will add my
> >class to my application Context?
> >
> >Thanks,
> >-AAron ([EMAIL PROTECTED])
> >
> >
> >_
> >The new MSN 8: smart spam protection and 2 months FREE*
> >http://join.msn.com/?page=features/junkmail
> >
> >
> >--
> >To unsubscribe, e-mail:
> >
> >For additional commands, e-mail:
> >
>
>
> _
> The new MSN 8: smart spam protection and 2 months F

RE: Retrieving username and password from url??

2002-12-02 Thread Andreas Probst
Hi Reynir,

how can you get the Authentication header? As far as I know the
only information you can get is the Principal and the username,
but not the password, neither clear nor encoded.

Andreas


On 2 Dec 2002 at 9:14, Reynir Hübner wrote:

> Hi,
>
> Depending on the browser and authentication scheme this will may
> try to authenticate against tomcat. There for you should be able
> to do request.getRemoteUser() on (at least) the first request
> that has the authenticative username:password.
> request.getRemoteUser() only returns the username, you can get
> the Authentication header wich is formed like this in BASIC
> authentication scheme: String user_Password = login+ ":"+
> password; String encoding  = new String
> (Base64.encode(user_Password.getBytes())); String Authentication
> = "Basic " + encoding;
>
> You might be able to do that backwards somehow
>
> Hope it helps
> -reynir
>
>
> > -Original Message-
> > From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]]
> > Sent: 2. desember 2002 08:30
> > To: [EMAIL PROTECTED]
> > Cc: Sunu Joseph
> > Subject: Retrieving username and password from url??
> >
> >
> > Hi,
> > Is there a way that I can retrieve the username and password
> > from the url given as below using a servlet.
> > https://username:password@hostname/servletname> /servlet
> >
> >
> >
> > Regards,
> > Abhishek
> >
> >
> >
> >
> >


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Large files corrupted -- possible bug in isapi_redirector2.dll?

2002-12-02 Thread Joakim Ström
Hello,

We are trying to use Tomcat 4.1.12 with IIS 5.0. To all
appearance the configuration works perfectly.

However a serious error sometimes occurrs when we access tomcat
through IIS (I have not been able to reproduce this error using
tomcat directly without IIS).

However, in some cases large files get corrupted when
uploading--32 bytes of the file are taken from one location
and copied to a later place in the file. Typically the error
occurs the first time at appr. the 56,000th byte in the file.
If the file is very large, the same sequence of 32 bytes gets
copied several times later on in the file. The file is not
sent using chunked transfer-encoding.

The call finishes without errors, and there are no suspicious-
looking entries in the logs as far as I can tell (I have set
log_level=debug in the registry for the isapi filter). The size
of the produced file on the server is the same as the original,
but the same number of bytes that were erroneously copied are
missing at the end of the file. The next http call after this
happens always fails, as the bytes that should have been at the
end of the file seem to be left on the socket.

This error does not happen every time I upload a large file, but
usually once out of 2-5 tries.

I have tried to use versions 2.0.1 and 2.0.2 of isapi_redirector2.dll,
with the same result. Have anyone else experienced a similar problem?
Could this possibly be a configuration problem, or is it a bug in
the isapi_redirector filter?

I will appreciate any help on this.

Best Regards,
Joakim Strom
System Architect, Excosoft



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: SSL problem

2002-12-02 Thread Gabriel Enriquez Perez
   
hi, Rodrigo.
 
There are several debug steps that you should follow..
First of all,  when you start your tomcat server, is there any error on
start process on it? If there are error, then you should first come around
the generated error. Probably it can be the default location of the
.keystore file... or something like that.
 
If you can turn on your Tomcat web server... you can probably have problems
related to the port number... "port conflicts". >>> you can change your
port... to see what happens!
 
There are also several scenarios,, for example... are you running your
Tomcat as your primary web server??? or just a Servlet/JSP container?
 
Hope, this help you!
 
From: "Rodrigo Videschi" 
Reply-To: "Tomcat Users List" 
To: [EMAIL PROTECTED] 
Subject: Re: SSL problem 
Date: Sun, 01 Dec 2002 02:15:52 -0200 
Ol? staff, I am trying to make configuration of the TomCat with SSL but I am
not obtaining, I followed all the steps that were in the manual of the
TomCat: To generate serverkey, clientkey..., all with keytool and in the end
I decomento the lines of server.xml that they deal with the SSL, but
unhappyly no functions. Please you they could help me? 
 
Rodrigo Videschi 
[EMAIL PROTECTED] 
Analista JAVA 
SIOUX Tecnologia 
_ 
MSN Messenger: converse com os seus amigos online.
http://messenger.msn.com.br 
-- 
To unsubscribe, e-mail: 
For additional commands, e-mail: 

 



RE: Configure IIS + Tomcat 4.1.12

2002-12-02 Thread srinath narasimhan

See my earlier post. I don't know how to get the message id or something.
but if you search you should be able to find it.



-Original Message-
From: Luca Ventura [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 28, 2002 09:29
To: Tomcat Users List
Subject: R: Configure IIS + Tomcat 4.1.12


Thanks but it speaks about JK connector (ISAPI redirector 1.0) and not about
JK2 (Coyote) connector :-(

Best regards,

  Luca

-Messaggio originale-
Da: Panos Konstantinidis [mailto:[EMAIL PROTECTED]]
Inviato: giovedi 28 novembre 2002 15.07
A: Tomcat Users List
Oggetto: Re: Configure IIS + Tomcat 4.1.12


  I found a new URL which deals with Tomcat 4.0.1.

http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/

  It might help.

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat Manager won't undeploy

2002-12-02 Thread Mark
I'm using Tomcat 4.1.12 and can't get the manager 'undeploy' command to 
work.  Other mgr commands such as stop, start, remove, list, etc. work, but 
not undeploy.  The application is defined in server.xml with context 
path="/myapp" docBase="myapp" and lives under webapps/myapp.  Using this 
manager command:
http://localhost:8080/manager/undeploy?path=/myapp

I get the following simple response:
   FAIL - Cannot remove document base for path /myapp

and the Tomcat log shows:
2002-12-02 10:09:37 Manager: undeploy: Undeploying web application at 
'/myapp'

Anyone know what the problem is? I stopped the app first but that doesn't 
help.  I searched the archives to no avail. I'm looking at integrating TC 
manager functions into our Ant build for a complete clean build/redeploy, 
but have hit a wall here.

Thanks in advance.
Mark

Re: Win98/ME - Tomcat not closing on Shutdown

2002-12-02 Thread Chris Weaver
I sent this out earlier but got no response.  Can someone possibly point me to
the right group if this is the wrong group?  I've tried
comp.lang.java.programmer, too.

Thanks very much for any assistance.
Chris


> This may or may not be the right group so if I'm off I apologize in
> advance.
>
> I've taken the Tomcat server and modified it so that it is embedded
> per the Apache Jakarta-Tomcat book by James Goodwill, chapter 6.  I've
> then added my own web apps and all of this works great.
>
> The problem is that when I go to shut down Win98 or WinME the shutdown
> hangs on my Tomcat/java application with the error "You must quit this
> application before you can quit Windows."  This works fine in Win2K.
>
> Is there some message or something special I need to do in java to make
> sure it handles the windows shutdown properly?  I'm a bit of a fish out
> of water here (I'm a C++/Windows guy) so any direction someone could
> push me would be great.  This is my last major known bug in this project
>
> and I'm stuck.
>
> Thanks very much,
> Chris
>
> BTW, I'm using Java 1.4.1.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




ajp13 port always 8009 (config does not apply)

2002-12-02 Thread SAXESS - Hussayn Dabbous
Hy;

I wanted to change the ajp13 port from 8009 (the default port) to
9010. But i always see, the instance opening on the default port.
This is an exerpt of my server.xml:







I can connect from a browser via port 9000. And if i comment out the
ajp connector and restart tomcat, the ajp connector will not be
instanciated as expected. So i am shure, my server.xml is readable
and been executed...

I tried to track the problem within the sources, but i quickly gave up.
Maybe someone knows, if this is a bug (i've seen a NEW bug on this issue
in the bugdatabase) or i missunderstand something ...


regards, hussayn



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat 4.0.3 & getResourceAsStream

2002-12-02 Thread Esteban González
Hi!
I´ve just moved an old app that we had running using Jserv to tomcat4.0.3

But i have problems with this
p = new Properties();
InputStream is = p.getClass().getResourceAsStream("/icard.properties");
I keep getting null no matter where i put the icard.properties file.

i´ve placed icard.properties inside WEB-INF/lib and WEB-INF/classes and it´s
also on the classpath...

any workarounds to this issue?...  I´m trying not to use the java.io.*
approach...

--
Esteban González

Departamento de Sistemas
ASSIST-CARD International


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Help with jsp:includes

2002-12-02 Thread John Trollinger
I have pages that have the posibility of having 1000+ jsp:include
statements in them.  These pages take long times to load because of all
the requests going to the server.  Is there a way I can call the classes
directly instead of going through a request to the server?


Thanks,

John


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




ajp13 port always 8009 (config does not apply)

2002-12-02 Thread SAXESS - Hussayn Dabbous
Hello;

I wanted to change the ajp13 port from 8009 (the default port) to
9010. But i always see the instance opening on the default port.
This is an exerpt of my server.xml:







With this config i can connect from a browser via port 9000.
And if i comment out the ajp connector and restart tomcat,
the ajp connector will not be instanciated as expected.
So i am shure, my server.xml is readable and been executed...

I tried to track the problem within the sources, but i quickly gave up.
Maybe someone knows, if this is a bug (i've seen a NEW bug on this issue
in the bugdatabase) or i missunderstand something ...


regards, hussayn




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ajp13 port always 8009 (config does not apply)

2002-12-02 Thread Roberts, Eric
Hussayn,

The JK2 properties file contains a directive to port 8009.

You need to change this as well!

-Original Message-
From: SAXESS - Hussayn Dabbous [mailto:[EMAIL PROTECTED]]
Sent: Montag, 02. Dezember 2002 16:27
To: [EMAIL PROTECTED]
Subject: ajp13 port always 8009 (config does not apply)


Hy;

I wanted to change the ajp13 port from 8009 (the default port) to
9010. But i always see, the instance opening on the default port.
This is an exerpt of my server.xml:







I can connect from a browser via port 9000. And if i comment out the
ajp connector and restart tomcat, the ajp connector will not be
instanciated as expected. So i am shure, my server.xml is readable
and been executed...

I tried to track the problem within the sources, but i quickly gave up.
Maybe someone knows, if this is a bug (i've seen a NEW bug on this issue
in the bugdatabase) or i missunderstand something ...


regards, hussayn



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ajp13 port always 8009 (config does not apply)

2002-12-02 Thread Kristján Bjarni Guðmundsson

Return Receipt
   
Your  RE: ajp13 port always 8009 (config does not apply)   
document   
:  
   
was   Kristján Bjarni Guðmundsson/BIS/Dev/REK/Hugvit   
received   
by:
   
at:   02.12.2002 15:57:22  
   





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat 4.0.3 & getResourceAsStream

2002-12-02 Thread Andreas Probst
Hi Esteban,

try

p.getClass().getResourceAsStream("/WEB-INF/icard.properties");
(inside WEB-INF)
or
p.getClass().getResourceAsStream("/WEB-
INF/classes/icard.properties");
(inside classes)
or
p.getClass().getResourceAsStream("/WEB-
INF/lib/icard.properties");
(inside lib)

If this doesn't work, try
getServletContext().getResourceAsStream(...)
This one will work.

Good luck.

Andreas

On 2 Dec 2002 at 12:33, Esteban González wrote:

> Hi!
> I´ve just moved an old app that we had running using Jserv to
> tomcat4.0.3
>
> But i have problems with this
> p = new Properties();
> InputStream is =
> p.getClass().getResourceAsStream("/icard.properties");
> I keep getting null no matter where i put the icard.properties
> file.
>
> i´ve placed icard.properties inside WEB-INF/lib and
> WEB-INF/classes and it´s also on the classpath...
>
> any workarounds to this issue?...  I´m trying not to use the
> java.io.* approach...
>
> --
> Esteban González
>
> Departamento de Sistemas
> ASSIST-CARD International
>
>
> --
> To unsubscribe, e-mail:
>  For
> additional commands, e-mail:
> 
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Help with auto-generating Apache config files for mod_jk

2002-12-02 Thread Wendy Smoak

How do I get Tomcat to generate the JkMount lines the in mod_jk.conf file?

I have Tomcat generating the Apache config files by including

in server.xml.

I can't figure out how to get it to include the
  JkMount /dev ajp13
  JkMount /dev/* ajp13
lines that seem to be necessary to tell Apache what to hand off to Tomcat.

If I add those lines manually after starting Tomcat and before starting
Apache, it works.  But as soon as I restart Tomcat, it regenerates
mod_jk.conf and the lines go away.

My guess was that Tomcat would generate these from server.xml 
entries, but I added this to server.xml and I'm still not getting the
JkMount lines.

   
  

Thanks,

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management



Re: Tomcat 4.0.3 & getResourceAsStream

2002-12-02 Thread Esteban González
Thanks for your help andreas.

It didn´t work with p.getClass..

i´m trying with getServletContext().

But my idea is to have WEB-INF/conf   to place all .properties files.

is that possible?...

Best regards,
Esteban

- Original Message -
From: "Andreas Probst" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 12:57 PM
Subject: Re: Tomcat 4.0.3 & getResourceAsStream


Hi Esteban,

try

p.getClass().getResourceAsStream("/WEB-INF/icard.properties");
(inside WEB-INF)
or
p.getClass().getResourceAsStream("/WEB-
INF/classes/icard.properties");
(inside classes)
or
p.getClass().getResourceAsStream("/WEB-
INF/lib/icard.properties");
(inside lib)

If this doesn't work, try
getServletContext().getResourceAsStream(...)
This one will work.

Good luck.

Andreas

On 2 Dec 2002 at 12:33, Esteban González wrote:

> Hi!
> I´ve just moved an old app that we had running using Jserv to
> tomcat4.0.3
>
> But i have problems with this
> p = new Properties();
> InputStream is =
> p.getClass().getResourceAsStream("/icard.properties");
> I keep getting null no matter where i put the icard.properties
> file.
>
> i´ve placed icard.properties inside WEB-INF/lib and
> WEB-INF/classes and it´s also on the classpath...
>
> any workarounds to this issue?...  I´m trying not to use the
> java.io.* approach...
>
> --
> Esteban González
>
> Departamento de Sistemas
> ASSIST-CARD International
>
>
> --
> To unsubscribe, e-mail:
>  For
> additional commands, e-mail:
> 
>



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




migration from jrun to tomcat

2002-12-02 Thread Shyama Gavulla
Hi All,

I am new user to tomcat. I have my application in Jrun. I want to mirate
to tomcat . It would be really helpful if anyone can tell me the necessary
steps needed for the migration. It would be of great help .

shyam



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat 4.0.3 & getResourceAsStream

2002-12-02 Thread Andreas Probst
Hi Esteban

I think if WEB-INF/classes works, any other directory there will
work too.

Andreas

On 2 Dec 2002 at 12:59, Esteban González wrote:

> Thanks for your help andreas.
>
> It didn´t work with p.getClass..
>
> i´m trying with getServletContext().
>
> But my idea is to have WEB-INF/conf   to place all .properties
> files.
>
> is that possible?...
>
> Best regards,
> Esteban
>
> - Original Message -
> From: "Andreas Probst" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, December 02, 2002 12:57 PM
> Subject: Re: Tomcat 4.0.3 & getResourceAsStream
>
>
> Hi Esteban,
>
> try
>
> p.getClass().getResourceAsStream("/WEB-INF/icard.properties");
> (inside WEB-INF) or p.getClass().getResourceAsStream("/WEB-
> INF/classes/icard.properties"); (inside classes) or
> p.getClass().getResourceAsStream("/WEB-
> INF/lib/icard.properties"); (inside lib)
>
> If this doesn't work, try
> getServletContext().getResourceAsStream(...)
> This one will work.
>
> Good luck.
>
> Andreas
>
> On 2 Dec 2002 at 12:33, Esteban González wrote:
>
> > Hi!
> > I´ve just moved an old app that we had running using Jserv to
> > tomcat4.0.3
> >
> > But i have problems with this
> > p = new Properties();
> > InputStream is =
> > p.getClass().getResourceAsStream("/icard.properties");
> > I keep getting null no matter where i put the icard.properties
> > file.
> >
> > i´ve placed icard.properties inside WEB-INF/lib and
> > WEB-INF/classes and it´s also on the classpath...
> >
> > any workarounds to this issue?...  I´m trying not to use the
> > java.io.* approach...
> >
> > --
> > Esteban González
> >
> > Departamento de Sistemas
> > ASSIST-CARD International
> >
> >


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Help with auto-generating Apache config files for mod_jk

2002-12-02 Thread Turner, John

You need two Listener tags, minimum.  One at the Server "level" in
server.xml, and one at each Host "level".

John

> -Original Message-
> From: Wendy Smoak [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 10:58 AM
> To: 'Tomcat Users List'
> Subject: Help with auto-generating Apache config files for mod_jk
> 
> 
> 
> How do I get Tomcat to generate the JkMount lines the in 
> mod_jk.conf file?
> 
> I have Tomcat generating the Apache config files by including
>  modJk="/opt/hpapache2/modules/mod_jk.so" />
> in server.xml.
> 
> I can't figure out how to get it to include the
>   JkMount /dev ajp13
>   JkMount /dev/* ajp13
> lines that seem to be necessary to tell Apache what to hand 
> off to Tomcat.
> 
> If I add those lines manually after starting Tomcat and 
> before starting
> Apache, it works.  But as soon as I restart Tomcat, it regenerates
> mod_jk.conf and the lines go away.
> 
> My guess was that Tomcat would generate these from server.xml 
> 
> entries, but I added this to server.xml and I'm still not getting the
> JkMount lines.
> 
>docBase="webapps/dev" 
> debug="0" 
>   reloadable="true" > 
>   
> 
> Thanks,
> 
> -- 
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: migration from jrun to tomcat

2002-12-02 Thread rsequeira

Tomcat follows the web app standard. If your applications on JRun are set
up in a similar fashion, migration should be a breeze and would probably
entail just modifying the Tomcat configuration files (server.xml, web.xml).
Read the docs closely and you should be in good shape.
A point of concern would be if your servlets are called using the servlet
tag. Since the servlet tag is proprietary to JRun and isn't a standard, you
could get around it by using jsp:include

RS




   

  Shyama Gavulla   

  <[EMAIL PROTECTED]To:   Tomcat Users List 

  u><[EMAIL PROTECTED]>   

   cc: 

  12/02/02 10:07 AMSubject:  migration from jrun to tomcat 

  Please respond to

  "Tomcat Users

  List"

   

   





Hi All,

I am new user to tomcat. I have my application in Jrun. I want to mirate
to tomcat . It would be really helpful if anyone can tell me the necessary
steps needed for the migration. It would be of great help .

shyam



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







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Help with jsp:includes

2002-12-02 Thread rsequeira

1000+ includes in a single page isn't a good idea IMHO. And using
jsp:include for all 1000+ includes just aggravates the situation. It would
be a good idea to minimize the number of includes by maybe clubbing a few
together into one file. Also if looking at static includes as opposed to
dynamic (jsp:include) will help performance. A jsp:include tag includes a
file at request time as opposed to a static (<@ inlcude) tag which
includes a file at compile time.

RS



   

  "John Trollinger"


  ers.com> cc: 

   Subject:  Help with jsp:includes

  12/02/02 09:39 AM

  Please respond to

  "Tomcat Users

  List"

   

   





I have pages that have the posibility of having 1000+ jsp:include
statements in them.  These pages take long times to load because of all
the requests going to the server.  Is there a way I can call the classes
directly instead of going through a request to the server?


Thanks,

John


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







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tomcat 4.1.12 much slower than Tomcat 4.0.3

2002-12-02 Thread Ron Day
Hi,

I have tried re-installing Tomcat 4.1.12 , moving to JDK1.4.1, but:

My original post, still happening: This is post.

**

I just installed Tomcat 4.1.12.

But now my tomcat 4.0.3 webapps run about 10-20 times slower.
These are my class exercises, ranging from small single servlets to medium
projects.

Anyone have any ideas as to why this may be.

I did not change anything, and it happens for jsp's and servlets !!!

It seems that the tomcat examples work fine !

**

ron



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Retrieving username and password from url??

2002-12-02 Thread Reynir Hübner
Hi, 
Try this : 

 String authheader = request.getHeader("authorization");
 
I should point out, that usually sessions are only authenticated once, there for there 
is not authorization header in every request but only the one that is used for 
authentication). Some browsers sometimes try to authenticate every request, I think it 
has to do with cookie settings and more. 

Hope it helps
  -reynir


> -Original Message-
> From: Andreas Probst [mailto:[EMAIL PROTECTED]] 
> Sent: 2. desember 2002 14:09
> To: Tomcat Users List
> Subject: RE: Retrieving username and password from url??
> 
> 
> Hi Reynir,
> 
> how can you get the Authentication header? As far as I know the 
> only information you can get is the Principal and the username, 
> but not the password, neither clear nor encoded.
> 
> Andreas
> 
> 
> On 2 Dec 2002 at 9:14, Reynir Hübner wrote:
> 
> > Hi,
> > 
> > Depending on the browser and authentication scheme this 
> will may try 
> > to authenticate against tomcat. There for you should be able to do 
> > request.getRemoteUser() on (at least) the first request 
> that has the 
> > authenticative username:password.
> > request.getRemoteUser() only returns the username, you can get the 
> > Authentication header wich is formed like this in BASIC 
> authentication 
> > scheme: String user_Password = login+ ":"+ password; String 
> encoding  
> > = new String (Base64.encode(user_Password.getBytes())); String 
> > Authentication = "Basic " + encoding;
> > 
> > You might be able to do that backwards somehow
> > 
> > Hope it helps
> > -reynir
> > 
> > 
> > > -Original Message-
> > > From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]]
> > > Sent: 2. desember 2002 08:30
> > > To: [EMAIL PROTECTED]
> > > Cc: Sunu Joseph
> > > Subject: Retrieving username and password from url??
> > > 
> > > 
> > > Hi,
> > > Is there a way that I can retrieve the username and password from 
> > > the url given as below using a servlet. 
> > > https://username:password@hostname/servletname> /servlet
> > > 
> > > 
> > > 
> > > Regards,
> > > Abhishek
> > > 
> > > 
> > > 
> > > 
> > > 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat 4.1.12 much slower than Tomcat 4.0.3

2002-12-02 Thread Reynir Hübner
Hi, 

My setup is much faster with tomcat 4.1.12 than 4.0.x

What kind of things are you doing with your servlets/jsps ? Which libraries are you 
using ?

Do you do a lot of XML parsing ?

Did you disable tagpooling ?
Do you have less memory assigned to the process than before ?


-reynir


> -Original Message-
> From: Ron Day [mailto:[EMAIL PROTECTED]] 
> Sent: 2. desember 2002 16:24
> To: Tomcat Users List
> Subject: tomcat 4.1.12 much slower than Tomcat 4.0.3
> 
> 
> Hi,
> 
> I have tried re-installing Tomcat 4.1.12 , moving to JDK1.4.1, but:
> 
> My original post, still happening: This is post.
> 
> **
> 
> I just installed Tomcat 4.1.12.
> 
> But now my tomcat 4.0.3 webapps run about 10-20 times slower. 
> These are my class exercises, ranging from small single 
> servlets to medium projects.
> 
> Anyone have any ideas as to why this may be.
> 
> I did not change anything, and it happens for jsp's and servlets !!!
> 
> It seems that the tomcat examples work fine !
> 
> **
> 
> ron
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How do I access files above and below \web-inf folder?

2002-12-02 Thread Tim Moore
You should probably use ServletContext.getResource or
ServletContext.getResourceAsStream

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html#getResource(java.lang.String)

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html#getResourceAsStream(java.lang.String)

That way, it will still work if your web app is packaged as a WAR file.
The path argument is context-relative.

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, December 02, 2002 5:06 AM
> To: Tomcat Users List
> Subject: RE: How do I access files above and below \web-inf folder?
> 
> 
> 
> I use the getRealPath,
> 
> String pathToPropsFile = config.getServletContext().getRealPath
> ("WEB-INF/properties/");
> 
> use "/", as this also works on win platforms, and does not 
> need escaping. You should be able to use a relative going up 
> the tree, in the argument ("../foo/bar");
> 
> cheers,
> 
> Mehdi

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




explicit context failing

2002-12-02 Thread Noah Davis
I'm having a strange problem using an explicit context. I have a ".war" file for my 
application. If I drop it in my webapps folder and use automatic deployment, it works 
fine -- it gets unpacked and deploys on startup. 

However, if I explictly define the context for this webapp, the webapp does not get 
unpacked and (possibly as a consequence of) I get jsp compilation errors (cannot find 
classes in the WEB-INF/classes directory) and path errors. So, tomcat at least knows 
about this .war file, and can read some of its contents, but but for some reason 
cannot resolve paths, and does not unpack it.

The relevant part of my server.xml file is below with the explicit definition. Anyone 
have any ideas on why this might fail?

Thanks in advance.


  




 

 









Re: How do I access files above and below \web-inf folder?

2002-12-02 Thread Esteban González
Hi,
What if I don´t have a way to access to any kind of ServletContext.?

Let´s say i have a static class that loads properties, but i want it to
use ServletContext.getResource(..). Unfortunately there´s no static method
around to the a reference to the servletContext.

any ideas?

Best regards,
Esteban

- Original Message -
From: "Tim Moore" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 1:31 PM
Subject: RE: How do I access files above and below \web-inf folder?


You should probably use ServletContext.getResource or
ServletContext.getResourceAsStream

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html#getResource(java.lang.String)

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html#getResourceAsStream(java.lang.String)

That way, it will still work if your web app is packaged as a WAR file.
The path argument is context-relative.

--
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 5:06 AM
> To: Tomcat Users List
> Subject: RE: How do I access files above and below \web-inf folder?
>
>
>
> I use the getRealPath,
>
> String pathToPropsFile = config.getServletContext().getRealPath
> ("WEB-INF/properties/");
>
> use "/", as this also works on win platforms, and does not
> need escaping. You should be able to use a relative going up
> the tree, in the argument ("../foo/bar");
>
> cheers,
>
> Mehdi

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How do I access files above and below \web-inf folder?

2002-12-02 Thread Tim Moore
Instead of making the class static, you could load the properties from a servlet that 
runs when your web application starts up.
-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> -Original Message-
> From: Esteban González [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, December 02, 2002 11:38 AM
> To: Tomcat Users List
> Subject: Re: How do I access files above and below \web-inf folder?
> 
> 
> Hi,
> What if I don´t have a way to access to any kind of 
> ServletContext.?
> 
> Let´s say i have a static class that loads properties, 
> but i want it to use ServletContext.getResource(..). 
> Unfortunately there´s no static method around to the a 
> reference to the servletContext.
> 
> any ideas?
> 
> Best regards,
> Esteban
> 
> - Original Message -
> From: "Tim Moore" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, December 02, 2002 1:31 PM
> Subject: RE: How do I access files above and below \web-inf folder?
> 
> 
> You should probably use ServletContext.getResource or 
> ServletContext.getResourceAsStream
> 
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html#getResource(java.lang.String)

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
xt.html#getResourceAsStream(java.lang.String)

That way, it will still work if your web app is packaged as a WAR file. The path 
argument is context-relative.

--
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 5:06 AM
> To: Tomcat Users List
> Subject: RE: How do I access files above and below \web-inf folder?
>
>
>
> I use the getRealPath,
>
> String pathToPropsFile = config.getServletContext().getRealPath
> ("WEB-INF/properties/");
>
> use "/", as this also works on win platforms, and does not need 
> escaping. You should be able to use a relative going up the tree, in 
> the argument ("../foo/bar");
>
> cheers,
>
> Mehdi

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat 4.1.12 much slower than Tomcat 4.0.3

2002-12-02 Thread Ron Day
I did not change anything in 4.1.12.

No XML parsing. Same Windows machine, same memory.

If I revert back to 4.0.3 it works fine and faster than 4.1.12.

My test cases are very simple (by design to find reason it is slower)...
most use no 3rd party libaries, a couple use log4j.

Strange huh ??

ron

-Original Message-
From: Reynir Hübner [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 10:29 AM
To: Tomcat Users List
Subject: RE: tomcat 4.1.12 much slower than Tomcat 4.0.3


Hi,

My setup is much faster with tomcat 4.1.12 than 4.0.x

What kind of things are you doing with your servlets/jsps ? Which libraries
are you using ?

Do you do a lot of XML parsing ?

Did you disable tagpooling ?
Do you have less memory assigned to the process than before ?


-reynir


> -Original Message-
> From: Ron Day [mailto:[EMAIL PROTECTED]]
> Sent: 2. desember 2002 16:24
> To: Tomcat Users List
> Subject: tomcat 4.1.12 much slower than Tomcat 4.0.3
>
>
> Hi,
>
> I have tried re-installing Tomcat 4.1.12 , moving to JDK1.4.1, but:
>
> My original post, still happening: This is post.
>
> **
>
> I just installed Tomcat 4.1.12.
>
> But now my tomcat 4.0.3 webapps run about 10-20 times slower.
> These are my class exercises, ranging from small single
> servlets to medium projects.
>
> Anyone have any ideas as to why this may be.
>
> I did not change anything, and it happens for jsp's and servlets !!!
>
> It seems that the tomcat examples work fine !
>
> **
>
> ron
>
>
>
> --
> To unsubscribe, e-mail:
>  [EMAIL PROTECTED]>
> For
> additional commands,
> e-mail: 
>
>

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




NullPointerException in Tomcat

2002-12-02 Thread Bradley Ward
I am getting a NullPointerException, and the stack trace says it is down in
the bowels of Tomcat somewhere. Can anyone give me any ideas of what might
be wrong?

Thanks

Here is the stack trace:

java.lang.NullPointerException
at
org.netbeans.modules.web.monitor.server.MonitorFilter.recordServletData(Moni
torFilter.java:979)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.getDataBefore(MonitorF
ilter.java:545)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter
.java:180)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.j
ava:142)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1011)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
)
at java.lang.Thread.run(Thread.java:536)


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Access denied... to /tmp !?

2002-12-02 Thread Simon Brooke
Hi

I've been running things under various versions of Tomcat for a long time 
now, but it's always been Tomcats I've compiled and installed myself. Now I'm 
trying to get things running with the version of Tomcat which is packaged in 
the Debian package 'tomcat4  4.0.3-3woody1'. The tomcat install works, and I 
can install my webapp OK, and tomcat serves static pages out of my webapp 
just fine. But when I try to access a Servlet, I get 

  Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
  type Exception report
  message Internal Server Error
  description The server encountered an internal error (Internal Server
  Error) that prevented it from fulfilling this request.
  exception
  javax.servlet.ServletException: Servlet.init() for servlet items threw
  exception at
 org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935
)

... usual stuf...

  root cause
  java.security.AccessControlException: access denied (java.io.FilePermission
  /tmp read) at
 java.security.AccessControlContext.checkPermission(AccessControlContext.java(
Compiled Code))

Now if I understand what's going on there, the servlet is falling over 
because it can't read /tmp...

What I want to know is where this security policy is set?

-- 
[EMAIL PROTECTED] (Simon Brooke) http://www.jasmine.org.uk/~simon/

Error 1109: There is no message for this error

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: NullPointerException in Tomcat

2002-12-02 Thread Jeanfrancois Arcand
It's more a Netbeans error than a Tomcat error. I'm sure you will 
receive a better answer in the Netbeans users mailling list.

Sorry :-(

-- Jeanfrancois

Bradley Ward wrote:

I am getting a NullPointerException, and the stack trace says it is down in
the bowels of Tomcat somewhere. Can anyone give me any ideas of what might
be wrong?

Thanks

Here is the stack trace:

java.lang.NullPointerException
	at
org.netbeans.modules.web.monitor.server.MonitorFilter.recordServletData(Moni
torFilter.java:979)
	at
org.netbeans.modules.web.monitor.server.MonitorFilter.getDataBefore(MonitorF
ilter.java:545)
	at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter
.java:180)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:213)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.j
ava:142)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1011)
	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
)
	at java.lang.Thread.run(Thread.java:536)


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: NullPointerException in Tomcat

2002-12-02 Thread Tim Funk
Nope - the NPE is here (line 1 of stack trace):
org.netbeans.modules.web.monitor.server.MonitorFilter.recordServletData(MonitorFilter.java:979)

-Tim

Bradley Ward wrote:

I am getting a NullPointerException, and the stack trace says it is down in
the bowels of Tomcat somewhere. Can anyone give me any ideas of what might
be wrong?

Thanks

Here is the stack trace:

java.lang.NullPointerException
	at
org.netbeans.modules.web.monitor.server.MonitorFilter.recordServletData(Moni
torFilter.java:979)
	at
org.netbeans.modules.web.monitor.server.MonitorFilter.getDataBefore(MonitorF
ilter.java:545)
	at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter
.java:180)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:213)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.j
ava:142)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1011)
	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
)
	at java.lang.Thread.run(Thread.java:536)





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re[2]: Tomcat 4.0.3 & getResourceAsStream

2002-12-02 Thread Jacob Kjome
Hello Esteban,

It won't work with p.getClass... unless the resource you are trying to
load is in the classpath...meaning it must be within WEB-INF/classes
or WEB-INF/lib/somejar.jar and you wouldn't reference "WEB-INF".  The
classloader knows absolutely nothing about it.

If your resoruce was in the root of WEB-INF/classes (root of the
current classloader... also equivalent to putting the resource in a jar file, but
not inside a package in that jar file), the following will work:
p.getClass.getResourceAsStream("/myResource.properties");

This will work if your resource is located relative to the current
class "p" (same package as the class).
p.getClass.getResourceAsStream("myResource.properties");

This will work to find the resource anywhere in the current
classloader (make sure not to prefix with "/"):
p.getClass.getClassLoader.getResourceAsStream("myResource.properties");

This will work to find the resource even if it isn't in the same
classloader.  For instance, maybe it is in a parent classloader or a
child classloader relative to the current classloader (make sure not
to prefix with "/"):
Thread.currentThread().getContextClassLoader().getResourceAsStream("myResource.properties");

This will work to find the the resource using the servlet context and
fulfill your requirement to put all properties in WEB-INF/conf:
theServletConfig.getServletContext().getResourceAsStream("/WEB-INF/conf/myResource.properties");


For your purposes, you need the last one.  None of the others will
work unless your resource is in the classloader which WEB-INF/conf
isn't.

Jake

Monday, December 02, 2002, 9:59:28 AM, you wrote:

EG> Thanks for your help andreas.

EG> It didn´t work with p.getClass..

EG> i´m trying with getServletContext().

EG> But my idea is to have WEB-INF/conf   to place all .properties files.

EG> is that possible?...

EG> Best regards,
EG> Esteban

EG> - Original Message -
EG> From: "Andreas Probst" <[EMAIL PROTECTED]>
EG> To: "Tomcat Users List" <[EMAIL PROTECTED]>
EG> Sent: Monday, December 02, 2002 12:57 PM
EG> Subject: Re: Tomcat 4.0.3 & getResourceAsStream


EG> Hi Esteban,

EG> try

EG> p.getClass().getResourceAsStream("/WEB-INF/icard.properties");
EG> (inside WEB-INF)
EG> or
EG> p.getClass().getResourceAsStream("/WEB-
EG> INF/classes/icard.properties");
EG> (inside classes)
EG> or
EG> p.getClass().getResourceAsStream("/WEB-
EG> INF/lib/icard.properties");
EG> (inside lib)

EG> If this doesn't work, try
EG> getServletContext().getResourceAsStream(...)
EG> This one will work.

EG> Good luck.

EG> Andreas

EG> On 2 Dec 2002 at 12:33, Esteban González wrote:

>> Hi!
>> I´ve just moved an old app that we had running using Jserv to
>> tomcat4.0.3
>>
>> But i have problems with this
>> p = new Properties();
>> InputStream is =
>> p.getClass().getResourceAsStream("/icard.properties");
>> I keep getting null no matter where i put the icard.properties
>> file.
>>
>> i´ve placed icard.properties inside WEB-INF/lib and
>> WEB-INF/classes and it´s also on the classpath...
>>
>> any workarounds to this issue?...  I´m trying not to use the
>> java.io.* approach...
>>
>> --
>> Esteban González
>>
>> Departamento de Sistemas
>> ASSIST-CARD International
>>
>>
>> --
>> To unsubscribe, e-mail:
>>  For
>> additional commands, e-mail:
>> 
>>



EG> --
EG> To unsubscribe, e-mail:
EG> 
EG> For additional commands, e-mail:
EG> 


EG> --
EG> To unsubscribe, e-mail:   
EG> For additional commands, e-mail: 



-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Access denied... to /tmp !?

2002-12-02 Thread Jeanfrancois Arcand
That's the proper behaviour. By default, a web application is only able 
to read under the context under which it was deployed. If you want to 
grant access to the /tmp !*be carefull*!, add the following in your 
catalina.policy file:

grant codeBase "file:${catalina.home}/webapps/<>/-" {
   permission java.io.FilePermission "/tmp", "read";
};

-- Jeanfrancois



Simon Brooke wrote:

Hi

I've been running things under various versions of Tomcat for a long time 
now, but it's always been Tomcats I've compiled and installed myself. Now I'm 
trying to get things running with the version of Tomcat which is packaged in 
the Debian package 'tomcat4  4.0.3-3woody1'. The tomcat install works, and I 
can install my webapp OK, and tomcat serves static pages out of my webapp 
just fine. But when I try to access a Servlet, I get 

 Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
 type Exception report
 message Internal Server Error
 description The server encountered an internal error (Internal Server
 Error) that prevented it from fulfilling this request.
 exception
 javax.servlet.ServletException: Servlet.init() for servlet items threw
 exception at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935
)

... usual stuf...

 root cause
 java.security.AccessControlException: access denied (java.io.FilePermission
 /tmp read) at
java.security.AccessControlContext.checkPermission(AccessControlContext.java(
Compiled Code))

Now if I understand what's going on there, the servlet is falling over 
because it can't read /tmp...

What I want to know is where this security policy is set?

 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Access denied... to /tmp !?

2002-12-02 Thread Shapira, Yoav
Howdy,
Mr. Arcand already answered, but I wanted to add something: you can use
the directory indicated by context property
javax.servlet.context.tempdir as your temporary directory, rather than
hard-coding /tmp.  See the servlet spec, section 3.7.1, for details.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Simon Brooke [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 02, 2002 11:40 AM
>To: 'Tomcat Users List'
>Subject: Access denied... to /tmp !?
>
>Hi
>
>I've been running things under various versions of Tomcat for a long
time
>now, but it's always been Tomcats I've compiled and installed myself.
Now
>I'm
>trying to get things running with the version of Tomcat which is
packaged
>in
>the Debian package 'tomcat4  4.0.3-3woody1'. The tomcat install works,
and
>I
>can install my webapp OK, and tomcat serves static pages out of my
webapp
>just fine. But when I try to access a Servlet, I get
>
>  Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
>  type Exception report
>  message Internal Server Error
>  description The server encountered an internal error (Internal Server
>  Error) that prevented it from fulfilling this request.
>  exception
>  javax.servlet.ServletException: Servlet.init() for servlet items
threw
>  exception at
>
>org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.ja
va:9
>35
>)
>
>... usual stuf...
>
>  root cause
>  java.security.AccessControlException: access denied
>(java.io.FilePermission
>  /tmp read) at
>
>java.security.AccessControlContext.checkPermission(AccessControlContext
.jav
>a(
>Compiled Code))
>
>Now if I understand what's going on there, the servlet is falling over
>because it can't read /tmp...
>
>What I want to know is where this security policy is set?
>
>--
>[EMAIL PROTECTED] (Simon Brooke) http://www.jasmine.org.uk/~simon/
>
>   Error 1109: There is no message for this error
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How do I access files above and below \web-inf folder?

2002-12-02 Thread Cédric Viaud
Or better than a servlet (wich can stop and re-start for many reasons on the
Servlet Container) use a "listener" if you use 2.3 servlet version. Easy to
implements, and certainly safer then using the init() method of a servlet.

See the servlet specification SRV.10.2

Hope it helps,

   Cédric
- Original Message -
From: "Tim Moore" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>; "Esteban González"
<[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 5:45 PM
Subject: RE: How do I access files above and below \web-inf folder?


> Instead of making the class static, you could load the properties from a
servlet that runs when your web application starts up.
> --
> Tim Moore / Blackboard Inc. / Software Engineer
> 1899 L Street, NW / 5th Floor / Washington, DC 20036
> Phone 202-463-4860 ext. 258 / Fax 202-463-4863
>
>
> > -Original Message-
> > From: Esteban González [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, December 02, 2002 11:38 AM
> > To: Tomcat Users List
> > Subject: Re: How do I access files above and below \web-inf folder?
> >
> >
> > Hi,
> > What if I don´t have a way to access to any kind of
> > ServletContext.?
> >
> > Let´s say i have a static class that loads properties,
> > but i want it to use ServletContext.getResource(..).
> > Unfortunately there´s no static method around to the a
> > reference to the servletContext.
> >
> > any ideas?
> >
> > Best regards,
> > Esteban
> >
> > - Original Message -
> > From: "Tim Moore" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Monday, December 02, 2002 1:31 PM
> > Subject: RE: How do I access files above and below \web-inf folder?
> >
> >
> > You should probably use ServletContext.getResource or
> > ServletContext.getResourceAsStream
> >
> http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
> xt.html#getResource(java.lang.String)
>
> http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
> xt.html#getResourceAsStream(java.lang.String)
>
> That way, it will still work if your web app is packaged as a WAR file.
The path argument is context-relative.
>
> --
> Tim Moore / Blackboard Inc. / Software Engineer
> 1899 L Street, NW / 5th Floor / Washington, DC 20036
> Phone 202-463-4860 ext. 258 / Fax 202-463-4863
>
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, December 02, 2002 5:06 AM
> > To: Tomcat Users List
> > Subject: RE: How do I access files above and below \web-inf folder?
> >
> >
> >
> > I use the getRealPath,
> >
> > String pathToPropsFile = config.getServletContext().getRealPath
> > ("WEB-INF/properties/");
> >
> > use "/", as this also works on win platforms, and does not need
> > escaping. You should be able to use a relative going up the tree, in
> > the argument ("../foo/bar");
> >
> > cheers,
> >
> > Mehdi
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How do I access files above and below \web-inf folder?

2002-12-02 Thread Shapira, Yoav
Howdy,
Use a ServletContextListener and load these things in the contextInitialized() method. 
 The ServletContextEvent has a reference to the ServletContext.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Esteban González [mailto:[EMAIL PROTECTED]]
>Sent: Monday, December 02, 2002 11:38 AM
>To: Tomcat Users List
>Subject: Re: How do I access files above and below \web-inf folder?
>
>Hi,
>What if I don´t have a way to access to any kind of ServletContext.?
>
>Let´s say i have a static class that loads properties, but i want it to
>use ServletContext.getResource(..). Unfortunately there´s no static method
>around to the a reference to the servletContext.
>
>any ideas?
>
>Best regards,
>Esteban
>
>- Original Message -
>From: "Tim Moore" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Monday, December 02, 2002 1:31 PM
>Subject: RE: How do I access files above and below \web-inf folder?
>
>
>You should probably use ServletContext.getResource or
>ServletContext.getResourceAsStream
>
>http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
>xt.html#getResource(java.lang.String)
>
>http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConte
>xt.html#getResourceAsStream(java.lang.String)
>
>That way, it will still work if your web app is packaged as a WAR file.
>The path argument is context-relative.
>
>--
>Tim Moore / Blackboard Inc. / Software Engineer
>1899 L Street, NW / 5th Floor / Washington, DC 20036
>Phone 202-463-4860 ext. 258 / Fax 202-463-4863
>
>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, December 02, 2002 5:06 AM
>> To: Tomcat Users List
>> Subject: RE: How do I access files above and below \web-inf folder?
>>
>>
>>
>> I use the getRealPath,
>>
>> String pathToPropsFile = config.getServletContext().getRealPath
>> ("WEB-INF/properties/");
>>
>> use "/", as this also works on win platforms, and does not
>> need escaping. You should be able to use a relative going up
>> the tree, in the argument ("../foo/bar");
>>
>> cheers,
>>
>> Mehdi
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: NullPointerException in Tomcat

2002-12-02 Thread Bradley Ward
I see that it is in the netbeans level, but I was hoping someone in the
Tomcat world would know what is going on. None of my modules are in the call
stack; it is all within some internal Tomcat call.  Since there is none of
my code involved, it would appear that Tomcat is calling netbeans in some
invalid manner.

Does this mean in order to work with Tomcat I will have to diagnose Tomcat
source code AND Netbeans also?  I surely hope not...



> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 11:54 AM
> To: Tomcat Users List
> Subject: Re: NullPointerException in Tomcat
>
>
> Nope - the NPE is here (line 1 of stack trace):
> org.netbeans.modules.web.monitor.server.MonitorFilter.recordServle
> tData(MonitorFilter.java:979)
>
> -Tim
>
> Bradley Ward wrote:
> > I am getting a NullPointerException, and the stack trace says
> it is down in
> > the bowels of Tomcat somewhere. Can anyone give me any ideas of
> what might
> > be wrong?
> >
> > Thanks
> >
> > Here is the stack trace:
> >
> > java.lang.NullPointerException
> > at
> >
> org.netbeans.modules.web.monitor.server.MonitorFilter.recordServle
> tData(Moni
> > torFilter.java:979)
> > at
> >
> org.netbeans.modules.web.monitor.server.MonitorFilter.getDataBefor
> e(MonitorF
> > ilter.java:545)
> > at
> >
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(Mon
> itorFilter
> > .java:180)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
> pplication
> > FilterChain.java:213)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
> onFilterCh
> > ain.java:193)
> > at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
> erValve.ja
> > va:243)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 66)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> > at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardConte
> xtValve.ja
> > va:201)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 66)
> > at
> >
> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesVa
> lve.java:2
> > 46)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 64)
> > at
> >
> org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(Moni
> torValve.j
> > ava:142)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 64)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> > at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> >
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
> > at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
> e.java:164
> > )
> > at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 66)
> > at
> >
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispat
> cherValve.
> > java:170)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 64)
> > at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValv
> e.java:170
> > )
> > at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 64)
> > at
> >
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 64)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> > at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine
> Valve.java
> > :163)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
> ine.java:5
> > 66)
> > at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
> java:472)
> > at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> > at
> >
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProce
> ssor.java:
> > 1011)
> > at
> >
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor
> .java:1106
> > )
> > at java.lang.Thread.run(Thread.java:536)
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Bezerk - tomcat calls JSP twice ?

2002-12-02 Thread Craig R. McClanahan


On Mon, 2 Dec 2002, Stephen Riek wrote:

>
> If a Filter makes a call to a page using for example
> RequestDispatcher.forward("/Products/index.jsp"), will that request
> dispatcher bypass any filters, or will it still be subject to all filter
> rules ?
>

In Servlet 2.3 (i.e. Tomcat 4.x), Filters are not invoked when you do a
RequestDispatcher.forward() or RequestDispatcher.include().  They are only
invoked on the original request.

In Servlet 2.4 (i.e. Tomcat 5), you can use an additional web.xml
configuration element that requests filters even on RD calls.  For
backwards compatibility, the default behavior will continue to be omitting
them.

>
> Stephen.
>

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How to set Multiple instances for tomcat?

2002-12-02 Thread Tushar Kulkarni
Hi I want to set multiple instances for tomcat4. How do I do that?
Thanks



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Redirecting requests back to the webserver from tomcat

2002-12-02 Thread Jeremy Joslin
I don't know what your setup it but it might be worth your while to look
at the Proxy Support how-to located here:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/proxy-howto.html

Jeremy

> > -Original Message-
> > From: Prashanth Pushpagiri [mailto:[EMAIL PROTECTED]]
> > Sent: 1. desember 2002 02:05
> > To: Tomcat Users List
> > Subject: Redirecting requests back to the webserver from tomcat
> >
> >
> > Hi
> >
> > Is there a way to redirect a request that comes to
> > tomcat back to the main webserver (IIS or Apache
> > etc.). I want to use tomcat to verify the existence of
> > a session and then send it back to IIS to serve the
> > page out. Is this possible?
> >
> > Thanks
> > Prashanth
> >
> > __
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: NullPointerException in Tomcat

2002-12-02 Thread Jeanfrancois Arcand


Bradley Ward wrote:


I see that it is in the netbeans level, but I was hoping someone in the
Tomcat world would know what is going on. None of my modules are in the call
stack; it is all within some internal Tomcat call.  Since there is none of
my code involved, it would appear that Tomcat is calling netbeans in some
invalid manner.

Does this mean in order to work with Tomcat I will have to diagnose Tomcat
source code AND Netbeans also?  I surely hope not...


The Netbeans team have added listener to Tomcat. The exception is 
occuring when Tomcat call those listeners. So you just have to read 
Netbeans code ;-)Can you give more information on how you produce 
the error. I suspect a bug in your code

-- Jeanfrancois




 

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 11:54 AM
To: Tomcat Users List
Subject: Re: NullPointerException in Tomcat


Nope - the NPE is here (line 1 of stack trace):
org.netbeans.modules.web.monitor.server.MonitorFilter.recordServle
tData(MonitorFilter.java:979)

-Tim

Bradley Ward wrote:
   

I am getting a NullPointerException, and the stack trace says
 

it is down in
   

the bowels of Tomcat somewhere. Can anyone give me any ideas of
 

what might
   

be wrong?

Thanks

Here is the stack trace:

java.lang.NullPointerException
	at

 

org.netbeans.modules.web.monitor.server.MonitorFilter.recordServle
tData(Moni
   

torFilter.java:979)
	at

 

org.netbeans.modules.web.monitor.server.MonitorFilter.getDataBefor
e(MonitorF
   

ilter.java:545)
	at

 

org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(Mon
itorFilter
   

.java:180)
	at

 

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
pplication
   

FilterChain.java:213)
	at

 

org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
onFilterCh
   

ain.java:193)
	at

 

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
erValve.ja
   

va:243)
	at

 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
ine.java:5
   

66)
	at

 

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
java:472)
   

	at
 

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   

	at

 

org.apache.catalina.core.StandardContextValve.invoke(StandardConte
xtValve.ja
   

va:201)
	at

 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
ine.java:5
   

66)
	at

 

org.apache.catalina.valves.CertificatesValve.invoke(CertificatesVa
lve.java:2
   

46)
	at

 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
ine.java:5
   

64)
	at

 

org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(Moni
torValve.j
   

ava:142)
	at

 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
ine.java:5
   

64)
	at

 

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
java:472)
   

	at
 

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   

	at

 

org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
   

	at

 

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
e.java:164
   

)
	at

 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
ine.java:5
   

66)
	at

 

org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispat
cherValve.
   

java:170)
	at

 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
ine.java:5
   

64)
	at

 

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValv
e.java:170
   

)
	at

 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
ine.java:5
   

64)
	at

 

org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
   

	at

 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
ine.java:5
   

64)
	at

 

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
java:472)
   

	at
 

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   

	at

 

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine
Valve.java
   

:163)
	at

 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
ine.java:5
   

66)
	at

 

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
java:472)
   

	at
 

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   

	at

 

org.apache.catalina.connector.http.HttpProcessor.process(HttpProce
ssor.java:
   

1011)
	at

 

org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor
.java:1106
   

)
	at java.lang.Thread.run(Thread.java:536)


 

--
To unsubscribe, e-mail:

For additional commands, e-mail:



   



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

Socket GURU'S PLEASE HELP ON OBSCURE PROBLEM

2002-12-02 Thread Jason Johnston
The project that I'm working on is actually much larger and more
complex, but I've thrown together this class that illustrates my
problem.  I'm basically starting a socket server on port 80 and then
connecting with a web browser.  The strange thing is that the connection
never terminates and I can't identify where it's hung up.
 
The code is as follows:
 
import java.io.*;
import java.net.*;
import java.util.*;

public class Lab9 {
   ServerSocket ss;
   Socket tempSocket;
   BufferedReader instream;
   PrintWriter outstream;
   Socket connection;

   public Lab9(){
   try{
   System.out.println("Server Started");
   ss=new ServerSocket(80);
   tempSocket=ss.accept();
   instream=new BufferedReader(new
InputStreamReader(tempSocket.getInputStream()));
   outstream= new PrintWriter(tempSocket.getOutputStream(),true);
   ss.close();
   String tempString;
   System.out.println("Starting to read from client.");
   while((tempString=instream.readLine())!=null)
   {
   //tempString=instream.readLine();
   System.out.print("got:");
   outstream.print("got:");
   System.out.println(tempString);
   outstream.println(tempString);
}
System.out.println("Done with Input.");
tempSocket.close();
instream.close();   
System.out.println("Server Closed.");   
   }
   catch(IOException e){
System.out.println("Error: "+e.getMessage());
   }
  
   }  
public static void main(String[] args) {
Lab9 bob=new Lab9();  
}
}
 
The strange thing is where the output is concverned.  The browser just
hangs indefinitely and claims that it's downloading the page.  But on
the console I'm getting the following:
 
Server Started
Starting to read from client.
got:GET / HTTP/1.1
got:Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel,
application/msword, */*
got:Accept-Language: en-us
got:Accept-Encoding: gzip, deflate
got:User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
got:Host: localhost
got:Connection: Keep-Alive
got:
 
Then it hangs.  This is what's really bugging me.  It never exits the
while loop and it never iterates the loop again.  It just hangs until I
close the browser window.  Then it gives me this:
 
Error: Connection reset by peer: JVM_recv in socket input stream read
 
There's obviously something here I'm not understanding.  If the
inputstream is not null, then in my mind it should continue with the
loop and keep printing "got" and the line of input.  Yet, the connection
stays alive and the loop stops iterating.  Is this a behavior of the
BufferedReader, is it a behavior of the Socket?  Is this something
unique to using browsers?  If anyone has any insight, I would appreciate
it.  Thanks. 



RE: How to set Multiple instances for tomcat?

2002-12-02 Thread Jeremy Joslin
This is a pretty vague question so you're going to get a vague answer.
Look at http://jakarta.apache.org/tomcat/tomcat-4.0-doc/RUNNING.txt item
#4.

Jeremy

> -Original Message-
> From: Tushar Kulkarni [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 01, 2001 9:19 AM
> To: Tomcat Users List
> Subject: How to set Multiple instances for tomcat?
> 
> Hi I want to set multiple instances for tomcat4. How do I do that?
> Thanks
> 
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to set Multiple instances for tomcat?

2002-12-02 Thread Turner, John

Separate server.xml files (like server-1.xml, server-2.xml), separate work
directories.  Also set CATALINA_BASE to what would normally be CATALINA_HOME
in a single-intance configuration, then set CATALINA_HOME for each separate
instance to the correct directory.

John

> -Original Message-
> From: Tushar Kulkarni [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 01, 2001 12:19 PM
> To: Tomcat Users List
> Subject: How to set Multiple instances for tomcat?
> 
> 
> Hi I want to set multiple instances for tomcat4. How do I do that?
> Thanks
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Redirecting requests back to the webserver from tomcat

2002-12-02 Thread Turner, John

I think a Filter might be an alternative, as well.

John


> -Original Message-
> From: Jeremy Joslin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 12:19 PM
> To: 'Tomcat Users List'
> Subject: RE: Redirecting requests back to the webserver from tomcat
> 
> 
> I don't know what your setup it but it might be worth your 
> while to look
> at the Proxy Support how-to located here:
> http://jakarta.apache.org/tomcat/tomcat-4.0-doc/proxy-howto.html
> 
> Jeremy
> 
> > > -Original Message-
> > > From: Prashanth Pushpagiri [mailto:[EMAIL PROTECTED]]
> > > Sent: 1. desember 2002 02:05
> > > To: Tomcat Users List
> > > Subject: Redirecting requests back to the webserver from tomcat
> > >
> > >
> > > Hi
> > >
> > > Is there a way to redirect a request that comes to
> > > tomcat back to the main webserver (IIS or Apache
> > > etc.). I want to use tomcat to verify the existence of
> > > a session and then send it back to IIS to serve the
> > > page out. Is this possible?
> > >
> > > Thanks
> > > Prashanth
> > >
> > > __
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > http://mailplus.yahoo.com
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat Manager won't undeploy

2002-12-02 Thread Craig R. McClanahan
On Mon, 2 Dec 2002, Mark wrote:

> Date: Mon, 02 Dec 2002 10:25:54 -0500
> From: Mark <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Tomcat Manager won't undeploy
>
> I'm using Tomcat 4.1.12 and can't get the manager 'undeploy' command to
> work.  Other mgr commands such as stop, start, remove, list, etc. work, but
> not undeploy.  The application is defined in server.xml with context
> path="/myapp" docBase="myapp" and lives under webapps/myapp.  Using this
> manager command:
>  http://localhost:8080/manager/undeploy?path=/myapp
>
> I get the following simple response:
> FAIL - Cannot remove document base for path /myapp
>
> and the Tomcat log shows:
>  2002-12-02 10:09:37 Manager: undeploy: Undeploying web application at
> '/myapp'
>
> Anyone know what the problem is? I stopped the app first but that doesn't
> help.  I searched the archives to no avail. I'm looking at integrating TC
> manager functions into our Ant build for a complete clean build/redeploy,
> but have hit a wall here.
>

You can't use "undeploy" on an app that was listed in server.xml already.
It can only be used on an app where you did a "deploy".  Set up your Ant
build scripts to do the deploy command as well.

(Note -- if you're running Tomcat on your development machine, using
install/remove will run faster than deploy/undeploy.)

> Thanks in advance.
> Mark

Craig



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tomcat 4.1.12 much slower than Tomcat 4.0.3

2002-12-02 Thread Craig R. McClanahan


On Mon, 2 Dec 2002, Ron Day wrote:

> Date: Mon, 2 Dec 2002 10:24:26 -0600
> From: Ron Day <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: tomcat 4.1.12 much slower than Tomcat 4.0.3
>
> Hi,
>
> I have tried re-installing Tomcat 4.1.12 , moving to JDK1.4.1, but:
>

15 second delays sound like something wierd with your DNS server (perhaps
you've got access logging enabled?) or database.  There's nothing in
Tomcat that would do this -- and, in fact, most users see a performance
boost, especially with JSP pages that use lots of custom tags.

Craig

> My original post, still happening: This is post.
>
> **
>
> I just installed Tomcat 4.1.12.
>
> But now my tomcat 4.0.3 webapps run about 10-20 times slower.
> These are my class exercises, ranging from small single servlets to medium
> projects.
>
> Anyone have any ideas as to why this may be.
>
> I did not change anything, and it happens for jsp's and servlets !!!
>
> It seems that the tomcat examples work fine !
>
> **
>
> ron
>
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: NullPointerException in Tomcat

2002-12-02 Thread Craig R. McClanahan


On Mon, 2 Dec 2002, Bradley Ward wrote:

> Date: Mon, 2 Dec 2002 11:48:23 -0500
> From: Bradley Ward <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: NullPointerException in Tomcat
>
> I am getting a NullPointerException, and the stack trace says it is down in
> the bowels of Tomcat somewhere. Can anyone give me any ideas of what might
> be wrong?
>
> Thanks
>
> Here is the stack trace:
>
> java.lang.NullPointerException
>   at
> org.netbeans.modules.web.monitor.server.MonitorFilter.recordServletData(Moni
> torFilter.java:979)

The NPE is occurring here, not inside Tomcat.  Check at line 979 of this
class.

>   at
> org.netbeans.modules.web.monitor.server.MonitorFilter.getDataBefore(MonitorF
> ilter.java:545)
>   at
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter
> .java:180)
>   at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:213)

>From here on down is the normal stack trace you would expect when Tomcat
calls a Filter that is included in your webapp.

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [OT] Re: Java method equal to perl crypt()?

2002-12-02 Thread Gudipati, Arvind
You can use the java cryptography (JCE) package from Sun. its also part of
JRE 1.4 !

-Original Message-
From: AAron nAAs [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, November 28, 2002 12:37 PM
To: [EMAIL PROTECTED]
Subject: [OT] Re: Java method equal to perl crypt()?


Although off topic, the standard unix crypt algorithm has been 
written/ported to many languages (I've even seen source code in books.. 
Applied Cryptography I think).

I know versions exist for Java, or you could just convert a basic, C, C++ or

Pascal version to Java.

Seek with Google,
-AAron

>From: "Galbayar Dorjgotov" <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>To: "TomCat Users" <[EMAIL PROTECTED]>
>Subject: Java method equal to perl crypt()?
>Date: Thu, 28 Nov 2002 17:33:45 +0800
>
>Ok, I have an existing MySQL database that has user's passwords stored 
>that were encrypted using the Perl "crypt()" function. I was wondering 
>what the best way to re-use this database using JSP. I know enough Java 
>to get most functionality working, and I can already connect to and 
>read/write to MySQL. The only problem I have is if I migrate to JSP, 
>how can I compare passwords that are supplied in the JSP page to the 
>password in the DB that was stored via the Perl crypt() function?
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail:
>


_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail:

For additional commands, e-mail:


* This E-mail is from PANACYA
Inc. The E-mail and any files transmitted with it are confidential and may
also be privileged and intended solely for the use of the individual or
entity to whom they are addressed. Any unauthorized direct or indirect
dissemination, distribution or copying of this message and any attachments
is strictly prohibited. If you have received the E-mail in error please
notify [EMAIL PROTECTED] or telephone (410) 910-3300.





RE: tomcat 4.1.12 much slower than Tomcat 4.0.3

2002-12-02 Thread Ron Day
Craig, thanks for suggeations but.

Not 15 seconds, but 10 times slower than 4.0.3

what puzzles me is that environment is identical except that I use 4.1.12
version rather than 4.0.3

No other changes between versions and when I go back to 4.0.3 performance
improves.

ron

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 11:26 AM
To: Tomcat Users List
Subject: Re: tomcat 4.1.12 much slower than Tomcat 4.0.3




On Mon, 2 Dec 2002, Ron Day wrote:

> Date: Mon, 2 Dec 2002 10:24:26 -0600
> From: Ron Day <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: tomcat 4.1.12 much slower than Tomcat 4.0.3
>
> Hi,
>
> I have tried re-installing Tomcat 4.1.12 , moving to JDK1.4.1, but:
>

15 second delays sound like something wierd with your DNS server (perhaps
you've got access logging enabled?) or database.  There's nothing in
Tomcat that would do this -- and, in fact, most users see a performance
boost, especially with JSP pages that use lots of custom tags.

Craig

> My original post, still happening: This is post.
>
> **
>
> I just installed Tomcat 4.1.12.
>
> But now my tomcat 4.0.3 webapps run about 10-20 times slower.
> These are my class exercises, ranging from small single servlets to medium
> projects.
>
> Anyone have any ideas as to why this may be.
>
> I did not change anything, and it happens for jsp's and servlets !!!
>
> It seems that the tomcat examples work fine !
>
> **
>
> ron
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Error on Java Bean running

2002-12-02 Thread Ming Zhao
I use Tomcat 4.1.16 as the server. And when I run java
bean and got an error. It's a manufacturing-system
simulation java bean. On the website, click one
button to run the simulation. I can set the beginning
simulation time (e.t.,from 01/01/2000 to current
clicking time). It can work well for short running
period of time, but error for early beginning time
(e.t., 1/1/1998).

And if set the beginning time earlier, the server
shutdowns. But I run the similar simulation model
offline (with JBuiler 6) with longer running period
of time (from 1/1/1990 to current time). And it works
well and no such errors.

Can you help me figure out the problem? Is it possible
that there is some problem for memory allocation? 

The error is as below:


HTTP Status 500 - 
---type
Exception report

message 

description The server encountered an internal error
() that prevented it from fulfilling this request.

exception 

org.apache.jasper.JasperException
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:431)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:537)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:484)


root cause 

javax.servlet.ServletException
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
at
org.apache.jsp.simul_jsp._jspService(simul_jsp.java:317)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.

RE: tomcat 4.1.12 much slower than Tomcat 4.0.3

2002-12-02 Thread Craig R. McClanahan


On Mon, 2 Dec 2002, Ron Day wrote:

> Date: Mon, 2 Dec 2002 11:37:32 -0600
> From: Ron Day <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: tomcat 4.1.12 much slower than Tomcat 4.0.3
>
> Craig, thanks for suggeations but.
>
> Not 15 seconds, but 10 times slower than 4.0.3
>
> what puzzles me is that environment is identical except that I use 4.1.12
> version rather than 4.0.3
>
> No other changes between versions and when I go back to 4.0.3 performance
> improves.
>

Well, obviously nobody has had any useful ideas based on this description
of the problem :-).  The next step would be to create a sample webapp
illustrating the difference for you, and letting some other people try it.
That's the only way I can see to track down what's causing this.

> ron
>

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: migration from jrun to tomcat

2002-12-02 Thread rsequeira

The error message implies that the session-timeout element is missing in
the web.xml file.

SEVERE: Parse Error at line 137 column -1: Element type "session-timeout"
is not
 declared.
org.xml.sax.SAXParseException: Element type "session-timeout" is not
declared.


See $TOMCAT_HOME/conf/web.xml file. To be more specific look under the
"Default Session Configuration" section. If it isn't present, then you may
need to add the following lines just after the servlet mapping section.

  
30
  

RS




   

  Shyama Gavulla   

  <[EMAIL PROTECTED]To:   <[EMAIL PROTECTED]>   

  u>   cc: 

   Subject:  Re: migration from jrun to 
tomcat 
  12/02/02 11:13 AM

   

   





Hello Sir,
Operatin system is windows XP home edition
tomcat version is 4.1.12


This is the brief error output

at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411
)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:368)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)

at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)

at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347
)
at
org.apache.catalina.core.StandardService.start(StandardService.java:4
97)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:218
9)
at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Dec 2, 2002 12:11:40 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 137 column -1: Element type "session-timeout"
is not
 declared.
org.xml.sax.SAXParseException: Element type "session-timeout" is not
declared.
at org.apache.crimson.parser.Parser2.error(Parser2.java:3160)
at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1322)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
at
org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)

at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextCo
nfig.java:282)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:63
9)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
g.java:243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3
493)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase


On Mon, 2 Dec 2002 [EMAIL PROTECTED] wrote:

>
> It would help to provide more details such as the Tomcat version,
operating
> system, brief error log output, etc. Also I believe you meant "WEB-INF"
> instead of "web-inf".
>
> RS
>
>
>
>
>   Shyama Gavulla
>   <[EMAIL PROTECTED]To:
<[EMAIL PROTECTED]>
>   u>   cc:
>Subject:  Re: migration
from jrun to tomcat
>   12/02/

RE: tomcat 4.1.12 much slower than Tomcat 4.0.3

2002-12-02 Thread Turner, John

When you say "no other changes" are you taking into account that the
defaults for Tomcat 4.1.12 may be quite a bit different than 4.0.3?  That
is, have you gone through your 4.1.12 server.xml and verified that every
option/parameter is equivalent to the same parameter as the 4.0.3
server.xml, and have you verified that any new parameters or configuration
options in 4.1.12 aren't doing something that you don't expect?

John


> -Original Message-
> From: Ron Day [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 12:38 PM
> To: Tomcat Users List
> Subject: RE: tomcat 4.1.12 much slower than Tomcat 4.0.3
> 
> 
> Craig, thanks for suggeations but.
> 
> Not 15 seconds, but 10 times slower than 4.0.3
> 
> what puzzles me is that environment is identical except that 
> I use 4.1.12
> version rather than 4.0.3
> 
> No other changes between versions and when I go back to 4.0.3 
> performance
> improves.
> 
> ron
> 
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 11:26 AM
> To: Tomcat Users List
> Subject: Re: tomcat 4.1.12 much slower than Tomcat 4.0.3
> 
> 
> 
> 
> On Mon, 2 Dec 2002, Ron Day wrote:
> 
> > Date: Mon, 2 Dec 2002 10:24:26 -0600
> > From: Ron Day <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: tomcat 4.1.12 much slower than Tomcat 4.0.3
> >
> > Hi,
> >
> > I have tried re-installing Tomcat 4.1.12 , moving to JDK1.4.1, but:
> >
> 
> 15 second delays sound like something wierd with your DNS 
> server (perhaps
> you've got access logging enabled?) or database.  There's nothing in
> Tomcat that would do this -- and, in fact, most users see a 
> performance
> boost, especially with JSP pages that use lots of custom tags.
> 
> Craig
> 
> > My original post, still happening: This is post.
> >
> > **
> >
> > I just installed Tomcat 4.1.12.
> >
> > But now my tomcat 4.0.3 webapps run about 10-20 times slower.
> > These are my class exercises, ranging from small single 
> servlets to medium
> > projects.
> >
> > Anyone have any ideas as to why this may be.
> >
> > I did not change anything, and it happens for jsp's and servlets !!!
> >
> > It seems that the tomcat examples work fine !
> >
> > **
> >
> > ron
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Q: java.util.regex uris in workers2.properties?

2002-12-02 Thread David Boyer
isapi_redirector2.dll v2.0.2 mentions this as one of the changes:
 
"Add the regular expressions to uriMap. The regex uris are differentiated to normal 
one by starting with dollar ($) sign."
 
I've tried looking through the C++ source for the ISAPI filter, the tomcat dev 
archives, the cvs repository docs, and java.util.regex.Pattern to see how to use this 
in addition to trying dozens of different combinations to see what works. I've even 
tried prefixing different portions of the uri with a dollar sign. No dice.
 
What I'd like to do is to be able to use this approach:
 
[uri:/staff/*/servlet/*]
worker=ajp13:dev:8009
 
instead of this:
 
[uri:/staff/bob/servlet/*]
worker=ajp13:dev:8009
 
[uri:/staff/jim/servlet/*]
worker=ajp13:dev:8009
 
[uri:/staff/steve/servlet/*]
worker=ajp13:dev:8009
 
(etc)
 
Otherwise, I'll have about 1,300 contexts which will need uri mappings and those 
change on a daily basis.
 
Any suggestions? Thanks!




RE: Socket GURU'S PLEASE HELP ON OBSCURE PROBLEM

2002-12-02 Thread Jeremy Joslin
Looks like you're trying to implement a small webserver but you're not
obeying the HTTP spec.  You need to read the entire request in from the
client before responding and you should send the appropriate response
header, e.g. HTTP/1.1 200 OK, or your results will be unpredictable.
The reason you see it "hang" is because it's waiting for a response from
your server, it finally times out (Connection reset by peer) and closes
the connection.  I would suggest using HTTP 1.0 on the server side to
avoid dealing with keep-alives sent by 1.1 clients.  For more
information on the HTTP spec check out RFC 2616.  Good luck on your
homework.

Jeremy
 
> -Original Message-
> From: Jason Johnston [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 9:04 AM
> To:  Subject: Socket GURU'S PLEASE HELP ON OBSCURE PROBLEM
> 
> The project that I'm working on is actually much larger and more
> complex, but I've thrown together this class that illustrates my
> problem.  I'm basically starting a socket server on port 80 and then
> connecting with a web browser.  The strange thing is that the
connection
> never terminates and I can't identify where it's hung up.
> 
> The code is as follows:
> 
> import java.io.*;
> import java.net.*;
> import java.util.*;
> 
> public class Lab9 {
>ServerSocket ss;
>Socket tempSocket;
>BufferedReader instream;
>PrintWriter outstream;
>Socket connection;
> 
>public Lab9(){
>try{
>System.out.println("Server Started");
>ss=new ServerSocket(80);
>tempSocket=ss.accept();
>instream=new BufferedReader(new
> InputStreamReader(tempSocket.getInputStream()));
>outstream= new PrintWriter(tempSocket.getOutputStream(),true);
>ss.close();
>String tempString;
>System.out.println("Starting to read from client.");
>while((tempString=instream.readLine())!=null)
>{
>//tempString=instream.readLine();
>System.out.print("got:");
>outstream.print("got:");
>System.out.println(tempString);
>outstream.println(tempString);
> }
> System.out.println("Done with Input.");
> tempSocket.close();
> instream.close();
> System.out.println("Server Closed.");
>}
>catch(IOException e){
> System.out.println("Error: "+e.getMessage());
>}
> 
>}
> public static void main(String[] args) {
> Lab9 bob=new Lab9();
> }
> }
> 
> The strange thing is where the output is concverned.  The browser just
> hangs indefinitely and claims that it's downloading the page.  But on
> the console I'm getting the following:
> 
> Server Started
> Starting to read from client.
> got:GET / HTTP/1.1
> got:Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
> application/vnd.ms-powerpoint, application/vnd.ms-excel,
> application/msword, */*
> got:Accept-Language: en-us
> got:Accept-Encoding: gzip, deflate
> got:User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
> got:Host: localhost
> got:Connection: Keep-Alive
> got:
> 
> Then it hangs.  This is what's really bugging me.  It never exits the
> while loop and it never iterates the loop again.  It just hangs until
I
> close the browser window.  Then it gives me this:
> 
> Error: Connection reset by peer: JVM_recv in socket input stream read
> 
> There's obviously something here I'm not understanding.  If the
> inputstream is not null, then in my mind it should continue with the
> loop and keep printing "got" and the line of input.  Yet, the
connection
> stays alive and the loop stops iterating.  Is this a behavior of the
> BufferedReader, is it a behavior of the Socket?  Is this something
> unique to using browsers?  If anyone has any insight, I would
appreciate
> it.  Thanks.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Problem downloading binary files, please help.

2002-12-02 Thread Vy Ho

 
> I got a very weird error and here is the situation:
> 
> The app I used: tomcat 4.06, phoenix web browser 0.3, ie6.0
> 
> Here is the problem:
> 
> When I set up an application in tomcat (with BASIC AUTHEN), phoenix could
> download all binary files (.exe, .pdf, etc...) fine from Tomcat server.
> Then I tested with IE6.0, and I got error (server could not find the file
> or something).  However, IE6.0 could download text file ok without any
> problem. Ok, so I came back and delete the file index.html in the
> application, and I can download the file fine.  Isn't this strange?
> 
> But that's not all yet.  I want to serve files using a servlet wraper.
> Basically send back the binary with the right content type.
> Mozilla/phoenix can download without any problem.  But IE6.0 complain with
> the same error before.  So, somehow the index.html file and the servlet
> have something in common that make IE not working while it works without
> the index.html and statically.
> 
> Well, want another strange thing?  I could not find anyone complain about
> this, or even ask any question about this in newsgroup or apache site.
> And I can produce consistently using different machine.
> 
> Anyone have any idea?  Is it Apache Tomcat or IE error?  Or both?  Or it's
> me?
> 
> I am sure Tomcat can be changed to work, since statically served page
> works.  And I am sure IE can be changed to work, since Mozilla works all
> the time.
> 
> Actually, I found any article in the newsgroup on Google with a similar
> error, but very different situation (IIS server).  And the problem is in
> the expiration of a page.  If some page has instant expiration, then IE6
> has problem getting it.  It could be the same problem.  Coudl someone help
> me out here since IE has 95% of the market share?
> 
> Thank you very much in advance.
> 
> Vy
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat 4.1.12 much slower than Tomcat 4.0.3

2002-12-02 Thread Ron Day
I'll do that , thanks for input

r

-Original Message-
From: Turner, John [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 11:46 AM
To: 'Tomcat Users List'
Subject: RE: tomcat 4.1.12 much slower than Tomcat 4.0.3



When you say "no other changes" are you taking into account that the
defaults for Tomcat 4.1.12 may be quite a bit different than 4.0.3?  That
is, have you gone through your 4.1.12 server.xml and verified that every
option/parameter is equivalent to the same parameter as the 4.0.3
server.xml, and have you verified that any new parameters or configuration
options in 4.1.12 aren't doing something that you don't expect?

John


> -Original Message-
> From: Ron Day [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 12:38 PM
> To: Tomcat Users List
> Subject: RE: tomcat 4.1.12 much slower than Tomcat 4.0.3
>
>
> Craig, thanks for suggeations but.
>
> Not 15 seconds, but 10 times slower than 4.0.3
>
> what puzzles me is that environment is identical except that
> I use 4.1.12
> version rather than 4.0.3
>
> No other changes between versions and when I go back to 4.0.3
> performance
> improves.
>
> ron
>
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 11:26 AM
> To: Tomcat Users List
> Subject: Re: tomcat 4.1.12 much slower than Tomcat 4.0.3
>
>
>
>
> On Mon, 2 Dec 2002, Ron Day wrote:
>
> > Date: Mon, 2 Dec 2002 10:24:26 -0600
> > From: Ron Day <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: tomcat 4.1.12 much slower than Tomcat 4.0.3
> >
> > Hi,
> >
> > I have tried re-installing Tomcat 4.1.12 , moving to JDK1.4.1, but:
> >
>
> 15 second delays sound like something wierd with your DNS
> server (perhaps
> you've got access logging enabled?) or database.  There's nothing in
> Tomcat that would do this -- and, in fact, most users see a
> performance
> boost, especially with JSP pages that use lots of custom tags.
>
> Craig
>
> > My original post, still happening: This is post.
> >
> > **
> >
> > I just installed Tomcat 4.1.12.
> >
> > But now my tomcat 4.0.3 webapps run about 10-20 times slower.
> > These are my class exercises, ranging from small single
> servlets to medium
> > projects.
> >
> > Anyone have any ideas as to why this may be.
> >
> > I did not change anything, and it happens for jsp's and servlets !!!
> >
> > It seems that the tomcat examples work fine !
> >
> > **
> >
> > ron
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat and SSL

2002-12-02 Thread Jay Wright

I am trying to configure a tomcat (4.1.12 on solaris) webserver to redirect
a web app to a secure site.  I'm attempting to configure this through
web.xml, but I haven't found any valuable documentation.  

I have added: 



Some Name
/a/b/c/*


CONFIDENTIAL



to the web.xml file, though it is unclear to me how this works.  I have also
configured tomcat with a certificate and set up the SSL Connector as per
apache's documentation.  SSL works, but the problem is that I can reach any
of my web apps through either http or https.  

In my configuration above, the  maps to nothing.  Is this
just a friendly name or should it map to a "resource" in my 
configuration? 

Thanks,

Jay

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: HELP!! Tomcat crashes on me!

2002-12-02 Thread micael
Once again, and for the last time, please tell us everything you did after 
opening the zip (or whatever) file.  There is not that much to do, and we 
can get you on the right path if you tell us whatever you did.  If you 
won't bother to do that, I am putting you on iggy, Steve.

At 10:28 PM 12/1/2002 -0800, you wrote:
Listen up, men, I just now got thru with trying/attempting to activate 
Tomcat on
the command line, but WITHOUT SUCCESS!! In fact here, for "your reading 
pleasure",
is the DOS screen dump: "Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\srburrus>Cd C:\jakarta-tomcat-4.1.12\bin\

C:\jakarta-tomcat-4.1.12\bin>startup
Using CATALINA_BASE:   ..
Using CATALINA_HOME:   ..
Using CATALINA_TMPDIR: ..\temp
Using JAVA_HOME:   C:\j2sdk1.4.1_01\
C:\jakarta-tomcat-4.1.12\bin>"
Now, there has to be something basicly unstable about my current 
installation of
Tomcat, I just don't know what the hell it is!!! Is there possibly a problem
"lurking" in my system or what?


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

Micael

---

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank you 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: HELP!! Tomcat crashes on me!

2002-12-02 Thread micael
So, you have a  tag that is not closed.  Close it.

At 11:26 PM 12/1/2002 -0800, you wrote:

 Bill, I am about to go to bed, but I couldn't help but displaying the 
"screen
dump" to u from executing the "catalina run" command:

 "C:\jakarta-tomcat-4.1.12\bin>catalina run
Using CATALINA_BASE:   ..
Using CATALINA_HOME:   ..
Using CATALINA_TMPDIR: ..\temp
Using JAVA_HOME:   C:\j2sdk1.4.1_01\
Dec 2, 2002 1:21:41 AM org.apache.commons.modeler.Registry loadRegis
INFO: Loading registry information
Dec 2, 2002 1:21:42 AM org.apache.commons.modeler.Registry getRegist
INFO: Creating new Registry instance
Dec 2, 2002 1:21:43 AM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Dec 2, 2002 1:21:45 AM org.apache.commons.digester.Digester fatalErr
SEVERE: Parse Fatal Error at line 369 column 14: The element type "C
 be terminated by the matching end-tag "".
org.xml.sax.SAXParseException: The element type "Context" must be te
the matching end-tag "".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParse
rorHandlerWrapper.java:232)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Err
pper.java:213)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLEr
java:366)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLEr
java:296)
at org.apache.xerces.impl.XMLScanner.reportFatalError(XMLSca
69)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.han
t(XMLDocumentFragmentScannerImpl.java:1133)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.sca
XMLDocumentFragmentScannerImpl.java:987)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fra
Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.sca
LDocumentFragmentScannerImpl.java:333)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfi
a:524)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfi
a:580)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:
at org.apache.xerces.parsers.AbstractSAXParser.parse(Abstrac
ava:1169)
at org.apache.commons.digester.Digester.parse(Digester.java:
at org.apache.catalina.startup.Catalina.start(Catalina.java:
at org.apache.catalina.startup.Catalina.execute(Catalina.jav
at org.apache.catalina.startup.Catalina.process(Catalina.jav
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Metho
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodA
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegatin
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java
Catalina.start: org.xml.sax.SAXParseException: The element type "Con
e terminated by the matching end-tag "".
org.xml.sax.SAXParseException: The element type "Context" must be te
the matching end-tag "".
at org.apache.xerces.parsers.AbstractSAXParser.parse(Abstrac
ava:1183)
at org.apache.commons.digester.Digester.parse(Digester.java:
at org.apache.catalina.startup.Catalina.start(Catalina.java:
at org.apache.catalina.startup.Catalina.execute(Catalina.jav
at org.apache.catalina.startup.Catalina.process(Catalina.jav
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Metho
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodA
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegatin
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java

C:\jakarta-tomcat-4.1.12\bin>"

I DEFY you to make any kind of "rhyme or reason" out of this error 
message! What
does all of this mean?

__
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

Micael

---

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank you 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: NullPointerException in Tomcat

2002-12-02 Thread Bradley Ward
When you mentioned the filters "in my web app", I thought "but I don't use
any filters".  Heck, I don't even know for sure what they are.  But (and
this is a big but), I am using the Tomcat that comes bundled with the Sun
One IDE, and IT was putting both a filter and a valve into the server.xml
file.   I removed these and have been able to proceed.  So it would assume
there is some sort of problem with the Sun One IDE in this regard.

Thanks!

Brad


> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 12:29 PM
> To: Tomcat Users List
> Subject: Re: NullPointerException in Tomcat
>
>
>
>
> On Mon, 2 Dec 2002, Bradley Ward wrote:
>
> > Date: Mon, 2 Dec 2002 11:48:23 -0500
> > From: Bradley Ward <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: NullPointerException in Tomcat
> >
> > I am getting a NullPointerException, and the stack trace says
> it is down in
> > the bowels of Tomcat somewhere. Can anyone give me any ideas of
> what might
> > be wrong?
> >
> > Thanks
> >
> > Here is the stack trace:
> >
> > java.lang.NullPointerException
> > at
> >
> org.netbeans.modules.web.monitor.server.MonitorFilter.recordServle
> tData(Moni
> > torFilter.java:979)
>
> The NPE is occurring here, not inside Tomcat.  Check at line 979 of this
> class.
>
> > at
> >
> org.netbeans.modules.web.monitor.server.MonitorFilter.getDataBefor
> e(MonitorF
> > ilter.java:545)
> > at
> >
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(Mon
> itorFilter
> > .java:180)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
> pplication
> > FilterChain.java:213)
>
> >From here on down is the normal stack trace you would expect when Tomcat
> calls a Filter that is included in your webapp.
>
> Craig
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




TC memory consumption increases when -Xincgc is used?

2002-12-02 Thread Eric Gilbertson
Hello Tomcaters:

Has anyone encountered a problem with TC memory consumption growing
faster with incremental GC enabled? With the -Xincgc switch, memory consumption
not only grows faster on startup, but it never seems to go down 
significantly as it
does with normal GC. Under stress testing this results eventually in the 
dreaded
OutOfMemory error. The weird thing  is that our other servers don't seem to 
exhibit
this behavior. Another contributing factor to the memory consumption is 
whether TC
is invoked from the command line, or whether it is started via an NT 
service. I do see
faster memory consumption when starting via the CL with -Xincgc, but the
OutOfMemory exception occurs only with incgc *and* service invocation. The 
service
invocation includes no other switches that aren't used in the CL version. I 
did see a post
in the archives regarding memory problems when TC is invoked via a service 
but there
was no confirmation that this was a known problem. Suggestions as to how to 
start TC
via a service without incurring increased memory consumption are appreciated.

The operation environment is TC 4.01 with NT 2000/XP with precompiled JSPs.

Sincerely,

Eric Gilbertson
[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Accessing Apache environment variables (or notes or IPC space) from within Tomcat

2002-12-02 Thread Aidan Fitzpatrick

I'm running a small authentication system that works within Apache and stores user 
information in Apache environment variables. I want to be able to pull out this data 
from within a Servlet. Pretty much exactly the same as this (unanswered?) question 
that was asked on the Tomcat development list two years ago:

http://w6.metronet.com/~wjm/tomcat/2000/Sep/msg00331.html

I'm not sure how this question relates to the various connectors, or which would be 
best for what we're attempting to do. Is it possible? If so, how?

If it's not possible, is it possible to access IPC or Apache Notes space from within 
Tomcat? I understand that mod_webapp uses IPC, and that that might be of some use.

Many thanks for any help,
Aidan Fitzpatrick

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Configuring Apache 2.0.43 and Tomcat 4.1 on Windows 2000

2002-12-02 Thread Johnson, Garrett
I'm having some problems making Apache call Tomcat for it's servlet calls,
and was hoping someone could help me:

My environment:

1)  Apache HTTPD 2.0.43
2)  Tomcat 4.1
3)  mod_jk.dll has been copied into the C:\Apache\Apache2\modules\ directory
4)  httpd.conf, (in C:\Apache\Apache2\conf,) has these lines appended to it:

# Load mod_jk module
LoadModule jk_module modules/mod_jk.dll

# Declare the module for 
AddModule mod_jk.c 

# Where to find workers.properties
JkWorkersFile conf/workers.properties 

# Where to put jk logs
JkLogFile logs/mod_jk.log 

# Set the jk log level [debug/error/info]
JkLogLevel info 

# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " 

# JkOptions indicate to send SSL KEY SIZE, 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories 

# JkRequestLogFormat set the request format 
JkRequestLogFormat "%w %V %T" 

# Send everything for context /examples to worker named worker1 (ajp13)
JkMount /examples/* worker1

5)  workers.properties, (in C:\Apache\Apache2\conf,) contains:

# Define 1 real worker using ajp13
worker.list=worker1 

# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13 
worker.worker1.host=locahost 
worker.worker1.port=8009 
worker.worker1.lbfactor=50 
worker.worker1.cachesize=10 
worker.worker1.cache_timeout=600 
worker.worker1.socket_keepalive=1 
worker.worker1.socket_timeout=300 

THE PROBLEM:  When attempting to run apache, after starting up Tomcat first,
I get the error message:

C:\Apache\Apache2\bin>apache

Syntax error on line 988 of C:/Apache/Apache2/conf/httpd.conf:
Invalid command 'AddModule', perhaps mis-spelled or defined by a module not 
included in the server configuration

What's wrong here?  Line 988 maps to the "AddModule mod_jk.c" command.  Have
I failed to edit this line properly?  Do I also need to make changes to
Tomcat's .conf files to enable apache to call it as a child process/thread?
What am I missing?

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Configuring Apache 2.0.43 and Tomcat 4.1 on Windows 2000

2002-12-02 Thread Fenlason, Josh
There is no AddModule in Apache2.  All you have to do is LoadModule.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Configuring Apache 2.0.43 and Tomcat 4.1 on Windows 2000

2002-12-02 Thread Johnson, Garrett
First of all, Josh, thanks -- That at least got Apache started.  The problem
now is that when I attempt to use apache as the go-between for serving up
servlets and jsp's from tomcat it still can't seem to instantiate a worker
thread:

Calling the URL: http://localhost:80/examples/servlet/HelloWorldExample

results in a 500 Internal Server Error Page, and the mod_jk log reports:

[Mon Dec 02 14:03:06 2002]  [jk_ajp_common.c (1245)]: ERROR: can't resolve
tomcat address locahost
[Mon Dec 02 14:03:06 2002]  [jk_ajp_common.c (1247)]: ERROR: invalid host
and port locahost 8009
[Mon Dec 02 14:03:06 2002]  [jk_worker.c (174)]: wc_create_worker validate
failed for worker1
[Mon Dec 02 14:03:06 2002]  [jk_worker.c (244)]: build_worker_map failed to
create workerworker1

Is there anything I need to do to the Tomcat installation to instruct it to
start listening at port 8009?  My environment is available on previous
threads.



-Original Message-
From: Fenlason, Josh [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 1:52 PM
To: Tomcat Users List
Subject: RE: Configuring Apache 2.0.43 and Tomcat 4.1 on Windows 2000


There is no AddModule in Apache2.  All you have to do is LoadModule.

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: TC memory consumption increases when -Xincgc is used?

2002-12-02 Thread Craig R. McClanahan

On Mon, 2 Dec 2002, Eric Gilbertson wrote:

>
> Has anyone encountered a problem with TC memory consumption growing
> faster with incremental GC enabled? With the -Xincgc switch, memory
> consumption not only grows faster on startup, but it never seems to go
> down significantly as it does with normal GC.

Which GC style is best for you is pretty much always an application
dependent decision, but the behavior you describe matches my intuitive
understanding of how incremental garbage collection works -- at any
point in time, there will be relatively more objects that haven't been
collected yet.  The corresponding benefit is you don't have to wait for
the garbage to be collected all at once (which can cause noticeable pauses
in response time on a JVM with lots of heap space).

I don't know the details of how you configure the JVM when starting Tomcat
as a service, but presume that the info must be in the docs somewhere.

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Configuring Apache 2.0.43 and Tomcat 4.1 on Windows 2000

2002-12-02 Thread Turner, John

Replace "locahost" with "localhost". 

John


> -Original Message-
> From: Johnson, Garrett [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 2:13 PM
> To: 'Tomcat Users List'
> Subject: RE: Configuring Apache 2.0.43 and Tomcat 4.1 on Windows 2000
> 
> 
> First of all, Josh, thanks -- That at least got Apache 
> started.  The problem
> now is that when I attempt to use apache as the go-between 
> for serving up
> servlets and jsp's from tomcat it still can't seem to 
> instantiate a worker
> thread:
> 
> Calling the URL: 
> http://localhost:80/examples/servlet/HelloWorldExample
> 
> results in a 500 Internal Server Error Page, and the mod_jk 
> log reports:
> 
> [Mon Dec 02 14:03:06 2002]  [jk_ajp_common.c (1245)]: ERROR: 
> can't resolve
> tomcat address locahost
> [Mon Dec 02 14:03:06 2002]  [jk_ajp_common.c (1247)]: ERROR: 
> invalid host
> and port locahost 8009
> [Mon Dec 02 14:03:06 2002]  [jk_worker.c (174)]: 
> wc_create_worker validate
> failed for worker1
> [Mon Dec 02 14:03:06 2002]  [jk_worker.c (244)]: 
> build_worker_map failed to
> create workerworker1
> 
> Is there anything I need to do to the Tomcat installation to 
> instruct it to
> start listening at port 8009?  My environment is available on previous
> threads.
> 
> 
> 
> -Original Message-
> From: Fenlason, Josh [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 1:52 PM
> To: Tomcat Users List
> Subject: RE: Configuring Apache 2.0.43 and Tomcat 4.1 on Windows 2000
> 
> 
> There is no AddModule in Apache2.  All you have to do is LoadModule.
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >