apache/tomcat communication issues (502 response)
We are running apache and tomcat on the same machine (using the http connector) and logging requests in both. Occasionally (maybe 1% of requests) we see 502 response in the apache log spread fairly evenly throughout the day. these requests don't appear in the tomcat log produced by the access valve. in the apache error log I see: proxy: error reading status line from remote server 127.0.0.1 proxy: Error reading from remote server returned by [url] The requests are a mix of methods (GET/POST/PUT) of pretty small bodies and responses, generally under 1k. We added request time (%T) in the apache logs and many of the requests have 0 response time so I don't think it's a timeout issue. Reading the tomcat connector documentation, I tried increasing the maxThreads to 100 and backlog to 1000 in the http connector since it seemed like with the default settings a burst of traffic may cause this issue. This didn't solve the problem. I have done periodic thread dumps and it looks like the number of http threads doesn't get past 80. concerning machine resources, cpu is not loaded at all (~10% utilization). i checked file descriptor usage, it's about 400 and there is a per process limit of 1024. I am not sure if this should be posted to the apache list or tomcat list, but thought i would start here since to me it seems more likely that I am not configuring tomcat correctly as opposed to some problem in apache. I have searched the web quite a bit, but nothing seems to fit. The next thing I will try is to use the AJP connector. But even if it gets rid of the problem, I am worried it may reappear once traffic increases. Has anyone experienced a similar problem? other stuff: OS: CentOS apache: 2.2.3, using mod_proxy tomcat: 6.0.16 using netstat, i see a moderate number (~80) of tomcat's sockets in the CLOSE_WAIT state, not sure if this is relevant. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat, mod_jk, and apache
> From: Jordan Michaels [mailto:jor...@viviotech.net] > Subject: tomcat, mod_jk, and apache > > I'm using mod_jk with apache and I was wondering if it would be > possible to configure mod_jk in a way that I wouldn't have to > specify the entries in Tomcat's server.xml file in addition > to apache. (I'll assume by "apache" you really mean httpd, since both Tomcat and httpd are Apache products.) Let's turn the question around: do you really need httpd in front of Tomcat? There are certainly valid reasons for doing so (e.g., running PHP, poor man's load balancing, etc.), but is your environment one of those? If you do need to use httpd, can you get away with a single in Tomcat, and simply differentiate the varied requests via webapp name? (Using mod_rewrite might help here.) Another possibility is having a single source for your host setup, with some kind of script/program to generate both the httpd and Tomcat config files from that. (That could turn out to be a marketable product.) - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: $CATALINA_HOME
> From: jigneshjsoni [mailto:jigneshjs...@gmail.com] > Subject: $CATALINA_HOME > > When I run above command on cmd prompt , I get message path can not be > found. How to find path for $CATALINA_HOME from cmd prompt ? Read *all* of RUNNING.txt, including this from 2.2: "For the purposes of the remainder of this document, the symbolic name "$CATALINA_HOME" is used to refer to the full pathname of the release directory." When running Tomcat from the scripts, you typically do so from a command prompt window where your current directory is $CATALINA_HOME\bin, so all you need to enter is startup. > IS running this command on cmd prompt or starting tomcat service from > "services" is same or different ? Different. Be aware that if you used the .exe download (one of the many things you haven't bothered to mention), there are no scripts, and Tomcat must be run as a service. If you use the .zip download, you can run Tomcat either as a service or via the scripts. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat not working
> From: jigneshjsoni [mailto:jigneshjs...@gmail.com] > Subject: tomcat not working > > what is wrong in here ? Lots of things, such as you not telling us the Tomcat version you're using, the JDK/JRE it's running on, the platform this is all installed on, the complete contents of server.xml, how you're starting Tomcat, and any messages in the Tomcat logs - for starters. http://www.catb.org/~esr/faqs/smart-questions.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
$CATALINA_HOME
I am trying to do following. (3) Start Up Tomcat (3.1) Tomcat can be started by executing the following commands: $CATALINA_HOME\bin\startup.bat (Windows) When I run above command on cmd prompt , I get message path can not be found. How to find path for $CATALINA_HOME from cmd prompt ? IS running this command on cmd prompt or starting tomcat service from "services" is same or different ? thanks -- View this message in context: http://www.nabble.com/%24CATALINA_HOME-tp22941742p22941742.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat not working
I have set up, ports as below <-- whats the eaning of snhutdown here ? --> Now when I run the "http://localhost:8080";, I get an error essage "Internet Explorer cannot display the webpage " what is wrong in here ? -- View this message in context: http://www.nabble.com/tomcat-not-working-tp22941730p22941730.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Do multiple Hosts force multiple instances of webapps?
Thanks! To both Chuck & Andre. Not only does the simple solution work, but I understand a tiny bit more. Have a good night. Ken On Apr 7, 2009, at 7:20 PM, Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Do multiple Hosts force multiple instances of webapps? The first defined is the "default host". No - the defaultHost is the defined by the defaultHost attribute of the . It can be any of the elements. To make a longer story shorter, just do this : - remove the second - add 3 aliases to the first "localhost" Host : www.mydomain.com 123.123.123.123 mydomain.com Or, just use one and no aliases. What you're suggesting is unnecessarily complex and serves no real purpose. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To 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: tomcat, mod_jk, and apache
André Warnier wrote: Jordan Michaels wrote: Hey Folks, I'm using mod_jk with apache and I was wondering if it would be possible to configure mod_jk in a way that I wouldn't have to specify the entries in Tomcat's server.xml file in addition to apache. It's not terribly difficult to enter in host information in both places, but it would be nice if I could just enter in the domain name and docbase attributes in apache and then have tomcat just "know" when the request is passed to it from apache. Is this possible? That would be nice. If I then knew the ip address of your Tomcat host, and the port of your AJP connector (8009?), I could just configure my Apache httpd and mod_jk, and serve documents from wherever I want from your Tomcat server. Just kidding, but maybe a good reason not to ? ;-) Ha! Interesting point! Still, It'd be nice to know if it's possible. Security could be addressed by firewalling the AJP ports. I'm happy to do my own research and everything. I would just appreciate a point in the right direction. Thanks in advance for any help anyone can offer. Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Adobe Solution Provider - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Services not working under Program Files folder
I have used the service.bat in various versions of Tomcat with no such error. The script you posted is different from the service.bats in Tomcat 5.0, 5.5 and 6.0 that I have lying around. Where did you get your service.bat from? -- Len On Tue, Apr 7, 2009 at 19:52, mailinglist wrote: > Hi, > > I am trying to create a tomcat service with the service.bat. The > service.bat looks for my environment variable to create the service. If > my directory name has a space in it (e.g. Program files) it will create > the service but it will not start. It keeps saying that the service has > nothing to do. But if i change my directory to Programfiles, then it > would be fine. I cannot figure out why, it will not work. I even check > the services properties to see the path "c:\Program Files\..", and > this seems fine to me. Does anyone know what I am missing? I provided > the service.bat below also: > > > @echo off > if "%OS%" == "Windows_NT" setlocal > set CURRENT_DIR=%cd% > echo Current Directory = %cd% > > rem > --- > rem NT Service Install/Uninstall script > rem > rem Options > rem install Install the service using Tomcat5 as service > name. > rem Service is installed using default settings. > rem remove Remove the service from the System. > rem > rem name (optional) If the second argument is present it is > considered > rem to be new service name > rem > rem $Id: service.bat 304097 2005-09-22 13:34:05Z yoavs $ > rem > --- > > rem > --- > rem PassagePoint settings > rem > --- > if exist "%PP_HOME%\client.bat" goto okPPHome > rem Try to set PP_Home manually based on the current directory > (...\tomcat\bin) > cd ..\.. > set PP_Home=%cd% > cd %CURRENT_DIR% > > :okPPHome > echo PP_Home = %PP_HOME% > set JAVA_HOME=%PP_HOME%\Java > set PATH=%JAVA_HOME%\bin;%PATH% > > rem Guess PPService_HOME if not defined > rem Checking service home ... > if not "%PPService_HOME%" == "" goto gotHome > rem CD to the upper dir > cd .. > set PPService_HOME=%cd% > cd %CURRENT_DIR% > > :gotHome > rem Checking if Tomcat5.exe exists ... > if exist "%PPService_HOME%\bin\tomcat5.exe" goto okHome > echo The tomcat.exe was not found... > echo The PPService_HOME environment variable is not defined correctly. > echo This environment variable is needed to run this program > goto end > > :okHome > rem Make sure prerequisite environment variables are set > rem Checking Java home ... > if not "%JAVA_HOME%" == "" goto okJava > echo The JAVA_HOME environment variable is not defined > echo This environment variable is needed to run this program > goto end > > :okJava > if not "%PPService_BASE%" == "" goto gotBase > rem Setting service base to service home ... > set PPService_BASE=%PPService_HOME% > > :gotBase > rem Setting service executable to tomcat5 ... > set EXECUTABLE=%PPService_HOME%\bin\tomcat5.exe > > ::-- > :: Start configuring Tomcat service - environment ready > ::-- > rem Set default Service name > set SERVICE_NAME=PPServer > set PR_DISPLAYNAME=PassagePoint Server > > if "%1" == "" goto displayUsage > if "%2" == "" goto setServiceName > set SERVICE_NAME=%2 > set PR_DISPLAYNAME=Apache Tomcat %2 > > :setServiceName > if %1 == install goto doInstall > if %1 == remove goto doRemove > if %1 == uninstall goto doRemove > echo Unknown parameter specified: "%1" > > :displayUsage > echo. > echo Usage: service.bat install/remove [service_name] > goto end > > :doRemove > rem Remove the service > "%EXECUTABLE%" //DS//%SERVICE_NAME% > echo The service '%SERVICE_NAME%' has been removed. > goto end > > :doInstall > rem Use the environment variables as an example > rem Each command line option is prefixed with PR_ > set PR_DESCRIPTION=PassagePoint Server (Apache Tomcat5) > set PR_INSTALL=%EXECUTABLE% > set PR_LOGPATH=%PPService_BASE%\logs > set PR_CLASSPATH=%PPService_HOME%\bin\bootstrap.jar > > rem Set the server jvm from JAVA_HOME > set PR_JVM=%JAVA_HOME%\bin\server\jvm.dll > if exist "%PR_JVM%" goto foundJvm > rem Set the client jvm from JAVA_HOME > set PR_JVM=%JAVA_HOME%\bin\client\jvm.dll > if exist "%PR_JVM%" goto foundJvm > set PR_JVM=auto > > :foundJvm > rem Install the service > echo Installing the service '%SERVICE_NAME%' ... > echo Using PPService_HOME: %PPService_HOME% > echo Using PPService_BASE: %PPService_BASE% > echo Using JAVA_HOME: %JAVA_HOME% > echo Using JVM: %PR_JVM% > > "%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass > org.apache.catalina.startup.Bootstrap --StopClass > org.apache.catalina.startup.Bootstrap --StartParams start --Stop
Services not working under Program Files folder
Hi, I am trying to create a tomcat service with the service.bat. The service.bat looks for my environment variable to create the service. If my directory name has a space in it (e.g. Program files) it will create the service but it will not start. It keeps saying that the service has nothing to do. But if i change my directory to Programfiles, then it would be fine. I cannot figure out why, it will not work. I even check the services properties to see the path "c:\Program Files\..", and this seems fine to me. Does anyone know what I am missing? I provided the service.bat below also: @echo off if "%OS%" == "Windows_NT" setlocal set CURRENT_DIR=%cd% echo Current Directory = %cd% rem --- rem NT Service Install/Uninstall script rem rem Options rem installInstall the service using Tomcat5 as service name. remService is installed using default settings. rem remove Remove the service from the System. rem rem name(optional) If the second argument is present it is considered remto be new service name rem rem $Id: service.bat 304097 2005-09-22 13:34:05Z yoavs $ rem --- rem --- rem PassagePoint settings rem --- if exist "%PP_HOME%\client.bat" goto okPPHome rem Try to set PP_Home manually based on the current directory (...\tomcat\bin) cd ..\.. set PP_Home=%cd% cd %CURRENT_DIR% :okPPHome echo PP_Home = %PP_HOME% set JAVA_HOME=%PP_HOME%\Java set PATH=%JAVA_HOME%\bin;%PATH% rem Guess PPService_HOME if not defined rem Checking service home ... if not "%PPService_HOME%" == "" goto gotHome rem CD to the upper dir cd .. set PPService_HOME=%cd% cd %CURRENT_DIR% :gotHome rem Checking if Tomcat5.exe exists ... if exist "%PPService_HOME%\bin\tomcat5.exe" goto okHome echo The tomcat.exe was not found... echo The PPService_HOME environment variable is not defined correctly. echo This environment variable is needed to run this program goto end :okHome rem Make sure prerequisite environment variables are set rem Checking Java home ... if not "%JAVA_HOME%" == "" goto okJava echo The JAVA_HOME environment variable is not defined echo This environment variable is needed to run this program goto end :okJava if not "%PPService_BASE%" == "" goto gotBase rem Setting service base to service home ... set PPService_BASE=%PPService_HOME% :gotBase rem Setting service executable to tomcat5 ... set EXECUTABLE=%PPService_HOME%\bin\tomcat5.exe ::-- :: Start configuring Tomcat service - environment ready ::-- rem Set default Service name set SERVICE_NAME=PPServer set PR_DISPLAYNAME=PassagePoint Server if "%1" == "" goto displayUsage if "%2" == "" goto setServiceName set SERVICE_NAME=%2 set PR_DISPLAYNAME=Apache Tomcat %2 :setServiceName if %1 == install goto doInstall if %1 == remove goto doRemove if %1 == uninstall goto doRemove echo Unknown parameter specified: "%1" :displayUsage echo. echo Usage: service.bat install/remove [service_name] goto end :doRemove rem Remove the service "%EXECUTABLE%" //DS//%SERVICE_NAME% echo The service '%SERVICE_NAME%' has been removed. goto end :doInstall rem Use the environment variables as an example rem Each command line option is prefixed with PR_ set PR_DESCRIPTION=PassagePoint Server (Apache Tomcat5) set PR_INSTALL=%EXECUTABLE% set PR_LOGPATH=%PPService_BASE%\logs set PR_CLASSPATH=%PPService_HOME%\bin\bootstrap.jar rem Set the server jvm from JAVA_HOME set PR_JVM=%JAVA_HOME%\bin\server\jvm.dll if exist "%PR_JVM%" goto foundJvm rem Set the client jvm from JAVA_HOME set PR_JVM=%JAVA_HOME%\bin\client\jvm.dll if exist "%PR_JVM%" goto foundJvm set PR_JVM=auto :foundJvm rem Install the service echo Installing the service '%SERVICE_NAME%' ... echo Using PPService_HOME: %PPService_HOME% echo Using PPService_BASE: %PPService_BASE% echo Using JAVA_HOME:%JAVA_HOME% echo Using JVM: %PR_JVM% "%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop if not errorlevel 1 goto installed echo Failed installing '%SERVICE_NAME%' service goto end :installed rem Clear the environment variables which are not needed any more. set PR_DISPLAYNAME= set PR_DESCRIPTION= set PR_INSTALL= set PR_LOGPATH= set PR_CLASSPATH= set PR_JVM= rem Set extra parameters "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%PPService_BASE%;-Dcatalina.home=%PPService_HOME%;-Djava.endorsed.dirs=%PPService_HOME%\common\endorsed" --StartMode jvm --StopMode jvm rem More extra parameters set PR_LOGPATH
Re: tomcat, mod_jk, and apache
Jordan Michaels wrote: Hey Folks, I'm using mod_jk with apache and I was wondering if it would be possible to configure mod_jk in a way that I wouldn't have to specify the entries in Tomcat's server.xml file in addition to apache. It's not terribly difficult to enter in host information in both places, but it would be nice if I could just enter in the domain name and docbase attributes in apache and then have tomcat just "know" when the request is passed to it from apache. Is this possible? That would be nice. If I then knew the ip address of your Tomcat host, and the port of your AJP connector (8009?), I could just configure my Apache httpd and mod_jk, and serve documents from wherever I want from your Tomcat server. Just kidding, but maybe a good reason not to ? ;-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat, mod_jk, and apache
Hey Folks, I'm using mod_jk with apache and I was wondering if it would be possible to configure mod_jk in a way that I wouldn't have to specify the entries in Tomcat's server.xml file in addition to apache. It's not terribly difficult to enter in host information in both places, but it would be nice if I could just enter in the domain name and docbase attributes in apache and then have tomcat just "know" when the request is passed to it from apache. Is this possible? Thanks for the help! -Jordan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Do multiple Hosts force multiple instances of webapps?
> From: André Warnier [mailto:a...@ice-sa.com] > Subject: Re: Do multiple Hosts force multiple instances of webapps? > > The first defined is the "default host". No - the defaultHost is the defined by the defaultHost attribute of the . It can be any of the elements. > To make a longer story shorter, just do this : > - remove the second > - add 3 aliases to the first "localhost" Host : > > www.mydomain.com > > 123.123.123.123 > mydomain.com Or, just use one and no aliases. What you're suggesting is unnecessarily complex and serves no real purpose. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Do multiple Hosts force multiple instances of webapps?
André Warnier wrote: Ken Bowen wrote: [Feels like a newbie question, but I don't know the anwser.] I have a web app (myapp) which has its context.xml in META-INF. When I run it on a local vanilla Tomcat 6.0.18 (Apache download) with the standard unzipped server.xml, only one instance of myapp is started (as observed in catalina.out). I have a Tomcat 6.0.18 running on a CentOS 5 Linux on a remote hosting service. (Actually running in a Parallels virtual VPS.) That system has two hosts in the server.xml (set up by the remote hosting service) as follows: autoDeploy="true"> www.mydomain.com 123.123.123.123 Note that they share the appBase. When I drop myapp.war in webapps, and observe catalina.out, I see that it is started twice. I assume that this is the expected behavior? And so then the question is: In a remote hosting setting like this, what is the purpose of the localhost Host: Do I need this at all? Maybe it was just cruft left lying around by the person who set things up? It is the standard server.xml setting, and normally it is enough, because... The first defined is the "default host". Any request that comes in to this server on a part on which Tomcat is listening, and whose "Host:" header does not match any other tag, will be handled by that default host. In other words, if you have only that first tag, then it will handle all requests. Because you have a second tag defined, now you have two (virtual) hosts. Your Host #2 now matches all requests for "mydomain.com", "www.mydomain.com" and "123.123.123.123". Your first still matches all requests addresses to "localhost", and all the ones not matched by your Host #2. (Because it is still the default host). To make a longer story shorter, just do this : - remove the second - add 3 aliases to the first "localhost" Host : > www.mydomain.com > 123.123.123.123 mydomain.com Of course, as Charles pointed out, these 3 aliases are totally superfluous, for the reason I myself outlined above. Duh.. Time to go to bed here too. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Do multiple Hosts force multiple instances of webapps?
Ken Bowen wrote: [Feels like a newbie question, but I don't know the anwser.] I have a web app (myapp) which has its context.xml in META-INF. When I run it on a local vanilla Tomcat 6.0.18 (Apache download) with the standard unzipped server.xml, only one instance of myapp is started (as observed in catalina.out). I have a Tomcat 6.0.18 running on a CentOS 5 Linux on a remote hosting service. (Actually running in a Parallels virtual VPS.) That system has two hosts in the server.xml (set up by the remote hosting service) as follows: autoDeploy="true"> www.mydomain.com 123.123.123.123 Note that they share the appBase. When I drop myapp.war in webapps, and observe catalina.out, I see that it is started twice. I assume that this is the expected behavior? And so then the question is: In a remote hosting setting like this, what is the purpose of the localhost Host: Do I need this at all? Maybe it was just cruft left lying around by the person who set things up? It is the standard server.xml setting, and normally it is enough, because... The first defined is the "default host". Any request that comes in to this server on a part on which Tomcat is listening, and whose "Host:" header does not match any other tag, will be handled by that default host. In other words, if you have only that first tag, then it will handle all requests. Because you have a second tag defined, now you have two (virtual) hosts. Your Host #2 now matches all requests for "mydomain.com", "www.mydomain.com" and "123.123.123.123". Your first still matches all requests addresses to "localhost", and all the ones not matched by your Host #2. (Because it is still the default host). To make a longer story shorter, just do this : - remove the second - add 3 aliases to the first "localhost" Host : > www.mydomain.com > 123.123.123.123 mydomain.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Do multiple Hosts force multiple instances of webapps?
> From: Ken Bowen [mailto:kbo...@als.com] > Subject: Do multiple Hosts force multiple instances of webapps? > Note that they share the appBase. Which can lead to "interesting" events when updating on the fly. > When I drop myapp.war in webapps, and observe catalina.out, I see that > it is started twice. I assume that this is the expected behavior? Yes; there's a separate classloader created for each / combination. > And so then the question is: In a remote hosting setting > like this, what is the purpose of the localhost Host: > You might well ask what's the purpose of the other with the domain name. You really only need one, and its name is irrelevant, as long as that name appears on the defaultHost attribute of the . Multiple elements are useful when you really are serving separate, multiple domains. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
André Warnier wrote: Trying to redeem myself to Andrey for hijacking his post.. Andrey, in your (latest) client code you do not set either a content-length, nor a "chunked" encoding headers. Is it possible that Tomcat 6 just ignores your POST content in that case ? In RFC2616, I find this in section 4.3 : The presence of a message-body in a request is signaled by the inclusion of a Content-Length or Transfer-Encoding header field in the request's message-headers. A message-body MUST NOT be included in a request if the specification of the request method (section 5.1.1) does not allow sending an entity-body in requests. A server SHOULD read and forward a message-body on any request; if the request method does not include defined semantics for an entity-body, then the message-body SHOULD be ignored when handling the request. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Do multiple Hosts force multiple instances of webapps?
[Feels like a newbie question, but I don't know the anwser.] I have a web app (myapp) which has its context.xml in META-INF. When I run it on a local vanilla Tomcat 6.0.18 (Apache download) with the standard unzipped server.xml, only one instance of myapp is started (as observed in catalina.out). I have a Tomcat 6.0.18 running on a CentOS 5 Linux on a remote hosting service. (Actually running in a Parallels virtual VPS.) That system has two hosts in the server.xml (set up by the remote hosting service) as follows: autoDeploy="true"> www.mydomain.com 123.123.123.123 Note that they share the appBase. When I drop myapp.war in webapps, and observe catalina.out, I see that it is started twice. I assume that this is the expected behavior? And so then the question is: In a remote hosting setting like this, what is the purpose of the localhost Host: Do I need this at all? Maybe it was just cruft left lying around by the person who set things up? I certainly want to avoid two copies of myapp running. Thanks in advance Ken - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
Caldarale, Charles R wrote: From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Cannot read httpservlet's inputstream Does there exist a library somewhere which allows me to feed it this InputStream and which will parse the parts for me appropriately (for example allowing me to determine if a given parameter is a file, and handle it easily ) ? Why not just use this? http://commons.apache.org/fileupload/ Great ! Thanks for the link. The irony is (now that I look back) that this was mentioned in the very first post of Andrey, the OP. So he already knew that.. Big circle to get back to the starting point. Sorry Andrey, I got carried away. By the way, did you find a solution for your problem yet ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
On Tue, Apr 07, 2009 at 05:30:49PM -0500, Caldarale, Charles R wrote: > > CGI? That URL gives me download links. > > Sorry, I scanned it too quickly (time to go home). No problems. It happens. Thanks for replying and have fun. :) -- "Not to engage in the pursuit of ideas is to live like ants instead of men." --Mortimer J. Adler /\___/\ / /\ /\ \ Phil/Ant @ http://antfarm.ma.cx (Personal Web Site) | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net \ _ / E-mail: phi...@earthlink.net or a...@zimage.com ( ) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
> From: Caldarale, Charles R > Subject: RE: Newbie Question with Apache Tomcat v6.0.18 in Windows XP > SP2. > CGI? That URL gives me download links. Sorry, I scanned it too quickly (time to go home). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
> > http://www.google.com/search?q=tomcat+pac+script reveal that the > > relationships. > > If you actually took a look at what the search found, you'd see that the > relationship is ... nothing. Mostly hits on a similarly confused thread from > a while back. Oh. Strange results then. > > > Here is the scenario from her based on Tomcat: > > 1. Install the latest binaries of TomCat(6.0.18) > > http://tomcat.apache.org/download-60.cgi and use the generic setup(we > > don't need a lot of optimizations). > > What do you intend to do with CGI on Tomcat? httpd does that better, but > nothing in your requirements listed so far indicate any need for CGI. CGI? That URL gives me download links. I downloaded http://www.urlstructure.com/apache/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.exe ("Core: Windows Service Installer (pgp, md5)"). > > 2. Setup Tomcat's proxy server and make sure it works on a client(needs > > to be physically different machine than server). > > There is no "Tomcat proxy server", as we keep trying to tell you. I know that. That is what the original request said. I was sharing to show what the goals were. > > > 3. Surf on the client machine with the configured Internet > > Explorer (IE) to use Tomcat's proxy server and see if the > > websites show up via Tomcat. > > There is no "Tomcat proxy server", as we keep trying to tell you. > > > 4. Create a proxy auto-config (PAC) file and set it up so that it sends > > a proxy configuration from the tomcat server to your client machine. > > There is no "Tomcat proxy server", as we keep trying to tell you. > > > Are we confused > > Seriously confused. As Chris keeps pointing out, you can likely use > httpd for this, but there are simpler solutions. Tomcat serves no > purpose here. OK and thanks. -- "Not to engage in the pursuit of ideas is to live like ants instead of men." --Mortimer J. Adler /\___/\ / /\ /\ \ Phil/Ant @ http://antfarm.ma.cx (Personal Web Site) | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net \ _ / E-mail: phi...@earthlink.net or a...@zimage.com ( ) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
> From: Phillip Pi [mailto:a...@zimage.com] > Subject: Re: Newbie Question with Apache Tomcat v6.0.18 in Windows XP > SP2. > > http://www.google.com/search?q=tomcat+pac+script reveal that the > relationships. If you actually took a look at what the search found, you'd see that the relationship is ... nothing. Mostly hits on a similarly confused thread from a while back. > Here is the scenario from her based on Tomcat: > 1. Install the latest binaries of TomCat(6.0.18) > http://tomcat.apache.org/download-60.cgi and use the generic setup(we > don't need a lot of optimizations). What do you intend to do with CGI on Tomcat? httpd does that better, but nothing in your requirements listed so far indicate any need for CGI. > 2. Setup Tomcat's proxy server and make sure it works on a client(needs > to be physically different machine than server). There is no "Tomcat proxy server", as we keep trying to tell you. > 3. Surf on the client machine with the configured Internet > Explorer (IE) to use Tomcat's proxy server and see if the > websites show up via Tomcat. There is no "Tomcat proxy server", as we keep trying to tell you. > 4. Create a proxy auto-config (PAC) file and set it up so that it sends > a proxy configuration from the tomcat server to your client machine. There is no "Tomcat proxy server", as we keep trying to tell you. > Are we confused Seriously confused. As Chris keeps pointing out, you can likely use httpd for this, but there are simpler solutions. Tomcat serves no purpose here. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
On Tue, Apr 07, 2009 at 05:58:46PM -0400, Christopher Schultz wrote: > > OK, she said we need Tomcat because of PAC scripts to do the proxy auto > > configurations. > > I think she's still confused. Sorry if you already know all this, but > I'm new to proxy research and I'd never heard of a "PAC script". Here's > my reference: http://en.wikipedia.org/wiki/Proxy_auto-config No problems. I am confused and new too, and of course learning! :) Good find too. I didn't think PAC was a generic thing. I thought it was only for Tomcat. > These scripts don't appear to have anything to do with Tomcat > specifically. Let me re-state this: Tomcat does not include any kind of > build-in proxying capability. You'd either have to write your own web > application to run in Tomcat and do the proxying (which is totally > stupid, because you'd be performing a /ton/ of work that is not > necessary just to then hand-off the request to another server) or use > someone else's existing application (equally stupid for the previously > stated reason). > > You might want to read > http://homepages.tesco.net/J.deBoynePollard/FGA/web-browser-auto-proxy-configuration.html > for information on these scripts and ultimately how to use them. Excellent finds. I will share those. > > So, do I still need to do the Apache [web] server? > > Maybe? If you want to do proxying, Apache httpd will get you closer than > Apache Tomcat, but I think there are better products out there for you > (see below). If you're still interested, you can read > http://httpd.apache.org/docs/2.2/mod/mod_proxy.html for everything > Apache httpd can do for you proxy-wise. Thanks. Maybe she wanted me to run Apache and not Tomcat. I will have to talk her about that. > > If so, then can I put both Tomcat and Apache on one machine to act a > > server and another computer? > > Uh... huh? Yes, you can install both Apache httpd and Apache Tomcat on > the same machine, but I'm not sure why you'd want both (or either)? Well, it sounded like Apache httpd and Tomcat are two differnet things. Apache for web service/server and Tomcat to add to Apache. > You might want to start with the information you can find on Wikipedia > about proxy servers (http://en.wikipedia.org/wiki/Proxy_server) > specifically the sections on "web proxy" and "proxy software". Instead > of trying to get httpd or Tomcat as a proxy server, why not use > something that was built specifically to act as a proxy (such as Squid). OK. I actually used CCproxy (http://www.youngzsoft.net/ccproxy/) and got it to work. She wanted me to use Tomcat for another scenario. [shrugs] Thanks again. :) -- "Not to engage in the pursuit of ideas is to live like ants instead of men." --Mortimer J. Adler /\___/\ / /\ /\ \ Phil/Ant @ http://antfarm.ma.cx (Personal Web Site) | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net \ _ / E-mail: phi...@earthlink.net or a...@zimage.com ( ) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 4/7/2009 5:56 PM, André Warnier wrote: > Now suppose I /do/ a POST with multipart/form-data encoding to a Tomcat > servlet, and one of the parts /is/ a large file. > How can I handle this at the servlet level ? Of course you can. Haven't we been over this one already? ;) > All I see in the Servlet Spec is HttpRequest.getParameter(), which > returns a string (already URL-decoded), which seems hardly appropriate > for uploading a file. ...especially because the servlet spec says that it will only decode form parameters if the content-type is application/x-www-form-urlencoded. If you use multipart/form-data, then your servlet has to read the entire request body using request.getReader() or request.getInputStream() and parse-out its own parameters AND file content. > Or else HttpRequest.getInputStream(), which returns a byte stream. But > then I guess I have to do the whole multipart/form-data parsing myself. Exactly. There are libraries that can handle this sort of stuff for you, but it's not part of the standard servlet API. Think of this as HTTP::multipart which you have to download from JPAN and install. :) > Does there exist a library somewhere which allows me to feed it this > InputStream and which will parse the parts for me appropriately (for > example allowing me to determine if a given parameter is a file, and > handle it easily ) ? There are several. Struts 2 has one built-into itself, as do other application frameworks. Here are several standalone ones: Super old-skool, still maintained: http://www.servlets.com/cos/index.html Newer, and probably more widely used: http://commons.apache.org/fileupload/ I'm sure there are others. IMO there's no reason to look beyond commons-fileupload. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbz3UACgkQ9CaO5/Lv0PCtFQCeOqQnQUBeD3mpb6ZQlxKu1SrU qo0AoLXQGCqMHT6ejyHr9O4xTmwZgtSF =II8q -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
On Tue, Apr 07, 2009 at 04:46:32PM -0500, Caldarale, Charles R wrote: > > OK, she said we need Tomcat because of PAC scripts to do the proxy auto > > configurations. > > I've never heard of PAC scripts in conjunction with Tomcat. http://www.google.com/search?q=tomcat+pac+script reveal that the relationships. > To repeat: Tomcat has zero, no, nada proxy capability. httpd can be used as > a proxy, but it's still not really clear what your goals are here. Here is the scenario from her based on Tomcat: 1. Install the latest binaries of TomCat(6.0.18) http://tomcat.apache.org/download-60.cgi and use the generic setup(we don't need a lot of optimizations). 2. Setup Tomcat's proxy server and make sure it works on a client(needs to be physically different machine than server). 3. Surf on the client machine with the configured Internet Explorer (IE) to use Tomcat's proxy server and see if the websites show up via Tomcat. 4. Create a proxy auto-config (PAC) file and set it up so that it sends a proxy configuration from the tomcat server to your client machine. 5. Now make 2 auto config scripts. 6. Where it sets the generic proxy config on the client to point to the server. 7. Where it sets the more complicated setup to the client. Are we confused or am I misunderstanding the requirements and goals? Again, I am new at this Web server administration and proxy stuff. I hope this makes it clearer for you guys (you guys are fast and awesome). -- "Not to engage in the pursuit of ideas is to live like ants instead of men." --Mortimer J. Adler /\___/\ / /\ /\ \ Phil/Ant @ http://antfarm.ma.cx (Personal Web Site) | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net \ _ / E-mail: phi...@earthlink.net or a...@zimage.com ( ) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Cannot read httpservlet's inputstream
> From: André Warnier [mailto:a...@ice-sa.com] > Subject: Re: Cannot read httpservlet's inputstream > > Does there exist a library somewhere which allows me to feed it this > InputStream and which will parse the parts for me appropriately (for > example allowing me to determine if a given parameter is a file, and > handle it easily ) ? Why not just use this? http://commons.apache.org/fileupload/ - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: Migration from Tomcat 4.1 to 6.0 <<>>
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rashid, On 4/7/2009 5:45 PM, Rashid Malik wrote: > What I mean here is that I have three 3 installations of tomcat not > 2. How many total web applications do you have? Do any of them have any requirements for which Tomcat version on which they are running? It sounds like the answer is "I have 3 webapps and at least one of them requires Tomcat 6.0". If there are no other constraints, then just move all your webapps to Tomcat 6.0, uninstall Tomcat 4.1, and change Tomcat 6.0's to port="80" as I said previously. > There is tomcat 2.2 application (using port 80) As Chuck suggests, that is probably Apache httpd, which might actually make things easier. If this is the case, you have not correctly configured httpd to support your new application. Go into httpd's configuration and find out where your other application is configured. Read and /understand/ the configuration before you start changing things. Reading that configuration plus the config reference I already posted should clear a lot of things up. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbzb4ACgkQ9CaO5/Lv0PCgngCeJLFU7QsoPwisTu7EVwvLHJ+g 3aEAoKgI0amw4JfW1BU0+5fbmG1rRO4G =1bQY -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Phillip, On 4/7/2009 5:38 PM, Phillip Pi wrote: > OK, she said we need Tomcat because of PAC scripts to do the proxy auto > configurations. I think she's still confused. Sorry if you already know all this, but I'm new to proxy research and I'd never heard of a "PAC script". Here's my reference: http://en.wikipedia.org/wiki/Proxy_auto-config These scripts don't appear to have anything to do with Tomcat specifically. Let me re-state this: Tomcat does not include any kind of build-in proxying capability. You'd either have to write your own web application to run in Tomcat and do the proxying (which is totally stupid, because you'd be performing a /ton/ of work that is not necessary just to then hand-off the request to another server) or use someone else's existing application (equally stupid for the previously stated reason). You might want to read http://homepages.tesco.net/J.deBoynePollard/FGA/web-browser-auto-proxy-configuration.html for information on these scripts and ultimately how to use them. > So, do I still need to do the Apache [web] server? Maybe? If you want to do proxying, Apache httpd will get you closer than Apache Tomcat, but I think there are better products out there for you (see below). If you're still interested, you can read http://httpd.apache.org/docs/2.2/mod/mod_proxy.html for everything Apache httpd can do for you proxy-wise. > If so, then can I put both Tomcat and Apache on one machine to act a > server and another computer? Uh... huh? Yes, you can install both Apache httpd and Apache Tomcat on the same machine, but I'm not sure why you'd want both (or either)? You might want to start with the information you can find on Wikipedia about proxy servers (http://en.wikipedia.org/wiki/Proxy_server) specifically the sections on "web proxy" and "proxy software". Instead of trying to get httpd or Tomcat as a proxy server, why not use something that was built specifically to act as a proxy (such as Squid). > The reason for this that I need to test Internet (not Intranet) Web > pages through proxies. You should be able to use any site on the Internet for this. Try http://www.google.com/ or http://www.yougotrickrolled.com/ I hope all that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbzJYACgkQ9CaO5/Lv0PBUAgCgqrlt0QHOWz/keX0z8/La+KQg 6oMAnAz+BKWMUBQ5SX7KtXyVXzLoLrHW =KK6q -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Migration from Tomcat 4.1 to 6.0 <<>>
> From: Rashid Malik [mailto:rma...@dhmh.state.md.us] > Subject: Re: Migration from Tomcat 4.1 to 6.0 <<>> > > There is tomcat 2.2 application (using port 80) There was never any Tomcat 2.2 release. You may actually have httpd on port 80, since there is a 2.2 version of that. httpd usually communicates with Tomcat via port 8009 using mod_jk; is that what's really going on? What you have described so far as your existing installation is not physically possible. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 4/7/2009 4:49 PM, André Warnier wrote: Ok Mark, I don't pretend I know how it works in Tomcat. How does one upload a file then ? That depends on how you /want/ to upload it. If you want to use the standard HTML form-based file upload, you'll have to use multipart/form-data (since that's what the HTML spec says to do). PUT is, as stated, also an option. The only real difference is the meaning of the target URI. I mean other than with a PUT, as I presume that the OP doesn't just want to write files arbitrarily in his URI space on the server) If your server is expecting a single file for upload, then there is no need to go through the whole multipart/form-data thing. You can just use the Content-Type header to indicate that the file is application/x-msword or whatever and jam the file into the request body. multipart/form-data is only useful if you want both discrete data (like form parameters) plus something huge, like the contents of a file. It's just like an email message: there's no reason to use a multipart MIME message when there's only one part to transmit. Ok, got it, thanks Chris (and Mark). Now suppose I /do/ a POST with multipart/form-data encoding to a Tomcat servlet, and one of the parts /is/ a large file. How can I handle this at the servlet level ? All I see in the Servlet Spec is HttpRequest.getParameter(), which returns a string (already URL-decoded), which seems hardly appropriate for uploading a file. Or else HttpRequest.getInputStream(), which returns a byte stream. But then I guess I have to do the whole multipart/form-data parsing myself. Does there exist a library somewhere which allows me to feed it this InputStream and which will parse the parts for me appropriately (for example allowing me to determine if a given parameter is a file, and handle it easily ) ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
> From: Phillip Pi [mailto:a...@zimage.com] > Subject: Re: Newbie Question with Apache Tomcat v6.0.18 in Windows XP > SP2. > > OK, she said we need Tomcat because of PAC scripts to do the proxy auto > configurations. I've never heard of PAC scripts in conjunction with Tomcat. To repeat: Tomcat has zero, no, nada proxy capability. httpd can be used as a proxy, but it's still not really clear what your goals are here. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Migration from Tomcat 4.1 to 6.0 <<>>
Hello Chris, Thanks for your quick response. What you said makes sense to me but let me clarify my situation further. > Hi, I changed port 8080 to 80 and I get page not found error. Please > note that I have another website that is running on an older version > of tomcat. What I mean here is that I have three 3 installations of tomcat not 2. There is tomcat 2.2 application (using port 80) that is being used for a very basic web page that has nothing but URLs to various parts of the application that is being run on Tomcat 6.0. This tomcat 6.0 application is running on port 8080. The older version of this application was using tomcat 4.1 and listening on port 8080 also. However, after upgrading the application to 6.0, I shutdown the tomcat 4.1 application. From the tomcat 2.2 homepage, I can just click the link that will take me directly to > http://localhost/MyWebAPP/ However, after shutting down tomcat 4.1, installing and configuring tomcat 6.0, I can use the new web app only using the following URL. http://localhost:8080/MyWebAPP/ Do I still need to do what you mentioned in your previous email or should there be a different approach. I can completely uninstall tomcat 4.1 if I have to. Thanks, Rashid >>> Christopher Schultz 4/7/2009 5:22 PM >>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rashid, On 4/7/2009 5:08 PM, Rashid Malik wrote: > Hi, I changed port 8080 to 80 and I get page not found error. Please > note that I have another website that is running on an older version > of tomcat. Aah, you didn't mention that. Only one process may bind to a particular interface/port combination. In your case, port 80 is already taken (by Tomcat 4.1). If you want both Tomcat 4.1 ans 6.0 to appear to be using port 80, you will need to put another piece of software out in front in order to play traffic cop and properly route the requests to the appropriate server (app on TC4.1 versus app on TC6.0). Apache httpd is a popular choice for accomplishing this. You will have to: 1. Change Tomcat 4.1's configuration so that the HTTP port is something /other/ than port 80 (8080 is a popular choice) 2. Change Tomcat 6.0's configuration so that the HTTP port is something /other/ than port 80 and 8080 (8081?) 3. Install Apache httpd and have it listen on port 80 4. Configure httpd to send the appropriate requests to the appropriate back-end server To accomplish #4, you will need to use either mod_proxy_http, mod_proxy_ajp (both built-into Apache httpd 2.2.x) or mod_jk (which is a separate download). There is a lot of documentation for using mod_jk here: http://tomcat.apache.org/connectors-doc/ If you use mod_proxy_http, you'll need to do: ProxyPass /appA http://localhost:8080/appA ProxyPass /appB http://localhost:8081/appB That should be enough to get you started. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbw/sACgkQ9CaO5/Lv0PA/TgCfUuclAcTXu9aQwp7Ov2qSK7I5 nacAoK2ple5RH6My3jwaTIeQBXB88caf =rcZe -END PGP SIGNATURE- - 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: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Phillip, On 4/7/2009 4:57 PM, Phillip Pi wrote: > On Tue, Apr 07, 2009 at 04:49:06PM -0400, Christopher Schultz wrote: > >>> I was asked to set up a Tomcat's proxy server in Windows (using XP SP2). >> Question 1: What is "Tomcat's proxy server"? > > Apache Tomcat to act like a proxy server so other PCs, on the LAN, can > go through it to access the Internet. Is this not a correct way to set > up? Tomcat does not include a proxy server. You would have to install one on top of it. I am unaware of any Java servlet-based proxy servers. Most proxy servers work at a lower-level because a real servlet container provides a /ton/ of unnecessary features and complexity if all you want to do it proxy requests. > I thought Apache Tomcat already includes Apache. To reiterate André's statement: Apache is the name of an organization. httpd is the web server. Tomcat is the Java servlet container (sometimes called an "application server"). Whoever asked you to "install the Apache Tomcat proxy server" must have also been confused about this relationship. If you are interested in a proxy server implemented in Java, there are some listed here (if you can stomach all the frackin' blinking and animated crap): http://www.roseindia.net/opensource/freeproxyservers.php Squid (http://www.squid-cache.org/) is a popular HTTP proxy if that's all you're looking for. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbyPEACgkQ9CaO5/Lv0PAlSQCgwPmYQ6VkWRIkW3Ko0sa8tOyS 5GAAnizQm0F/G+7M3j5qVCEd75O2Ji/L =/Jr/ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
On Tue, Apr 07, 2009 at 02:10:39PM -0700, Phillip Pi wrote: > > >>>I was asked to set up a Tomcat's proxy server in Windows (using XP SP2). > > >>Question 1: What is "Tomcat's proxy server"? > > > > > >Apache Tomcat to act like a proxy server so other PCs, on the LAN, can > > >go through it to access the Internet. Is this not a correct way to set > > >up? > > > > What you want is probably Apache httpd, not Apache Tomcat. > > And in httpd, look up "forward proxy" in > > http://httpd.apache.org/docs/2.2/mod/mod_proxy.html > > > > > > >I thought Apache Tomcat already includes Apache. > > > > That is probably what got you confused. > > "Apache" is a generic name for many different software projects. > > (check http://www.apache.org/, the list below "Projects"). > > One of them is "Apache HTTP Server" (which is generally what people mean > > by "Apache" or "Apache webserver"). Another one is "Apache Tomcat" (or > > "Tomcat" for short), which is a java servlet engine (container?). > > They are two different things, which /can/ work together, but also > > separately. > > Thanks. Let me share this with my boss to see what she says. Maybe she > did get confused. OK, she said we need Tomcat because of PAC scripts to do the proxy auto configurations. So, do I still need to do the Apache server? If so, then can I put both Tomcat and Apache on one machine to act a server and another computer? The reason for this that I need to test Internet (not Intranet) Web pages through proxies. -- "Not to engage in the pursuit of ideas is to live like ants instead of men." --Mortimer J. Adler /\___/\ / /\ /\ \ Phil/Ant @ http://antfarm.ma.cx (Personal Web Site) | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net \ _ / E-mail: phi...@earthlink.net or a...@zimage.com ( ) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Help with a Tomcat issue???
Me too. And looking at the source (via Google search), it looks like that is what is was meant to do. I'm using Sun Java JDK 1.6.0_13. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, April 07, 2009 12:48 PM To: Tomcat Users List Subject: Re: Help with a Tomcat issue??? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jason, On 4/6/2009 6:33 PM, Jason Smith wrote: > Sun's implementation of HttpURLConnector apparently creates a new > ChunkedOutputStream every time you call .getOutputStream(). That's obnoxious and completely unexpected. Latest version of Java, huh? Too bad. Obviously, the solution is for your client to cache the result of conn.getOutputStream, but I would have expected conn.getOutputStream to return the same object every time, or at least an object that /felt/ like the same object every time. Strange. > So if I call conn.getOutputStream().close(); 10 times, I get a very > interesting method name. I looked at the source for this, and it was > not apparent that they meant to do this. However, with this code, my > method name becomes: > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > POST Nice. - -chbris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbn9IACgkQ9CaO5/Lv0PDyJACgw9GfbGHvAqUfuaP+vRcNEa0B 2m0An34BtHsiwEZ/G0e0zq7rlbmn8wN4 =Fax0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Migration from Tomcat 4.1 to 6.0 <<>>
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rashid, On 4/7/2009 5:08 PM, Rashid Malik wrote: > Hi, I changed port 8080 to 80 and I get page not found error. Please > note that I have another website that is running on an older version > of tomcat. Aah, you didn't mention that. Only one process may bind to a particular interface/port combination. In your case, port 80 is already taken (by Tomcat 4.1). If you want both Tomcat 4.1 ans 6.0 to appear to be using port 80, you will need to put another piece of software out in front in order to play traffic cop and properly route the requests to the appropriate server (app on TC4.1 versus app on TC6.0). Apache httpd is a popular choice for accomplishing this. You will have to: 1. Change Tomcat 4.1's configuration so that the HTTP port is something /other/ than port 80 (8080 is a popular choice) 2. Change Tomcat 6.0's configuration so that the HTTP port is something /other/ than port 80 and 8080 (8081?) 3. Install Apache httpd and have it listen on port 80 4. Configure httpd to send the appropriate requests to the appropriate back-end server To accomplish #4, you will need to use either mod_proxy_http, mod_proxy_ajp (both built-into Apache httpd 2.2.x) or mod_jk (which is a separate download). There is a lot of documentation for using mod_jk here: http://tomcat.apache.org/connectors-doc/ If you use mod_proxy_http, you'll need to do: ProxyPass /appA http://localhost:8080/appA ProxyPass /appB http://localhost:8081/appB That should be enough to get you started. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbw/sACgkQ9CaO5/Lv0PA/TgCfUuclAcTXu9aQwp7Ov2qSK7I5 nacAoK2ple5RH6My3jwaTIeQBXB88caf =rcZe -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 4/7/2009 4:49 PM, André Warnier wrote: > Ok Mark, I don't pretend I know how it works in Tomcat. > How does one upload a file then ? That depends on how you /want/ to upload it. If you want to use the standard HTML form-based file upload, you'll have to use multipart/form-data (since that's what the HTML spec says to do). PUT is, as stated, also an option. The only real difference is the meaning of the target URI. > I mean other than with a PUT, as I presume that the OP doesn't just want > to write files arbitrarily in his URI space on the server) If your server is expecting a single file for upload, then there is no need to go through the whole multipart/form-data thing. You can just use the Content-Type header to indicate that the file is application/x-msword or whatever and jam the file into the request body. multipart/form-data is only useful if you want both discrete data (like form parameters) plus something huge, like the contents of a file. It's just like an email message: there's no reason to use a multipart MIME message when there's only one part to transmit. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbwg0ACgkQ9CaO5/Lv0PB9vACcC/UIPdCE9DwQglm78OORn+Eu kJYAoL59rNOTErwLU2iK6aHm0YOY8XVF =ZL/Y -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
> >>>I was asked to set up a Tomcat's proxy server in Windows (using XP SP2). > >>Question 1: What is "Tomcat's proxy server"? > > > >Apache Tomcat to act like a proxy server so other PCs, on the LAN, can > >go through it to access the Internet. Is this not a correct way to set > >up? > > What you want is probably Apache httpd, not Apache Tomcat. > And in httpd, look up "forward proxy" in > http://httpd.apache.org/docs/2.2/mod/mod_proxy.html > > > >I thought Apache Tomcat already includes Apache. > > That is probably what got you confused. > "Apache" is a generic name for many different software projects. > (check http://www.apache.org/, the list below "Projects"). > One of them is "Apache HTTP Server" (which is generally what people mean > by "Apache" or "Apache webserver"). Another one is "Apache Tomcat" (or > "Tomcat" for short), which is a java servlet engine (container?). > They are two different things, which /can/ work together, but also > separately. Thanks. Let me share this with my boss to see what she says. Maybe she did get confused. -- "Not to engage in the pursuit of ideas is to live like ants instead of men." --Mortimer J. Adler /\___/\ / /\ /\ \ Phil/Ant @ http://antfarm.ma.cx (Personal Web Site) | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net \ _ / E-mail: phi...@earthlink.net or a...@zimage.com ( ) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Migration from Tomcat 4.1 to 6.0 <<>>
Hi, I changed port 8080 to 80 and I get page not found error. Please note that I have another website that is running on an older version of tomcat. that website is already using port 80. On that page, there is a link that connects to http://localhost/MyWebAPP/ . If I use the older version of this site (4.1), it works. However, using a 6.0 version only works with this URL: http://localhost:8080/MyWebAPP/ . Please help >>> Christopher Schultz 4/7/2009 4:56 PM >>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rashid, On 4/7/2009 4:45 PM, Rashid Malik wrote: > To give you an example, the URL to get to the application in 4.1 is: > > http://localhost/MyWebAPP/ > > However, after shutting down tomcat 4.1, installing and configuring > tomcat 6.0, I can use the new web app only using the following URL. > > http://localhost:8080/MyWebAPP/ Your new 6.0 configuration does not match your old 4.1 configuration. Check server.xml for an active (that is, not commented-out) element. It should have the port="8080" attribute. Just change this to port="80" and you will no longer need to specify the port number. > Taking out the port number 8080 from the following URL returns page > not found. That's because the port number is required if your server is not listening on port 80 (the default port for HTTP). > Please note that the 4.1 manager does not work for some reason. You should use the 6.0 manager with Tomcat 6.0. The 4.1 manager will be incompatible with Tomcat 6.0. > P.s. Also, is there a way to change the port from 8080 to something > else? See above. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbveAACgkQ9CaO5/Lv0PAybgCgliNBGcU7ul+gA6kwat/KErci XnoAn2v/4+a0hPAjDhcja9QrG+9DDumL =k/AZ -END PGP SIGNATURE- - 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: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
Phillip Pi wrote: On Tue, Apr 07, 2009 at 04:49:06PM -0400, Christopher Schultz wrote: I was asked to set up a Tomcat's proxy server in Windows (using XP SP2). Question 1: What is "Tomcat's proxy server"? Apache Tomcat to act like a proxy server so other PCs, on the LAN, can go through it to access the Internet. Is this not a correct way to set up? What you want is probably Apache httpd, not Apache Tomcat. And in httpd, look up "forward proxy" in http://httpd.apache.org/docs/2.2/mod/mod_proxy.html I thought Apache Tomcat already includes Apache. That is probably what got you confused. "Apache" is a generic name for many different software projects. (check http://www.apache.org/, the list below "Projects"). One of them is "Apache HTTP Server" (which is generally what people mean by "Apache" or "Apache webserver"). Another one is "Apache Tomcat" (or "Tomcat" for short), which is a java servlet engine (container?). They are two different things, which /can/ work together, but also separately. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Redirect from https to http
as2 wrote: > Is this possible? Yes. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Redirect from https to http
Is this possible? Thanks x -- View this message in context: http://www.nabble.com/Redirect-from-https-to-http-tp22938216p22938216.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
On Tue, Apr 07, 2009 at 04:49:06PM -0400, Christopher Schultz wrote: > > I was asked to set up a Tomcat's proxy server in Windows (using XP SP2). > > Question 1: What is "Tomcat's proxy server"? Apache Tomcat to act like a proxy server so other PCs, on the LAN, can go through it to access the Internet. Is this not a correct way to set up? > Are you talking about using another web server out in front of Tomcat? > That would make sense given the steps you've taken: > > > 1. Installed the required latest Sun's JRE v6u13. > > 2. Downloaded and installed > > http://www.archicentral.com/mirrors/apache/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.exe > > > > (Apache Tomcat Core). > > 3. Saw Apache Tomcat's system tray icon. I opened it up to see its > > screen, but did not seeing anything about proxy. > > Tomcat does not run its own proxy or anything like that. If you want to > run another web server in front of Tomcat, you'll have to install and > configure /that/ web server. > > It sounds like you're trying to set up Apache httpd (which is a web > server) so that it proxies (some?) traffic to Tomcat. Where is Tomcat > already running? If it's already running on another box, and this new > Windows machine is intended to be the "proxy", then your first step is > to uninstall Tomcat. Really. > > Next, download Apache httpd (you can find it here: > http://httpd.apache.org/download.cgi). The latest version is 2.2.11. Get > the windows binary and install it. I thought Apache Tomcat already includes Apache. > Now, you'll be able to find things like httpd.conf (part of Apache > httpd). You will want to configure a module called mod_proxy_ajp or > mod_proxy_http (use the 'ajp' one if you want to use the binary > connector or the 'http' one is you want a plain-text connector... which > one should you use? it depends...). > > Basically, your configuration should look like this, in httpd.conf: > > ProxyPass [path to proxy] protocol://host/remote path > > For instance, if you were running Tomcat on a server called "scratchy" > and your web application's context path was "/itchy" and you had an HTTP > connector running in Tomcat on port 8080, then this would be an > appropriate setup: > > ProxyPass /itchy http://scratchy:8080/itchy > > On the other hand, if you were using the binary protocol on port 8009 > and everything else were the same, you would do this: > > ProxyPass /itchy ajp://scratchy:8009/itchy > > This should be enough to get you to ask a /lot/ of other questions. ;) -- "Not to engage in the pursuit of ideas is to live like ants instead of men." --Mortimer J. Adler /\___/\ / /\ /\ \ Phil/Ant @ http://antfarm.ma.cx (Personal Web Site) | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net \ _ / E-mail: phi...@earthlink.net or a...@zimage.com ( ) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
André Warnier wrote: > Mark Thomas wrote: >> André Warnier wrote: >>> Despite what you may wish and what you may have found in Google, I >>> believe that if you want to send a file, you have to do it with a >>> "multipart/form-data" content type. >> >> Nope. That is just plain wrong. >> >>> http://www.faqs.org/rfcs/rfc2616.html >>> Sections 9.5 (POST) and 9.6 (PUT) describe the two methods that allow >>> you to upload a file. But 9.6 is not applicable, since you are sending >>> this to a webapp, not directly to a URI. >> >> Wrong again. PUT is disabled by default for security reasons but it is >> valid and is supported by the default servlet. >> > Ok Mark, I don't pretend I know how it works in Tomcat. > How does one upload a file then ? > > I mean other than with a PUT, as I presume that the OP doesn't just want > to write files arbitrarily in his URI space on the server) Put the content in the body of a POST, read the request body content in your servlet and do whatever you need to do with it. If you want to add extra attributes and send them via POST then you'll need to use "multipart/form-data". At that point using a library will be easier than coding it yourself although you can if you want. There are other ways of sending extra attributes that don't use multipart. There are, as usual, many ways of doing this and no one way is the best. It will depend on what you are trying to do and why. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Migration from Tomcat 4.1 to 6.0 <<>>
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rashid, On 4/7/2009 4:45 PM, Rashid Malik wrote: > To give you an example, the URL to get to the application in 4.1 is: > > http://localhost/MyWebAPP/ > > However, after shutting down tomcat 4.1, installing and configuring > tomcat 6.0, I can use the new web app only using the following URL. > > http://localhost:8080/MyWebAPP/ Your new 6.0 configuration does not match your old 4.1 configuration. Check server.xml for an active (that is, not commented-out) element. It should have the port="8080" attribute. Just change this to port="80" and you will no longer need to specify the port number. > Taking out the port number 8080 from the following URL returns page > not found. That's because the port number is required if your server is not listening on port 80 (the default port for HTTP). > Please note that the 4.1 manager does not work for some reason. You should use the 6.0 manager with Tomcat 6.0. The 4.1 manager will be incompatible with Tomcat 6.0. > P.s. Also, is there a way to change the port from 8080 to something > else? See above. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbveAACgkQ9CaO5/Lv0PAybgCgliNBGcU7ul+gA6kwat/KErci XnoAn2v/4+a0hPAjDhcja9QrG+9DDumL =k/AZ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcats stops on Apache restart
Hello, Yes we do logrotation for the tomcat catalina.out but that happens once a night at 4 en doesn't include a kill -SOMESIGNAL command. (We use 'copytruncate' in a logrotate.d config). I have never seen tomcat's go down around this time. Groeten Leon -- Leon Brouwers System Engineer GX open for business t: +31(0)24 - 388 82 61 f: +31(0)24 - 388 86 21 e: le...@gx.nl KvK: 10044410 > -Original Message- > From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Sent: Tuesday, April 07, 2009 21:06 > To: Tomcat Users List > Subject: Re: Tomcats stops on Apache restart > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Leon, > > On 4/7/2009 3:10 AM, Leon Brouwers wrote: > > For instance we have a scripts which rotates the apache logfiles once > a month. I think we have about 50 tomcats (distributed across a number > of servers) of which 3 went down last month after the logfile rotation > (which uses the kill -HUP command explained earlier). Also when we > restart apache by hand (after configchanges) this sometimes happens. > > Are you also doing some kind of log rotation for Tomcat? If so, how is > that being done? I wonder if Tomcat is being "kill -HUP'd" by logrotate > or something similar. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAknbo/8ACgkQ9CaO5/Lv0PCMjACfa6jRbCco4/N5Pnna8PGhYCSO > bDkAoK3ARvjMXfeIimYVfGC7xYhaAS+z > =NyyZ > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
Mark Thomas wrote: André Warnier wrote: Despite what you may wish and what you may have found in Google, I believe that if you want to send a file, you have to do it with a "multipart/form-data" content type. Nope. That is just plain wrong. http://www.faqs.org/rfcs/rfc2616.html Sections 9.5 (POST) and 9.6 (PUT) describe the two methods that allow you to upload a file. But 9.6 is not applicable, since you are sending this to a webapp, not directly to a URI. Wrong again. PUT is disabled by default for security reasons but it is valid and is supported by the default servlet. Ok Mark, I don't pretend I know how it works in Tomcat. How does one upload a file then ? I mean other than with a PUT, as I presume that the OP doesn't just want to write files arbitrarily in his URI space on the server) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Phillip, On 4/7/2009 4:34 PM, Phillip Pi wrote: > I was asked to set up a Tomcat's proxy server in Windows (using XP SP2). Question 1: What is "Tomcat's proxy server"? Are you talking about using another web server out in front of Tomcat? That would make sense given the steps you've taken: > 1. Installed the required latest Sun's JRE v6u13. > 2. Downloaded and installed > http://www.archicentral.com/mirrors/apache/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.exe > > (Apache Tomcat Core). > 3. Saw Apache Tomcat's system tray icon. I opened it up to see its > screen, but did not seeing anything about proxy. Tomcat does not run its own proxy or anything like that. If you want to run another web server in front of Tomcat, you'll have to install and configure /that/ web server. It sounds like you're trying to set up Apache httpd (which is a web server) so that it proxies (some?) traffic to Tomcat. Where is Tomcat already running? If it's already running on another box, and this new Windows machine is intended to be the "proxy", then your first step is to uninstall Tomcat. Really. Next, download Apache httpd (you can find it here: http://httpd.apache.org/download.cgi). The latest version is 2.2.11. Get the windows binary and install it. Now, you'll be able to find things like httpd.conf (part of Apache httpd). You will want to configure a module called mod_proxy_ajp or mod_proxy_http (use the 'ajp' one if you want to use the binary connector or the 'http' one is you want a plain-text connector... which one should you use? it depends...). Basically, your configuration should look like this, in httpd.conf: ProxyPass [path to proxy] protocol://host/remote path For instance, if you were running Tomcat on a server called "scratchy" and your web application's context path was "/itchy" and you had an HTTP connector running in Tomcat on port 8080, then this would be an appropriate setup: ProxyPass /itchy http://scratchy:8080/itchy On the other hand, if you were using the binary protocol on port 8009 and everything else were the same, you would do this: ProxyPass /itchy ajp://scratchy:8009/itchy This should be enough to get you to ask a /lot/ of other questions. ;) Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbvEIACgkQ9CaO5/Lv0PDzrgCdFy1cUkccBhuntygu1U9rPOLt D+0AnRfvnYDuteatEBSMB9kNy/el0Gua =DgQl -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Migration from Tomcat 4.1 to 6.0 <<>>
To whom it may concern: I am new to Tomcat and anyone's help will be greatly appreciated. I have recently deployed an application in Tomcat 6.0 that works flawlessly. However, previous version of this same application was running on Tomcat 4.1. My issue is that I want to basically replace the existing 4.1 webapp with the newly updated 6.0 webapp. Also, I want the URLs to stay the same for the new site as they were in the previous version. The reason is the there is a main page that has the following link on it to connect to MyWebApp. To give you an example, the URL to get to the application in 4.1 is: http://localhost/MyWebAPP/ However, after shutting down tomcat 4.1, installing and configuring tomcat 6.0, I can use the new web app only using the following URL. Taking out the port number 8080 from the following URL returns page not found. I want to basically uninstall/undeploy the 4.1 version and replace it with the 6.0 version with everything working exactly the same. This newer application required Tomcat 6.0 and Java 1.6. Please note that the 4.1 manager does not work for some reason. http://localhost:8080/MyWebAPP/ P.s. Also, is there a way to change the port from 8080 to something else? Rashid Malik GIS Programmer Analyst Certified Oracle DBA Community Health Administration Maryland Department of Health and Mental Hygiene 201 W. Preston St. Baltimore, MD 21201 rma...@dhmh.state.md.us (410) 767-1024 (410) 333-7545 fax ( mailto:rma...@dhmh.state.md.us ) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
[SECURITY] CVE-2008-5519: Apache Tomcat mod_jk information disclosure vulnerability
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vulnerability announcement: CVE-2008-5519: Apache Tomcat mod_jk information disclosure vulnerability Severity: important Vendor: The Apache Software Foundation Versions Affected: mod_jk 1.2.0 to 1.2.26 Description: Situations where faulty clients set Content-Length without providing data, or where a user submits repeated requests very quickly may permit one user to view the response associated with a different user's request. Mitigation: Upgrade to mod_jk 1.2.27 or later Example: See description Credit: This issue was discovered by the Red Hat Security Response Team References: http://tomcat.apache.org/security.html http://tomcat.apache.org/security-jk.html The Apache Tomcat Security Team -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJ27rAb7IeiTPGAkMRAlsDAJ9qqKPiFnh+rxaxzMZmKIFA5Q5r5QCg2N84 OzL54gpA6e272kokWjK4wZU= =GKVO -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Tomcat 5.5 embedded vs Tomcat 6.0.18 embedded
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 4/7/2009 4:29 PM, André Warnier wrote: > I would have to disagree again. Sorry, I should have done the code in a haiku. > The Tomcat you describe above is totally deterministic : it is alive > (since it can receive your request), but as soon as you interact with > it, it dies. Hmm... you're right. I was thinking that the System.exit() would kill the process and therefore the connection, but by the time the JVM dies, the connection has already been made, proving the liveness of the instance (nb: Mozilla Thunderbird does not consider 'liveness' to be a correctly-spelled English word). > Can [the listening port] be for example half-open ? Perhaps. How about this: ServerSocket socket = new ServerSocket(8080); // No subsequent socket.accept() call > And is a half-open port 8080 equivalent to a fully-open port 4040, or > does it just have only half the bandwidth ? Half the bandwidth, I think. "Half" would refer to its openness, not to its port number, but maybe only half of the data gets through per unit time. How many gigabits does the average cat hold? (nb: tb does not consider 'gigabits' to be a correctly-spelled word, though 'gigabytes' /is/). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAknbufcACgkQ9CaO5/Lv0PANUQCXd3QHBarYGT4YouC4saqc27xM sgCgjILsEbGDO3+rKWZGx2aUZ7znzPY= =EpK1 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot access Tomcat from Host Machine PLZ Help
timmy_ wrote: Ok I solved it Centos security settings by default are enforcing so port 8080 was not available then all requests were just ignored. Which is what a "telnet (ip_address) 8080" would have told you too, quickly. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Newbie Question with Apache Tomcat v6.0.18 in Windows XP SP2.
Hello! I was asked to set up a Tomcat's proxy server in Windows (using XP SP2). I am a total newbie on this and had never done this type of Web server setup before. Here is what I did so far based on reading documentations and searching (e.g., http://tomcat.apache.org/tomcat-6.0-doc/setup.html, http://tomcat.apache.org/tomcat-6.0-doc/proxy-howto.html), and most of them seem to be geared toward UNIX/Linux versions than Windows (compiling, editing files like httpd.conf which I can't find, etc.).: 1. Installed the required latest Sun's JRE v6u13. 2. Downloaded and installed http://www.archicentral.com/mirrors/apache/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.exe (Apache Tomcat Core). 3. Saw Apache Tomcat's system tray icon. I opened it up to see its screen, but did not seeing anything about proxy. What am I missing to set up a proxy server with it? http://tomcat.apache.org/tomcat-6.0-doc/proxy-howto.html mentioned compilations (don't I already have compiled Tomcat?), httpd.conf (can't find it), etc. Thank you in advance. :) -- "Not to engage in the pursuit of ideas is to live like ants instead of men." --Mortimer J. Adler /\___/\ / /\ /\ \ Phil/Ant @ http://antfarm.ma.cx (Personal Web Site) | |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net \ _ / E-mail: phi...@earthlink.net or a...@zimage.com ( ) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Truststore and keystore per application
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marcus, So, my original code was missing some important stuff (the ??? parts) and was incorrect in one place (the first two arguments to SSLContext.init() are arrays, not scalars). The following code compiles and executes on my machine. You'll need to change the password, of course, and there are a whole slew of exceptions that will need to be handled as well. Enjoy! - -chris import java.io.FileInputStream; import java.io.IOException; import javax.net.ssl.KeyManager; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLServerSocket; import javax.net.ssl.TrustManager; import java.security.KeyStore; import java.security.SecureRandom; String keyStoreFilename = "my.app.keystore"; char[] keyStorePassword = "secret".toCharArray(); KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); FileInputStream in = null; try { in = new FileInputStream(keyStoreFilename); keyStore.load(in, keyStorePassword); } finally { if(null != in) try { in.close(); } catch (IOException ioe) { ioe.printStackTrace(); } } String algorithm = TrustManagerFactory.getDefaultAlgorithm(); TrustManagerFactory tmf = TrustManagerFactory.getInstance(algorithm); tmf.init(keyStore); TrustManager[] trustManagers = tmf.getTrustManagers(); algorithm = KeyManagerFactory.getDefaultAlgorithm(); KeyManagerFactory kmf = KeyManagerFactory.getInstance(algorithm); kmf.init(keyStore, keyStorePassword); KeyManager[] keyManagers = kmf.getKeyManagers(); SSLContext sc = SSLContext.getInstance("SSL"); sc.init(keyManagers, trustManagers, new SecureRandom()); SSLServerSocketFactory sssf = sc.getServerSocketFactory(); SSLServerSocket socket = (SSLServerSocket)sssf.createServerSocket(8080); -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbuH8ACgkQ9CaO5/Lv0PBSLQCePnaut3PSF7RrNszXjSNrojid CL4AoLCv94ijdwwGiJMHp2OnTY9HNqLu =ZrpN -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Tomcat 5.5 embedded vs Tomcat 6.0.18 embedded
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 4/7/2009 7:57 AM, André Warnier wrote: A Schrödinger Tomcat would be one that exists multiple times, in quantum superposition. Which would probably create problems with all of them trying to listen on the same TCP ports. Unless of course the listening port only gets instantiated at the first interaction with one of the Tomcats. I would think that a Schrödinger Tomcat would be one configured thusly: 1. ROOT context captures all incoming requests and routes them to the CheckForTomcatRunningServlet. 2. CheckForTomcatRunningServlet is implemented as follows: public void service(...) { System.exit(0); } Tomcat is either up or not. I would have to disagree again. The Tomcat you describe above is totally deterministic : it is alive (since it can receive your request), but as soon as you interact with it, it dies. In my view, the Schrödinger Tomcat's existence is never in doubt. There are even an infinity of them, each one having some probability of being more or less alive or dead. As soon as you interact with it/them however, you automatically select one of them. Thus the code above should at least incorporate the following pseudo-code modification : >public void service(...) { if (random(1) < 0.5) >System.exit(0); else response.print(locale("miaou")); >} The question in fact really boils down to whether these quantums of life extend or not to the listening port. Can it be for example half-open ? And is a half-open port 8080 equivalent to a fully-open port 4040, or does it just have only half the bandwidth ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Sun Webserver connector problem - nsapi_redirector
Rainer, That did the trick. Thanks a lot. Dmitri Rainer Jung-3 wrote: > > On 07.04.2009 01:34, dmitriz wrote: >> No, it did not help. NameTrans does not seem to work here. WebServer >> still >> looks for subfolder examples under its docroot. > > I could reproduce the problem and th reason was a sillyness in the > config file parsing of the web server (not the plugin). Remove the > leading space in front of the content lines of the element in obj.conf. > That should do the trick. > > Now that I found it, I remember that happened to some other user one or > two years ago. Will add to the docs. > > Have fun! > > Rainer > > >> Rainer Jung-3 wrote: >>> On 02.04.2009 21:47, dmitriz wrote: I'm attaching log and config files here. Thanks. >>> I compared with my test setup. I'm not sure whether the following >>> changes are relevant, but you can try: >>> >>> - magnus.conf: >>> I have the two Init lines related to jk as the first Init lines, >>> directly after the TempDir >>> - obj.conf: >>> Use /examples/* as a pattern. >>> Remove the j2ee object (I vaguely remember some conflict with jk) >>> >>> Do those changes help? >>> >>> The nsapi log shows, that the plugin gets loaded successfully, so the >>> only thing which needs fixing is the NameTrans and Co. >>> dmitriz wrote: > I would like to front Tomcat 6.0.14 with Sun WebServer 6.1 SP8. I have > followed to a tee the instructions from > http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html > Unfortunately, it seems like the directive: > NameTrans fn="assign-name" from="/examples(|/*)" name="jknsapi" > is being completely ignored. > I get the following error: “trying to GET /examples, send-file > reports: > HTTP4142: can't find /cfo/SUNWwbsvr-6.1SP8/docs/examples (File not > found)”. > It looks like Sun Webserver is looking for /examples folder in its > docroot > and not redirecting it to Tomcat. > Any help will be appreciated. > TIA. > Dmitri > http://www.nabble.com/file/p22855669/websvr.zip websvr.zip >>> Regards, >>> >>> Rainer > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://www.nabble.com/Sun-Webserver-connector-problem---nsapi_redirector-tp22854897p22937374.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Truststore and keystore per application
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marcus, On 4/7/2009 9:49 AM, Marcus Carlson wrote: > I've developed an application that sets up an encrypted socket in a > separate thread when running init() on my servlet. However, I have no > idea how to set up the truststore and keystore just for this > application. Is this possible at all? I think this is possible, though I've never actually wrote code to open my own TrustStore file. Maybe this can get you on the right path: you have to flip everything around that you are probably already doing, like just doing "new SSLServerSocket(...)". Instead, you have to create a new SSLContext and SSLSocketFactory, etc.: import javax.net.ssl.KeyManager; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLServerSocket; import javax.net.ssl.TrustManager; SSLContext sc = SSLContext.getInstance("SSL"); // or TLS? KeyManager keyMgr = ???; TrustManager trustMgr = ???; sc.init(keyMgr, trustMgr, new java.security.SecureRandom()); SSLSocketFactory factory = sc.getSocketFactory(); SSLServerSocket socket = (SSLServerSocket)factory.createSocket(...); I hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbsUAACgkQ9CaO5/Lv0PDKCQCeMlv/fAI3zhDTW91Np3s5Bceq xZYAoJhdErGUFnytVMLyxK4RXEU00a6w =4y47 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
André Warnier wrote: > Despite what you may wish and what you may have found in Google, I > believe that if you want to send a file, you have to do it with a > "multipart/form-data" content type. Nope. That is just plain wrong. > http://www.faqs.org/rfcs/rfc2616.html > Sections 9.5 (POST) and 9.6 (PUT) describe the two methods that allow > you to upload a file. But 9.6 is not applicable, since you are sending > this to a webapp, not directly to a URI. Wrong again. PUT is disabled by default for security reasons but it is valid and is supported by the default servlet. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
Andrey Razumovsky wrote: Well, I've been looking through those 15 lines last two days.. I tried Apache's HttpClient with same effect (I used FileEntity for body, not multipart). I've seen many examples in Google which send post request.. My code is just the same.. Hi. I did some research, because I wanted to wrap up a number of recent discussions on this forum. Despite what you may wish and what you may have found in Google, I believe that if you want to send a file, you have to do it with a "multipart/form-data" content type. That is because it is the only way to let the server know what kind of file your are sending, and how it is encoded. The Apache HttpClient library will let you do that. I do that in a couple of application, and I never had a problem with Tomcat 4 and 5. Have not tried it yet with Tomcat 6, but this is so basic that I doubt there would be a problem. Have a look here : http://www.faqs.org/rfcs/rfc2616.html Sections 9.5 (POST) and 9.6 (PUT) describe the two methods that allow you to upload a file. But 9.6 is not applicable, since you are sending this to a webapp, not directly to a URI. There are also http://www.faqs.org/rfcs/rfc2388.html http://www.faqs.org/rfcs/rfc2046.html http://www.faqs.org/rfcs/rfc2046.html Then there is http://www.w3.org/TR/html401/interact/forms.html which is the only document that I have found which describes a bit more in detail how you should POST a file via HTTP. Look at section 17.13.4 Form content types Now, the funny part is that I don't find a corresponding request-handling method on the server side for such a POST.. Not in the servlet specs, that is. ? It seems that I need some more Googling myself. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: java.util.logging in tomcat 6
> From: Mikael Brännström [mailto:mikael.brannst...@gmail.com] > Subject: java.util.logging in tomcat 6 > > I have based my tomcat/conf/logging.properties on the > examples in > http://tomcat.apache.org/tomcat-6.0-doc/logging.html The above refers primarily to Tomcat's logging rather than individual webapp logging; they are normally independent. > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/myapp]. > handlers > = 6myapp.org.apache.juli.FileHandler The above will log messages that arise from org.apache.catalina.core.ContainerBase and subclasses thereof via the 6myapp handler. I think you need to add entries that name the packages that comprise your webapp (haven't tried it personally). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrey, On 4/7/2009 10:12 AM, Andrey Razumovsky wrote: > HttpURLConnection connect = (HttpURLConnection) > url.openConnection(); > connect.setRequestMethod("POST"); > connect.setDoInput(true); > connect.setDoOutput(true); I have code that makes an HTTP connection, and I have the setDoOutput(true) /before/ setRequestMethod("POST"). I'm not sure if that is significant. Also, you mentioned that Content-Type and Content-Length were being set to "the defaults". I don't see any setting of these header fields in your code. In your original code snippet, they are commented-out. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbnVoACgkQ9CaO5/Lv0PAZbACfZzbpItCeFngJPZZnpgVgNJeq u9kAnixPyxxolDv2GGNhmFe1Q+6/QT3Q =o8ko -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Sun Webserver connector problem - nsapi_redirector
On 07.04.2009 21:21, Rainer Jung wrote: > Will add to the docs. Done. Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: advantages using tomcat + mod_jk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas, On 4/6/2009 7:41 PM, Tomas Rodriguez wrote: > > thanks for the answer about advantages of tomcat + mod_jk, ok. > I want to have a different directory for my examples of java, or web > pages, wherever, but I will don't like to have the default directory for > my examples. This should not be a problem, and Apache httpd will not help you achieve it at all. In fact, there is /nothing/ you can do with Apache httpd to make this work /unless/ it is already working using Tomcat standalone. > I have a huge problem with this, I need configurate my tomcat6.0.18 for > windows for load all my example create for by myself in > d:\websites\examplestomcat > > however charles he sent me an email with the short explanation about it, > but dosen't work. he told me that I need to create my own web.xml > I following him according with his step, he told me this. > 1) no changes are needed to server.xml > > 2) create the file C:\tomcat6.0\conf\Catalina\localhost\tomas.xml > > 3) the contents of the above file are just: > If you want your application to live in "D:\websites\examplestomcat" then you'll need to set your docBase to "D:/websites/examplestomcat", not "D:/examplestomcat" because that's not where your files are. > 4) under D:\examplestomcat, you should have: Let's go ahead and say D:\websites\examplestomcat > BUT my big doubt is. > What paremeters I'll need write inside of my new file web.xml, this is > my big problem. Your web.xml should not change from whatever it was before. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbotQACgkQ9CaO5/Lv0PCNYwCdE56gbUQ8CuX2XK/QIUjByuyy LDkAmQGGvkYvcB7lWWu3TFB484n6e+xT =ixuE -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re:
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 MT, On 4/5/2009 10:24 PM, Mighty Tornado wrote: > I have an index.jsp page with 3 links to other JSP's. > These links don't seem to work. I get the 404 error. If you're getting a 404, then your URLs are incorrect. > Do I have to register the JSP's somewhere similarly to how I create servlet > mappings? These are not necessary: The JSPServlet handles all requests to *.jsp URLs. > in the href attribute I tried passing along both relative path - since all my > JSP's are in one directory called JSP under the app root so I wrote > something like "./mission.jsp" > And I also tried giving the absolute path - "/JSP/mission.jsp" - no luck. You should not do either. Your URLs should look like this: ">your link text If you are using a tag library to build your URLs, you should always begin your URLs with a '/', and the tag library will take care of adding the context path and the jsessionid (if necessary). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbqGcACgkQ9CaO5/Lv0PAJOwCfQHredIEIZ/rfFQB7KwepDxlj QdwAoLGMInRLgZ41wGbmbvYmNOrT2/Iy =1Jy0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Sun Webserver connector problem - nsapi_redirector
On 07.04.2009 01:34, dmitriz wrote: > No, it did not help. NameTrans does not seem to work here. WebServer still > looks for subfolder examples under its docroot. I could reproduce the problem and th reason was a sillyness in the config file parsing of the web server (not the plugin). Remove the leading space in front of the content lines of the element in obj.conf. That should do the trick. Now that I found it, I remember that happened to some other user one or two years ago. Will add to the docs. Have fun! Rainer > Rainer Jung-3 wrote: >> On 02.04.2009 21:47, dmitriz wrote: >>> I'm attaching log and config files here. Thanks. >> I compared with my test setup. I'm not sure whether the following >> changes are relevant, but you can try: >> >> - magnus.conf: >> I have the two Init lines related to jk as the first Init lines, >> directly after the TempDir >> - obj.conf: >> Use /examples/* as a pattern. >> Remove the j2ee object (I vaguely remember some conflict with jk) >> >> Do those changes help? >> >> The nsapi log shows, that the plugin gets loaded successfully, so the >> only thing which needs fixing is the NameTrans and Co. >> >>> dmitriz wrote: I would like to front Tomcat 6.0.14 with Sun WebServer 6.1 SP8. I have followed to a tee the instructions from http://tomcat.apache.org/connectors-doc/webserver_howto/nes.html Unfortunately, it seems like the directive: NameTrans fn="assign-name" from="/examples(|/*)" name="jknsapi" is being completely ignored. I get the following error: “trying to GET /examples, send-file reports: HTTP4142: can't find /cfo/SUNWwbsvr-6.1SP8/docs/examples (File not found)”. It looks like Sun Webserver is looking for /examples folder in its docroot and not redirecting it to Tomcat. Any help will be appreciated. TIA. Dmitri >>> http://www.nabble.com/file/p22855669/websvr.zip websvr.zip >> Regards, >> >> Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Tomcat 5.5 embedded vs Tomcat 6.0.18 embedded
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 4/7/2009 7:57 AM, André Warnier wrote: > A Schrödinger Tomcat would be one that exists multiple times, in quantum > superposition. Which would probably create problems with all of them > trying to listen on the same TCP ports. Unless of course the listening > port only gets instantiated at the first interaction with one of the > Tomcats. I would think that a Schrödinger Tomcat would be one configured thusly: 1. ROOT context captures all incoming requests and routes them to the CheckForTomcatRunningServlet. 2. CheckForTomcatRunningServlet is implemented as follows: public void service(...) { System.exit(0); } Tomcat is either up or not. You are outside the "box" (ha ha ha) so you can only check if it's up by sending an HTTP request to it. Is it running? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknboY4ACgkQ9CaO5/Lv0PCyiwCfUtPg9APi+7e5vQ7hKZHC1XWx 9/YAniya2ZZgU6Epe0R9spxHBeprz4s9 =QCAD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
java.util.logging in tomcat 6
Hi, I'm trying to configure logging for my web app but the logging output is sent to 'catalina.-mm-dd.log' and 'catalina.out' instead of 'myapp.-mm-dd.log'. How can I control that? I use java.util.logging in my web app. I have based my tomcat/conf/logging.properties on the examples in http://tomcat.apache.org/tomcat-6.0-doc/logging.html and added/modified the following lines (see below). Thanks Mikael --- my conf/logging.properties --- handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4admin.org.apache.juli.FileHandler, 5host-manager.org.apache.juli.FileHandler, 6myapp.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler .handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler 6myapp.org.apache.juli.FileHandler.level = FINE 6myapp.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 6myapp.org.apache.juli.FileHandler.prefix = myapp. org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/myapp].level = ALL org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/myapp].handlers = 6myapp.org.apache.juli.FileHandler - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot access Tomcat from Host Machine PLZ Help
Ok I think VMware is not a problem anymore I have hamachi installed and its interface was interfering when I had it in bridged form that is why I initially had it on NAT. Now that I disabled hamachi's interface I am able to have bridged mode again and all of my network pcs are able to ping back and forth my CentOS machine with tomcat. However I still get Firefox can't establish a connection to the server at 192.168.1.12:8080. This has to be a problem of tomcat on Centos since the same tomcat configuration is working and visible from another xp virtual machine... Has anyone have this problem? Hassan Schroeder-2 wrote: > > On Tue, Apr 7, 2009 at 9:36 AM, timmy_ wrote: > >> Anyway I'll try reinstalling everything on Virtual Box...VMWare is making >> me >> have >> a lot of trouble when it shouldn't be supposed to... > > VMWare isn't causing you any trouble -- your *configuration* of the > networking for the virtual host is causing you trouble. :-) > > Give it its own IP and interface and it'll work as you want. > > -- > Hassan Schroeder hassan.schroe...@gmail.com > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://www.nabble.com/Cannot-access-Tomcat-from-Host-Machine-PLZ-Help-tp22919036p22935095.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcats stops on Apache restart
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leon, On 4/7/2009 3:10 AM, Leon Brouwers wrote: > For instance we have a scripts which rotates the apache logfiles once a > month. I think we have about 50 tomcats (distributed across a number of > servers) of which 3 went down last month after the logfile rotation (which > uses the kill -HUP command explained earlier). Also when we restart apache by > hand (after configchanges) this sometimes happens. Are you also doing some kind of log rotation for Tomcat? If so, how is that being done? I wonder if Tomcat is being "kill -HUP'd" by logrotate or something similar. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbo/8ACgkQ9CaO5/Lv0PCMjACfa6jRbCco4/N5Pnna8PGhYCSO bDkAoK3ARvjMXfeIimYVfGC7xYhaAS+z =NyyZ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: confiugure Lang in Tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruno, On 4/7/2009 11:13 AM, brunobau wrote: > I found the solution. > just configured the jsp with: text/html; charset=iso-8859-1 Note that the default content type is "text/html; charset=it0-8859-1", so you haven't actually changed anything, unless you have some other forces at work modifying your content type / character encoding. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknboCUACgkQ9CaO5/Lv0PDuZwCdGqAxKh1ABqjudqasvQTpugzc PYgAoJsI+JyWwWLLFOL59snjI+nvTkIK =h2/8 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Help with a Tomcat issue???
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jason, On 4/6/2009 6:33 PM, Jason Smith wrote: > Sun's implementation of HttpURLConnector apparently creates a new > ChunkedOutputStream every time you call .getOutputStream(). That's obnoxious and completely unexpected. Latest version of Java, huh? Too bad. Obviously, the solution is for your client to cache the result of conn.getOutputStream, but I would have expected conn.getOutputStream to return the same object every time, or at least an object that /felt/ like the same object every time. Strange. > So if I call conn.getOutputStream().close(); 10 times, I get a very > interesting method name. I looked at the source for this, and it was > not apparent that they meant to do this. However, with this code, my > method name becomes: > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > 0 > > POST Nice. - -chbris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbn9IACgkQ9CaO5/Lv0PDyJACgw9GfbGHvAqUfuaP+vRcNEa0B 2m0An34BtHsiwEZ/G0e0zq7rlbmn8wN4 =Fax0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot access Tomcat from Host Machine PLZ Help
Ok I solved it Centos security settings by default are enforcing so port 8080 was not available then all requests were just ignored. Changing this did the job thank you all. timmy_ wrote: > > Ok I think VMware is not a problem anymore > > I have hamachi installed and its interface was interfering when I had it > in > bridged form that is why I initially had it on NAT. Now that I disabled > hamachi's > interface I am able to have bridged mode again and all of my network pcs > are > able to ping back and forth my CentOS machine with tomcat. > > However I still get > Firefox can't establish a connection to the server at 192.168.1.12:8080. > > This has to be a problem of tomcat on Centos since the same tomcat > configuration > is working and visible from another xp virtual machine... > Has anyone have this problem? > > > > Hassan Schroeder-2 wrote: >> >> On Tue, Apr 7, 2009 at 9:36 AM, timmy_ wrote: >> >>> Anyway I'll try reinstalling everything on Virtual Box...VMWare is >>> making me >>> have >>> a lot of trouble when it shouldn't be supposed to... >> >> VMWare isn't causing you any trouble -- your *configuration* of the >> networking for the virtual host is causing you trouble. :-) >> >> Give it its own IP and interface and it'll work as you want. >> >> -- >> Hassan Schroeder hassan.schroe...@gmail.com >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >> > > -- View this message in context: http://www.nabble.com/Cannot-access-Tomcat-from-Host-Machine-PLZ-Help-tp22919036p22935371.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrey, On 4/6/2009 11:47 AM, Andrey Razumovsky wrote: > //connect.setRequestProperty("Content-Type", "text/plain"); One more thing: you should /definitely/ set the charset in the Content-Type. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbk4EACgkQ9CaO5/Lv0PBPggCdFmUaClE4fxA/mMiNW6f9iI7B ea4An3Y6t0gpxZtYmPJV/Ik+TVk60LV3 =I/pY -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Jsp working fine from tomcat, but displaying source when accessed through apache (Only on Firefox)
Thanks Mark... I will try this and update the post. -- View this message in context: http://www.nabble.com/Jsp-working-fine-from-tomcat%2C-but-displaying-source-when-accessed-through-apache-%28Only-on-Firefox%29-tp22931646p22934602.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: ajp_read_header: ajp_ilink_receive failed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John, On 4/6/2009 6:50 PM, John Oliver wrote: > On Mon, Apr 06, 2009 at 06:08:54PM -0400, Christopher Schultz wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> John, >> >> On 4/6/2009 5:51 PM, John Oliver wrote: >>> RHEL 5.2, httpd-2.2.3-11.el5_1.3, tomcat5-5.5.23-0jpp.7.el5_2.1 >> 2.2.3 is pretty old... any chance of upgrading to 2.2.11? You're nearly >> 3 years out of sync with the state-of-the-art. > > Tell it to Red Hat... It's interesting how these distro maintainers act with regard to packages. IFAICT, their stance is that they spend a /long/ time vetting a particular package (let's say httpd 2.2.3) and then they go ahead and allow their customers to use it. Any security patches that come out for it will be applied, re-tested, and then released (that's why you see the "-11.el5_1.3" on the end of the official release number), but all other patches are ignored. Since it apparently takes so long to vet a new release, they don't bother to do it for every release... they just apply the security patches and consider it "stable". Unfortunately, big bug fixes that don't have anything to do with security (hey, mod_proxy_ajp is plenty secure because it doesn't allow communication!) don't make it into the distro. I know that Debian has different "branches" that you can follow depending on your level of paranoia about breaking things: security, stable, unstable, etc. Does Red Hat have anything like that? It's possible that you have (possibly unintentionally) stuck your Apache httpd version at a particular release level for fear of breaking something that is working. My sense is that a minor-version upgrade shouldn't break anything at all (unless there is some kind of regression)... just make sure you test everything before you put it into production. >> $ java -version > > [r...@mda-services ~]# java -version > java version "1.6.0_05" > Java(TM) SE Runtime Environment (build 1.6.0_05-b13) > Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode) Good. The presence of the gcj should not interfere as long as the /real/ Java is the one being used by Tomcat. I suspect it is, but you can always check with a simple JSP or something that dumps out the system properties (System.getProperties().list(System.out) ought to do the trick). > The only config I'm aware of is /etc/httpd/conf.d/proxy_ajp.conf, which > consists of lines like: > > ProxyPass /GmmsL/ ajp://localhost:8009/GmmsL/ > > I just add another similar line for each app. Okay, that's mod_proxy_ajp alright. As Rainer mentioned, there have been a /lot/ of improvements to mod_proxy_ajp since your version was released. I recommend working with Red Hat on a solution. Maybe they'll do a custom build for you... you /are/ paying them for support, afterall :) >> I've had the JVM crash crash (for different issues) and I've run out of >> memory, but Tomcat has never failed me. The most likely reason for >> "server instability" is, sadly, your own application. We might be able >> to help with that, too. > > That would rock :-) Come on back when you've got this AJP thing worked out. If Tomcat stops responding, take a few thread dumps (send a SIGQUIT to the main Java process, or use 'jstack') a few seconds apart. One or two over a 20-30 second time period should be enough. This will dump a stack trace for all running threads to stdout (which can be redirected to a file if using jstack, or collected from catalina.out if using SIGQUIT). These will help a lot in determining what the problems might be. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbh3MACgkQ9CaO5/Lv0PC1PACgkyqz5z0Z2mi7Jh0xPjUPqpJG KDQAoJdAJ+gRwTNBR9Zxm+4KP15sKdUz =L/uN -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: ajp_read_header: ajp_ilink_receive failed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 4/6/2009 6:30 PM, Caldarale, Charles R wrote: >> From: Christopher Schultz [mailto:ch...@christopherschultz.net] >> Subject: Re: ajp_read_header: ajp_ilink_receive failed >> >>> [r...@mda-services ~]# rpm -qa | grep java >>> java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.115 >>> gcc-java-4.1.2-42.el5 >>> java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 >> Hmm... it's probably /not/ your problem, here > > Actually, if Tomcat is crashing, it likely *is* the problem. gcj has never > really made it beyond the toy stage, so that's the first thing to replace. - From the OP: > [Sun Mar 29 04:05:33 2009] [error] ajp_read_header: ajp_ilink_receive > failed > [Sun Mar 29 04:05:33 2009] [error] (120006)APR does not understand this > error code: proxy: read response failed from (null) (localhost) This looks like mod_proxy_ajp complaining, or at least APR, which would be outside of Tomcat's domain. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknbg70ACgkQ9CaO5/Lv0PAc7QCgmlhyVzXpyWBeW2FxtWh5fqsI zEIAoKZSYtRPT+3xfqH4LmquM8wwxqfw =43C4 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot access Tomcat from Host Machine PLZ Help
On Tue, Apr 7, 2009 at 9:36 AM, timmy_ wrote: > Anyway I'll try reinstalling everything on Virtual Box...VMWare is making me > have > a lot of trouble when it shouldn't be supposed to... VMWare isn't causing you any trouble -- your *configuration* of the networking for the virtual host is causing you trouble. :-) Give it its own IP and interface and it'll work as you want. -- Hassan Schroeder hassan.schroe...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Jsp working fine from tomcat, but displaying source when accessed through apache (Only on Firefox)
newToMina wrote: > Mark, could you please explain it a little more detail and provide an example > of the proper JKmount entries. Thanks in advance ... Replace what you have previously with: JkMount /appname/* tomcat5 JkMount /appname tomcat5 Note this means you do not use the Alias or Directory settings you had previously. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Jsp working fine from tomcat, but displaying source when accessed through apache (Only on Firefox)
Mark, could you please explain it a little more detail and provide an example of the proper JKmount entries. Thanks in advance ... -- View this message in context: http://www.nabble.com/Jsp-working-fine-from-tomcat%2C-but-displaying-source-when-accessed-through-apache-%28Only-on-Firefox%29-tp22931646p22933197.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot access Tomcat from Host Machine PLZ Help
Hey all, First of all sry if this was no the forum to ask...I wouldn't have expected VMware to be the problem since I may access internet from the virtual machine and I may also ping both ways (host-VM-Host) However I may not ping from any other pc...this might be the problem. Yes I have the network connection configured as NAT and its ip is in the format 192.168.*.* I just want to be able to access it from my host machine or my home network. @Caldarale, Charles R - I see no error besides Mozilla telling me that I am accessing through http://192.168.*.*:8080 Anyway I'll try reinstalling everything on Virtual Box...VMWare is making me have a lot of trouble when it shouldn't be supposed to... -- View this message in context: http://www.nabble.com/Cannot-access-Tomcat-from-Host-Machine-PLZ-Help-tp22919036p22933138.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Jsp working fine from tomcat, but displaying source when accessed through apache (Only on Firefox)
newToMina wrote: > Thanks for the reply. The JK mount is difined as follows. The wired thing is > that first couple of page of the application is working fine. Only a > purticular page is giving this problem. (the response headers were for this > page). I have no clue on why is it happening. For some reason the firefox > render this page in quirk mode when accessing through apache. > > # appname > JkMount /appname/servlet/* tomcat5 > JkMount /appname/*.jsp tomcat5 > Alias /appname "/usr/local/tomcat5/webapps/appname" > > Options FollowSymLinks > AllowOverride None > Order allow,deny > Allow from all > And there is the problem. Configuring httpd and Tomcat to serve content from the same part of the file system is asking for trouble. /WEB-INF/web.xml is probably exposed too. Don't configure httpd to serve content from Tomcat's appBase and you'll be fine. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Jsp working fine from tomcat, but displaying source when accessed through apache (Only on Firefox)
Thanks for the reply. The JK mount is difined as follows. The wired thing is that first couple of page of the application is working fine. Only a purticular page is giving this problem. (the response headers were for this page). I have no clue on why is it happening. For some reason the firefox render this page in quirk mode when accessing through apache. # appname JkMount /appname/servlet/* tomcat5 JkMount /appname/*.jsp tomcat5 Alias /appname "/usr/local/tomcat5/webapps/appname" Options FollowSymLinks AllowOverride None Order allow,deny Allow from all -- View this message in context: http://www.nabble.com/Jsp-working-fine-from-tomcat%2C-but-displaying-source-when-accessed-through-apache-%28Only-on-Firefox%29-tp22931646p22932884.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Jsp working fine from tomcat, but displaying source when accessed through apache (Only on Firefox)
> From: newToMina [mailto:askme...@yahoo.com] > I have jsp page which displays fine when I access it directly > from tomcat. > But when the page is access through apache (mod_jk) it > displays the source code. Do you have a JkMount for the directory with the .jsp in *and* the same directory exposed directly through httpd? Seems unlikely to be the problem givem that both responses shown below return a JSESSIONID cookie, but even so > This is happening only on Firefox and on IE it works fine. What do the requests look like? Presumably there's a key difference somewhere? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
Well, I've been looking through those 15 lines last two days.. I tried Apache's HttpClient with same effect (I used FileEntity for body, not multipart). I've seen many examples in Google which send post request.. My code is just the same.. And I found a nasty thing - when I run my request against GWT's embedded Tomcat (and I think it's 5.x) everything works just fine!! So it's likely problem either in my Tomcat 6's settings or in Tomcat 6 itself Will continue my research and post here, but I'd greatly appreciate if someone tried to POST to Tomcat 6 with java client (or perhaps you have such JUnit test?) Andrey 2009/4/7 David Smith > This smells like tomcat is behaving absolutely correct, but your client > code isn't. Can you verify your client code is properly making the > request and handling the response? It could be you aren't using > HttpURLConnection correctly to upload a file. As much as you are trying > to avoid it, you are probably going to have to invest some quality time > in the libraries, etc. that properly support multipart file upload > requests. > > --David > > Andrey Razumovsky wrote: > > Sure. > > That's where my investigations lead me to: > > I'm sending POST request from Java (see code in my first message) to > Tomcat > > 6. But, somehow, the request comes there is GET (!) Also Content-Length, > > Content-Type and other header parameters are reset to default values (see > > valve trace in my second message). And mainly, servlet's input stream is > > empty. > > When I do POST from simple HTML,everything's fine. > > > > Hope you'll help me to figure out who's replacing request's header and > > content > > > > Andrey > > > > 2009/4/7 Caldarale, Charles R > > > > > >>> From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com] > >>> Subject: Re: Cannot read httpservlet's inputstream > >>> > >>> I figured out that the problem is in client side... > >>> When I fire POST request from HTML, it is received well... > >>> I've doublechecked my connection code - it seems all right. > >>> Can anyone help me here? > >>> > >> After your various contradictory messages, I have no idea what your > problem > >> is at the moment. Would you mind restating it? > >> > >> - Chuck > >> > >> > >> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > >> MATERIAL and is thus for use only by the intended recipient. If you > received > >> this in error, please contact the sender and delete the e-mail and its > >> attachments from all computers. > >> > >> > >> > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Cannot read httpservlet's inputstream
This smells like tomcat is behaving absolutely correct, but your client code isn't. Can you verify your client code is properly making the request and handling the response? It could be you aren't using HttpURLConnection correctly to upload a file. As much as you are trying to avoid it, you are probably going to have to invest some quality time in the libraries, etc. that properly support multipart file upload requests. --David Andrey Razumovsky wrote: > Sure. > That's where my investigations lead me to: > I'm sending POST request from Java (see code in my first message) to Tomcat > 6. But, somehow, the request comes there is GET (!) Also Content-Length, > Content-Type and other header parameters are reset to default values (see > valve trace in my second message). And mainly, servlet's input stream is > empty. > When I do POST from simple HTML,everything's fine. > > Hope you'll help me to figure out who's replacing request's header and > content > > Andrey > > 2009/4/7 Caldarale, Charles R > > >>> From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com] >>> Subject: Re: Cannot read httpservlet's inputstream >>> >>> I figured out that the problem is in client side... >>> When I fire POST request from HTML, it is received well... >>> I've doublechecked my connection code - it seems all right. >>> Can anyone help me here? >>> >> After your various contradictory messages, I have no idea what your problem >> is at the moment. Would you mind restating it? >> >> - Chuck >> >> >> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY >> MATERIAL and is thus for use only by the intended recipient. If you received >> this in error, please contact the sender and delete the e-mail and its >> attachments from all computers. >> >> >> - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Jsp working fine from tomcat, but displaying source when accessed through apache (Only on Firefox)
I have jsp page which displays fine when I access it directly from tomcat. But when the page is access through apache (mod_jk) it displays the source code. This is happening only on Firefox and on IE it works fine. Firefox is rendering the page in quirk mode when accessed through apache and rendering in standard complaince mode when accessed directly from tomcat. OS: Opensuse 10 Tomcat: 5.5.20 apache: 2.0.59 (Unix) (mod_jk/1.2.19) The following is the response headers for apache and tomcat. Direct from tomcat: Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=61DB0770967F268172873F742C37; Expires=Thu, 01-Jan-1970 00:00:10 GMT JSESSIONID=A279CC9DD911FC575BFFDEC7837E371F; Path=/appname Expires: Sat, 6 May 1995 12:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Encoding: gzip Content-Type: text/html;charset=ISO-8859-1 Content-Length: 2418 Date: Tue, 07 Apr 2009 14:55:42 GMT 200 OK Same page accessed through apache: Date: Tue, 07 Apr 2009 14:56:23 GMT Server: Apache/2.0.59 (Unix) DAV/2 SVN/1.4.0 mod_jk/1.2.19 Set-Cookie: JSESSIONID=9D1D989BFF39342075436442AE3291D9; Expires=Thu, 01-Jan-1970 00:00:10 GMT JSESSIONID=A2E8A86EDB48255780784AE916B4775E; Path=/appname Expires: Sat, 6 May 1995 12:00:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Content-Encoding: gzip Content-Length: 2418 Keep-Alive: timeout=15, max=97 Connection: Keep-Alive Content-Type: text/html;charset=ISO-8859-1 200 OK -- View this message in context: http://www.nabble.com/Jsp-working-fine-from-tomcat%2C-but-displaying-source-when-accessed-through-apache-%28Only-on-Firefox%29-tp22931646p22931646.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Tomcat 5.5 embedded vs Tomcat 6.0.18 embedded
On Apr 7, 2009, at 7:57 AM, André Warnier wrote: János Löbb wrote: On Apr 6, 2009, at 4:10 AM, André Warnier wrote: Caldarale, Charles R wrote: [...] The metaphysical implications of existing without a trace are rather intriguing... I am surprised that you would not have heard of stealth technology. What do they call a stealthy Tomcat ? a Raptor ? No that must be a Schrödingercat :) I am sorry, but I will have to disagree. A Schrödinger Tomcat would be one that exists multiple times, in quantum superposition. Which would probably create problems with all of them trying to listen on the same TCP ports. Unless of course the listening port only gets instantiated at the first interaction with one of the Tomcats. OK. :) How about BatCat ? It is stealthy, but still can say: "Miaú" :) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: confiugure Lang in Tomcat
> From: brunobau [mailto:barbalall...@yahoo.it] > Subject: confiugure Lang in Tomcat > > I'm trying to set the Lang It (italian), in order so view the special > character (like ò,à,è) correctly in the jsp. Try looking at this: http://wiki.apache.org/tomcat/FAQ/CharacterEncoding If that doesn't answer your question, please re-post. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: confiugure Lang in Tomcat
I found the solution. just configured the jsp with: text/html; charset=iso-8859-1 brunobau wrote: > > Hi all, > I've installed and configured tomcat under xampp with os Win. > I'm trying to set the Lang It (italian), in order so view the special > character (like ò,à,è) correctly in the jsp. > I don't konw how to do do. > Please could you help me? > Thanks in advance. > -- View this message in context: http://www.nabble.com/confiugure-Lang-in-Tomcat-tp22930652p22931429.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
confiugure Lang in Tomcat
Hi all, I've installed and configured tomcat under xampp with os Win. I'm trying to set the Lang It (italian), in order so view the special character (like ò,à,è) correctly in the jsp. I don't konw how to do do. Please could you help me? Thanks in advance. -- View this message in context: http://www.nabble.com/confiugure-Lang-in-Tomcat-tp22930652p22930652.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Help with a Tomcat issue???
Will do. -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Tuesday, April 07, 2009 8:15 AM To: Tomcat Users List Subject: Re: Help with a Tomcat issue??? Jason Smith wrote: > As follow-up, I guess I would have to count this as a core Java API bug, > since the high-level functions (HttpURLConnection) allow you to routinely > emit bad markup. > > However, wouldn't it be prudent in Tomcat to recognize that something has > gone wrong with the method name earlier? Should method names ever be allowed > to contain numbers? How about carriage returns and other white space? > > So the root question is, should I write this up as a low-priority bug, or is > the current behavior desired? Technically, there is a bug here. When we are reading the request method if we see CR or LF then the request is invalid and Tomcat should return a 400 Bad Request. If you could write this up in bugzilla that would be great. Mark - 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: Help with a Tomcat issue???
Jason Smith wrote: > As follow-up, I guess I would have to count this as a core Java API bug, > since the high-level functions (HttpURLConnection) allow you to routinely > emit bad markup. > > However, wouldn't it be prudent in Tomcat to recognize that something has > gone wrong with the method name earlier? Should method names ever be allowed > to contain numbers? How about carriage returns and other white space? > > So the root question is, should I write this up as a low-priority bug, or is > the current behavior desired? Technically, there is a bug here. When we are reading the request method if we see CR or LF then the request is invalid and Tomcat should return a 400 Bad Request. If you could write this up in bugzilla that would be great. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cannot read httpservlet's inputstream
I ran Tomcat on localhost and everything's the same. I don't have firewall and I disabled antivirus, so there's nothing between client and tomcat. So the problem is either in client code (or JDK?) or in Tomcat. I'm posting full client code once again to show how I'm connecting to server Thanks, Andrey -- public static void main(String[] args) throws Exception { String address = "http://localhost:8097/Dove";; File pack = new File("build.xml"); URL url = new URL(address); HttpURLConnection connect = (HttpURLConnection) url.openConnection(); connect.setRequestMethod("POST"); connect.setDoInput(true); connect.setDoOutput(true); connect.setUseCaches(false); OutputStream out = connect.getOutputStream(); FileInputStream in = new FileInputStream(pack); IOUtils.copy(in, out); out.flush(); in.close(); if (connect.getResponseCode() != HttpURLConnection.HTTP_OK) { System.err.println("file " + pack.getPath() + " was not transfered - response code " + connect.getResponseCode()); } else { System.out.println("file " + pack.getPath() + " transfered"); } } 2009/4/7 Caldarale, Charles R > > From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com] > > Subject: Re: Cannot read httpservlet's inputstream > > > > I'm sending POST request from Java (see code in my first message) > > to Tomcat 6. But, somehow, the request comes there is GET (!) Also > > Content-Length, Content-Type and other header parameters are reset > > to default values > > Tomcat won't be doing this. What else is between your client program and > Tomcat? (E.g., proxies, httpd, smart (?) firewall?) > > > And mainly, servlet's input stream is empty. > > When I do POST from simple HTML,everything's fine. > > Try running Wireshark or equivalent on both the client box and the Tomcat > box to see exactly what's being put on the wire from the points of view of > both ends. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you received > this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
RE: NOT AN EAGAIN STATUS
Thanks for the response. As far as I see in log files, this error occurs on pages used for ajax. I mean I post data(and that is a few parameters, not large files) to some jsp pages, used for ajax, and they reply back. I use prototype javascript library for sending ajax requests and JSON for processing answers from those ajax pages. I dont post files to ajax pages. This error is repeating too many times on log files. Please help On Tue, 2009-04-07 at 07:48 -0600, Jason Smith wrote: > First of all, I recommend you don't use 5.5.26. There was a known buffering > issue with that version that is fixed in 5.5.27. If I remember correctly, > the input stream of the request in a servlet was truncated at 8192 bytes. > > As for your original question, are you posting streaming data (large files)? > > -Original Message- > From: Tuncer Tunçer [mailto:tuncerk...@gmail.com] > Sent: Tuesday, April 07, 2009 7:29 AM > To: users@tomcat.apache.org > Subject: NOT AN EAGAIN STATUS > > I am running 5.5.26 on a debian server. i frequently see an error > message on my tomcat logs saying : > > org.apache.catalina.connector.Request parseParameters > WARNING: Exception thrown whilst processing POSTed parameters > java.net.SocketTimeoutException: Exception filling buffer with data from > underlying input stream: not an EAGAIN status, so perhaps disconnected > client? > > does anybody have any idea about why this is happening and how can i > resolve this? I am having some serious problems on the site especially > about performance and resource usage, and i think this error may be > connected with this problems. > > > - > 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 > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Help with a Tomcat issue???
As follow-up, I guess I would have to count this as a core Java API bug, since the high-level functions (HttpURLConnection) allow you to routinely emit bad markup. However, wouldn't it be prudent in Tomcat to recognize that something has gone wrong with the method name earlier? Should method names ever be allowed to contain numbers? How about carriage returns and other white space? So the root question is, should I write this up as a low-priority bug, or is the current behavior desired? -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Tuesday, April 07, 2009 2:40 AM To: Tomcat Users List Subject: Re: Help with a Tomcat issue??? Jason Smith wrote: > Solved. You gave me a clue that helped solve it, though Tomcat could handle > this better (not put '0 POST' in for the method name in the first place). > > Sun's implementation of HttpURLConnector apparently creates a new > ChunkedOutputStream every time you call .getOutputStream(). In other words, > multiple calls to conn.getOutputStream().close(); cause corrupted output. > Calling .close() on the same output stream does not cause corrupted output. Glad you found the problem. Mark - 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: Cannot read httpservlet's inputstream
> From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com] > Subject: Re: Cannot read httpservlet's inputstream > > I'm sending POST request from Java (see code in my first message) > to Tomcat 6. But, somehow, the request comes there is GET (!) Also > Content-Length, Content-Type and other header parameters are reset > to default values Tomcat won't be doing this. What else is between your client program and Tomcat? (E.g., proxies, httpd, smart (?) firewall?) > And mainly, servlet's input stream is empty. > When I do POST from simple HTML,everything's fine. Try running Wireshark or equivalent on both the client box and the Tomcat box to see exactly what's being put on the wire from the points of view of both ends. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Truststore and keystore per application
Hi, I've developed an application that sets up an encrypted socket in a separate thread when running init() on my servlet. However, I have no idea how to set up the truststore and keystore just for this application. Is this possible at all? TIA, Marcus - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: NOT AN EAGAIN STATUS
First of all, I recommend you don't use 5.5.26. There was a known buffering issue with that version that is fixed in 5.5.27. If I remember correctly, the input stream of the request in a servlet was truncated at 8192 bytes. As for your original question, are you posting streaming data (large files)? -Original Message- From: Tuncer Tunçer [mailto:tuncerk...@gmail.com] Sent: Tuesday, April 07, 2009 7:29 AM To: users@tomcat.apache.org Subject: NOT AN EAGAIN STATUS I am running 5.5.26 on a debian server. i frequently see an error message on my tomcat logs saying : org.apache.catalina.connector.Request parseParameters WARNING: Exception thrown whilst processing POSTed parameters java.net.SocketTimeoutException: Exception filling buffer with data from underlying input stream: not an EAGAIN status, so perhaps disconnected client? does anybody have any idea about why this is happening and how can i resolve this? I am having some serious problems on the site especially about performance and resource usage, and i think this error may be connected with this problems. - 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: Cannot read httpservlet's inputstream
Sure. That's where my investigations lead me to: I'm sending POST request from Java (see code in my first message) to Tomcat 6. But, somehow, the request comes there is GET (!) Also Content-Length, Content-Type and other header parameters are reset to default values (see valve trace in my second message). And mainly, servlet's input stream is empty. When I do POST from simple HTML,everything's fine. Hope you'll help me to figure out who's replacing request's header and content Andrey 2009/4/7 Caldarale, Charles R > > From: Andrey Razumovsky [mailto:razumovsky.and...@gmail.com] > > Subject: Re: Cannot read httpservlet's inputstream > > > > I figured out that the problem is in client side... > > When I fire POST request from HTML, it is received well... > > I've doublechecked my connection code - it seems all right. > > Can anyone help me here? > > After your various contradictory messages, I have no idea what your problem > is at the moment. Would you mind restating it? > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you received > this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >