tomcat 6.0 support

2008-10-23 Thread rajesh202023

Hi All,

Can anyone please tell me whether Tomcat 6.0 is supported on the following
platforms or not?

a. Windows 2003, 2008 32 bit x86 
b. Windows 2003, 2008 64 bit x64 
c. Solaris 10 SPARC 
d. HP-UX 11.31 IPF
e. RHEL 5, SLES 10 x64

--Rajesh

-- 
View this message in context: 
http://www.nabble.com/tomcat-6.0-support-tp20125222p20125222.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat 6.0 support

2008-10-23 Thread André Warnier

rajesh202023 wrote:

Hi All,

Can anyone please tell me whether Tomcat 6.0 is supported on the following
platforms or not?

a. Windows 2003, 2008 32 bit x86 
b. Windows 2003, 2008 64 bit x64 
c. Solaris 10 SPARC 
d. HP-UX 11.31 IPF

e. RHEL 5, SLES 10 x64



I am not the best qualified to answer your question, but I will make a 
stab at it, and someone else can contradict me if I am wrong.


Your question above really has several parts :

1) is Tomcat supported ?

Tomcat being a free and open source thing, it is not really supported 
in the sense that a commercial product may be supported.  The support 
you get (like here) is free of charge, which does not mean that it is 
bad, but that you get what you get.


2) does Tomcat 6.x run on the above platforms ?

Nothing that Tomcat does should in principle access the platform itself 
directly, it all goes through the Java JVM.
Since Tomcat runs in the Java JVM, I would think that as long as a 
decent Java JVM is present on the platform in question, nothing should 
prevent Tomcat 6.x from running.

That's one of the benefits of Java.
For Tomcat 6.x, you will need at least a Java 1.5 JRE or JDK.

3) where your Tomcat come from
There are different packages for Tomcat 6.x.

There is the official Tomcat, which you obtain from the Tomcat website 
http://tomcat.apache.org;.  That one will install on all platforms, in 
the same essential way. Since this is the Tomcat package that the 
helpers on this list all know and love (and use themselves), it is the 
easiest for them to support, because they know where things are and 
how it is configured.
But, the way in which it installs and the way in which it must be 
administered and maintained does not necessarily match the constraints 
of the environment in which you work, or the wishes of your system 
administrators.


And then there are, for each platform, some pre-packaged versions of 
Tomcat, usually available in that platform's software depot or 
similar, and installable with the standard software utilities of that 
platform (e.g. SAM for HP, apt-get for Linux Debian, rpm for other 
Linuxes, etc..)
These are the easiest for the sysadmins to install and maintain and 
update, because they fit with the rest that exists on the machine, they 
can use their preferred tools, they can easily see what is installed, etc...
One inconvenient of these packages is that they are not necessarily 
available for the latest available version of Tomcat.  That is normally 
compensated by the fact that these packages have been tested, that their 
installation has been tested, that the installation will automatically 
resolve any issue of dependencies with other packages, etc.. (e.g. 
automatically install Java if it is not already present, or SSL if 
needed, etc..).
Another inconvenient of these packages is that they sometimes (usually) 
use other directories to install the software than what the official 
Tomcat does, they put links all over the place, they use different 
configuration files, etc..
So the problem is that if you use one of these non-official-Tomcat 
packages, it may be easy to install and your sysadmins may be happy, but 
the people on this list may have a harder time helping you in case of 
problems, because they do not know where things are or which 
configuration things are changed from the official version.


Hope this helps

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5.5.26 Vulnerability - Test

2008-10-23 Thread Gozde Aytan
 Dear all,

In our project, we are using Tomcat 5.5.26 and as it is reported that some
vulnerabilities have been found. So, I just want to test our system if these
vulnerabilties are exploited in our side or not. But I do not know how to
test? Is there someone else who could help me in testing (how to generate)
any of the following cases below? If at least one of them can be tested and
resulted failure, that means Tomcat will be upgraded.

Any help will be appreciated.
Thanks.

1) An error in the Java Runtime Environment Virtual Machine can be exploited
by a malicious, untrusted applet to read and write local files and execute
local applications.

2) An error in the Java Management Extensions (JMX) management agent can be
exploited by a JMX client to perform certain unauthorized operations on a
system running JMX with local monitoring enabled.

3) Two errors within the scripting language support in the Java Runtime
Environment can be exploited by malicious, untrusted applets to access
information from another applet, read and write local files, and execute
local applications.

4) Boundary errors in Java Web Start can be exploited by an untrusted Java
Web Start applications to cause buffer overflows.

5) Three errors in Java Web Start can be exploited by an untrusted Java Web
Start applications to create or delete arbitrary files with the privileges
of the user running the untrusted Java Web Start application, or to
determine the location of the Java Web Start cache.

6) An error in the implementation of Secure Static Versioning allows applets
to run on an older release of JRE.

7) Errors in the Java Runtime Environment can be exploited by an untrusted
applet to bypass the same origin policy and establish socket connections to
certain services running on the local host.

8) An error in the Java Runtime Environment when processing certain XML data
can be exploited to allow unauthorized access to certain URL resources or
cause a DoS.
Successful exploitation requires the JAX-WS client or service in a trusted
application to process the malicious XML data.

9) An error in the Java Runtime Environment when processing certain XML data
can be exploited by an untrusted applet or application to gain unauthorized
access to certain URL resources.

10) A boundary error when processing fonts in the Java Runtime Environment
can be exploited to cause a buffer overflow.


RE: Tomcat 5.5.26 Vulnerability - Test

2008-10-23 Thread Peter Crowther
Which JDK are you using, and do those vulnerabilities apply to that *specific* 
JDK?

They are all Java vuls, not Tomcat vuls.

- Peter

 -Original Message-
 From: Gozde Aytan [mailto:[EMAIL PROTECTED]
 Sent: 23 October 2008 12:32
 To: users@tomcat.apache.org
 Subject: Tomcat 5.5.26 Vulnerability - Test

  Dear all,

 In our project, we are using Tomcat 5.5.26 and as it is
 reported that some
 vulnerabilities have been found. So, I just want to test our
 system if these
 vulnerabilties are exploited in our side or not. But I do not
 know how to
 test? Is there someone else who could help me in testing (how
 to generate)
 any of the following cases below? If at least one of them can
 be tested and
 resulted failure, that means Tomcat will be upgraded.

 Any help will be appreciated.
 Thanks.

 1) An error in the Java Runtime Environment Virtual Machine
 can be exploited
 by a malicious, untrusted applet to read and write local
 files and execute
 local applications.

 2) An error in the Java Management Extensions (JMX)
 management agent can be
 exploited by a JMX client to perform certain unauthorized
 operations on a
 system running JMX with local monitoring enabled.

 3) Two errors within the scripting language support in the
 Java Runtime
 Environment can be exploited by malicious, untrusted applets to access
 information from another applet, read and write local files,
 and execute
 local applications.

 4) Boundary errors in Java Web Start can be exploited by an
 untrusted Java
 Web Start applications to cause buffer overflows.

 5) Three errors in Java Web Start can be exploited by an
 untrusted Java Web
 Start applications to create or delete arbitrary files with
 the privileges
 of the user running the untrusted Java Web Start application, or to
 determine the location of the Java Web Start cache.

 6) An error in the implementation of Secure Static Versioning
 allows applets
 to run on an older release of JRE.

 7) Errors in the Java Runtime Environment can be exploited by
 an untrusted
 applet to bypass the same origin policy and establish socket
 connections to
 certain services running on the local host.

 8) An error in the Java Runtime Environment when processing
 certain XML data
 can be exploited to allow unauthorized access to certain URL
 resources or
 cause a DoS.
 Successful exploitation requires the JAX-WS client or service
 in a trusted
 application to process the malicious XML data.

 9) An error in the Java Runtime Environment when processing
 certain XML data
 can be exploited by an untrusted applet or application to
 gain unauthorized
 access to certain URL resources.

 10) A boundary error when processing fonts in the Java
 Runtime Environment
 can be exploited to cause a buffer overflow.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.26 Vulnerability - Test

2008-10-23 Thread Gozde Aytan
Dear Mr. Crowther,

Thank you for your quick response. We are using JDK 1.6.0_07. I do not have
any idea about those vulnerabilities. I just follow the link:
http://tomcat.apache.org/security-5.html and search for the vulnerabilities
that are fixed in Tomcat 5.5.27 one by one and found the items that I've
listed in my previous mail. Are those vulnerabilities fixed in 5.5.27 also
related to Java? I just wanted to know, if we need to upgrade the Tomcat or
not and for this decision I need to test these vulnerabilities somehow.

P.S.: I do not know much about these topics.Could you please consult me?

Thank you very much.
Gözde

On Thu, Oct 23, 2008 at 3:24 PM, Peter Crowther [EMAIL PROTECTED]
 wrote:

 Which JDK are you using, and do those vulnerabilities apply to that
 *specific* JDK?

 They are all Java vuls, not Tomcat vuls.

- Peter

  -Original Message-
  From: Gozde Aytan [mailto:[EMAIL PROTECTED]
  Sent: 23 October 2008 12:32
  To: users@tomcat.apache.org
  Subject: Tomcat 5.5.26 Vulnerability - Test
 
   Dear all,
 
  In our project, we are using Tomcat 5.5.26 and as it is
  reported that some
  vulnerabilities have been found. So, I just want to test our
  system if these
  vulnerabilties are exploited in our side or not. But I do not
  know how to
  test? Is there someone else who could help me in testing (how
  to generate)
  any of the following cases below? If at least one of them can
  be tested and
  resulted failure, that means Tomcat will be upgraded.
 
  Any help will be appreciated.
  Thanks.
 
  1) An error in the Java Runtime Environment Virtual Machine
  can be exploited
  by a malicious, untrusted applet to read and write local
  files and execute
  local applications.
 
  2) An error in the Java Management Extensions (JMX)
  management agent can be
  exploited by a JMX client to perform certain unauthorized
  operations on a
  system running JMX with local monitoring enabled.
 
  3) Two errors within the scripting language support in the
  Java Runtime
  Environment can be exploited by malicious, untrusted applets to access
  information from another applet, read and write local files,
  and execute
  local applications.
 
  4) Boundary errors in Java Web Start can be exploited by an
  untrusted Java
  Web Start applications to cause buffer overflows.
 
  5) Three errors in Java Web Start can be exploited by an
  untrusted Java Web
  Start applications to create or delete arbitrary files with
  the privileges
  of the user running the untrusted Java Web Start application, or to
  determine the location of the Java Web Start cache.
 
  6) An error in the implementation of Secure Static Versioning
  allows applets
  to run on an older release of JRE.
 
  7) Errors in the Java Runtime Environment can be exploited by
  an untrusted
  applet to bypass the same origin policy and establish socket
  connections to
  certain services running on the local host.
 
  8) An error in the Java Runtime Environment when processing
  certain XML data
  can be exploited to allow unauthorized access to certain URL
  resources or
  cause a DoS.
  Successful exploitation requires the JAX-WS client or service
  in a trusted
  application to process the malicious XML data.
 
  9) An error in the Java Runtime Environment when processing
  certain XML data
  can be exploited by an untrusted applet or application to
  gain unauthorized
  access to certain URL resources.
 
  10) A boundary error when processing fonts in the Java
  Runtime Environment
  can be exploited to cause a buffer overflow.
 

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




how to enable embedded tomcat logging - stderr.log stdout.log ?

2008-10-23 Thread Raminder Singh
Hi,

We are using embedded tomcat (5.0.28) in our project.
Now the requirement is to enable tomcat level logging  mainly into  stderr.log 
 stdout.log.

Current code updates:

// 1. tried settting logging at server level
embedded = new Embedded();
// print all log statments to standard error
embedded.setDebug(0);
embedded.setLogger(new SystemOutLogger());

//2. even tried doing this file logging but logs are not coming
FileLogger fileLog = new FileLogger();
fileLog.setDirectory(c:\\);
fileLog.setVerbosity(4);
fileLog.setPrefix(EmbeddedTomcat5028);
fileLog.setSuffix(.log);
fileLog.setTimestamp(true);
//fileLog.start();
   // embedded.setLogger(fileLog);

//2. tried settting logging at engine level
// Create an engine
engine = embedded.createEngine();
engine.setDefaultHost(localhost);
engine.setLogger(fileLog);

In all the cases, logging is not coming up in tomcat_dir/logs folder. Can 
someone share what are the right steps for this?


regards,
Raminder Singh



 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***


RE: Possible causes of connection timeouts?

2008-10-23 Thread gary . l . johnstone
It looks like this is an issue with the tomcat native connector. If I
remove it I have no connection issues at all.

Any ideas why the native connector could be causing issues?

I built the connector using

   TC native  - 1.1.14
   apr- 1.2.12
   OpenSSL  - 0.9.8h 28 May 2008
   Java - 1.6.0_07-b06

   ./configure --with-apr=/CTT/apr-1.2.12 --with-ssl=/usr/local/ssl
   --prefix=/CTT/tomcat6 --with-java-home=/usr/java

I see there is a new version of the TC native so I will experiment with
that and different versions of APR.

___

Gary Johnstone
PLM System Administrator
Cummins Turbo Technologies Ltd





   
 gary.l.johnstone@ 
 cummins.com   
To 
 22/10/2008 08:12  Tomcat Users List   
   users@tomcat.apache.org   
cc 
 Please respond to 
 Tomcat Users List Subject 
 [EMAIL PROTECTED] RE: Possible causes of connection   
 che.org  timeouts?   
   
   
   
   
   
   




Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443
   acceptCount=100
   address=160.95.14.76/


One thing I have found is that when I set

keepAliveTimeout=3

i.e different to the connectionTimeout

The delay then becomes 30 seconds and not 20s as it would default to with
just connectionTimeout set to 2.
I think this means I am seeing issues with new requests for pages/items on
a page rather than issues mid serving of a page.

___

Gary Johnstone
PLM System Administrator
Cummins Turbo Technologies Ltd







 Martin Gainty
 [EMAIL PROTECTED]
 com   To
   Tomcat Users List
 21/10/2008 19:40  users@tomcat.apache.org
cc

 Please respond to Subject
 Tomcat Users List RE: Possible causes of connection
 [EMAIL PROTECTED] timeouts?
 che.org










what are the values of your server.xml connection timeout parameters?
connectionTimeout
The number of milliseconds this Connector will wait, after accepting a
connection, for the request URI line to be presented. The default value is
6 (i.e. 60 seconds).
connectionTimeout=6
connectionLinger: The number of ms during which the sockets used by this
connector will linger when they are closed..-1 keeps the connection open
until socket read/write operation is complete
connectionLinger=-1
disableUploadTimeout
Allowed the servlet container to use a different longer connection timeout
while a servlet is being executed. Allows the servlet a longer amount of
time to complete execution or longer time during data upload
disableUploadTimeout=true
socketBuffer
size of the socket buffer to be used for socket output buffering. -1
disables default is 9000 bytes
socketBuffer=9000

Regards
Martin
__
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and
Sender does not endorse distribution to any party other than intended
recipient. Sender does not necessarily endorse content contained within
this transmission.


 Date: Tue, 21 Oct 2008 16:59:30 +0100
 From: [EMAIL PROTECTED]
 Subject: Possible causes of connection timeouts?
 To: users@tomcat.apache.org


 Hi,

 I am having intermitent but far too frequent issues with connection
 timeouts on a local tomcat server.

 The server is on the local network and 9 times out of 10 the pages are
 served up with no issues but now and then the connection is dropped and a
 delay of connectionTimeout occurs until the server/client resume
 communication. I do not want to drop the value of connectionTimeout too
low
 as this server will be 

Re: Tomcat 5.5.26 Vulnerability - Test

2008-10-23 Thread Konstantin Kolinko
2008/10/23 Gozde Aytan [EMAIL PROTECTED]:
 Dear Mr. Crowther,

 Thank you for your quick response. We are using JDK 1.6.0_07. I do not have
 any idea about those vulnerabilities. I just follow the link:
 http://tomcat.apache.org/security-5.html and search for the vulnerabilities
 that are fixed in Tomcat 5.5.27 one by one and found the items that I've
 listed in my previous mail. Are those vulnerabilities fixed in 5.5.27 also
 related to Java? I just wanted to know, if we need to upgrade the Tomcat or
 not and for this decision I need to test these vulnerabilities somehow.


The issues that you listed ( 1) .. 10) ) are not from
http://tomcat.apache.org/security-5.html

There are 4 issues that were fixed in 5.5.27, and all of them are listed on
that page, and two of them are important ones.

If more information is required, follow the links or search the mailing
list archive.

Also, the following issue is present in 5.5.26, but fixed in 5.5.27:
https://issues.apache.org/bugzilla/show_bug.cgi?id=44494

Best regards,
Konstantin Kolinko

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to serve two docBases under the same context path

2008-10-23 Thread nlif

Hi all,

I am using Tomcat 6, and I have the following problem:

I am trying to separate the static content from the dynamic content of my
application. In production, I intend to use Apache to serve the static
content, and Tomcat to process requests to the application (mainly JSP's).
This can be accomplished by writing a deployment script that will copy
everything to its repsective place.

My problem, however, is with the development environment:

The static-content (css,js,images,html) is in one SVN project, and the
dynamic (JSP,WEB-INF,classes) is in another. Thus, on my local workspace,
they are on separate paths (e.g. c:\workspace\static and
c:\workspace\webapp). Now, I need some way to have Tomcat serve them as a
single context.

I thought I'd create two context elements in my server.xml file, but they
will need to have the same PATH, like this:

Context docBase=workspace\static path=/myapp/ 
Context docBase=workspace\webapp path=/myapp/

Unfortunately, it is illegal to have two CONTEXT elements with the same PATH
value.

-- 
View this message in context: 
http://www.nabble.com/How-to-serve-two-docBases-under-the-same-context-path-tp20132698p20132698.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat 6.0 support

2008-10-23 Thread Filip Hanik - Dev Lists

one correction

you can buy commercial support, just google tomcat support and you'll 
find several companies offering commercial support with warranty and 
resolution guarantees


Filip

André Warnier wrote:

rajesh202023 wrote:

Hi All,

Can anyone please tell me whether Tomcat 6.0 is supported on the 
following

platforms or not?

a. Windows 2003, 2008 32 bit x86 b. Windows 2003, 2008 64 bit x64 c. 
Solaris 10 SPARC d. HP-UX 11.31 IPF

e. RHEL 5, SLES 10 x64



I am not the best qualified to answer your question, but I will make a 
stab at it, and someone else can contradict me if I am wrong.


Your question above really has several parts :

1) is Tomcat supported ?

Tomcat being a free and open source thing, it is not really 
supported in the sense that a commercial product may be supported.  
The support you get (like here) is free of charge, which does not mean 
that it is bad, but that you get what you get.




2) does Tomcat 6.x run on the above platforms ?

Nothing that Tomcat does should in principle access the platform 
itself directly, it all goes through the Java JVM.
Since Tomcat runs in the Java JVM, I would think that as long as a 
decent Java JVM is present on the platform in question, nothing should 
prevent Tomcat 6.x from running.

That's one of the benefits of Java.
For Tomcat 6.x, you will need at least a Java 1.5 JRE or JDK.

3) where your Tomcat come from
There are different packages for Tomcat 6.x.

There is the official Tomcat, which you obtain from the Tomcat 
website http://tomcat.apache.org;.  That one will install on all 
platforms, in the same essential way. Since this is the Tomcat package 
that the helpers on this list all know and love (and use 
themselves), it is the easiest for them to support, because they know 
where things are and how it is configured.
But, the way in which it installs and the way in which it must be 
administered and maintained does not necessarily match the constraints 
of the environment in which you work, or the wishes of your system 
administrators.


And then there are, for each platform, some pre-packaged versions of 
Tomcat, usually available in that platform's software depot or 
similar, and installable with the standard software utilities of that 
platform (e.g. SAM for HP, apt-get for Linux Debian, rpm for other 
Linuxes, etc..)
These are the easiest for the sysadmins to install and maintain and 
update, because they fit with the rest that exists on the machine, 
they can use their preferred tools, they can easily see what is 
installed, etc...
One inconvenient of these packages is that they are not necessarily 
available for the latest available version of Tomcat.  That is 
normally compensated by the fact that these packages have been tested, 
that their installation has been tested, that the installation will 
automatically resolve any issue of dependencies with other packages, 
etc.. (e.g. automatically install Java if it is not already present, 
or SSL if needed, etc..).
Another inconvenient of these packages is that they sometimes 
(usually) use other directories to install the software than what the 
official Tomcat does, they put links all over the place, they use 
different configuration files, etc..
So the problem is that if you use one of these non-official-Tomcat 
packages, it may be easy to install and your sysadmins may be happy, 
but the people on this list may have a harder time helping you in case 
of problems, because they do not know where things are or which 
configuration things are changed from the official version.


Hope this helps

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to serve two docBases under the same context path

2008-10-23 Thread Hassan Schroeder
On Thu, Oct 23, 2008 at 7:56 AM, nlif [EMAIL PROTECTED] wrote:

 I am trying to separate the static content from the dynamic content of my
 application. In production, I intend to use Apache to serve the static
 content, and Tomcat to process requests to the application (mainly JSP's).

 My problem, however, is with the development environment:

I'd say you should either forget about using Apache httpd altogether
or make your dev environment match production.

FWIW,
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Possible causes of connection timeouts?

2008-10-23 Thread Martin Gainty

Hi Gary-
i noticed you're using ./configure.sh?
the only suggestion I can offer would be to use maven for this effort
http://maven.apache.org

that way version specific anomalies/abnormalities would be addressed by the 
version attribute-specifier an example:

  dependencies
dependency
  groupIdfu/groupId
  artifactIdbar/artifactId
  version1.0/version
/dependency
...

//Here are the instructions I see from tcnative.spec which include includedir 
and define tcnver as 1 and not 1.1.10?
%define tcnver 1

##Summary: Tomcat Native Java library
##Name: tcnative
##Version: 1.1.10
##Release: 1

%prep
%setup -q

%build
%configure --with-apr=%{_prefix} \
--includedir=%{_includedir}/apr-%{tcnver}
make %{?_smp_mflags}  make dox

%check
# Run non-interactive tests
pushd test
make %{?_smp_mflags} testall CFLAGS=-fno-strict-aliasing
./testall -v || exit 1
popd

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# Documentation
mv docs/dox/html html

# Unpackaged files
rm -f $RPM_BUILD_ROOT%{_libdir}/tcnative.exp

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc CHANGES LICENSE NOTICE
%{_libdir}/libtcnative-%{tcnver}.so.*

%files devel
%defattr(-,root,root,-)
%{_libdir}/libtcnative-%{tcnver}.*a
%{_libdir}/libtcnative-%{tcnver}.so
%{_libdir}/pkgconfig/tcnative-%{tcnver}.pc
%{_includedir}/apr-%{tcnver}/*.h
%doc --parents html

maybe mladen or some of the committers can weigh in?
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Thu, 23 Oct 2008 15:08:13 +0100
 From: [EMAIL PROTECTED]
 Subject: RE: Possible causes of connection timeouts?
 To: users@tomcat.apache.org
 
 It looks like this is an issue with the tomcat native connector. If I
 remove it I have no connection issues at all.
 
 Any ideas why the native connector could be causing issues?
 
 I built the connector using
 
TC native  - 1.1.14
apr- 1.2.12
OpenSSL  - 0.9.8h 28 May 2008
Java - 1.6.0_07-b06
 
./configure --with-apr=/CTT/apr-1.2.12 --with-ssl=/usr/local/ssl
--prefix=/CTT/tomcat6 --with-java-home=/usr/java

 
 I see there is a new version of the TC native so I will experiment with
 that and different versions of APR.
 
 ___
 
 Gary Johnstone
 PLM System Administrator
 Cummins Turbo Technologies Ltd
 
 
 
 
 

  gary.l.johnstone@ 
  cummins.com   
 To 
  22/10/2008 08:12  Tomcat Users List   
users@tomcat.apache.org   
 cc 
  Please respond to 
  Tomcat Users List Subject 
  [EMAIL PROTECTED] RE: Possible causes of connection   
  che.org  timeouts?   






 
 
 
 
 Connector port=8080 protocol=HTTP/1.1
connectionTimeout=2
redirectPort=8443
acceptCount=100
address=160.95.14.76/
 
 
 One thing I have found is that when I set
 
 keepAliveTimeout=3
 
 i.e different to the connectionTimeout
 
 The delay then becomes 30 seconds and not 20s as it would default to with
 just connectionTimeout set to 2.
 I think this means I am seeing issues with new requests for pages/items on
 a page rather than issues mid serving of a page.
 
 ___
 
 Gary Johnstone
 PLM System Administrator
 Cummins Turbo Technologies Ltd
 
 
 
 
 
 
 
  Martin Gainty
  [EMAIL PROTECTED]
  com   To
Tomcat Users List
  21/10/2008 19:40  users@tomcat.apache.org
  

RE: How to serve two docBases under the same context path

2008-10-23 Thread Caldarale, Charles R
 From: nlif [mailto:[EMAIL PROTECTED]
 Subject: How to serve two docBases under the same context path

 In production, I intend to use Apache to serve the static
 content, and Tomcat to process requests to the application

Why are you wasting your time, energy, and resources to do that?  Tomcat is 
just as capable as httpd when it comes to handling static content.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Possible causes of connection timeouts?

2008-10-23 Thread gary . l . johnstone
Thanks Martin I will look into maven.

Switching to solaris has been a steep learning curve, one more thing wont
hurt :)

___

Gary Johnstone
PLM System Administrator
Cummins Turbo Technologies Ltd



Martin Gainty [EMAIL PROTECTED] wrote on 23/10/2008 16:19:43:


 Hi Gary-
 i noticed you're using ./configure.sh?
 the only suggestion I can offer would be to use maven for this effort
 http://maven.apache.org

 that way version specific anomalies/abnormalities would be addressed
 by the version attribute-specifier an example:

   dependencies
 dependency
   groupIdfu/groupId
   artifactIdbar/artifactId
   version1.0/version
 /dependency
 ...

 //Here are the instructions I see from tcnative.spec which include
 includedir and define tcnver as 1 and not 1.1.10?
 %define tcnver 1

 ##Summary: Tomcat Native Java library
 ##Name: tcnative
 ##Version: 1.1.10
 ##Release: 1

 %prep
 %setup -q

 %build
 %configure --with-apr=%{_prefix} \
 --includedir=%{_includedir}/apr-%{tcnver}
 make %{?_smp_mflags}  make dox

 %check
 # Run non-interactive tests
 pushd test
 make %{?_smp_mflags} testall CFLAGS=-fno-strict-aliasing
 ./testall -v || exit 1
 popd

 %install
 rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT

 # Documentation
 mv docs/dox/html html

 # Unpackaged files
 rm -f $RPM_BUILD_ROOT%{_libdir}/tcnative.exp

 %clean
 rm -rf $RPM_BUILD_ROOT

 %post -p /sbin/ldconfig

 %postun -p /sbin/ldconfig

 %files
 %defattr(-,root,root,-)
 %doc CHANGES LICENSE NOTICE
 %{_libdir}/libtcnative-%{tcnver}.so.*

 %files devel
 %defattr(-,root,root,-)
 %{_libdir}/libtcnative-%{tcnver}.*a
 %{_libdir}/libtcnative-%{tcnver}.so
 %{_libdir}/pkgconfig/tcnative-%{tcnver}.pc
 %{_includedir}/apr-%{tcnver}/*.h
 %doc --parents html

 maybe mladen or some of the committers can weigh in?
 Martin
 __
 Disclaimer and confidentiality note
 Everything in this e-mail and any attachments relates to the
 official business of Sender. This transmission is of a confidential
 nature and Sender does not endorse distribution to any party other
 than intended recipient. Sender does not necessarily endorse content
 contained within this transmission.


  Date: Thu, 23 Oct 2008 15:08:13 +0100
  From: [EMAIL PROTECTED]
  Subject: RE: Possible causes of connection timeouts?
  To: users@tomcat.apache.org
 
  It looks like this is an issue with the tomcat native connector. If I
  remove it I have no connection issues at all.
 
  Any ideas why the native connector could be causing issues?
 
  I built the connector using
 
 TC native  - 1.1.14
 apr- 1.2.12
 OpenSSL  - 0.9.8h 28 May 2008
 Java - 1.6.0_07-b06
 
 ./configure --with-apr=/CTT/apr-1.2.12 --with-ssl=/usr/local/ssl
 --prefix=/CTT/tomcat6 --with-java-home=/usr/java

 
  I see there is a new version of the TC native so I will experiment with
  that and different versions of APR.
 
  ___
 
  Gary Johnstone
  PLM System Administrator
  Cummins Turbo Technologies Ltd
 
 
 
 
 
 

   gary.l.johnstone@

   cummins.com

 
To
   22/10/2008 08:12  Tomcat Users List

 users@tomcat.apache.org

 
cc
   Please respond to

   Tomcat Users List
Subject
   [EMAIL PROTECTED] RE: Possible causes of
connection
   che.org  timeouts?

 

 

 

 

 

 

 
 
 
 
  Connector port=8080 protocol=HTTP/1.1
 connectionTimeout=2
 redirectPort=8443
 acceptCount=100
 address=160.95.14.76/
 
 
  One thing I have found is that when I set
 
  keepAliveTimeout=3
 
  i.e different to the connectionTimeout
 
  The delay then becomes 30 seconds and not 20s as it would default to
with
  just connectionTimeout set to 2.
  I think this means I am seeing issues with new requests for pages/items
on
  a page rather than issues mid serving of a page.
 
  ___
 
  Gary Johnstone
  PLM System Administrator
  Cummins Turbo Technologies Ltd
 
 
 
 
 
 
 
   Martin Gainty
   [EMAIL PROTECTED]
   com
To
 Tomcat Users List
   21/10/2008 19:40  users@tomcat.apache.org
 
cc
 
   Please respond to
Subject
   Tomcat Users List RE: Possible causes of
connection
   [EMAIL PROTECTED] timeouts?
   che.org
 
 
 
 
 
 
 
 
 
 
  what are the values of your server.xml connection timeout parameters?
  connectionTimeout
  The number of milliseconds this Connector will wait, after accepting a
  connection, for the request URI line to be presented. The default value
is
  6 (i.e. 60 seconds).
  connectionTimeout=6
  connectionLinger: The number of ms during which the sockets used 

RequestDispatcher and sendfile()/java.nio

2008-10-23 Thread Ronald Klop

Hi,

Does Tomcat 5.5 or maybe 6.0 use java.nio/sendfile() to send static content?
So is it more prefered to use RequestDispatcher.forward(myfile) than copy a 
FileInputStream to ServletOutputStream by hand?
I already have the copying part, but would like to know if it is worth the 
trouble to rewrite it to the dispatcher. I would have to shuffle quite some 
files, so the rewrite isn't like a couple of minutes work. ;-)

Ronald.


RE: How to serve two docBases under the same context path

2008-10-23 Thread nlif


Theoretically, maybe, but in real-life heavy-duty production environments, I
believe using Apache as a front to Tomcat has advantages, in areas as
security, load-balancing, caching and scalability.
Furthermore, the production architecture is not the issue here, as I've
explained in my original post. The problem stems from the decision to
separate the web-app and static-content to two projects in SVN, and this is
due to the fact that different people maintain them. 

Thanks anyway.


Caldarale, Charles R wrote:
 
 From: nlif [mailto:[EMAIL PROTECTED]
 Subject: How to serve two docBases under the same context path

 In production, I intend to use Apache to serve the static
 content, and Tomcat to process requests to the application
 
 Why are you wasting your time, energy, and resources to do that?  Tomcat
 is just as capable as httpd when it comes to handling static content.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-serve-two-docBases-under-the-same-context-path-tp20132698p20135565.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to serve two docBases under the same context path

2008-10-23 Thread nlif


Should my dev and prod environments be identical? Really? So you deploy your
source files? :-)
 This is one of many cases in which the development environment does not
match the production environment. And as I explained in my other post, not
using Apache will not change my problem. 




Hassan Schroeder-2 wrote:
 
 On Thu, Oct 23, 2008 at 7:56 AM, nlif [EMAIL PROTECTED] wrote:
 
 I am trying to separate the static content from the dynamic content of my
 application. In production, I intend to use Apache to serve the static
 content, and Tomcat to process requests to the application (mainly
 JSP's).
 
 My problem, however, is with the development environment:
 
 I'd say you should either forget about using Apache httpd altogether
 or make your dev environment match production.
 
 FWIW,
 -- 
 Hassan Schroeder  [EMAIL PROTECTED]
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-serve-two-docBases-under-the-same-context-path-tp20132698p20135720.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to serve two docBases under the same context path

2008-10-23 Thread Jeff
On Thu, Oct 23, 2008 at 9:56 AM, nlif [EMAIL PROTECTED] wrote:
 I am trying to separate the static content from the dynamic content of my
 application. In production, I intend to use Apache to serve the static
 content, and Tomcat to process requests to the application (mainly JSP's).
 This can be accomplished by writing a deployment script that will copy
 everything to its repsective place.

 My problem, however, is with the development environment:

What is your development environment? Eclipse?

In Eclipse, you could link the source of the static project into the
dynamic project. Eclipse might even automatically combine the content
in your war file. I have not tried this myself, so YMMV. You may need
to write a custom ant build file to create a combined war file. You
might have better luck posting on a list for your IDE. This is more of
an IDE problem than a tomcat issue.

-- 
Jeff

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to serve two docBases under the same context path

2008-10-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Nlif,

nlif wrote:
 The problem stems from the decision to
 separate the web-app and static-content to two projects in SVN, and this is
 due to the fact that different people maintain them. 

This shouldn't be a problem: set your Context to point to your actual
Tomcat-related stuff, and set your DocumentRoot (or Alias) to the static.

I don't know why you would ever need dual contexts unless you were
trying to mimic your production (split Apache httpd/TC) environment by
splitting your TC environment into two and trying to use two Tomcats
instead. If that's what you're trying to do, it won't work.

As I see it, you have several options:

1. Replicate your production environment in dev (always a good idea,
   as Hassan suggested) by using Apache httpd alongside TC.

2. In dev, copy everything into the same deployment directory and
   simply use a single context (i.e. merge these separate file sets
   for dev).

3. Merge your project repos back together and do either #1 or #2.

Was there a particular reason to split your project in half like that in
the first place?

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkAtkYACgkQ9CaO5/Lv0PA6BwCgsg/7NOxVszEVTU+Kd4nIaLuY
8/YAni31vTqexlajwanXtRcl5t2z4wwF
=mVsr
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Blocked threads

2008-10-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

Mark Thomas wrote:

 Sounds like you have a connection leak. There are various techniques for
 tracking these down. One I like is setting the connection pool size to 1 in
 your dev environment and then running your tests.

+1

I always use a fixed connection pool size of 1 for all development and
testing (except load testing, of course). This allows us to catch some
potential connection leaks as well as double-checkouts (which is more
often a problem for us than connection leaks). We also turn on
abandoned checking and logging even in production to detect abandoned
pooled connections. This results in a stack trace for the code that
checked-out the connection but never returned it to the pool (after a
timeout, though).

See the Tomcat JDBC docs for more info on these debugging settings.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkAuFcACgkQ9CaO5/Lv0PBPpgCbBjT/x6bOY0nx2lGKXABu3+dn
C1cAoJl4n/1zyP4UkWpUObPVaOrnOufx
=grBV
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat - Oracle 11G

2008-10-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Denny,

ciamik bener wrote:
 2. How do I connect to Oracle 11G ?
 Do I need to get the driver from oracle first?

Google is your friend:
http://www.google.com/search?q=oracle%20jdbc%20driver

It is courteous to do some basic research before you post to the mailing
list.

 [from the OP:] if yes, could you show me the url link that support it ?

The first Google result has links to documentation for the driver
(though not the latest?). This documentation will show you how to format
a JDBC URL for use with Oracle.

In order to configure a JDBC connection with Tomcat, please see the
Tomcat JDBC documentation:

http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkAujIACgkQ9CaO5/Lv0PDJ9QCdHSKFLTfjtI+ka8mf3XytKB+9
OHsAnjZPsF1ohONELaWktXsdIzKcFE2W
=5nsw
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Oracle 11g

2008-10-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Raj,

There is no need to double-post. Please give the list members a chance
to respond before you re-post. Also, consider sticking to a single email
address for use with the list.

- -chris

Raj Shivanna wrote:
 Hi,
 
 could you give more detail information about these :
 1. What is Tomcat version that can support Oracle 11G ?
 2. How do I connect to Oracle 11G ? Do I need to get the driver from oracle 
 first ? because I think there is no Oracle 11G driver specified in Tomcat.
 3. Based on your experience, do you have problems when you use Tomcat and 
 Oracle 11G ?
 
 Please advice ...
 
 Thx
 
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkAum4ACgkQ9CaO5/Lv0PC48wCcCmZHIQV7azDuFlOfF5YGeyTM
lgwAniNy36MP41ZD52TUCcCTT5LDO+RX
=JcOU
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to serve two docBases under the same context path

2008-10-23 Thread André Warnier

nlif wrote:
[...]

I will not, like some others (;-)), presume to guess why you want to do 
this.
But I will presume that you have a clear way to distinguish what are 
links to static content from what are links to dynamic content (e.g. 
static ends in .html,.jpg,.css etc.. while dynamic ends in .jsp etc).


With that premise, I can think of two ways :

1) as others said, set up an Apache on your development environment and 
do what you would do on your production one.

(JkMount and JkUnmount e.g.)

2) use a servlet filter in Tomcat like urlrewrite to catch either the 
links to dynamic content or the others, and rewrite these links to point 
to the other context.

See http://tuckey.org/urlrewrite/
and look at rules like
   rule
from/allcontext/([^.]+\.(jpg|html|css))$/from
to type=redirect/staticcontext/$1/to
   /rule

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to serve two docBases under the same context path

2008-10-23 Thread Hassan Schroeder
On Thu, Oct 23, 2008 at 10:23 AM, nlif [EMAIL PROTECTED] wrote:

 Should my dev and prod environments be identical? Really? So you deploy your
 source files? :-)
  This is one of many cases in which the development environment does not
 match the production environment.

Well, deploying source files isn't exactly the same as having your
development infrastructure reflect, at least reasonably closely, that of
production. Personally I wouldn't work very long at a place that took
such a haphazard approach.

YMMV, but I'm not the one wasting time trying to work around this
easily fixable discrepancy  :-)

-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



One instance listen on 127.0.0.1 and on single external ip

2008-10-23 Thread Fu-Tung Cheng
Hi,

I am trying to have my tomcat instance listen on a specific external ip address.

I do that with the Connector address=207.203.10.45

Now I also would like to have tomcat remain listening on 127.0.0.1.

Any idea how I get that to happen?

Thank you,

Fu-Tung


  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: One instance listen on 127.0.0.1 and on single external ip

2008-10-23 Thread Caldarale, Charles R
 From: Fu-Tung Cheng [mailto:[EMAIL PROTECTED]
 Subject: One instance listen on 127.0.0.1 and on single external ip

 I do that with the Connector address=207.203.10.45
 Now I also would like to have tomcat remain listening on 127.0.0.1.

Just configure another Connector identical to the first with the 127.0.0.1 IP 
address.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: One instance listen on 127.0.0.1 and on single external ip

2008-10-23 Thread Fu-Tung Cheng
That worked well.  Thank you very much!

Fu-Tung


--- On Thu, 10/23/08, Caldarale, Charles R [EMAIL PROTECTED] wrote:

 From: Caldarale, Charles R [EMAIL PROTECTED]
 Subject: RE: One instance listen on 127.0.0.1 and on single external ip
 To: Tomcat Users List users@tomcat.apache.org
 Date: Thursday, October 23, 2008, 6:52 PM
  From: Fu-Tung Cheng [mailto:[EMAIL PROTECTED]
  Subject: One instance listen on 127.0.0.1 and on
 single external ip
 
  I do that with the Connector
 address=207.203.10.45
  Now I also would like to have tomcat remain listening
 on 127.0.0.1.
 
 Just configure another Connector identical to the
 first with the 127.0.0.1 IP address.
 
  - Chuck


  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RequestDispatcher and sendfile()/java.nio

2008-10-23 Thread Filip Hanik - Dev Lists

Ronald Klop wrote:

Hi,

Does Tomcat 5.5 or maybe 6.0 use java.nio/sendfile() to send static 
content?
So is it more prefered to use RequestDispatcher.forward(myfile) than 
copy a FileInputStream to ServletOutputStream by hand?
I already have the copying part, but would like to know if it is worth 
the trouble to rewrite it to the dispatcher. I would have to shuffle 
quite some files, so the rewrite isn't like a couple of minutes work. ;-)


Ronald.

6.0 uses sendfile, you can manually trigger send file too by just 
setting attributes


check out DefaultServlet.java
search for sendfile and setAttribute on the same line

http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?view=markup



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 6 and subdirectories

2008-10-23 Thread Angelov, Rossen
Thanks Chuck,

It is in server.xml and may that's the problem. In previous version I
had in subdirectories under conf/Catalina.

I will try in META-INF/context.xml, although how do you specify multiple
contexts in this case?

Ross

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 20, 2008 2:18 PM
To: Tomcat Users List
Subject: RE: tomcat 6 and subdirectories

 From: Angelov, Rossen [mailto:[EMAIL PROTECTED]
 Subject: RE: tomcat 6 and subdirectories

 I have the feeling it's not the pattern, but
 something else that's causing this problem.

Are you still specifying an empty docBase?  That's illegal.

Where is your Context element located?  It should not be in server.xml
(strongly discouraged, but not yet illegal), but rather in the webapp's
META-INF/context.xml file.  Note that the path attribute is not allowed
when the Context is in the proper location.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This communication is intended solely for the addressee and is confidential 
and not for third party unauthorized distribution

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 6 and subdirectories

2008-10-23 Thread Caldarale, Charles R
 From: Angelov, Rossen [mailto:[EMAIL PROTECTED]
 Subject: RE: tomcat 6 and subdirectories

 I will try in META-INF/context.xml, although how do you
 specify multiple contexts in this case?

There's a separate META-INF directory in each webapp, so each gets its own 
context.xml file.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cookie.setSecure -- cookie not persisted in IE 6/7

2008-10-23 Thread David Wall

We set a secure cookie over HTTPS using:

javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie(name, 
value);

cookie.setVersion(1);
cookie.setMaxAge(60*60*24*90); // 90 days in seconds
cookie.setSecure(request.isSecure());
response.addCookie(cookie);

This works in Firefox and Chrome.  But in IE 6 and 7 (and I think 
Safari) it appears to work okay as long as the browser is not closed, 
when it appears to be forgotten.  Do those browsers not persist secure 
cookies, or is there something else we're doing wrong?


In Firefox, the cookie info appears correct and reports values like we 
expect:

Name: e
Value: [EMAIL PROTECTED]
Host: myhostname.com
Path: /MyWebapp/
Expires: Wed, 21 Jan 2009 21:55:13 GMT
Session cookie: No
Secure cookie: Yes

Any ideas why IE is not persisting?  Is this a security function not to 
write a secure cookie to disk?


Thanks,
David



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cookie.setSecure -- cookie not persisted in IE 6/7

2008-10-23 Thread David Wall



cookie.setVersion(1);


I think I found my own answer in that it appears that Firefox can accept 
a version 1 (RFC 2109) cookie, which we were using because the email 
address contains an '@' that's not allowed as a value in version 0 
cookies.  When we converted to version 0 and encoded the @, it worked on IE.


David


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



read context.xml Resource attributes

2008-10-23 Thread Harry Levinson
What is the proper way to read attributes of a Resource in context.xml, for
example the url attribute?

I am building a test web page that shows whether or not we are successfully
connected to the database. Only techies inide the company will be able to
view that web page, so security is not an issue. (I will not display
username/password anyway.)

I want to retrieve and display the url attribute for a specified Resource in
context.xml.

I know I can use XML functions to read the file, but is there a way to read
it using envContext() or something like that, after I create a Connection or
Context object?

Here are two different scenarios that begin the section of code I'm looking
for:

Connection conn = connections.get(dataSource);
...

Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup(java:/comp/env);
DataSource ds = (DataSource)envContext.lookup(jdbc/MYDB);
...

I googled but can't find a solution.

thanks,
Harry


Re: tomcat 6.0 support

2008-10-23 Thread rajesh202023

Thanks for the inputs that you have provided. Appreciated. I am sorry for the
confusing question. I really wanted to know whether tomcat runs on the below
mentioned platforms, and you have answered my query. :-)

-- Rajesh


awarnier wrote:
 
 rajesh202023 wrote:
 Hi All,
 
 Can anyone please tell me whether Tomcat 6.0 is supported on the
 following
 platforms or not?
 
 a. Windows 2003, 2008 32 bit x86 
 b. Windows 2003, 2008 64 bit x64 
 c. Solaris 10 SPARC 
 d. HP-UX 11.31 IPF
 e. RHEL 5, SLES 10 x64
 
 
 I am not the best qualified to answer your question, but I will make a 
 stab at it, and someone else can contradict me if I am wrong.
 
 Your question above really has several parts :
 
 1) is Tomcat supported ?
 
 Tomcat being a free and open source thing, it is not really supported 
 in the sense that a commercial product may be supported.  The support 
 you get (like here) is free of charge, which does not mean that it is 
 bad, but that you get what you get.
 
 2) does Tomcat 6.x run on the above platforms ?
 
 Nothing that Tomcat does should in principle access the platform itself 
 directly, it all goes through the Java JVM.
 Since Tomcat runs in the Java JVM, I would think that as long as a 
 decent Java JVM is present on the platform in question, nothing should 
 prevent Tomcat 6.x from running.
 That's one of the benefits of Java.
 For Tomcat 6.x, you will need at least a Java 1.5 JRE or JDK.
 
 3) where your Tomcat come from
 There are different packages for Tomcat 6.x.
 
 There is the official Tomcat, which you obtain from the Tomcat website 
 http://tomcat.apache.org;.  That one will install on all platforms, in 
 the same essential way. Since this is the Tomcat package that the 
 helpers on this list all know and love (and use themselves), it is the 
 easiest for them to support, because they know where things are and 
 how it is configured.
 But, the way in which it installs and the way in which it must be 
 administered and maintained does not necessarily match the constraints 
 of the environment in which you work, or the wishes of your system 
 administrators.
 
 And then there are, for each platform, some pre-packaged versions of 
 Tomcat, usually available in that platform's software depot or 
 similar, and installable with the standard software utilities of that 
 platform (e.g. SAM for HP, apt-get for Linux Debian, rpm for other 
 Linuxes, etc..)
 These are the easiest for the sysadmins to install and maintain and 
 update, because they fit with the rest that exists on the machine, they 
 can use their preferred tools, they can easily see what is installed,
 etc...
 One inconvenient of these packages is that they are not necessarily 
 available for the latest available version of Tomcat.  That is normally 
 compensated by the fact that these packages have been tested, that their 
 installation has been tested, that the installation will automatically 
 resolve any issue of dependencies with other packages, etc.. (e.g. 
 automatically install Java if it is not already present, or SSL if 
 needed, etc..).
 Another inconvenient of these packages is that they sometimes (usually) 
 use other directories to install the software than what the official 
 Tomcat does, they put links all over the place, they use different 
 configuration files, etc..
 So the problem is that if you use one of these non-official-Tomcat 
 packages, it may be easy to install and your sysadmins may be happy, but 
 the people on this list may have a harder time helping you in case of 
 problems, because they do not know where things are or which 
 configuration things are changed from the official version.
 
 Hope this helps
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/tomcat-6.0-support-tp20125222p20143988.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]