Re: Catalina.out

2013-03-04 Thread Markus Schönhaber
04.03.2013 12:33, vicky007aggar...@yahoo.co.in:
 I am using tomcat 7.0.30(os: redhat linux)  referring below link for 
 implementing log4j at the container level 
 
  http://tomcat.apache.org/tomcat-6.0-doc/logging.html#Using_Log4j
 
 Using this link i am still not able to rotate the
 Catalina.out , is it feasible to do that,if yes then
 can someone please share 
 the steps/guide me on this

http://wiki.apache.org/tomcat/FAQ/Logging#Q10

-- 
Regards
  mks


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] list server issues ?

2013-03-04 Thread Markus Schönhaber
04.03.2013 14:31, André Warnier:

 I don't know if it is the case for everyone, but I seem to be receiving 
 messages from the 
 list in some random order, totally out of timely sequence.
 Anyone notice the same, or is it just me ?

I didn't notice anything like that.

You could take a look at the Received-header fields of a mail you
consider out of timely sequence. You might get an idea where the delay
(if any) has happened.

-- 
Regards
  mks



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Directory contents listing of Aliases Directory

2011-11-23 Thread Markus Schönhaber
23.11.2011 12:53, Asha K S:

 Currently when I set Aliases attribute for Context ,Tomcat serves resources 
 from Aliases directory but I am unable to get the directory listing for the 
 Aliases Directory.Can you please let me know if anyone has tried this or if 
 there is any other way to do it.
 
 I have set my aliases=/mytest=C:\mytest and if I access 
 http://localhost:8080/mytest/test.jsp but if i just give 
 http://localhost:8080/mytest i am unable to get the directory listing for 
 mytest directory.

http://tomcat.apache.org/tomcat-7.0-doc/default-servlet.html

-- 
Regards
  mks


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Overriding web.xml parameters

2011-09-27 Thread Markus Schönhaber
27.09.2011 11:00, Romaric:

 context.xml :
 
 Context
 Parameter name=name value=value override=false /
---^
 /Context
 
 The problem is that the values in web.xml override those in context.xml 
 when it should be the other way around.
 
 Do you have any idea what the problem might be ?

The above is not valid XML. The attribute name isn't properly quoted.

-- 
Regards
  mks



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: URL for Tomcat forums

2011-09-08 Thread Markus Schönhaber
08.09.2011 10:28, Sonwabo Jordan:

 What is the URL for the Tomcat forums so that I can go and have a look at 
 questions already asked before I submit my own?

http://tomcat.apache.org/lists.html
provides links to archives of the various Tomcat mailing lists. Although
only the MARC archives are tagged searchable on the above page, those
from MarkMail, Nabble and Mail Archive can be searched too.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Custom URL configuration in Tomcat

2011-07-28 Thread Markus Schönhaber
28.07.2011 05:57, Dhana kumar:

 instead of http://localhost:8080/meobizWeb/index.html, could we make url
 accessible across the intranet, something like this,.
 http://www.mydomain.com/meobizWeb/index.html

Yes. Configure Tomcat to listen on port 80 and configure your internal
DNS to resolve the desired host name to your Tomcat server's IP.

BTW: don't use domain names you don't own for examples. That's what
example.com etc. are for.

-- 
Regards
  mks


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7: Why is JDK needed ?

2011-07-23 Thread Markus Schönhaber
21.07.2011 21:58, Bobi St:

 why is Why is JDK needed also for Tomcat 7 ? Does it use a compiler, or why 
 not simply using for example jre6 ?!?
 I have to install always extra JDK because of it ...

Who says Tomcat needs a JDK?
From
http://apache.mirror.digionline.de/tomcat/tomcat-7/v7.0.19/RELEASE-NOTES
| In addition, Tomcat 7.0 uses the Eclipse JDT Java compiler for
| compiling JSP pages.  This means you no longer need to have the
| complete Java Development Kit (JDK) to run Tomcat, but a Java Runtime
| Environment (JRE) is sufficient.  The Eclipse JDT Java compiler is
| bundled with the binary Tomcat distributions.  Tomcat can also be
| configured to use the compiler from the JDK to compile JSPs, or any
| other Java compiler supported by Apache Ant.

Ancient versions of Tomcat did, by default, use the JDK's compiler to
compile JSPs. Therefore, if you wanted Tomcat to compile JSPs on the
fly, a JRE, by default, wasn't enough.
But that was long, long ago and has never been the case for Tomcat 7.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

2011-07-20 Thread Markus Schönhaber
20.07.2011 23:02, Falzone.Matthew:

 Didn't mean to, I sent it too soon so I started a new thread.  Was there an 
 issue with starting a new one?

Yes. The issue was: you didn't start a new thread.
If you push the reply button of your mail client when viewing some
message, it will create a reply to this message. Changing the subject
line doesn't change the fact that it's still a reply.

To start a new thread/topic, create a *new* message to
users@tomcat.apache.org.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Document of Tomcat 6.0.32.

2011-06-09 Thread Markus Schönhaber
09.06.2011 10:13, Nash:

 I want to know how I can get the API Document of Tomcat 6.0.32 so I can refer 
 it regardless of Internet connection.
 Thank you a lot!

Download the fulldocs package, which, as it seems, is not linked to from
the download page of 6.0.
The name of the package is apache-tomcat-6.0.32-fulldocs.tar.gz. You can
get it from the download mirrors, for example
http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.apache.org/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32-fulldocs.tar.gz

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



[OT] facepalm (was: Re: Trouble configuring the manager :()

2011-01-06 Thread Markus Schönhaber
06.01.2011 22:12, Christopher Schultz:

 Is there an emoticon for smacking yourself in the forehead?

There doesn't seem to be a standard one, though googling for facepalm
smiley or facepalm emoticon lists quite a few.
Nevertheless, I *really* like that non-emoticon one
http://www.thefacepalm.org/2010/10/baby/

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Can't access tomcat manager

2010-12-02 Thread Markus Schönhaber
02.12.2010 15:43, Lava Saleem:

 Thanks for the replies yeah I have checked the tomcat user xml file and
 there are no missing  comments  brackets  or anything so is there any other
 reason for this to happen ? do  I need to modify anything else ?

What *missing* comment brackets? What André tried to explain, is that
you have to make sure to not add your role and user definitions *inside*
the comment that, by default, spans everything between tomcat-users
and /tomcat-users.

Did you correct your typo?

Maybe you should repost the contents of your tomcat-users.xml - this
time *entirely*.

-- 
Regards
  mks


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: automatic deployment without server.xml - bad request

2010-12-02 Thread Markus Schönhaber
02.12.2010 20:44, Pid:

 On 12/2/10 12:34 PM, Justin Case wrote:
 From: Pid p...@pidster.com
 If the request isn't being routed to your application,  then without a
 ROOT application the host hasn't got a mechanism to serve any  response
 other than an error.

 Error is fine, as long it's a 404 (and not this enigmatic 400)...
 
 400 isn't enigmatic and /is/ an error.  ;)

Yes, it is an error. But in this case, I, too, consider the error erroneous.
A status code of 400 basically means that the request was syntactically
b0rked. But, as I understand it, that's not the problem here: the
request is syntactically fine - it fails because the server is
misconfigured. Therefore a status code of 500 seems more appropriate to me.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Can't access tomcat manager

2010-12-01 Thread Markus Schönhaber
01.12.2010 23:05, Lava Saleem:

 I have installed apache tomcat 7.0.4  on a centos linux box,  I have
 modified the tomcat-users.xml file as shown below and restarted it, my
 tomcat  still can't get an access to the manager,  I deleted the other users
 and just put mine in the xml file but this didn't really helped. I'm new to
 this system can anybody send me a feedback?
 Thank you inadvance
 
 tomcat-users
 role rolename=tomcat/
 role rolename=role1/
 role rolenmae=manager-gui/
-^^

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Configure read/write-access in TomCat

2010-08-18 Thread Markus Schönhaber
18.08.2010 16:55, André Warnier:

 Pid wrote:
 On 18/08/2010 14:56, Caldarale, Charles R wrote:
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: Configure read/write-access in TomCat

 The conf/web.xml is the web.xml for the default servlet.
 It's a bit more than that, actually.  The contents of conf/web.xml are 
 logically merged into a webapp's own WEB-INF/web.xml when the webapp is 
 deployed.  Changing conf/web.xml effectively changes every deployed webapp, 
 which is rarely desirable.

 N.B.  It's well commented and worth reading.

 
 Would you gurus mind pointing out where exactly ?
 
 I am looking at the online documentation of Tomcat 7, at 
 http://tomcat.apache.org/tomcat-7.0-doc/index.html,
 and not finding it.

From
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Introduction

| Context elements may be explicitly defined:
|
| * In the $CATALINA_BASE/conf/context.xml file: the Context element
information will be loaded by all webapps.
| [...]

 I am also having trouble finding it in the Servlet Specifications v 3.0

AFAIK that's Tomcat-specific and has nothing to do with the spec.

 (I mean specifically where it says that the default web.xml is being merged 
 with the 
 application-specific web.xml.)
 
 If you refer to the content itself of the conf/web.xml file, here is all it 
 has to say :
 
 !--  Introduction == --
!-- This document defines default values for *all* web applications  
 --
!-- loaded into this instance of Tomcat.  As each application is 
 --
!-- deployed, this file is processed, followed by the
 --
!-- /WEB-INF/web.xml deployment descriptor from your own   
 --
!-- applications.
 --
!--  
 --
 
 For example, it does not clearly speak of merging,

Well, Chuck simply used the term merge to explain how things are.
Of course, since it's Chuck, it could be seen as a specification ;-)

 nor in case of merge which possibly 
 overlapping or conflicting directive has precedence (one wopuld presume the 
 webapp, but 
 then presumptions are sometimes misleading).

I didn't find that explicitly stated in the docs either.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Running PHP?

2010-08-03 Thread Markus Schönhaber
03.08.2010 13:20, michel:

 sorry, another empty email with just attachments  ... 

No.
It's not Pid's fault if your mail program doesn't understand PGP/MIME.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



[OT] broken mail clients (was: Re: Running PHP?)

2010-08-03 Thread Markus Schönhaber
03.08.2010 18:14, michel:

 From: Markus Schönhaber tomcat-us...@list-post.mks-mail.de

 03.08.2010 13:20, michel:

 sorry, another empty email with just attachments  ...

 No.
 It's not Pid's fault if your mail program doesn't understand PGP/MIME.
 
 OK, I checked online and found
 
 Handling of PGP/MIME signed messages
 Outlook Express does not correctly handle MIME,[9] and will not display the 
 body of signed messages inline. Users get a blank e-mail and two attachments 
 (one of the message text and one of the signature) and therefore need to 
 open an attachment to see the e-mail. ... This bug has still not been 
 rectified.
 
 http://en.wikipedia.org/wiki/Outlook_Express#Handling_of_PGP.2FMIME_signed_messages
 
 On one hand it's an MS bug, but then so many people (most?) use it, it 
 rather leaves a large number of us not being able to read Pid's posting.

1. I don't see why anyone should not use a perfectly reasonable and
standards compliant way of signing his mails just to please buggy mail
clients.
If you choose to use one of those, then live with it's deficiencies but
don't blame Pid because he uses a 14-year old standard which the vendor
of your mail client has still failed to implement.

2. A quick scan through the 37596 posts to this list in my current
archive (going back till mid-March 2008) shows 957 of them which seem to
be sent with OE. That's roughly 2.5%. At least on this mailing list,
it's not most (not even many people) that use OE.
I doubt that it's much different on other lists with IT subjects.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Error: Invalid or unreadable WAR file : error in opening zip file

2010-07-09 Thread Markus Schönhaber
09.07.2010 15:38, Caldarale, Charles R:

 From: Fernando Morgenstern [mailto:ferna...@consultorpc.com]
 Subject: Error: Invalid or unreadable WAR file : error in opening zip
 file

 I'm running the following version of tomcat:

 Server version: Apache Tomcat/6.0-snapshot
 Server built:   Nov 15 2009 11:02:53
 Server number:  6.0.0.0
 
 That is not a good version number for Tomcat, being many, many years old.

Not necessarily that old - the Server built seems to indicate that
it's roughly 9 month.
To me, this looks like a Tomcat built from source. IIRC the
build.properties.default does set the various version.foo properties
like that (version.suffix is -dev not -snapshot nowadays, though).

 That makes the rest of the report extremely suspect.

Seconded. At least it should be tested if a recent official Tomcat
binary shows the same behaviour.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Question on IE zones with Mod_jk

2010-06-08 Thread Markus Schönhaber
08.06.2010 09:16, Robin Diederen:

 The problem:
 - I surf to http://portal
 - IE recognizes the site as trusted / in the intranet zone
 - I click the sign in link and get redirected to 
 http://portal/c/portal/login; IE now thinks I'm in the _internet_zone_ (thus 
 NTLM auth doesn't work)
 - From the Apache logs, I find that a 401 error occurred
 
 My guess would be that IE detects the redirect and concludes the wrong zone.
 
 
 Is there any way to configure this from the server side?

Can't help you with that.
But just as a thought: being able to manipulate IE's trust settings from
the server side would be a feature a certain group of people would be
*very* interested in, I think.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat scalability settings

2010-04-08 Thread Markus Schönhaber
08.04.2010 09:42, cinl...@gmail.com:

 I am newbie here. I don't understand what you meant by hi-jacking this 
 thread. I simply asking tomcat user mailing lis of any solution to my issue. 
 Did I do something wrong? If so, please let me know what I did wrong.

When you want to talk about a new topic, create a new thread, i. e.
create a *new* mail and address it at us...@tomcat.apache.org.

What you did instead is create a reply to Florian's message which is
about an entirely different topic. That you changed the subject line in
your reply doesn't change the fact that you mail client did what you
told it to: create a reply. That is called thread hi-jacking.

It's pure accident that I read your post, since I tend to ignore
hi-jacked threads. And I may not be the only one doing so. Therefore,
it's in your own very interest to not hide your messages in an
completely unrelated discussion thread.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: No gain after pre-compilation

2010-03-09 Thread Markus Schönhaber
09.03.2010 10:25, Alexander Skwar:

I didn't look at your build script, just a general remark below.

 Or is it just, that this shows, that our web app doesn't have a bottleneck
 in the JSP land (which would be a true statement - it communicates
 with some background databases and apps, which might not be the
 fastest...)?
 
 One thing which confuses me a bit though, is that when I call the web
 app for the first time (after deployment or after having re-started Tomcat),
 the web app is slow. Ie. I go to http://server:8080/webapp and wait for
 like 10 seconds until the login screen of the web app is shown. This
 wait only happens for the very first time after deployment. When I do
 this again a few minutes/hours later, http://server:8080/webapp is shown
 right away.
 
 Shouldn't pre-compilation also make this first time wait go away?

Not also - the *only* gain that can be expected by pre-compilation of
JSPs is the elimination of the first time wait, since Tomcat doesn't
need to do the compilation on-the-fly when the JSP is accessed for the
first time. For all following accesses of the JSP it shouldn't matter
whether or not it was pre-compiled.
But: a noticeable difference can only be expected if it really is the
compilation that slows things down on first access. If, OTOH, the vast
amount of time is taken by, say, creation of DB connections,
pre-compiling the JSPs won't make much of a difference.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: No gain after pre-compilation

2010-03-09 Thread Markus Schönhaber
09.03.2010 12:43, Alexander Skwar:

 Do you happen to have any idea, why I did not notice any impovements  
 in the 1st time load delay? Ie. why do I still have to wait 10s after  
 having deployed, before the login screen is shown for the first time?
 
 At this point in time, the web app does not require the background  
 daemons at all. The login page is even shown, when those daemons are  
 down.

No idea.
What you could check (besides taking a look at your application to see
if it really is doing nothing that consumes time) is whether the
pre-compilation did work. In the deployed web-app you should notice a
change in web.xml, since the deployer creates additional servlet and
servlet-mapping entries. I. e. if your web-app contains a hello.jsp you
should see something like

[...]
servlet
servlet-nameorg.apache.jsp.hello_jsp/servlet-name
servlet-classorg.apache.jsp.hello_jsp/servlet-class
/servlet
[...]
servlet-mapping
servlet-nameorg.apache.jsp.hello_jsp/servlet-name
url-pattern/hello.jsp/url-pattern
/servlet-mapping
[..]

in the web.xml generated by the deployer.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: No gain after pre-compilation

2010-03-09 Thread Markus Schönhaber
09.03.2010 13:25, Markus Schönhaber:

 What you could check [...]

Forgot to mention: it might be useful to increase the log-level of
Jasper's Compiler class, i. e. add
org.apache.jasper.compiler.Compiler.level=FINE
to conf/logging.properties
You should then see in Tomcat's logs whether compilation of the accessed
JSP really takes place, if so, how long it took etc.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Startin tomcat5 instead of jsvc with java

2010-03-04 Thread Markus Schönhaber
04.03.2010 13:50, Petr Hracek:

 from the documention I have read that tomcat5.5 (
 http://tomcat.apache.org/tomcat-5.5-doc/setup.html)
 can be started with the help of command jsvc.
 
 Is there any other possibility how to start up tomcat with java?
 I wouldn't start tomcat 5.5 over rcScript stored in /etc/init.d/

Take a look at the scripts in $CATALINA_HOME/bin.
startup.sh and shutdown.sh do what their name suggests. If you'd like to
see Tomcat's status messages in the console instead of the log file
(useful, if something goes wrong), use
catalina.sh run.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: can not start tomcat and the jre_home var error

2010-03-04 Thread Markus Schönhaber
04.03.2010 14:00, maven apache:

 I am using Ubuntu9.10. I have install jdk1.6 in /home/kk/ProgramFiles/jdk1.6
 , also I have set up a permanent environment variable JAVA_HOME which link
 to the jdk directory.
 I just downloaded apache-tomcat-6.0.24.tar.gz and extact it to
 /home/kk/ProgramFiles/apache-tomcat-6.0.24, since the JAVA_HOME env var
 existed, so I run the startup.sh directly,however I can not enter the 
 http://localhost:8080; and I got the following message:
 
 Using CATALINA_BASE:   /home/kk/ProgramFiles/apache-tomcat-6.0.24
 Using CATALINA_HOME:   /home/kk/ProgramFiles/apache-tomcat-6.0.24
 Using CATALINA_TMPDIR: /home/kk/ProgramFiles/apache-tomcat-6.0.24/temp
 Using JRE_HOME:/usr
 Using CLASSPATH:
 /home/kk/ProgramFiles/apache-tomcat-6.0.24/bin/bootstrap.jar
 
 It seems that tomcat did not identify the JAVA_HOME var, so how to do next
 in my case?

Unset JRE_HOME before starting Tomcat, make sure JAVA_HOME really is
exported.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: can not start tomcat and the jre_home var error

2010-03-04 Thread Markus Schönhaber
04.03.2010 14:44, maven apache:

 The tomcat directory is  /home/kk/ProgramFiles/apache-tomcat-6.0.24'
 In the terminal , I enter this the bin directory and run  sudo
 ./startup.sh

Why do you start Tomcat as root?

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: can not start tomcat and the jre_home var error

2010-03-04 Thread Markus Schönhaber
04.03.2010 14:56, maven apache:

 2010/3/4 Markus Schönhaber tomcat-us...@list-post.mks-mail.de

 Why do you start Tomcat as root?

 Ok, I tried it again.

?

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: can not start tomcat and the jre_home var error

2010-03-04 Thread Markus Schönhaber
04.03.2010 15:01, maven apache:

 2010/3/4 Caldarale, Charles R chuck.caldar...@unisys.com
 
 From: maven apache [mailto:apachemav...@gmail.com]
 Subject: Re: can not start tomcat and the jre_home var error

 In the terminal , I enter this the bin directory and run  sudo
 ./startup.sh

 Try it without the sudo.  You should never run Tomcat as root.

 Thanks, it works. But I wonder why?

Because, by default, sudo resets the environment.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: can not start tomcat and the jre_home var error

2010-03-04 Thread Markus Schönhaber
04.03.2010 15:13, maven apache:

 Now I found there is something wrong with the apr component  because I got
 the info:
 
 INFO: The APR based Apache Tomcat Native library which allows optimal
 performance in production environments was not found on the
 java.library.path:
 /home/kk/ProgramFiles/jdk1.6.0_17/jre/lib/i386/client:/home/kk/ProgramFiles/jdk1.6.0_17/jre/lib/i386:/home/kk/ProgramFiles/jdk1.6.0_17/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib

This is just an INFOrmational message that tells you that the native
component is not installed.

  And the whole logs can be found here:http://dpaste.com/167789/
 Does it matter?

If it starts with SEVERE, it does matter.
WAG: By starting Tomcat using sudo, a work directory was created that
isn't writeable by an unprivileged user. Remove work and try again.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cyclos Webapp Trouble (404)

2010-01-18 Thread Markus Schönhaber
18.01.2010 15:57, Rick Bragg:

 On Mon, 2010-01-18 at 09:43 -0500, David Smith wrote:

 MySQL leave the tcp port disabled for security reasons.  I've never
 understood the decision, but it happens.  You can test w/ the mysql command:

 mysql -P 3306 -h localhost -u cyclos -p

 Yes the above works perfect.  I can log into MySQL in exactly that way.
 I also double checked the password.

And it still works, if you replace localhost with 127.0.0.1 (since
that's what you configured)? I. e.
mysql -P 3306 -h 127.0.0.1 -u cyclos -p

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: TomCat multiple ssl support

2009-12-29 Thread Markus Schönhaber
29.12.2009 15:28, Mark Thomas:

 However, there is a spec for this: RFC 4366, SNI (Server Name
 Indication). It should be implementable for at least the APR/native
 connector. Not sure of the extent, if any, of support in the browsers.

If a recent article in the German c't magazine is right (an I remember
it correctly) browser support for SNI is better than I thought it was.
According to this article, most modern browsers already support SNI -
the major exception being IE on Windows XP. As I understand it, IE uses
the OS'es cryptographic libs and those of XP don't support SNI.
BTW: SNI support was added to Apache httpd with version 2.2.12.

Nevertheless, as long as IE on XP still has a significant market share,
I think the *general* usefulness of SNI for public websites is still
somewhat limited.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Config Question

2009-12-09 Thread Markus Schönhaber
09.12.2009 15:31, steflik:

 I'm teaching a Web Programming course and am using Tomcat 6 for the
 servlet/jsp portion of the course. I have created a context for each student
 in the server.xml file and it seems to work pretty good but if a student
 modifies the web.xml file in their application I have to restart the sever
 before it takes effect. Is there a way to configure Tomcat so that changes
 in a users web.xml file will be automatically sensed by the server and take
 effect immediately?

Adding Contexts to server.xml is strongly discouraged nowadays. Among
the reasons for this discouragement is exactly the problem you're facing
now.
See
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: SSL only working on localhost

2009-12-02 Thread Markus Schönhaber
In addition to Pid's comment, which you should take heed of:

02.12.2009 13:41, Michael Dockery:

 i have wiresharked the server, and can see the inbound 443 connections,
  so the firewall does not seem to be the issue.
(note: the other computers are on the same subnet/lan)

What exactly do you mean by can see the inbound 443 connections?
My guess would be that wireshark only shows incoming TCP packets
directed to port 443 of your server. If my guess is correct, this proves
nothing wrt to the packet filter's settings. It might well throw those
packets away.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 5.17 crashes too often

2009-11-27 Thread Markus Schönhaber
Am 27.11.2009 15:00, schrieb Rocco Scappatura:

I have no idea if it's in any way related to the problem you're seeing,
but...

 vm_info: Java HotSpot(TM) Server VM (1.5.0_09-b01) for windows-x86,
 built on Sep  7 2006 13:40:20 by java_re with MS VC++ 6.0

...the first thing I'd check is whether a (much) more recent JVM (for
example 1.5.0_22 or even a Java 6 VM) still shows this problem.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6 and Apache2 VS Tomcat 6 alone

2009-11-24 Thread Markus Schönhaber
TheGrailer:

 So what do you all think? Is the Apache2 infront of the Tomcat 6 a waste of
 time or worth while?

I agree with what Pid and Peter already said. Just to phrase it with my
own words: I see two major reasons why you'd want to put httpd in front
of Tomcat
1. To act as a load balancer for multiple Tomcats.
2. To serve dynamic content written in something that Tomcat isn't able
to process as good as httpd (if at all), for example PHP.

Judging from what you wrote, neither seems to apply to your case.
Nevertheless it would be interesting to hear why your friend, who
advocates the use of httpd, thinks this additional complexity is justified.
In my experience, simply having some static content to serve, isn't a
justification.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to make tomcat persistant ?

2009-11-02 Thread Markus Schönhaber
daulat khan:

 I know that tomcat use session manager to persist sessions and reload
 them when \
 server starts up. But I can not find where to configure it. How can I
 turn it off so \
 that I don't get the error message?

Take a look at conf/context.xml.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Understanding context.xml

2009-11-02 Thread Markus Schönhaber
Carsten Pohl:

 When I deploy the project to a local tomcat (Apache Tomcat/6.0.20) Everything 
 works as expected. Meaning, the context.xml is copied to 
 /conf/Catalina/localhost and renamed to testprojekt.xml.
 
 When I edit the testprojekt.xml to:
 
 ?xml version=1.0 encoding=UTF-8?
 Context
   Parameter name=companyName value=My BLAH Company, Incorporated  
 override=false/
 /Context
 
 I see the following output in the catalina.out:
 
 02.11.2009 13:21:35 org.apache.catalina.startup.HostConfig checkResources
 INFO: Undeploying context [/testprojekt]
 02.11.2009 13:21:35 org.apache.catalina.core.StandardContext resourcesStart
 SCHWERWIEGEND: Error starting static Resources
 java.lang.IllegalArgumentException: Document base 
 /opt/tomcat6/webapps/testprojekt does not exist or is not a readable directory
[...]
 INFO: Container 
 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/testprojekt] 
 has not been started
 
 Why is that? Is that the expected result? What is the right way to change 
 parameters in a context.xml?

You might be affected by this bug:
https://issues.apache.org/bugzilla/show_bug.cgi?id=47343

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Understanding context.xml

2009-11-02 Thread Markus Schönhaber
Carsten Pohl:

 If I change the testprojekt.xml in
 conf/Catalina/localhost/testprojekt.xml my webapplication will be
 redeployed (assuming the bug is fixed), and it would get the new
 values. If I change the conf/context.xml all my webapps will be
 RELOADED, but new values and changes to values in conf/context.xml
 will not be given to the webapp.

Hm, indeed.
If the changes in conf/context.xml aren't propagated to the webapps, I
don't see the point in reloading the apps on changes in that file.
But I don't know if this is a (known) bug or if it works as designed and
I'm simply misunderstanding how it's supposed to work.

 I am using the tomcat connection pooling to connect to a postgres DB,
 I would like to put the configuration (hostname, username, etc)
 somewhere, so that i can change it, when I change the databasehost.
 Where is the right place to put such a configuration?
 
 If i put the configuration in conf/context.xml the changes to the
 values wont be given to running applications.
 
 If i put it in the conf/Catalina/ the application will be
 redeployed, which causes downtimes.
 
 What is the right place to PUT and later change the connection infos
 to the database?

Well what is right for you depends on your needs.
I configure Resource elements in the webapp's context.xml - but YMMV.

Anyway: I don't know of a built-in method that would enable a webapp to
see changes in a Resource configuration without a reload of the app.
But maybe someone else can provide better/additional information.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: doubts about tomcat form based authentication

2009-10-20 Thread Markus Schönhaber
Nirvann:

 I mean't authorization. Consider a scenario as follows. There are two users,
 admin and user. Consider two pages adminPage.jsp and userPage.jsp. Admin has
 rights to both the pages but user can access only userPage.jsp. Lets assume
 that the user logs in as user (not admin) and accesses userPage.jsp. It is
 fine upto this point because user has access to userPage.jsp. But what
 happens if the user tries to access adminPage.jsp for which he is not
 authorized. As you have indicated it should fail through 403 access denied.
 But, I am getting HTTP 404 - File not found in IE and blank page in
 Mozilla. 

In a situation like the one you describe my Tomcat responds with 403
response code and the standard access denied page (I did not change it
in web.xml).
So, I second Curtis' guess that you did something wrong.

BTW: What IE shows you is of very little use, unless you turn off
friendly error messages.

-- 
Regards
  mks



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: What is the difference between running Tomcat 6 as a Windows Service vs. running from the command line?

2009-10-19 Thread Markus Schönhaber
Alan Kennedy:

 I need to find out what is the difference between running Tomcat 6 as
 a Windows Service and running it from the command line.
 
 The reason is that I'm getting a bizarre bug when a jython based
 servlet is run under Tomcat6-as-Service. But the bug does NOT appear
 when Tomcat 6 is run from the command line using bin\startup.bat.

The most prominent difference I can think of is the user account Tomcat
runs as.
Although I have no idea why this should cause the endless recursion you
are seeing, I'd (temporarily) change the user account of the Tomcat
service to your personal account and see if the problem still exists.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: What is the difference between running Tomcat 6 as a Windows Service vs. running from the command line?

2009-10-19 Thread Markus Schönhaber
Alan Kennedy:

 Unfortunately, it did not solve the problem: the behaviour is exactly
 the same when running under my own account: the bug still occurs.

Well, that seems to rule out any permission problems - and leaves me
pretty much out of ideas.
One thing, though: do you run Tomcat in both cases from the same
installation (same binary, same config etc.)? If not, maybe that's where
the difference is.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Logging startup parms for Tomcat...

2009-10-11 Thread Markus Schönhaber
Tony Anecito:

 I need to see the jvm startup params (memory settings, ect) for Tomcat. How 
 do I enable that to showup in the logs?

If you simply want to see the JVM startup params (i. e. logging them
would be just one one way to achieve that, but not the only one
acceptable to you), you could use jconsole (provided you're using a
sufficiently recent  JVM from Sun). The VM Summary tab shows quite
detailed info about the VM and it's parameters.

Regards
  mks


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Increasing Heap Size and Max Perm Size

2009-08-19 Thread Markus Schönhaber
Daniele Development-ML:

 Forgot to mention that when I try with the following command:
 java -Xms512m -Xmx750m
 
 it does succeed in creating the JVM
[...]
 I don't understand why I get different behaviour passing this option the JVM
 when starting Tomcat, and when I give directly to the JVM

From your OP:
 JAVA_OPTS=$JAVA_OPTS -Xmx=100m -XX:MaxPermSize=350m -Dfile.encoding=UTF-8

You get different behaviour because you're passing *different* options
to the VM.
Moreover, as you've been told by the VM and André, -Xmx=100m isn't a
valid way to set the VM's maximum heap size.

And BTW: instead of changing a Tomcat-provided script like catalina.sh
to set your options you should create (or edit) setenv.sh and set the
desired env vars there.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: catalina.sh and java_opts question

2009-08-17 Thread Markus Schönhaber
Susan Teague Rector:

 I've searched around on the net and have found differing opinions about 
 where to actually place the java_opts env var for tomcat.
 Should this variable be in /tomcat/bin/catalina.sh? When I set it in 
 this file and then print out all env vars, it looks like it is not set.
 How do I set java_opts to enable my tomcat applications to get to it?

Judging from /tomcat/bin/catalina.sh you mention, I assume you're on
Linux (or another Unix-like platform). If so, it will probably not
matter much where you set an environment variable java_opts because
it's JAVA_OPTS that gets passed to the java command starting Tomcat.

IMO the Tomcat-provided scripts like cataline.sh should not be modified.
Instead set JAVA_OPTS in setenv.sh (create it if it doesn't already
exist). setenv.sh will be sourced by catalina.sh.
BTW: unless you really need the options set even when stopping Tomcat,
CATALINA_OPTS may be the better choice to set your options.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 5.5 on Windows Server 2003, HTTPS and tc-native

2009-07-31 Thread Markus Schönhaber
Fred Janon:

 It looks like you have an extensive experience deploying Tomcat 5.5.x on Win
 XP, SBS, Enterprise and Datacenter, so maybe you can tell me where the
 option to use APR/tc-native is during the installation using the msi file?

The installation wizard contains a page where you can choose what to
install. Among those choices is the native lib.

 Just wanted to share my experience, since the same issue has popped up
 several times for over a year, but fine with me if you think I am an idiot
 and the doc is perfect. I made an effort to subscribe to the list, post
 something, but if you have an issue with that, fine.

And Chuck made an effort to post a reply that adds *real* value to the
topic by explaining what went wrong and providing pointers to the
relevant docs. If, to you, this is the same as calling you an idiot,
your view of the world seems to be *very* different from mine.

BTW: The solution to the problem is not deleting a DLL but using the
appropriate configuration for the Connector you chose. And for choosing
the POJ Connector it isn't even necessary to remove the native DLL.

 Looks like the Jetty folks are less agressive. Lots of choices for a servlet
 container out there.

If you think Jetty suits your needs better, that's fine. The freedom of
choice is IMO one of the main advantages of open source software.

-- 
Regards
  mks


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: IAVM Identified Vulnerability - 2009-B-0026_0028

2009-07-23 Thread Markus Schönhaber
Owen, Scott A CTR IT/IM Bldg1490:

 I am currently running Tomcat 5.5.27 on a Windows 2003 server for the
 application Business Objects Enterprise XI R2.
 
 I have been notified by my IA department of an IAVA that has been
 identified and needs immediate action.
 
 The IAVM is 2009-B-0026_0028 and references the following CVE
 vulnerabilities:
 
 CVE-2008-5515 CVE-2009-0033 CVE-2009-0580 CVE-2009-0781 CVE-2009-0783
 
 
 I have searched the Apache Tomcat site for any assistance, and the
 only thing I am able to find references a fix in Tomcat 5.5.SVN.
 However, I am unable to find this package to install on my server to
 resolve these vulnerabilities.

This is not a package you can install but (probably) refers to the
current state of development, where those vulnerabilities are already fixed.

 Can somebody point me in the right direction on implement this fix to
 make my system compliant with this identified IAVA?

Look at the corresponding announcements here:
http://mail-archives.apache.org/mod_mbox/tomcat-announce/

For CVE-2009-0781 see:
http://mail-archives.apache.org/mod_mbox/tomcat-dev/200903.mbox/%3c49b147b2.1060...@apache.org%3e
But this vulnerability only effects a component of the example webapps -
which shouldn't be deployed on a production server anyway.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem of port 8080

2009-06-25 Thread Markus Schönhaber
Please don't hijack a completely unrelated thread.

Xia Guowen:

 Tomcat running for some time, do not have access to 8080, but 8009 and 8005 
 is ok.
 mod_jk access is normal.

Is a Connector listening to port 8080 indeed configured?
If so, what's in the logs?

 # netstat -lnut |grep 8080
 tcp0  0 127.0.0.1:8005  0.0.0.0:*   
 LISTEN
 tcp0  0 0.0.0.0:80090.0.0.0:*   
 LISTEN

Is that the output of
netstat -lnut |grep 8080
Seems very odd to me.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat startup as service on CentOS 5.3

2009-06-25 Thread Markus Schönhaber
tomcatastrophe:

 When I try to run /etc/init.d/tomcat restart or /sbin/service tomcat restart
 (or stop or start) I get this error:
 
 -bash: /etc/init.d/tomcat: /bin/bash^M: bad interpreter: No such file or
 directory

When you create script files for Linux on a Windows box, make sure you
save them with the proper line endings, i. e. \n instead of \r\n.
dos2unix might help.

 RUN_AS_USER=root # Adjust run user here

Not a good idea.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat startup as service on CentOS 5.3

2009-06-25 Thread Markus Schönhaber
tomcatastrophe:

 I was using root just trying to get it to work. I'm not sure what you mean
 about line endings here... I don't have any \n in my file... or do you mean
 the character return ? I'm a little confused.

I'm talking about the character(s) that denotes a line ending, return
in a manner of speaking.
Fix the line endings of your script using dos2unix or, as Jason
proposed, using nano.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Celebrating Apache Tomcat 10th Anniversary

2009-06-17 Thread Markus Schönhaber
Mladen Turk:

 So, wish us happy anniversary :)

Congratulations!
And thanks for a decade of good work!

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: chunked encoding

2009-06-12 Thread Markus Schönhaber
Anthony J. Biacco:

 Hence the idea about downgrading to http 1.0. But that doesn't get me
 the content length header still (which in itself is strange),

No, it's not strange at all. If the length of the response body is not
known when the response headers are sent, you obviously can't add a
Content-Length header. That has nothing to do with the HTTP version used.

 though I could (although I'm sure to get yelled at for) fake the
 content-length header with something in apache like: Header add
 Content-length 5 Where 5 is some number larger than my
 largest possible response. Again, probably not the greatest idea.

Probably not. Did you try using ServletResponse#setBufferSize as I
suggested in my other post?

BTW: For Tomcat's NIO Connector I see the socket.appWriteBufSize
property which seems to set the output buffer size globally.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: chunked encoding

2009-06-12 Thread Markus Schönhaber
Rainer Jung:

 On 12.06.2009 10:43, Markus Schönhaber wrote:

 No, it's not strange at all. If the length of the response body is not
 known when the response headers are sent, you obviously can't add a
 Content-Length header. That has nothing to do with the HTTP version used.
 
 ... true, but an HTTP/1.0 client can also just read until the connection
 is closed. That's another way of handling content of unknown length.

Yes, that's exactly what I was pointing at.
IOW, using HTTP/1.0 doesn't magically add a Content-Length header (as
the OP seems to have expected) in situations where the size of the
response body isn't known beforehand. The difference between HTTP/1.1
and HTTP/1.0 wrt this situation is simply what has to be done to enable
the client to know about the end of transmission. While 1.1 will need to
transfer the body chunked (at least with keep-alive), 1.0 doesn't know
nor care about chunked because the server will close the underlying TCP
connection when the response is completely sent.

-- 
Regards
  mks


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: chunked encoding

2009-06-12 Thread Markus Schönhaber
André Warnier:

 In summary thus :
 
 - making the request be HTTP 1.0, no matter how it's done, is not going 
 to magically make Tomcat send the response in one chunk nor add a 
 Content-Length header.

Exactly.

 (it may just /prevent/ it from adding a Content-transfer-encoding: 
 chunked header, yes ?)

It may prevent it from sending chunked content (and adding the
appropriate header) in 100% of the cases, since there's no chunked
transfer encoding in HTTP/1.0. IOW, you may replace may with will in
the above sentence ;-).

 - the first-choice solution would be to have the CDN fix their software, 
 or select another CDN which can handle chunked content.

I agree.

 - the second-best would be :
 (presuming the OP knows at some point the real size of the data chunk 
 that has to be sent back.)
 Write a servlet which obtains the data, then uses 
 response.setContentLength(nnn), then does a 
 response.getWriter/getOutputStream, then writes the data there. Yes ?
 
 - if the above is not acceptable/practical, then another solution would 
 be to intercept and buffer the full response somewhere, calculate its 
 size, and then forward it unchunked, preceded by a proper Content-Length 
 header.

Yes.
I just noticed that the OP said he was going to experiment with setting
the bufferSize attribute of the AJP Connector to a higher value.
That might indeed be the easiest workaround - provided the output his
servlets/JSPs generate do not exceed the buffer size - and this
attribute really does what I understand it does.
Using ServletResponse#setBufferSize, which I already mentioned, might
work too - on an per servlet level. But if increasing the value of the
bufferSize attribute of the Connector works, it's much less hassle.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: chunked encoding

2009-06-11 Thread Markus Schönhaber
Anthony J. Biacco:

 Here's my problem. When the request is to a servlet (static apache files
 and JSPs through mod_jk are fine) in the form of a GET, instead of
 sending a Content-Length response header, I get a Transfer-Encoding:
 chunked header
 I'd like to know:
 1) What are the causes of either Tomcat (or Apache is it?) enabling
 chunking on the connection?

Tomcat, probably, since you're talking about a servlet-created response.
And it's not chunking the connection but transferring the response body
chunked.

If at the time the response headers are sent the size of the response
body is already known (for example, if it's just the contents of a
file), it's easy to send a Content-Length response header.
OTOH, how big the output of a servlet will be is generally not known
before the servlet has finished. If you want to send a Content-Length
header anyway, I see two (well, really only one) alternatives:
1. Cache the complete servlet output and count the bytes - which isn't
very practical.[1]
2. Don't send a Content-Length header.
Alternative 2. creates another problem:
With HTTP/1.0 a client can quite reliably determine when the entire
response body is transferred, even if no content-length header is sent:
when the server closes the underlying TCP connection.
With HTTP/1.1 this isn't the case any more since the TCP connection may
be left open to be used to transfer additional requests/responses
(keep-alive). To enable the client to determine when the entire response
was transmitted, you'll have to transfer it chunked.

 2) How do I get a Content-Length reponse header instead? Do I need to
 downgrade the client to HTTP/1.0 or is there another way?

What's the point in caching dynamically created responses?

 FYI, the reason I'm trying to do this is that I use a CDN, and they
 won't cache my data without the presence of a Content-Length response
 header, so my servlet data isn't getting cached at the CDN.

What's a CDN?

[1] Tomcat will, by default, cache some output of servlets. IIRC the
default buffer size is 8k. So, if your servlet creates output of no more
then 8k, a Content-Length header will be sent. Otherwise chunked
encoding will be used.
This might be the reason why you see Content-Length headers from your
JSPs - their output is probably small enough.
-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6.0.18 access files case-insensitive

2009-06-11 Thread Markus Schönhaber
André Warnier:

 the filesystem which matters.  If the filesystem is case-insensitive, it 
 doesn't matter whether the URL is /ABC.PDF or /abc.pdf, does it ?

No. Try
http://localhost:8080/tomcat.gif
and
http://localhost:8080/tomcaT.gif
with a default Tomcat install.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: chunked encoding

2009-06-11 Thread Markus Schönhaber
Anthony J. Biacco:

 The only thing that makes me question this, is that if I query the
 servlet directly on port 8080 instead of through mod_jk/ajp, it
 doesn't get chunked. Well, I don’t get a transfer-encoding header I
 should say. But I don’t get a content length through there either.

And which HTTP version is used?

 But according to the CDN, without a content-length
 header, the caching won't happen. I wonder if I downgrade the
 connection to http 1.0 if it applies to every hop? The way the CDN
 works is that, a request is made to it by the client, if it has it in
 its cache, it serves it to the client, if not, it requests the file
 from the origin server (my web server), I'm assuming by some proxy
 mechanism. So if I downgrade to 1.0, will that apply to the
 connection from the client to the CDN, the CDN to me, or both?

I don't know. But you could use a network sniffer and check.

 I tested with a 8K jsp and did get it chunked. Do you happen to know
 the parameter for changing the buffer size? Perhaps I can increase it
 to a number representing the largest length of my servlet content.
 Which isn't too big, maybe 20K.

You could try
javax.servlet.ServletResponse#setBufferSize
http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html#setBufferSize%28int%29

There may be even a configuration parameter to change Tomcat's default
buffer size globally. But I don't know if there really is one and if so,
which (and I'm too lazy too check atm).

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6.0.18 access files case-insensitive

2009-06-11 Thread Markus Schönhaber
Markus Schönhaber:

 André Warnier:
 
 the filesystem which matters.  If the filesystem is case-insensitive, it 
 doesn't matter whether the URL is /ABC.PDF or /abc.pdf, does it ?
 
 No. Try

Hm, re-reading the way you asked the question, this should be Yes, it
does matter instead of No. ;-)

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Header names lower case

2009-06-08 Thread Markus Schönhaber
Alexander Müller:

 I noticed the Tomcat implementation of
 HttpServletRequest.getHeaderNames() returns all header names in lower
 case. Is there any possibility to get them with their original case?

I can't answer your question but I'm curious: why is a HTTP header
name's case of any importance to you?

RFC 2616 defines field names as case-insensitive. Relying on a header
field's case therefore seems at least non-portable to me.
Maybe you should elaborate what problem you are really trying to solve.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Header names lower case

2009-06-08 Thread Markus Schönhaber
Alexander Müller:

 RFC 2616 defines field names as case-insensitive. Relying on a
 header field's case therefore seems at least non-portable to me. 
 Maybe you should elaborate what problem you are really trying to
 solve.
 
 For me the case wouldnt be important, but I am forwarding (basically
 a proxy) the headers and the receiving party apparently is case
 sensitive.

apparently? Hm, in this case I'd double-check whether whatever problem
you're having is indeed caused by the case of the header names. Just to
make sure you're not barking at the wrong tree.
If the receiving party is really relying on the case of header names,
I'd ask them to fix their broken code.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Newbie question: How to test if Tomcat is running?

2009-06-02 Thread Markus Schönhaber
Peter Crowther:

 From: Kai Behncke [mailto:kai-behn...@gmx.de]
 I have installed tomcat on a Debian Etch-System via

 http://www.myhomepage.de:8180

 nothing at all appears?
 
 Unless Debian changes Tomcat's configuration a lot, the default port is port 
 8080, not 8180.  Try that?

IIRC Debian does change the port in Tomcat's default configuration (I'm
not sure if anyone knows why, though).

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Windows x64 Installer

2009-05-29 Thread Markus Schönhaber
János Löbb:

 Because the electron has resting mess, it will never go with speed of  
 light.  The info by the way is not supplied by the electron, but  
 rather with electromagnetic waves around the wire who have no resting  
 mess,

Oh, what a mess!
;-)

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: mod_proxy, Tomcat and request URL

2009-05-20 Thread Markus Schönhaber
Andre-John Mas:

 this is not the ideal setup, I don't have any control over this. At  
 the same time I see that using mod_proxy, by way of ProxyPass, means  
 that the Tomcat server does not know what hostname was used to access  
 the Apache server, instead getting http://localhost:8080/ . Is there  
 any way, probably via configuration of Apache, that this could be  
 passed to the Tomcat? I looked for information on this, but I could  
 not find any.

Instead of mod_proxy_http, I use mod_proxy_ajp. AJP passes the client's
IP through.

-- 
Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat doesn't stop if a java thread is running

2009-04-20 Thread Markus Schönhaber
Paolo Gambetti:

 I have this problem. If in my web application running in Tomcat there is a
 java thread running when i stop Tomcat with shutdown.bat or shutdown.sh
 tomcat process doesn't end and i have to kill it manually. How can i solve
 this problem? Is there anything to change in java threads code?
 thank you.

The JVM won't terminate until all non-daemon threads have ended. If your
webapp starts such a thread it has the responsibility to stop it when
needed. You can use a ServletContextListener to do this.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Announcing new Apache Tomcat installable Live CD appliance

2009-04-20 Thread Markus Schönhaber
Leon Rosenberg:

 tomcat standalone performs better in most setups (yes, yes sendfile
 myth is there too, but the performance measurements shows that tomcats
 plain old java connector performs better)

Which performance measurements do show that?

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 5 and UTF-8

2009-04-03 Thread Markus Schönhaber
Christopher Schultz:

 The problem is when the web server sends a response, it sends it using a
 particular character set (let's just say UTF8 for argument's sake). If
 you also report that the character set is UTF8 in the META tags, then
 it's only valid if the client saves the file to the disk with that same
 character encoding. If a different encoding is being used, then the file
 is lying about its own encoding.

Agreed, a wrong charset in a meta tag is brain-dead.

Nevertheless, one should keep in mind the charset reported in meta tags
is in practice *not* *only* used when the file is read from disk.
Firefox 3, IE 7 and Opera use the charset from the meta tag if the
server doesn't add a charset to the value of the Content-Type response
header field (Tomcat's DefaultServlet doesn't, for example).

BTW: Although the behaviour of the browsers does comply with the HTML 4
W3C recommendation you cited in an earlier post, they, IMO, violate RFC
2616 (HTTP/1.1) which says in section 3.7.1 that a missing charset in
the Content-Type header field means that the content is encoded in
ISO-8859-1 (for text/* media types, of course) - and the DefaultServlet
violates the RFC too.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: XSD mime type

2009-03-16 Thread Markus Schönhaber
Pid:

 What, if any, is the correct MIME type for the XSD file type?

When you say the XSD file type, you're talking about files containing
XML Schemas?
IIRC there's no special media type for schemas. But since they are
themselves XML files, this...

 I'm guessing it's text/xml or application/xml

...would be what I, too, would use.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: howto clear Tomcat 6.0 ServerInfo.properties ?

2009-03-13 Thread Markus Schönhaber
Caldarale, Charles R:

 You still haven't explained why you think it's necessary to update
 ServerInfo.properties at all.  If you want to differentiate multiple
 Tomcat instances, the value of ${catalina.base} would seem to
 suffice.

My guess would be that she wants to hide Tomcat version information from
Tomcat's error pages. Some people think that this increases security
somehow. I'm not sure, why.

Regards
  mks


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: howto clear Tomcat 6.0 ServerInfo.properties ?

2009-03-13 Thread Markus Schönhaber
Stephanie Wullbieter:

 I mean what did not work was adding
 
 common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/lib,${catalina.base}/lib/*.jar
 
 to $CATALINA_BASE/conf/catalina.properties
 
 and unzipping the SystemInfo.properties from 
 $CATALINA_HOME/server/lib/catalina.jar to 
 $CATALINA_BASE/lib/org/apache/catalina/util/

Seems to me that this is to be expected, since ${catalina.base}/lib
is searched *after* ${catalina.home}/lib/*.jar (i. e. after
catalina.jar) when common.loader is set as above.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: howto clear Tomcat 6.0 ServerInfo.properties ?

2009-03-13 Thread Markus Schönhaber
Caldarale, Charles R:
 From: Markus Schönhaber

 My guess would be that she wants to hide Tomcat version 
 information from Tomcat's error pages.
 
 Then setting the server attribute of the Connector element and providing 
 custom error pages would seem to be a whole lot easier and more robust.

Of course.
As I said before, I don't know why some people think they increase
security by messing around with server.properties.
I've once seen an article about Tomcat security somewhere on the net
which did propose this. Maybe that's the reason.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tcnative-1.dll

2009-03-13 Thread Markus Schönhaber
markov.ya...@neftochim.bg:

 How can I tell for sure that tcnative-1.dll is used by tomcat ?
 System is Windows 2003 SP2, Tomcat 5.5.20, JDK 1.5.0_11, tcnative-1.dll used 
 is 1.1.12
 Tomcat is started as a service.
 File tcnative-1.dll is placed in directory mentioned within 
 -Djava.library.path =... in registry.
 
 If it's not in this directory there is a warning in stdout.log(which is the 
 only one used for logging).
 (can't find... tcnative-1.dll... ), but when it's placed in the 
 directory, there is no message about it's loading (as stated in 
 http://tomcat.apache.org/native-doc/).
 
 Difference in version behaviour, or...?

It was not that long ago that Chuck proved me wrong, so I could easily
remember that this question was asked recently:
http://marc.info/?l=tomcat-userm=123326323910806w=2

Bottom line for Tomcat 5.5: if the native lib is found, no message will
appear in the logs. Only failure to load it will be logged.
Tomcat 6.0 will print out information in either case.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: how to compile tomcat source

2009-02-28 Thread Markus Schönhaber
h iroshan:

 I am new to Apache Tomcat. Can any body explain me to how to compile the
 source code of Apache Tomcat 5.5.

http://tomcat.apache.org/tomcat-5.5-doc/building.html

But: if you're new to Tomcat, what makes you think it's necessary for
you to build it from source?

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: error while building tomcat 5.5

2009-02-28 Thread Markus Schönhaber
h iroshan:

 I tried to build the Tomcat 5.5 source with ant 1.7 and SVN 1.5 . while
 building I faced with following error .
 
  BUILD FAILED
 /home/iroshan/Documents/sources/tomcatBuild/build.xml:67: The following
 error occurred while executing this line:
 /home/iroshan/Documents/sources/tomcatBuild/build/build.xml:1980: The
 following error occurred while executing this line:
 /home/iroshan/Documents/sources/tomcatBuild/build/build.xml:2031: Can't get
 http://tomcat.apache.org/dev/dist/tomcat-connectors/native/tomcat-native-1.1.12-src.tar.gzto
 /usr/share/java/tomcat-native-1.1.12/tomcat-native.tar.gz

Open ${tomcat.source}/build/build.properties.default, go to line 142 and
change the three following lines that they look like this:

# - Tomcat native library -
tomcat-native.home=${base.path}/tomcat-native-1.1.16
tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
tomcat-native.loc=${base-tomcat.loc}/tomcat-connectors/native/source/1.1.16/tomcat-native-1.1.16-src.tar.gz

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Wrong install on debian server 40r6

2009-02-04 Thread Markus Schönhaber
cactux:

 The Tomcat install on Debian Server 40r6 is quite weird and not functionnal,
 although I used the package manager.
 
 I just installed tomcat5.5 on debian server 40r6, with:
 aptitude install sun-java5-jre
 aptitude install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps

Most people on this list (me included) are not interested in helping to
solve problems which might be caused by the Debian-specific re-packaging
of Tomcat (or in finding out whether or not this really is the case).
Therefore, the answer you'll most likely get is: go to
http://tomcat.apache.org
download a recent Tomcat version from there and use that.

If you still want to use the Debian package, you'll probably have more
luck asking on a Debian list.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tuning Tomcat

2009-02-03 Thread Markus Schönhaber
Sergey Livanov:

 Help me to adjust JVM, please. My configuration - win2k server, Tomcat5.5.9

I hope you follow Chuck's good advice and re-describe your problem in a
way others can understand.

Moreover, if you're interested in tuning, you could start by downloading
a Tomcat version that is not almost 4 years old.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Indicator APR is loaded - TC 5.5

2009-01-29 Thread Markus Schönhaber
Gregor Schneider:

 I guess that the APR-message usually showing up in the logs IMHO is
 triggered by the APRLifeCycleListener (true?)

Yes.

 Could it be that the APRLifeCycleListener is loaded lazy, and since
 no static HTML is served, the APRLifeCycleListener ist not loaded and
 therefore no logging-message is showing up?

 Would appreciate if anyone here could confirm this behaviour.

I'm not sure but I doubt it. AFAIR there's no APRLifeCycleListener in
Tomcat 5.5.
Looking at the changelog, this entry for 6.0.11 seems relevant, too:
- Add logging to display APR capabilities on the platform.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat and OpenSSL 9.8.0j ?

2009-01-28 Thread Markus Schönhaber
franziska.oliv...@postfinance.ch:

 I need a Tomcat version with Open SSL 9.8.0j (came out beginning of
 January 2009). Does anyone know when this version of OpenSSL will be
 integrated in a Tomcat distribution?

Probably never. At least, I don't know of an official Tomcat
distribution that is bundled with OpenSSL.
OTOH: Tomcat's native lib can make use of APR which in turn can make use
of OpenSSL. And there are pre-built binaries which are statically linked
against APR and OpenSSL. If you're asking about those: I don't have the
slightest idea if or when a version linked against the current OpenSSL
version will be made available. But you can always build your own
version of libtcnative. In this case, it might be a good idea to follow
the advice of the Tomcat APR docs and link it dynamically.

Regards
  mks


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to prevent direct ip address

2009-01-23 Thread Markus Schönhaber
Jaakko Taipale:

 I have specified domain eg. www.myapp.com and I have tomcat running my
 machine that have IP address 123.123.123.123. Now I can access to my app
 with two address:
  
 http://www.myapp.com/myapp or
 http://123.123.123.123/myapp
  
 How can I prevent tomcat to response when somebody is trying to access with
 direct ip?

If your Tomcat listens on 123.123.123.123 then you can't prevent it from
responding.
What you can do is create an additional Host with it's name attribute
set to 123.123.123.123 and make sure that myapp isn't deployed to this
Host's appBase. Then someone accessing
http://123.123.123.123/myapp
would only get an error message. Or you could deploy a webapp there
which does nothing else than redirect the client to
http://www.myapp.com/myapp

Alternatively, configuring a RemoteHostValve might work too.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Address already in use: JVM_Bind /87.230.103.25:80

2009-01-16 Thread Markus Schönhaber
kareda:

 thanks for the tip. indeed, the server.xml is not used at all. I removed it
 completely from the conf dir and when I ran catalina.bat run, the log output
 didn't change at all - still the same error. 
 I have another tomcat instance on the same server, running as a service. so
 it's probably using the server.xml from the other tomcat installation,
 right?

Maybe, I don't know.

 strange.. what may cause this?

Among the first lines printed when you start Tomcat by using
catalina.bat run should be the values of CATALINA_HOME and
CATALINA_BASE. Are these (especially CATALINA_BASE) what you'd expect
them to be - i. e. do the point to the dir where the Tomcat you just
started is located?
If not, is one or both of them already set in your environment?

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Address already in use: JVM_Bind /87.230.103.25:80

2009-01-15 Thread Markus Schönhaber
kareda:

 I need to have Tomcat running on a win2003 server that also has IIS running.
 IIS uses port 80. 
 I have changed the port in connector element in server.xml: 
 
 Connector port=90 protocol=HTTP/1.1 
connectionTimeout=2 
redirectPort=8493 
  address=87.230.103.25 /
 
 But still when I run tomcat I get the error: 
 Address already in use: JVM_Bind /87.230.103.25:80
 
 How can I have tomcat not to bind to port 80 on startup? 

You did the right thing. If Tomcat still tries to bind to port 80, make
sure that
a) there's no other Connector configured to listen on port 80,
b) Tomcat really uses the server.xml that you modified.

Additionally you can take a look at the logs. Also, if you start Tomcat
by issuing
catalina.bat run
the console will stay open, allowing you to see Tomcat's startup messages.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6, APR, native wrapper and shutdown-port

2009-01-08 Thread Markus Schönhaber
Gregor Schneider:

 I'm running Tomcat using the APR and the native wrapper jsvc so that
 Tomcat runs on privileged port 80. Could somebody please be so kind to
 explain to me why there's no port 8005 listening on localhost?

That's the way it's intended to be when you start Tomcat via jsvc. If
you start the same Tomcat installation with the shell scripts, you'll
see Tomcat listening on port 8005.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Setting /WebContent as ROOT for an application

2008-12-13 Thread Markus Schönhaber
Tom Blank:

 The reason why I'm asking is, because I'm using eclipse and its
 'dynamic web project' structure.

I'm no Eclipse user either, but AFAIR the folder Webapps is part of an
Eclipse Dynamic Web Project. And a project folder is not meant to be
simply copied to Tomcat's appBase (judging from your OP, it seems to me
that's what you've been doing).

You could, for example, export your project to a WAR file and deploy this.
Experienced Eclipse users may know of other/better ways of deployment.
You might consider asking in the appropriate Eclipse mailinglist/newsgroup.

Regards
  mks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: HTTP 400 Error when trying to check Tomcat installation

2008-12-11 Thread Markus Schönhaber
BoyePeter:

 I am running Windows XP Professional version 2002 SP 3 with all updates
 applied.
 I am running Internet Explorer v 7.0.5730.11.
 I have installed Java JDK 1.6.0_11 with the JRE from the same download.

Care to mention the Tomcat version you're using?

 I copied the servlet-api.jar to the JDK directory\jre\lib\ext.

Why?
Don't do that.

 I edited the c:\tomcat\conf\context.xml file to have Context
 reloadable=true.
 I edited the c:\tomcat\conf\web.exl file to un-comment the invoker entrie
 for servlet and servlet_mappings.

Why?
The Invoker Servlet is evil. It may be OK for a quick test but is a big
no-no for any installation reachable over the net.
I suggest you get used to create a webapp with a real deployment
descriptor instead.

 when I try to test the installation using the examples that come with tomcat
 using the URL http://localhost:8080/ I get the HTTP 400 Bad Request message.
 
 This tells me that IE was able to connect to the web server but the web page
 could not be found because of a problem with the address.

What do Tomcat's log messages show?
If you've not already done so, turn off IE's friendly error messages.

Regards
  mks


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



Re: HTTP 400 Error when trying to check Tomcat installation

2008-12-11 Thread Markus Schönhaber
BoyePeter:

 I have installed Tomcat version 6.

Although I doubt it's of any importance wrt your problem, for the
future: Tomcat's version numbers consist of three numbers separated by
dots - like 6.0.18.

 I copied the servlet-api.jar to the JDK directory because, according to Java
 for Dummies, it is needed to compile my servlets.

If the book really says so, I'd think that now was a good time to throw
it away.

 If it is not there,
 Eclipse reports errors when trying to import javax.servlet.* and when I try
 to use extends HttpServlet.

If you're already using Eclipse, why don't you use it's Web Tools
Platform which takes care of setting the classpath when building, of
deploying etc. when developing webapps?

 Perhaps I should have mentioned that I am trying to learn how to program in
 Java and I am trying to set up the test environment for this.

If you're starting to program in Java, programming servlets is not the
starting point to the most easy route IMO.

 I am not
 trying to set up a Web Server for the internet. The books that I read and
 the Tomcat documentation said to change the invoker stuff.

Then you're most likely reading the wrong books.
But I'd be very interested to know where the official Tomcat
documentation says that one should enable the Invoker servlet.

 I had a look at the Tomcat logs but, being the novice that I am, they didn't
 mean anything to me.

You could post the relevant snippet (the timestamps should give a hint
what might be relevant) here. Even if it means nothing to you, it might
mean a lot to someone trying to help you.

 Not sure how to turn off IE's friendly messages nor what would be the result
 if I did so.

I'm no Windows user myself, so I don't know exactly. But IIRC it's
buried somewhere in the advanced internet options.
Without this option disabled, IE thinks it knows best what to show the
user (and especially: what not) when an error occurs and suppresses the
error message sent by the server that might actually contain information
about what went wrong. OTOH it might not - but with IE's friendly
error messages you'll never know.

Regards
  mks

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



Re: SSL/Apache and Proxy

2008-12-08 Thread Markus Schönhaber
Doctor Khumalo:

 Anyone know anything about this or will my post be ignored?

Hijacking unrelated threads is a good way to get ignored.

Regards
  mks


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



Re: Tomcat mapping of URLs - servlets

2008-12-03 Thread Markus Schönhaber
André Warnier:

 I have tried to download and find this in the Servlet 2.5 Specification, 
 but I seem to get a series of html pages describing the API, without 
 telling me much about the general principles.

Yep, for some reason unknown to me it's unnecessarily difficult to find
the PDF with the 2.5 spec. Go here
http://jcp.org/en/jsr/detail?id=154
and select the topmost Download page, i. e. the one for Maintenance
release 2 and you're just a few clicks away from downloading the PDF.

Starting on p. 87 the section Mapping Requests to Servlets will
probably answer your questions.

Regards
  mks

-
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 mapping of URLs - servlets

2008-12-03 Thread Markus Schönhaber
André Warnier:

 It appears anyway that my previous attempted logic was quite wrong.
 But I still find the spec quite confusing.  There is some kind of 
 mixture between servlet and web application that is not very clear, 
 at least to me.
 
 As I understand it now, there are 2 steps :
 1) the appropriate webapp (not servlet) is located using the path, not 
 the url-pattern
 2) the appropriate servlet *within* the webapp is selected based on the 
 url-pattern

Yes.
Example: given the URL http://servername/foo/bar/baz/, the Container
looks at /foo/bar/baz/ to find out which webapp should handle the request.
- If there's a webapp with the context path /foo/bar/baz, that's the one
to handle the request and the path for the servlet mapping is /.
- If there's a webapp with the context path /foo/bar, that's the one to
handle the request and the path for the servlet mapping is /baz/.
- If there's a webapp with the context path /foo, that's the one to
handle the request and the path for the servlet mapping is /bar/baz/.
- If neither of the above is true, the webapp with the context path 
(the default webapp, ROOT in Tomcat) is the one to handle the request
and the path for the servlet mapping is /foo/bar/baz/.

 and
 3) .. each webapp has a default servlet, to which things get mapped 
 when no other url-pattern of this webapp matches

Essentially, yes. You could comment the Default Servlet and it's mapping
in ${catalina.base}/conf/web.xml, though.

 4) the ROOT webapp matches the path /, not the url-pattern /

The default webapp (named ROOT in Tomcat) matches the path . Apart
from that, what you said in 1) is true for all webapps, including the
default one.

 Is the above correct ?
 
 The confusing part for me may also be due to my misunderstanding.
 I view this as follows :
 - a web application is the whole thing that one finds below 
 (tomcat_dir)/webapps/xyz for example (including its static pages, 
 WEB-INF/web.xml, its servlets etc..)
 - this webapp can consist of one or more servlets, each with its set of 
 url-pattern's that it handles
 
 Not so ?

No, correct.

 And if so, then I find the examples in table SRV.11.2.2 Example Mapping 
 Set quite confusing, since paths like
 /foo
 /bar
 /catalog
 would tend to imply different webapps, rather than different servlets 
 inside of one webapp, no ?

No. These examples talk about the mappings *inside* a webapp, i. e. what
can be used as a value for url-mapping.
In other words: the part of the request URL which is used to determine
the webapp to handle the request is already removed.

Take this trivial JSP and deploy it to different contexts/webapps. Maybe
the output will make things clearer:

html
body
table
trtdRequestURL/tdtd%= request.getRequestURL() %/td/tr
trtdRequestURI/tdtd%= request.getRequestURI() %/td/tr
trtdContextPath/tdtd%= request.getContextPath() %/td/tr
trtdServletPath/tdtd%= request.getServletPath() %/td/tr
/table
/body
/html

Regards
  mks

-
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: Deployment Web App on Debian

2008-11-07 Thread Markus Schönhaber
Kevin Jackson:

 Do you have the JDK installed or just the jre?  Remember tomcat really
 needs a jdk to compile jsps

No, it doesn't. A JRE is enough for modern Tomcat versions - at least
this is true for the official builds from Apache.

Regards
  mks

-
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: MySQL DBCP Connection Example?

2008-10-19 Thread Markus Schönhaber
Martin Gainty:

 Im not baiting you but rebutting your wrong answer to davids right answer
 you pick fights with people and state what they say is wrong without doing 
 any research

Oh, please, this is ridiculous!
You are wrong - as you are so often. And all the foot stamping of yours
won't change that.
Christopher was even kind enough to point you to the relevant part of
the docs to make the research *you* have failed to do easier.
Moreover, I have yet to see Christopher to pick fights with people or
to do name calling on others (as *you* did).

You should read Mark's reply to your previous post closely and do as he
proposes in the last sentence.

Regards
  mks

-
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: cannot seem to see deployed application

2008-10-07 Thread Markus Schönhaber

cooper5114:


So in trying to figure out what was going on, i edited the
webapps/ROOT/index.jsp page to verify that it would change. It didn't. So i
figured it must be cached, so i killed my browser, restarted. No change. I
also deleted $CATALINA_HOME/work directory (which i believe is used for
caching). No change


If you take a look at the web.xml of the default ROOT webapp that is 
shipped with Tomcat, you'll see that /index.jsp is mapped to the 
pre-compiled servlet that's generated from ROOT/index.jsp, not to the 
JSP servlet that would compile it on access.
Therefore, what you observed is exactly what is to be expected and 
doesn't help with tracking down the problem you have.


But that's just a side note.
To really get help with solving the problem, you should continue to 
answer Mark's questions and follow his advice.


Regards
  mks

-
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: tomcat6 + proxy issues

2008-10-02 Thread Markus Schönhaber

Mark Thomas:


Actually, mod_proxy_http is usually a better choice than mod_proxy_ajp


Could you please explain a little further?
Since at one site I'm using mod_proxy_ajp I'm interested in what the 
advantage of switching to mod_proxy_http might be.


Regards
  mks

-
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: tomcat6 + proxy issues

2008-10-02 Thread Markus Schönhaber

Mark Thomas:


Generally, and YMMV, mod_proxy_http is more stable. This is only a
generalisation though. I have used mod_proxy_ajp in the past without any
problems.


Ah, OK.
Since the mod_proxy_ajp setup I use is extremely simple and for a 
low-volume site, I don't expect any problems.



Other reasons include:
- you can use https for encryption
- it is easier (at least I find it easier) to read http in wireshark than ajp


Good points. Something to keep in mind.

Thanks
  mks

-
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: JVM config for tomcat5.5

2008-09-21 Thread Markus Schönhaber

Martin Gainty:

you'll definitely need the JDK in $JAVA_HOME 
and $JDK_HOME/bin to compile the JSPs..


No, a JRE is enough.

Regards
  mks

-
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 + Native Library + HTTPS

2008-09-12 Thread Markus Schönhaber

StrongSteve wrote:


Can anyone tell me - or give me a resource - on how to configure SSL in
Tomcat 6 with an installed Native Library?

I did it as usual in the following way:

Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
   maxThreads=150 scheme=https secure=true
   clientAuth=true sslProtocol=TLS 
   keystoreFile=.keystore keyAlias=tomcat

keystorePass=changeit
   truststoreFile=.truststore truststorePass=changeit/

But Tomcat refuses to start up. As soon as I remove the Native Library,
these settings work perfect.


The configuration for SSL enabled Connectors is different when using APR:
http://tomcat.apache.org/tomcat-6.0-doc/apr.html#HTTPS

Regards
  mks

-
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: Migrating to tomcat 6 gives formatted currency amounts problem

2008-09-11 Thread Markus Schönhaber

Johnny Kewl wrote:


http://www.kewlstuff.co.za/test/test.htm

What do you see in this test page?


The output of a server that lies right to my face.
It says, it is serving UTF-8-encoded text, while it really serves text 
encoded with some 8-bit charset - probably ISO-8859-1.


Regards
  mks

-
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: https problem after upgrading from Tomcat 5.5 to Tomcat 6

2008-09-06 Thread Markus Schönhaber

randomw wrote:


I've been trying to upgrade from Tomcat 5.5.26 to Tomcat 6.0.18 for the past
couple days but just cannot get https to work.  Everything works as expected
in Tomcat 5.5.  Plain old http works in Tomcat 6, but the moment I try to
switch to https, the connection just times out.

[...]

My server.xml looks like this:



lt;Connector port=443 scheme=https secure=true
  clientAuth=false sslProtocol=TLS
  keystoreFile=path to my.keystore keystorePass=myPassword
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  acceptCount=100 enableLookups=false
  connectionTimeout=2 disableUploadTimeout=true
  /gt;


Any ideas what might be the trouble here?  I'm pretty much at the end of my
rope.  All other references to problems of this sort that I can find relate
to using APR, which I'm not.


Try adding SSLEnabled=true to the Connector's attributes.

Regards
  mks

-
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: APR SSL not working

2008-09-01 Thread Markus Schönhaber

Gregor Schneider wrote:


The solution was:

- create an .rnd-file within the user-space:

openssl rand -out $HOME/.rnd 2048

- compile the APR with /dev/urandom:

./configure --with-apr=/usr/bin/apr-1-config \\
--with-devrandom=/dev/urandom \\
--prefix=/home/tomcat/www/lib

make  make install

Now it seems to work like charm.


If you configure APR to use /dev/urandom, creating a static ranndom file 
shouldn't be necessary.


BTW: in Tomcat 6 (starting with 6.0.17?) the AprLifecycleListener 
supports the attribute SSLRandomSeed:

http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html#Edit%20the%20Tomcat%20Configuration%20File
This is supposed to set the random source used by APR. As I understand 
it (haven't tried it myself) one should be able to set this, for 
example, to /dev/urandom or a static random file and speed things up 
even if APR was compiled with /dev/random as default random source.


Regards
  mks

-
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: APR SSL not working

2008-09-01 Thread Markus Schönhaber

Gregor Schneider wrote:


seems I was a bit too optimistic...

although I compiled APR with /dev/urandomPLUS creating $HOME/.rnd
(changed 2048 to 4096 since this is the value specified in
/proc/sys/kernal/poolsize), it's again taking ages to start up tomcat.


AFAIK is /dev/urandom guaranteed not to block. If initializing the HTTPS 
connector takes very long nevertheless, I'd make sure that /dev/urandom 
is indeed used - and not /dev/random. You could, for example, use lsof 
to check.


Is the libtcnative your Tomcat uses really linked against your 
self-compiled version of APR (ldd to check)?



Do you know of any additional option to speed up the process of
creating some entropy?


I'm not sure, but maybe a lot of activity generated in a ssh session 
might help too.


Regards
  mks

-
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: APR SSL not working

2008-08-29 Thread Markus Schönhaber

Gregor Schneider schrieb:


Anybody out there who has the following combination up  running:

- Linux (Debian preferred, other distributions also welcome)
- Tomcat 5.5
- APR
- SSL


Yes.


into server.xml, Tomcat-startup hangs when initializing Coyote HTTP/1.1:

2008-08-29 17:15:31,722 INFO[main]: An older
version 1.1.3 of the Apache Tomcat Native library is installed, while
Tomcat recommends versi
on greater than 1.1.4
2008-08-29 17:15:32,142 INFO[main]: Initializing
Coyote HTTP/1.1 on http-8080

However, netstat shows me that Tomcat is listening on port 8443


If these are the last lines of your log, that's to be expected. 
Otherwise the log would contain info about http-8443.
How long did you wait? Chances are, APR is using /dev/random and the 
system  has run out of entropy.
Search the list archives. There has more than once been discussion about 
this topic. For example

http://marc.info/?l=tomcat-userm=118190563608389w=2
Maybe this helps.

Regards
  mks


-
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 context.xml, how to configure the Host element

2008-08-26 Thread Markus Schönhaber

jerrycat wrote:


Here is the context.xml
Context path= docBase=C://Program Files//Apache Software
Foundation//Tomcat 5.5//webapps//test 

[...]

/Context


Please read the docs:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
Especially the last paragraphs in the descriptions of the docBase and 
the path attributes.
You have not mentioned how you are going to deploy your webapp. 
Therefore I'll simply assume you want to autodeploy a war file or an 
exploded war file.
In this case, remove the path and docBase attributes from the Context 
element.



and here is the Host element in the conf/server.xml
Host name=www.test.com deployOnStartup=true debug=0 appBase=webapps


Set the appBase attributes for all your Host elements to different paths 
and make sure that not one is contained in another. For example, if 
you've got two hosts, localhost and www.test.com, you could 
configure them like that:

Host name=localhost appBase=webapps/localhost [...]
and
Host name=www.test.com appBasewebapps/test [...]

If you want a webapp to be accessible via www.test.com, drop the 
corresponding war file into $CATALINA_BASE/webapps/test.
If a webapp shall be the default Context for a given Host, name it 
ROOT and deploy it to the Host's appBase.



unpackWARs=true autoDeploy=true xmlValidation=false
xmlNamespaceAware=false 

[...]

/Host


Regards
  mks

-
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 context.xml, how to configure the Host element

2008-08-26 Thread Markus Schönhaber

jerrycat wrote:


Thanks,
just a question here.

Set the appBase attributes for all your Host elements to different paths
and make sure that not one is contained in another. For example, if
you've got two hosts, localhost and www.test.com, you could
configure them like that:
Host name=localhost appBase=webapps/localhost [...]
and
Host name=www.test.com appBasewebapps/test [...] 


The question:
If I have a subdomain, demo.test.com, should I define a new Host?
Host name=demo.test.com appBasewebapps/demo.test


If you want demo.test.com to be different from www.test.com, then yes.
Otherwise you could define demo.test.com to be an Alias for www.test.com.


The name after webapps/, which is demo.test, can it be named anyhow?
for example webapps/mydemotestwebapp


Yes.
In fact, there is no law that states that the appBase has to start with 
webapps/. You could even use absolute paths to point appBase to a 
directory outside of your CATALINA_BASE.


Regards
  mks

-
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 context.xml, how to configure the Host element

2008-08-25 Thread Markus Schönhaber

jerrycat wrote:


I understand that Tomcat 5.5 prefers that your web application comes with a
context.xml file under the META-INF folder. 


OK.


So I added a context.xml file under the META-INF folder of my web
application, please have a look below. 

context.xml 
[code] 
   
[/code] 


Looks very ... hm ... clean.

Ok, that is good so far, but how do I configure the Host element. 

I mean how do you link a specific Host to a specific Context? 
before, the Context element was a sub element of the Host element, now it is
completely separated. 


Deploy your webapp to the directory you configured as appBase for the 
corresponding host.



Host element in server.xml
[code] 
 
 
[/code] 


Rather clean also.

Regards
  mks

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



  1   2   3   4   5   >