.do file with Apache problems
I've got problems with my mod_jk setup (as far as I understand). I've got a customer using our server (shared webhosting environment) who is having trouble using .do files. It comes back as file not found errors when it's executed by a jsp page. Here's my setup and log files. Perhaps anyone can give some suggestions on where to look or what to do?? Has anyone run into this issue before? I'm using Tomcat 4, JDK 4.1, Apache 1.3, and mod_jk here's my mod_jk.log . [Tue Apr 09 11:19:20 2002] [jk_ajp13_worker.c (712)]: Error reading reply [Tue Apr 09 11:19:20 2002] [jk_ajp13_worker.c (845)]: In jk_endpoint_t::service, get_reply failed in send loop 0 [Tue Apr 09 11:22:46 2002] [jk_ajp13_worker.c (381)]: Error ajp13_process_callback - write failed [Tue Apr 09 11:51:40 2002] [jk_ajp13_worker.c (228)]: connection_tcp_get_message: Error - jk_tcp_socket_recvfull failed [Tue Apr 09 11:51:40 2002] [jk_ajp13_worker.c (712)]: Error reading reply [Tue Apr 09 11:51:40 2002] [jk_ajp13_worker.c (845)]: In jk_endpoint_t::service, get_reply failed in send loop 0 [Tue Apr 09 12:00:40 2002] [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 111 [Tue Apr 09 12:00:40 2002] [jk_ajp13_worker.c (196)]: In jk_endpoint_t::connect_to_tomcat, failed errno = 111 [Tue Apr 09 12:00:40 2002] [jk_ajp13_worker.c (635)]: Error connecting to the Tomcat process. [Tue Apr 09 12:00:40 2002] [jk_ajp13_worker.c (848)]: In jk_endpoint_t::service, send_request failed in send loop 0 [Tue Apr 09 12:00:40 2002] [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 111 [Tue Apr 09 12:00:40 2002] [jk_ajp13_worker.c (196)]: In jk_endpoint_t::connect_to_tomcat, failed errno = 111 [Tue Apr 09 12:00:40 2002] [jk_ajp13_worker.c (635)]: Error connecting to the Tomcat process. [Tue Apr 09 12:00:40 2002] [jk_ajp13_worker.c (848)]: In jk_endpoint_t::service, send_request failed in send loop 1 [Tue Apr 09 12:00:40 2002] [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 111 [Tue Apr 09 12:00:40 2002] [jk_ajp13_worker.c (196)]: In jk_endpoint_t::connect_to_tomcat, failed errno = 111 [Tue Apr 09 12:00:40 2002] [jk_ajp13_worker.c (635)]: Error connecting to the Tomcat process. [Tue Apr 09 12:00:40 2002] [jk_ajp13_worker.c (848)]: In jk_endpoint_t::service, send_request failed in send loop 2 [Wed Apr 10 07:32:09 2002] [jk_ajp13_worker.c (381)]: Error ajp13_process_callback - write failed [Wed Apr 10 10:48:54 2002] [jk_ajp13_worker.c (381)]: Error ajp13_process_callback - write failed [Wed Apr 10 21:52:13 2002] [jk_ajp13_worker.c (381)]: Error ajp13_process_callback - write failed [Wed Apr 10 23:46:11 2002] [jk_ajp13_worker.c (381)]: Error ajp13_process_callback - write failed ... === Here's catalina.log for this particular hosting customer (which seems fine to me): ... 2002-04-11 01:55:47 WebappLoader[]: Deploying class repositories to work directory /var/tomcat4/work/valuerequest.com/_ 2002-04-11 01:55:47 WebappLoader[]: Deploy JAR /WEB-INF/lib/log4j.jar to /home/valuerequest/html/WEB-INF/lib/log4j.jar 2002-04-11 01:55:47 WebappLoader[]: Deploy JAR /WEB-INF/lib/omcontrib.jar to /home/valuerequest/html/WEB-INF/lib/omcontrib.jar 2002-04-11 01:55:47 WebappLoader[]: Deploy JAR /WEB-INF/lib/omcore.jar to /home/valuerequest/html/WEB-INF/lib/omcore.jar 2002-04-11 01:55:47 WebappLoader[]: Deploy JAR /WEB-INF/lib/openmap.jar to /home/valuerequest/html/WEB-INF/lib/openmap.jar 2002-04-11 01:55:47 WebappLoader[]: Deploy JAR /WEB-INF/lib/servletMonitor.jar to /home/valuerequest/html/WEB-INF/lib/servletMonitor.jar 2002-04-11 01:55:47 WebappLoader[]: Deploy JAR /WEB-INF/lib/struts.jar to /home/valuerequest/html/WEB-INF/lib/struts.jar 2002-04-11 01:55:47 StandardManager[]: Seeding random number generator class java.security.SecureRandom 2002-04-11 01:55:47 StandardManager[]: Seeding of random number generator has been completed 2002-04-11 01:55:48 ContextConfig[]: Added certificates - request attribute Valve 2002-04-11 01:55:48 initialisation: init 2002-04-11 01:55:48 StandardWrapper[:default]: Loading container servlet default 2002-04-11 01:55:48 default: init 2002-04-11 01:55:48 StandardWrapper[:invoker]: Loading container servlet invoker 2002-04-11 01:55:48 invoker: init 2002-04-11 01:55:48 action: init 2002-04-11 01:55:48 action: Loading application resources from resource com.dgarnier.awas.web.ApplicationResources 2002-04-11 01:55:48 action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2002-04-11 01:55:48 action: Process servletName=mapdisplay, urlPattern=*.map 2002-04-11 01:55:48 action: Process servletName=graphdisplay, urlPattern=*.ghd 2002-04-11 01:55:48 action: Process servletName=initialisation, urlPattern=/nothing 2002-04-11 01:55:48 action: Process servletName=action, urlPattern=*.do 2002-04-11 01:55:48 action: Mapping for servlet 'action' = '*.do' 2002-04-11 01:55:48 jsp: init 2002-04-11 01:55:49
Re: war Deployement ?
I have seen it is possible with TC 4.1 (in JWDSP )to add a mywebapp.xml file in the webapp directory. This file is merged to the server configuration file ... so ti permits to do required initializations. But is there a way with TC 4.0.3 ? Hello, I package my web app as a war file. Probelm is that I'd like to do all initialization in my war file. But my server configuration file (server.xml) need to intialize the weapp RDBM driver : Resource name=jdbc/myDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/myDB parameternameuser/namevaluesa/value/parameter parameternamepassword/namevalue/value/parameter parameternamedriverClassName/name valueorg.hsqldb.jdbcDriver/value/parameter parameternamedriverName/name valuejdbc:hsqldb:D:/mywebapp/src/docroot/WEB-INF/databases/myDB/value/parameter /ResourceParams . So is there informations about how to package those servers configurations informations into a war to deploy my webapp without modifying server.xml ? thanks. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
AW: Designing for scalability ?
There are several ways to achieve scalability: - Use a session aware external load balancer - Use the tomcat loadbancer mod_jk has a loadbalacer that implements sticky sessions (AFAIK the loadbalancer currently just works with 3.2/3.3) - Use distributed sessions I don't know the state for tomcat. But there is something going on. - Scale horicontal - deploy apache, tomcat, database on different machines. - Scale vertically Depending on the kind of application you have, you can deploy differents part of your application on different machines. It depends on you application if you need to keep the session between these parts. - Scale with hardware Buy or rent a bigger/faster machine or improve your existing one. (Find out the bottlenecks and improve) There are many solutions around from 1 to several hundred processors with different architectures. Depending on your needs this can be much cheaper in TCO than a second machnine. (With a second machine you double the administrative overhead, you need to think about distributed backup, the failure rate will increase) - Scale with optimizing Make your application faster on the same hardware. If you want to scale by deploying tomcat to several machines this is not always transparent to your application. Some examples: - If you create unique id's, you must make shure that they are unique across instances. - If you store information in the file system you have to enshure - that it is acsessible to the current session no matter on which machine the session currently is - that if you use sticky sessions, this information is not needed by other sessions or it is available on all machines. -Ursprüngliche Nachricht- Von: Soefara Redzuan [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 11. April 2002 04:56 An: [EMAIL PROTECTED] Betreff: Designing for scalability ? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Problem in Apache /Tomcat Config
hi .. I am trying to configure Tomcat 3.2.1 to work with Apache 1.3.19 using mod_jk. In tomcat we have a servlet mapping called some intra ie. URI is http://localhost:8008/intra which actually points to a servlet. But Apache does not recognize the servlet and searches for a file called intra in the docroot of the context. isn't there any other way other than giving /servlet for a servlet to be recognized by Apache. Thanx in advance Regards, Suresh.R -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
DTD of server.xml
Hi Does anybody know how can I get the DTD for the Tomcat 4.X server.xml configuration file? The default server.xml doesn't have any reference to a DTD. Thanks in advance Enrique _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
compatibility Tomact 3.3.1 and 4.x
Hi, We are running applications on Tomcat 3.3.1 but want to update to 4.x to use new featrues for future projects. 1) What are the incompatibilities and how is your experiance by doing this? 2) Can someone run 3.3.1 and 4.x on _ONE_ box parallel? thanks, rainer juenger
Re: How can I automatically start a servlet in a specific time?
On 11/04/02 7:25, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: From: Kelly Prudente Pereira [mailto:[EMAIL PROTECTED]] Sent: quarta-feira, 10 de Abril de 2002 23:04 To: '[EMAIL PROTECTED]' Subject: How can I automatically start a servlet in a specific time? Can anyone answer my question? How can I automatically start a servlet in a specific time? For example: at midnight. I don't want to start it when I start my webserver. Thanks in advanced, Ola Kelly, Posso falar em inglês? Se não peça-me devolta e eu faço a tradução. I do exactly this to schedule various tasks such as periodic emails of database generated reports and logging details. If you are using JDK 1.3.x use the Timer and TimerTask. They are very straightforward. A simple demo can be found at: http://java.sun.com/docs/books/tutorial/essential/threads/timer.html I wholeheartedly disagree with the FAQ @ Distributopia. I think servlets are the best way to schedule tasks and they can be packaged with your application on whatever platform that you deploy on. You definitely do not want to run this from cron or any other platform dependent process (even if you did JCrontab exists and is a Java alternative to Cron). The problem with the servlet method I have found is guaranteeing that only one instance of your servlet is instantiated. This is a real problem with Tomcat and you must go to lengths to insure a singleton pattern is not invoked at least twice (once by Tomcat classloader and once by your application classloader). If you find you are having this problem let me know. HTH Steven ///* * VTV Learning Corporation *Los Angeles - Boston - Lisbon * (http://www.vtvLearning.com/) */ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: OT: Question to hardware requirements
Bernhard Wraase wrote: This is difficult question which may be the reason why nobody has answered yet. I thought that every experienced developer who handles servlets must have some experience concerning the requirements From my experience with it I give a guess: 1) 1000 MHz, 512MB and a desktop harddisk should be sufficient 2) standalone configuration is the best choice according to your description That is almost the same as I estimated. Thanks for your help. Greetings, Andreas -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: global singleton across multiple engines?
On 11/04/02 7:25, [EMAIL PROTECTED] Ray Tayek wrote: ... a different class loader. he claims that if i put the class to be shared in the server_root/classes, then it wll be found. this does not seem to work ... Try putting the singleton in $CATALINA_HOME/common/classes Steven ///* * VTV Learning Corporation *Los Angeles - Boston - Lisbon * (http://www.vtvLearning.com/) */ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Apache mod_rewrite - mod_jk interaction
This is not strictly speaking a Tomcat question but I assume that most people use mod_jk only with Tomcat so I give it a go here. I am using mod_rewrite in conjunction with mod_jk and it seemed to work fine, ie. the rewritten URLs are passed to Tomcat via mod_jk. However, after having to make a configuration change I noticed that the decision if mod_jk accepts a particular URL, based on the various JkMount directives in the conf file, is based on the URL before(!) it is rewritten. Is there a way to change the order of processing such that the rewritten URLs are given to mod_jk for testing against the JkMount directives and not the original URLs? Apache: 1.3.22 mod_jk: mod_jk-3_3-ap13-eapi.so Thanks Manuel -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
WebAppConnection warpConnection
hi all i have new problem now... i have this configuration on my httpd.conf IfModule mod_webapp.c WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples WebAppDeploy cocoon warpConnection /cocoon WebAppInfo /webapp-info /IfModule if i open http://localhost:8080/examples/ or http://localhost:8080/cocoon/ , it's run very good.. and if i open http://localhost/examples/ , it's run very good too.. but if open this address http://localhost/cocoon/ it's the same like http://localhost/examples/ can any body help me?? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
AW: compatibility Tomact 3.3.1 and 4.x
Some differences are caused by the fact that tomcat 3.x and 4.x implement different servlet and jsp specs. 2.2/1.1 - 2.3/1.2 But tomcat should be backwards compatible with all spec related changes. Some other effects are created by the fact that the classloader architecture is quite different. Other effects have their cause in the different states for certain libraries. (e.g. AFAIK mod_jk supports no loadbalancing for tomcat 4 but for 3.2/3.3) It's no problem to run several versions of tomcat on one machine. You have only to make shure that you avoid port conflicts. /usr/local/java/jakarta-tomcat-3.3.x /usr/local/java/jakarta-tomcat-4.0.2 /usr/local/java/jakarta-tomcat-4.0.3 Here we have the original distribution. For all domains that use tomcat 4 we have following setup /www/online/domain/ conf/ Here we have our edited config files for the site (We have one server per site) bin/ Here we have scripts that sets following env vars to start and stop tomcat: JAVA_HOME, CATALINA_HOME and CATALINA_BASE CATALINA_HOME points to the tomcat version we wan to use for a given site. CATALINA_BASE points to the base directory of the site As we didn't have a multisite environment for tomcat 3.* I didn't look how to achive this setup with it. -Ursprüngliche Nachricht- Von: rainer jünger [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 11. April 2002 10:58 An: Tomcat Users List Betreff: compatibility Tomact 3.3.1 and 4.x Hi, We are running applications on Tomcat 3.3.1 but want to update to 4.x to use new featrues for future projects. 1) What are the incompatibilities and how is your experiance by doing this? 2) Can someone run 3.3.1 and 4.x on _ONE_ box parallel? thanks, rainer juenger -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Monitoring Tomcat
Hello, I made a search in the Tomcat User List Archive but for each message asking for some monitoring function in Tomcat, I didn't find any answer... Indeed, I would need a way to know about threads' managing and what happens to received requests (are some of them delayed or even dropped ?), in order to tune up my configuration and to prevent any crash. How to know if Tomcat's developpers already talked about such a thing, and above all, how to know what they said about this - I mean, do they think it's a useless function, or do they think it could be usefull but not enough to waste time on this now, etc. ? Thanks for your answers ! Pauline - CANTALOUP Pauline PCOTechnologies Burolines - 2 ter rue Marcel Doret 31700 Blagnac Tél. : 05.34.60.44.17 Web : www.pcotech.fr -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Exception when I try to reload a page
Hi, my JSP page is printed on the screen (note that this webpage contains a jsp:forwardbut when I try to refresh it I get this message : java.io.IOException: Error: Attempt to clear a buffer that's already been flushed When I go to the compiled jsp the error is pointing to a line where there is out.clear(); Is there any way I can work around this problem ? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Exception when I try to reload a page
I always put a return just after a forward, forcing the tomcat to stop compiling the rest. If it's not your problem, post some more code Regards Giorgio - Original Message - From: Raphael Di Cicco [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 12:23 PM Subject: Exception when I try to reload a page Hi, my JSP page is printed on the screen (note that this webpage contains a jsp:forwardbut when I try to refresh it I get this message : java.io.IOException: Error: Attempt to clear a buffer that's already been flushed When I go to the compiled jsp the error is pointing to a line where there is out.clear(); Is there any way I can work around this problem ? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: port
Atif Munir wrote: Hi, in which file the port is set fro tomcat? atif -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Hi default port setting for tomcat is usually port 80 such as http://localhost:8080/ webapp/ Thus you can change this in Jakarta-tomcat conf server.xml file scroll down and change above 1024 as per the tomcat installation readme.txt file.As usually and in my case that port has already been assigned to another app. Hope this helps Cheers Chuck Amadi Systems Programmer -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Newbie question
Hi Javier, I am not very sure what mistake are you doing, but to find out if your tomcat is up and installation is okey, try using default examples servlets http://localhost:8080/examples/ try any of them, and if they are okey, tell me if you can access http://localhost:8080/index.html if both these are working fine, then try to put your tomcat under a directory that doesn't contain spaces , like d:\tomcat I suspect the directory where you put Tomcat program files is causing problems, since it includes a space, just guessing cheers :) - Original Message - From: Javier A. Leyba [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 1:09 AM Subject: Re: Newbie question On 11/04/2002 at 0:18 yilmaz wrote: Hi Javier! Servlets should be under webapps/yourcontext/WEB-INF/classes/ directory. yourcontext can be anyone like, ROOT, examples,etc. One more thing do not forget to append /servlet/ to your url. Just to be more helpful for a new comer : say you put your HelloWorld servlet under tomcathome/webapps/ROOT/WEB-INF/classes/ your url should be like this: http://localhost:8080/servlet/HelloWorld Hope this helps :) I've tried but it didn't work. I've made a new directory called classes under /Program Files/Apache Tomcat 4.0/webapps/ROOT/WEB-INF and I copied my HelloWorldExample.class to this directory. From my browser I tried and I received a The requested resource (/servlet/HelloWorldExample) is not available. message. Need I to define a new context ? jl _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: tomcat 4.0 url authentication
it works for me - Original Message - From: Jay Gardner [EMAIL PROTECTED] To: Tomcat-User [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 2:40 AM Subject: tomcat 4.0 url authentication Does TC4.X support http://username:[EMAIL PROTECTED]:8080/manager/list ? I want to authenticate to the realm this way, but it does not seem to work. --Jay Gardner -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Includes desappearing
hi! On my JSP project with Tomcat4/Apache sometimes, in some pages, the page is returned incomplete. They come without the includes, that are other JSPs and without parts of the master JSP. It is not normal and I am worried by this... do somebody can help me?? Thank u in advance, Marcelo Mathias Lima Web Developer -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: how can i test
Atif Munir wrote: Hi, Apache is running my linux box and me have installed tomcat rpm on this machine what should me do to keep my jsp pages up and browseable. thanks in advance atif -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Me again you should read the documetation. Nevertheless if you haven't assigned your port 8080 to another application. Once you have installed tomcat $ cd to bin chuck @maddr bin $ ./startup.sh This should start tomcat service if not check the following: Ensure that you have your java running by just typeing java on the command line. CHECK WHAT VERSION of Java you got and add to your .bash_profile If it is not running you/ll need to modify your .bash_profile with your favourite editor in my case emacs should be in your home dir . $ emacs .bash_profile export JAVA_HOME=/opt/IBMJava-2.13 export JDK_HOME=$JAVA_HOME export CATALINA_HOME=/home/chucka/jakarta-tomcat-4.0.1 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin If you are using version 3 0f tomcat use TOMCAT_HOME instead of CATALINA_HOME Hope this is what your after . Chuckie Amadi Systems Programmer -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Monitoring Tomcat
At 12:18 PM 4/11/2002 +0200, you wrote: Hello, I made a search in the Tomcat User List Archive but for each message asking for some monitoring function in Tomcat, I didn't find any answer... Indeed, I would need a way to know about threads' managing I'm unsure of truly understanding your question but I can advise you to read about the servlets life cycle (in the servlets specification or in any valuable resource as the book from Jason Hunter O'Reilly editions). and what happens to received requests (are some of them delayed or even dropped ?), you can use a dummy filter (if you use the 2.3 servlets API aka Tomcat 4 -catalina) which logs any filter, adds trace for incoming request, responses... in order to tune up my configuration and to prevent any crash. that is the point where I can't see any links with your question!!! H.T.H Jerome -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: port
chuck amadi a écrit : Atif Munir wrote: Hi, in which file the port is set fro tomcat? atif -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Hi default port setting for tomcat is usually port 80 such as http://localhost:8080/ webapp/ Thus you can change this in Jakarta-tomcat conf server.xml file scroll down and change above 1024 as per the tomcat installation readme.txt file.As usually and in my case that port has already been assigned to another app. Hope this helps Cheers Chuck Amadi Systems Programmer -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] I guess it's just typo error. The default port for Tomcat is 8080: To change this features, go to $TOMCAT_HOME/conf and edit the file server.xml !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN debug=0 This Port 8005 is the port on which Tomcat is waitin' for a kill server cmd... Only necessary to modify if already in use by another app. !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- The port above 8080 is the std port on which Tomcat, as a standalone app, is runnin' on. Modify this port in case yu need to make as a std web server; for instance 80. !-- Define an Apache-Connector Service -- Service name=Tomcat-Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=true appBase=webapps acceptCount=10 debug=0/ The port below is the port used by the Tomcat-Apache communication module. In my case the WarpConnector ( mod_webapp in the Apache Server ). Yu can also have port 8009 for AJP13, port 8007 for AJP12 And, as far as i remember, 8008 for ApacheJServ. Hope this help. Jean-Luc :O)
RE: Monitoring Tomcat
you should look at the docs for the 'Connector' element(server.xml) - specifically the maxProcessors,minProcessors, and acceptCount Charlie -Original Message- From: Pauline Cantaloup [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 6:18 AM To: Tomcat Users List Subject: Monitoring Tomcat Hello, I made a search in the Tomcat User List Archive but for each message asking for some monitoring function in Tomcat, I didn't find any answer... Indeed, I would need a way to know about threads' managing and what happens to received requests (are some of them delayed or even dropped ?), in order to tune up my configuration and to prevent any crash. How to know if Tomcat's developpers already talked about such a thing, and above all, how to know what they said about this - I mean, do they think it's a useless function, or do they think it could be usefull but not enough to waste time on this now, etc. ? Thanks for your answers ! Pauline - CANTALOUP Pauline PCOTechnologies Burolines - 2 ter rue Marcel Doret 31700 Blagnac Tél. : 05.34.60.44.17 Web : www.pcotech.fr -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
IIS-Tomcat
hi! I work with tomcat 3.3.1 and iis 5.0. To test isapi filter I launch a tomcat example : date.jsp. When i've launched iis with isapi filter to catch jsp's pages, Tomcat return an error 500, whereas tomcat run jsp's pages without difficulties. Error: 500 Location: /dates/date.jsp Erreur interne de servlet: org.apache.jasper.JasperException: dates.JspCalendar [.] What can i do to solve this trouble? Thanks; Jean-Christophe -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Monitoring Tomcat
At 02:12 PM 4/11/02 +0200, you wrote: I made a search in the Tomcat User List Archive but for each message asking for some monitoring function in Tomcat, I didn't find any answer... Indeed, I would need a way to know about threads' managing I'm unsure of truly understanding your question but I can advise you to read about the servlets life cycle (in the servlets specification or in any valuable resource as the book from Jason Hunter O'Reilly editions). and what happens to received requests (are some of them delayed or even dropped ?), you can use a dummy filter (if you use the 2.3 servlets API aka Tomcat 4 -catalina) which logs any filter, adds trace for incoming request, responses... in order to tune up my configuration and to prevent any crash. that is the point where I can't see any links with your question!!! ...sorry, I wasn't very clear. I have to monitor a (huge) three tiers application which uses a servlet/jsp container. The aim is to help administrators to tune the application (i.e. to set the best number of threads in the pool), and to notice them when it seems this application reaches its limits (when requests are delayed or dropped). Before, the container used was JRun and it had a function which allowed us to know the number of listening threads/buzy threads, the number of received calls, the number of delayed and dropped requests. Now, they want to use Tomcat, so I have to find a way to have the same informations... what do you mean by filter, is it something specific to Tomcat 4.x ? anyway, they don't want to use Tomcat 4 but Tomcat 3.2... Thank you very much for yor kind help, I'm really lost :( Pauline - CANTALOUP Pauline PCOTechnologies Burolines - 2 ter rue Marcel Doret 31700 Blagnac Tél. : 05.34.60.44.17 Web : www.pcotech.fr -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
AW: IIS-Tomcat
You snipped away to much of the stack trace. So it's difficult to see what problem jasper has with this class. Verify that this file exists examples/WEB-INF/classes/dates/JspCalendar.class -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 11. April 2002 14:54 An: [EMAIL PROTECTED] Betreff: IIS-Tomcat snip Error: 500 Location: /dates/date.jsp Erreur interne de servlet: org.apache.jasper.JasperException: dates.JspCalendar [.] snip/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Jspc i18n
It looks like the output is probably in UTF-8 format. If you use the %@ page contentType=text/html;charset=UTF-8 % directive in your page, that should instruct the browser to use that encoding for display. To see if this should work, you should be able to just manually change your browser's encoding to UTF-8 (Unicode) while viewing the page that currently doesn't work and have it display properly for you. HTH, Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 04:57 PM Please respond to Tomcat Users List Hi Jeff ! I can't use the attribute encoding, I think my app server doesn't implements the last JSP specs ! But I have an update to my problem, I did a diff on two different .java file based on the same jsp file : 1) the one generated by using jspc command line (the one that doesn't works) 2) the one generated by tomcat/jspc when accessed the first time by a browser (the one that works) Its really weird because there are almost identical (only the class name is different but this is normal), the french text is scrambled in both versions ! Even more weird, if I access the command line generated version page (#1) in IE I see this : Joyeux noël et bonne année !!! But if I do a view source of the page look at this : Joyeux noël et bonne année !!! Everything is fine !! Christian - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 4:55 PM Subject: Re: Jspc i18n Hi, Christian. I haven't run into this problem before, so I'm not sure, but it looks like the compiler is encoding the accented characters. Perhaps if you specify the JSP page's encoding, it won't do that anymore...? Try using a directive at the top of your JSP to do this, something like %@ page encoding =ISO-8859-1 % or whatever specific encoding/character set you are using. HTH, -Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 02:16 PM Please respond to Tomcat Users List Hi Jay ! No, the bad characters are in the .java files that jspc creates ! The text is clean in the .jsp file but as soon as I convert it to .java with jspc all french accent are scrambled ! Christian - Original Message - From: Jay Gardner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 2:42 PM Subject: RE: Jspc i18n Are all the correct characters in the .java files that jspc creates? --Jay Gardner -Original Message- From: Christian Bourque [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 12:49 PM To: Tomcat Users List Subject: Jspc i18n Hi ! I'm having a weird problem with JSPC. We have a bilingual web application (english/french), so when I pre-compile all my jsp pages the ones which contains french accent are all screwed up : Vous avez oublié votre mot de passe ? = Vous avez oubliÃ(c) votre mot de passe ? chaîne = chaÃ(r)ne ??? Christian -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL
configuring IIS: Isapi filter
I have installed Tomcat and IIS 5.0. The tomcat serves the servlets and jsp pages just fine on port 8080. When I attempt to have IIS serve the jsp pages I get a Error 500. The isapi redirector does have a green arrow. Any ideas on something we may have missed? thanks a lot Here a copy of the error: Error: 500 Location: /dates/date.jsp Internal Servlet Error: org.apache.jasper.JasperException: dates.JspCalendar at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:183) at org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerator.java:99) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(JspParseEventListener -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: mod webapp and SSL
Some more info: I noticed I was using Tomcat 4.01. Just upgraded to 4.03, but that didn't help much. I downloaded the source to see where the exception is happening and what I find is very perplexing. Using 4.03, the start of the exception looks like this: 2002-04-11 09:35:49 WarpEngine[develop.streetmail.com]: Mapping request 2002-04-11 09:35:49 WarpHost[develop.streetmail.com]: Mapping request for Host 2002-04-11 09:35:49 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at org.apache.catalina.authenticator.AuthenticatorBase.checkUserData(Authentica torBase.java:702) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:491) Line 702 in authenticatorBase.java is marked with a star: // Initialize variables we need to determine the appropriate action HttpServletRequest hrequest = (HttpServletRequest) request.getRequest(); HttpServletResponse hresponse = (HttpServletResponse) response.getResponse(); *int redirectPort = request.getConnector().getRedirectPort(); It looks to me like getConnector is returning null. How can that be? I have defined, and am using the Warp connector. I know it is being used because when I remove the user-data-constraint everything works fine. Running out of ideas :-( Rich -Original Message- From: Rich [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 3:55 PM To: [EMAIL PROTECTED] Subject: mod webapp and SSL I'm trying to secure my webapp with Apache's SSL (mod_ssl). I've given up trying to get it to work using mod_proxy and have turned to the mod webapp and the warp connector. I have successfully installed mod webapp and can access my web application the apache via the Warp connector. I believe apache's SSL is set up correctly, too, as I can access my web application securely by changing the protocol in the url to https. However, as soon as I add the confidential user constraint: user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint to any of my servlets, tomcat bails with a null pointer exception. Has anyone seen this before? Any insight/ideas would be greatly appreciated. Rich 2002-04-10 15:32:43 WarpEngine[develop.streetmail.com]: Mapping request 2002-04-10 15:32:43 WarpHost[develop.streetmail.com]: Mapping request for Host 2002-04-10 15:32:43 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at org.apache.catalina.authenticator.AuthenticatorBase.checkUserData(Authentica torBase.java:694) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:481) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHand ler.java:215) at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:19 4) at java.lang.Thread.run(Thread.java:484) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
AW: configuring IIS: Isapi filter
That Exeption doesn't mean anything to me. Do get this info in the browser or in a log file ? If it's in the browser can you find more info in the logfiles ? -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 11. April 2002 15:30 An: [EMAIL PROTECTED] Betreff: configuring IIS: Isapi filter I have installed Tomcat and IIS 5.0. The tomcat serves the servlets and jsp pages just fine on port 8080. When I attempt to have IIS serve the jsp pages I get a Error 500. The isapi redirector does have a green arrow. Any ideas on something we may have missed? thanks a lot Here a copy of the error: Error: 500 Location: /dates/date.jsp Internal Servlet Error: org.apache.jasper.JasperException: dates.JspCalendar at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepo sitory.java:183) at org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPr opertyGenerator.java:99) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrap per.generate(JspParseEventListener -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RES: How can I automatically start a servlet in a specific time?
Olá, Kelly. Existem alguns produtos para agendamento de tarefas (schedulers), e que são na verdade instalados como módulos ou serviços (depende do servidor utilizado). Até onde sei, pela especificação J2EE - da qual as Servlets e JSP fazem parte - não devemos utilizar threads. Eu sei que existem MLETS prontos para utilização com JBoss e com HP-AS, mas realmente não conheço nenhum para Jakarta/Tomcat. Uma boa fonte de pesquisa é o www.sourceforge.net. Boa sorte. Atenciosamente, Edson Carlos Ericksson Richter Gerente de Tecnologia ECONET Soluções Web +55 61 326 5115 -Mensagem original- De: Kelly Prudente Pereira [mailto:[EMAIL PROTECTED]] Enviada em: quarta-feira, 10 de abril de 2002 19:20 Para: 'Tomcat Users List' Assunto: RES: How can I automatically start a servlet in a specific time? Yes Ken, I mean I don't want to load it until a specific time. I need to load it to do a specific job at a certain time. Do you know how can I do this? -Mensagem original- De: Ken Anderson [mailto:[EMAIL PROTECTED]] Enviada em: quarta-feira, 10 de abril de 2002 19:19 Para: Tomcat Users List Assunto: Re: How can I automatically start a servlet in a specific time? You mean you don't want to load it until a specific time, or you don't want it to respond to requests until a certain time? Ken Carlos Martins wrote: Kelly, Boa pergunta... não sei nenhuma maneira directa, mas podes sempre criar um servlet tipo scheduler que arranca automáticamente com o tomcat e que a determinadas horas arranca outros servlets. Carlos -Original Message- From: Kelly Prudente Pereira [mailto:[EMAIL PROTECTED]] Sent: quarta-feira, 10 de Abril de 2002 23:04 To: '[EMAIL PROTECTED]' Subject: How can I automatically start a servlet in a specific time? Can anyone answer my question? How can I automatically start a servlet in a specific time? For example: at midnight. I don't want to start it when I start my webserver. Thanks in advanced, Kelly Prudente Pereira Analista de Sistemas - NDS [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Fóton® Informática e Serviços Fone: (61) 328 5060 R.: 221 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/02 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/02 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Concurrency problem with Tomcat under Linux
Sorry, I forgot the page directive from the example. We solved the problem by removing the buffer=16000 attribute from the page directive and voila-everything seems to work fine! Matti Härö Matti Härö wrote: We are getting empty responce bodies from Tomcat under Linux under stress testing. We managed to find out in what circumstances the empty bodies are delivered by Tomcat, but we would like to know the cause. While running Tomcat version 4.0.3 under Linux, and trying to access a single page simultaneously from two distinct browsers, we receive no body in the responce, only responce headers. The responce header code is 200. The error happens if the following conditions are met: 1) The server operating system is Linux (my kernel version is: Linux pollux 2.4.9-13 #1 Tue Oct 30 20:11:04 EST 2001 i686 unknown) The error does not appear under windows Tomcat versions. 2) The page is large enough, so that the previous request is still executing while a new one is coming in. (need two separate browsers in two separate machines for testing the concurrency problem) The error occurs with Sun's JDK 1.4, BlackDown's JDK, and IBM's JDK, so the bug is propably not in the JDK implementation. When testing with older Tomcat versions, the problem also exists, but the manifestation is a little bit different: There occurs a null pointer exception in the servlet generated from the JSP page. The NullPointerException occurs at the end of the servlet, on the line: out.flush(); This error also only occurs if there are two distinct browsers accessing simultaneously the page. Here is an example page to demonstrate the problem: %-- Page starts --% %@ java.util.*% html head titleMy test page/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 link rel=stylesheet href=my_stylesheet.css /head body bgcolor=#FF leftmargin=10 marginwidth=10 % for (int i=0;i=1;i++) { Date date = new java.util.Date(); % %= date %br % } % /body /html %-- Page ends --% Setting the LD_ASSUME_KERNEL=2.2.5 and reducing the OS stack size to 2048 didn't have any effect on this behaviour. Has anyone come up with a solution to this problem? Matti Härö -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
problem with opencms - where to specify java memory
I'm running apache 1.3.23 with tomcat 4.0.3 (mod_webapp) (although the tomcat examples still cannot be seen under /examples through apache - - :8080 (tomcat) sees them). Anyway, strange things were happening when OpenCMS loaded itself and a project was imported. A deploy directory is only filled halfway, files are missing etc. Someone from the opencms mailing list pointed me to perhaps setting the amount of memory the java servlet engine is using by some switch -Xmx256M becaus eth e default were -Xmx64M and that could be not enough. Were can one set this option in Tomcat? -- Chris Christoph P. U. Kukulies [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
AW: Concurrency problem with Tomcat under Linux
That sounds as if a buffer isn't flushed under all circumstances or the buffer is cleared by the second thread. As this problem persists across different vm implementations it might be a linux problem. (The 2.4 kernel between 2.4.8 and 2.4.18 is not very famous for stability) I currently have difficulties to imagine an error in any java code outside the core io libraries that can produce such behaviour. Can you switch bak to the 16K Buffer and use an explicit out.flush() at the end of the page and see what happens ? -Ursprüngliche Nachricht- Von: Matti Härö [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 11. April 2002 16:00 An: [EMAIL PROTECTED] Betreff: Re: Concurrency problem with Tomcat under Linux We solved the problem by removing the buffer=16000 attribute from the page directive and voila-everything seems to work fine! The error happens if the following conditions are met: 1) The server operating system is Linux (my kernel version is: Linux pollux 2.4.9-13 #1 Tue Oct 30 20:11:04 EST 2001 i686 unknown) The error does not appear under windows Tomcat versions. 2) The page is large enough, so that the previous request is still executing while a new one is coming in. (need two separate browsers in two separate machines for testing the concurrency problem) The error occurs with Sun's JDK 1.4, BlackDown's JDK, and IBM's JDK, so the bug is propably not in the JDK implementation. browsers accessing simultaneously the page. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
AW: problem with opencms - where to specify java memory
Set the env variable JAVA_OPTS before starting tomcat. Either define it in the environment of the user that runs tomcat or change startup.[sh|bat] -Ursprüngliche Nachricht- Von: Christoph Kukulies [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 11. April 2002 16:17 An: [EMAIL PROTECTED] Betreff: problem with opencms - where to specify java memory Were can one set this option in Tomcat? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Jspc i18n
Jeff, If I precompile my jsp file with this option : %@ page contentType=text/html;charset=UTF-8 % I get this error : JspReader: Exception parsing file \index.jsp sun.io.MalformedInputException at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:110) at java.io.InputStreamReader.convertInto(InputStreamReader.java:137) at java.io.InputStreamReader.fill(InputStreamReader.java:186) at java.io.InputStreamReader.read(InputStreamReader.java:249) at java.io.Reader.read(Reader.java:102) at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:224) at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:164) at org.apache.jasper.compiler.JspReader.init(JspReader.java:282) at org.apache.jasper.compiler.JspReader.createJspReader(JspReader.java:288) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:167) at org.apache.jasper.JspC.parseFile(JspC.java:376) at org.apache.jasper.JspC.parseFiles(JspC.java:641) at org.apache.jasper.JspC.main(JspC.java:689) You were right about changing the encoding directly in the browser, it works when I switch to UTF-8 ! But I still don't understand why it works if I deploy the same page directly in Tomcat (without precompilation) ??? What is the difference ? It should be the same thing ! Christian - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 9:30 AM Subject: Re: Jspc i18n It looks like the output is probably in UTF-8 format. If you use the %@ page contentType=text/html;charset=UTF-8 % directive in your page, that should instruct the browser to use that encoding for display. To see if this should work, you should be able to just manually change your browser's encoding to UTF-8 (Unicode) while viewing the page that currently doesn't work and have it display properly for you. HTH, Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 04:57 PM Please respond to Tomcat Users List Hi Jeff ! I can't use the attribute encoding, I think my app server doesn't implements the last JSP specs ! But I have an update to my problem, I did a diff on two different .java file based on the same jsp file : 1) the one generated by using jspc command line (the one that doesn't works) 2) the one generated by tomcat/jspc when accessed the first time by a browser (the one that works) Its really weird because there are almost identical (only the class name is different but this is normal), the french text is scrambled in both versions ! Even more weird, if I access the command line generated version page (#1) in IE I see this : Joyeux noël et bonne année !!! But if I do a view source of the page look at this : Joyeux noël et bonne année !!! Everything is fine !! Christian - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 4:55 PM Subject: Re: Jspc i18n Hi, Christian. I haven't run into this problem before, so I'm not sure, but it looks like the compiler is encoding the accented characters. Perhaps if you specify the JSP page's encoding, it won't do that anymore...? Try using a directive at the top of your JSP to do this, something like %@ page encoding =ISO-8859-1 % or whatever specific encoding/character set you are using. HTH, -Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 02:16 PM Please respond to Tomcat Users List Hi Jay ! No, the bad characters are in the .java files that jspc creates ! The text is clean in the .jsp file but as soon as I convert it to .java with jspc all french accent are scrambled ! Christian - Original Message - From: Jay Gardner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 2:42 PM Subject: RE: Jspc i18n Are all the correct characters in the .java files that jspc creates? --Jay Gardner -Original Message- From: Christian Bourque [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 12:49 PM To: Tomcat Users List Subject: Jspc i18n Hi ! I'm having a weird problem with JSPC. We have a bilingual web application (english/french), so when I pre-compile all my jsp pages the ones which contains french accent are all screwed up : Vous avez oublié votre mot de passe ? = Vous avez oubliÃ(c)
Re: problem with opencms - where to specify java memory
Christoph Kukulies a écrit : I'm running apache 1.3.23 with tomcat 4.0.3 (mod_webapp) (although the tomcat examples still cannot be seen under /examples through apache - - :8080 (tomcat) sees them). Anyway, strange things were happening when OpenCMS loaded itself and a project was imported. A deploy directory is only filled halfway, files are missing etc. Someone from the opencms mailing list pointed me to perhaps setting the amount of memory the java servlet engine is using by some switch -Xmx256M becaus eth e default were -Xmx64M and that could be not enough. Were can one set this option in Tomcat? -- Chris Christoph P. U. Kukulies [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Well I think that the best place for it is in ... $CATALINA_HOME/bin/catalina.sh and modify/append the variable: CATALINA_OPTS ! Hope this help. Jean-Luc :O) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: How can I automatically start a servlet in a specific time?
Steven Elliott wrote: I wholeheartedly disagree with the FAQ @ Distributopia. I think servlets are the best way to schedule tasks I'd say that's going a bit far. There are obvious drawbacks. and they can be packaged with your application on whatever platform that you deploy on. Using a servlet container as an application server is undeniably appealing, and very convenient. If all you've got is a hammer, etc, etc. I've found that many people fall into the Well, it works fine for me trap. Instead of programming to the spec, they program to whatever servlet container they happen to be using for development work. Sometimes you have to settle for that, but no programmer should aspire to it. At the very least, developers should be aware of potential problems and consciously choose to trade safety for convenience. That's the whole point of the FAQ. I'm curious what you suggest should happen if the user's servlets are swapped out during the time the task should be running. Is the background thread destroyed, in which case the task doesn't run? Or do you leave it running, in which case you've got a resource leak? If you're depending on your particular servlet container never doing something like that, well, that's probably ok. But you may get a nasty shock the next time you upgrade your server. At the very least, people should know that there's a potential problem, and document it for the benefit of future maintainers. -- Christopher St. John [EMAIL PROTECTED] DistribuTopia http://www.distributopia.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tomcat 3.2.2 log file rotation
Does anyone know whether Tomcat 3.2.2 can do daily log file rotation? I searched the archive and it seemed to me that this feature starts from Tomcat 3.3. Is that true? If so, is there any method to do the rotation automatically? I think if the log file keeps growing it will eventually crash the server. I am using Apache 1.3.20 + Tomcat 3.2.2 on Windows 2000 server. Thanks. Charley -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: RES: How can I automatically start a servlet in a specific time?
nao dah pra colocar o tempo q vai demorar pra Servlet se carregar no web.xml?? soh pra saber... Edson Carlos Ericksson Richter wrote: Olá, Kelly. Existem alguns produtos para agendamento de tarefas (schedulers), e que são na verdade instalados como módulos ou serviços (depende do servidor utilizado). Até onde sei, pela especificação J2EE - da qual as Servlets e JSP fazem parte - não devemos utilizar threads. Eu sei que existem MLETS prontos para utilização com JBoss e com HP-AS, mas realmente não conheço nenhum para Jakarta/Tomcat. Uma boa fonte de pesquisa é o www.sourceforge.net. Boa sorte. Atenciosamente, Edson Carlos Ericksson Richter Gerente de Tecnologia ECONET Soluções Web +55 61 326 5115 -Mensagem original- De: Kelly Prudente Pereira [mailto:[EMAIL PROTECTED]] Enviada em: quarta-feira, 10 de abril de 2002 19:20 Para: 'Tomcat Users List' Assunto: RES: How can I automatically start a servlet in a specific time? Yes Ken, I mean I don't want to load it until a specific time. I need to load it to do a specific job at a certain time. Do you know how can I do this? -Mensagem original- De: Ken Anderson [mailto:[EMAIL PROTECTED]] Enviada em: quarta-feira, 10 de abril de 2002 19:19 Para: Tomcat Users List Assunto: Re: How can I automatically start a servlet in a specific time? You mean you don't want to load it until a specific time, or you don't want it to respond to requests until a certain time? Ken Carlos Martins wrote: Kelly, Boa pergunta... não sei nenhuma maneira directa, mas podes sempre criar um servlet tipo scheduler que arranca automáticamente com o tomcat e que a determinadas horas arranca outros servlets. Carlos -Original Message- From: Kelly Prudente Pereira [mailto:[EMAIL PROTECTED]] Sent: quarta-feira, 10 de Abril de 2002 23:04 To: '[EMAIL PROTECTED]' Subject: How can I automatically start a servlet in a specific time? Can anyone answer my question? How can I automatically start a servlet in a specific time? For example: at midnight. I don't want to start it when I start my webserver. Thanks in advanced, Kelly Prudente Pereira Analista de Sistemas - NDS [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Fóton® Informática e Serviços Fone: (61) 328 5060 R.: 221 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/02 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/02 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: DTD of server.xml
Enrique Riesgo wrote: Does anybody know how can I get the DTD for the Tomcat 4.X server.xml configuration file? There's no proper DTD for server.xml. The startup code figures out the legal attributes for the elements at runtime, by using introspection. For example, it's legal to do: Realm className=com.distributopia.mtc.MinimalRealm users=scott/tomcat/role1 / Note that the users attribute is specific to MinimalRealm, but you can put it in server.xml because Tomcat 4 looks at the bean methods on MinimalReal at runtime, finds setUsers(), and calls it for you automatically. You can see how it would be hard to write a DTD for that sort of thing. -- Christopher St. John [EMAIL PROTECTED] DistribuTopia http://www.distributopia.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Older TC version (v4.0-b7)
How might I find the tomcat.exe file that came with the v4.0-b7 release of TC for Windows. BTW, TC v4.0-b7 is what is packaged w/ the jwsdp from Sun, and it doesn't have the tomcat.exe file necessary to start TC as a service on NT. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
mod_jserv.log rotation in Apache
I would like to do a daily log file rotation for all the log files in Apache. I have four logs file in log direcotory:access.log, error.log, ssl.log and mod_jserv.log. I can do rotation for access.log, error.log and ssl.log by following directive in http.conf: TransferLog |D:\CA_Root\Production\Apache\Apache\bin/rotatelogs.exe logs/access_log 86400 ErrorLog |D:\CA_Root\Production\Apache\Apache\bin/rotatelogs.exe logs/error_log 86400 SSLLog |D:\CA_Root\Production\Apache\Apache\bin/rotatelogs.exe logs/ssl_log 86400 But anyone knows what is the directive for mod_jserv.log? I am using Apache 1.3.20 + Tomcat 3.2.2. Thanks in advance. Charley -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Restricting access by machine
Hi, I have a servlet that I wish to restrict access to. I can do this very easily by using authentication and requiring a user name and password to be entered. However I would like to take it a step further and restrict access to one particular machine (or perhaps a group of machines). I was wondering what the best way of doing this was? Many Thanks Iain -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Older TC version (v4.0-b7)
How might I find the tomcat.exe file that came with the v4.0-b7 release of TC for Windows. BTW, TC v4.0-b7 is what is packaged w/ the jwsdp from Sun, and it doesn't have the tomcat.exe file necessary to start TC as a service on NT. The Wspack actually comes with a Tomcat 4 nightly build, which is equivalent to 4.1-dev. Tomcat.exe can be found at JavaService homepage: http://www.alexandriasc.com/software/JavaService/index.html Remy -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Restricting access by machine
Have you considered restricting access via a firewall? Cheers, Graham. Graham Stirling Yakara Plc. tel: (+44) 131 624 8906 mail: [EMAIL PROTECTED] web: http://www.yakara.com -Original Message- From: Iain Darroch [mailto:[EMAIL PROTECTED]] Sent: 11 April 2002 16:18 To: [EMAIL PROTECTED] Subject: Restricting access by machine Hi, I have a servlet that I wish to restrict access to. I can do this very easily by using authentication and requiring a user name and password to be entered. However I would like to take it a step further and restrict access to one particular machine (or perhaps a group of machines). I was wondering what the best way of doing this was? Many Thanks Iain -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not an intended recipient, please notify [EMAIL PROTECTED] immediately. Please note that some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. This email is not intended nor should it be taken to create any legal relations contractual or otherwise. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Apache 2.0.35 with Tomcat 4.0
Hello from France, I'm trying to use Tomcat 4.0 with Apache 2.0.35. It seems that communication module between both has change. With Apache 1.3 and Tomcat 3, i used to use the mod_jk module. Now it is the mod_webapp module ? Where can i find this module, i've been looking everywhere at www.apache.org, i can't find it ! May i use my old Apache 1.3 module to connect Apache 2.0 to Tomcat 4.0 ? Thanks for any precious help. Michel COTE. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Antw: RE: Bug in Tomcat 3.3.1 with getPathInfo() ?
But URLEncoder.encode( myPath ) encodes ' ' to '+', not '%20'... Creating extra path info gets quite difficult now. [EMAIL PROTECTED] 10.04.2002 19:14 I think if request.getPathInfo() returns '/Hit+Run', then the path info was '/Hit+Run' or '/Hit%2BRun'. The path would have to be '/Hit%20Run' for getPathInfo() to return '/Hit Run' on Tomcat 3.3.1. Cheers, Larry -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Restricting access by machine
I dont think that would work as I want other servlets on the webserver to be accessable over the web. Iain On Thu, 11 Apr 2002, Graham Stirling wrote: Have you considered restricting access via a firewall? Cheers, Graham. Subject: Restricting access by machine Hi, I have a servlet that I wish to restrict access to. I can do this very easily by using authentication and requiring a user name and password to be entered. However I would like to take it a step further and restrict access to one particular machine (or perhaps a group of machines). I was wondering what the best way of doing this was? Many Thanks Iain -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Jspc i18n - solution
Ok I've found the solution ! The problem is not in jspc, its when I compile the .java file generated by jspc with javac ! I've look into Tomcat source code (org.apache.jasper.compiler.Compiler) and I realized that they don't compile using the default encoding instead they use UTF-8 (javac -encoding UTF-8 ...) ! Not it works !!! Thanks to everyone for your help ! Christian - Original Message - From: Christian Bourque [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 10:31 AM Subject: Re: Jspc i18n Jeff, If I precompile my jsp file with this option : %@ page contentType=text/html;charset=UTF-8 % I get this error : JspReader: Exception parsing file \index.jsp sun.io.MalformedInputException at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:110) at java.io.InputStreamReader.convertInto(InputStreamReader.java:137) at java.io.InputStreamReader.fill(InputStreamReader.java:186) at java.io.InputStreamReader.read(InputStreamReader.java:249) at java.io.Reader.read(Reader.java:102) at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:224) at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:164) at org.apache.jasper.compiler.JspReader.init(JspReader.java:282) at org.apache.jasper.compiler.JspReader.createJspReader(JspReader.java:288) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:167) at org.apache.jasper.JspC.parseFile(JspC.java:376) at org.apache.jasper.JspC.parseFiles(JspC.java:641) at org.apache.jasper.JspC.main(JspC.java:689) You were right about changing the encoding directly in the browser, it works when I switch to UTF-8 ! But I still don't understand why it works if I deploy the same page directly in Tomcat (without precompilation) ??? What is the difference ? It should be the same thing ! Christian - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 9:30 AM Subject: Re: Jspc i18n It looks like the output is probably in UTF-8 format. If you use the %@ page contentType=text/html;charset=UTF-8 % directive in your page, that should instruct the browser to use that encoding for display. To see if this should work, you should be able to just manually change your browser's encoding to UTF-8 (Unicode) while viewing the page that currently doesn't work and have it display properly for you. HTH, Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 04:57 PM Please respond to Tomcat Users List Hi Jeff ! I can't use the attribute encoding, I think my app server doesn't implements the last JSP specs ! But I have an update to my problem, I did a diff on two different .java file based on the same jsp file : 1) the one generated by using jspc command line (the one that doesn't works) 2) the one generated by tomcat/jspc when accessed the first time by a browser (the one that works) Its really weird because there are almost identical (only the class name is different but this is normal), the french text is scrambled in both versions ! Even more weird, if I access the command line generated version page (#1) in IE I see this : Joyeux noël et bonne année !!! But if I do a view source of the page look at this : Joyeux noël et bonne année !!! Everything is fine !! Christian - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 4:55 PM Subject: Re: Jspc i18n Hi, Christian. I haven't run into this problem before, so I'm not sure, but it looks like the compiler is encoding the accented characters. Perhaps if you specify the JSP page's encoding, it won't do that anymore...? Try using a directive at the top of your JSP to do this, something like %@ page encoding =ISO-8859-1 % or whatever specific encoding/character set you are using. HTH, -Jeff Christian Bourque To: Tomcat Users List [EMAIL PROTECTED] christian@alicc: osoft.comSubject: Re: Jspc i18n 04/10/02 02:16 PM Please respond to Tomcat Users List Hi Jay ! No, the bad characters are in the .java files that jspc creates ! The text is clean in the .jsp file but as soon as I convert it to .java with jspc all french accent are scrambled ! Christian - Original Message -
RE: Restricting access by machine
Can you use request.getRemoteAddr() and use the machine's IP address? -Original Message- From: Iain Darroch [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 11:22 AM To: Tomcat Users List Subject: RE: Restricting access by machine I dont think that would work as I want other servlets on the webserver to be accessable over the web. Iain On Thu, 11 Apr 2002, Graham Stirling wrote: Have you considered restricting access via a firewall? Cheers, Graham. Subject: Restricting access by machine Hi, I have a servlet that I wish to restrict access to. I can do this very easily by using authentication and requiring a user name and password to be entered. However I would like to take it a step further and restrict access to one particular machine (or perhaps a group of machines). I was wondering what the best way of doing this was? Many Thanks Iain -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Restricting access by machine
Are you using the Apache/Tomcat configuration? It should be possible to do this using Apache. Cheers, Graham. -Original Message- From: Iain Darroch [mailto:[EMAIL PROTECTED]] Sent: 11 April 2002 16:22 To: Tomcat Users List Subject: RE: Restricting access by machine I dont think that would work as I want other servlets on the webserver to be accessable over the web. Iain On Thu, 11 Apr 2002, Graham Stirling wrote: Have you considered restricting access via a firewall? Cheers, Graham. Subject: Restricting access by machine Hi, I have a servlet that I wish to restrict access to. I can do this very easily by using authentication and requiring a user name and password to be entered. However I would like to take it a step further and restrict access to one particular machine (or perhaps a group of machines). I was wondering what the best way of doing this was? Many Thanks Iain -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not an intended recipient, please notify [EMAIL PROTECTED] immediately. Please note that some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. This email is not intended nor should it be taken to create any legal relations contractual or otherwise. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Restricting access by machine
I'm sorry I didnt make it clear. I want the restriction to be in the webserver config files. I could do as you suggest, but I want a general solution that could apply to any servlets, or static html pages for that matter. Thanks Iain On Thu, 11 Apr 2002, Wagoner, Mark wrote: Can you use request.getRemoteAddr() and use the machine's IP address? I dont think that would work as I want other servlets on the webserver to be accessable over the web. Iain On Thu, 11 Apr 2002, Graham Stirling wrote: Have you considered restricting access via a firewall? Cheers, Graham. Subject: Restricting access by machine Hi, I have a servlet that I wish to restrict access to. I can do this very easily by using authentication and requiring a user name and password to be entered. However I would like to take it a step further and restrict access to one particular machine (or perhaps a group of machines). I was wondering what the best way of doing this was? Many Thanks Iain -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Bug in implementation of HttpSessionAttributeListener with Tomcat 4.0.1 ??
Hi, I have a very funny behaviour when using the HttpSessionAttributeListener interface. I have derived a class from HttpSessionAttributeListener and implemented the two methods - public void attributeAdded(HttpSessionBindingEvent se) - public void attributeRemoved(HttpSessionBindingEvent se) Both worked fine until I have disabled cookie support! When cookie support is disabled in a browser TOMCAT usually performs automatically URL rewriting (this assumes that the application also makes use of HttpServletResponse.encodeURL(...) whenever URL's are hardcoded for a tags or form action=. tags. I have done this in my application and was just tesing all my stuff when I noticed that this does not work anymore. OK now back to the HttpSessionAttributeListener implementation. The method attributeAdded() is still called correctly when using URL rewriting. The method attributeRemoved() gets NEVER called when URL rewriting is used (cookies are not allowed in the browser) I am still using Tomcat 4.0.1 and I can reproduce this behaviour anytime. I have not yet upgraded to 4.0.3 yet and therefore cannot say whether it is working there correctly. Does anybody else have the same problem? Could someone give me advice what I have to do? Can I somehow help to track down the problem? Thomas
some weird behaviour...
Hi, I have an Apache-Tomcat set up... It does seem to work, in that request for the jsp pages that are sent to Apache are being rerouted to the Tomcat server. The weird thing is that the the only jsps that can be reached are those that are found below a jsp directory. I have read the documentation and there is no mention of the NEED for a jsp directory. This also applied to the examples, they work fine as long as they are below the jsp directory, move them out of that directory and voila! page not found... Not a big deal to locate the JSP pages in a jsp directory but it is bugging me that this doesn't work as expected. Below is the appropriate configuration information: HTTPD configuration extract: #INCLUDE_SECTION_TOMCAT Include /usr/local/jakarta-tomcat-3.3a/conf/mod_jk.conf #END_INCLUDE_SECTION_TOMCAT VirtualHost _default_:443 SSLEngine on RewriteEngine on RewriteLog /home/xlink/logs/RewriteLog.proxy RewriteLogLevel 2 # this directive is set in order to avoid access # to directory listing in the portal Directory /home/portal/html Options -Indexes /Directory #SECTION_TOMCAT JkMount /*.jsp ajp13 JkMount /sso/* ajp13 #END_SECTION_TOMCAT ProxyPass /xlink http://localhost:9442/xlink ProxyPass /authapi http://localhost:9442/authapi ProxyPass /portal http://localhost:9303/ ProxyPass /portal/ http://localhost:9303/ ProxyPass / http://localhost:9303/ RewriteRule /portal/images(.*) /home/portal/html/images$1 RewriteRule /portal/js(.*) /home/portal/html/js$1 RewriteRule /images(.*) /home/portal/html/images$1 RewriteRule /js(.*) /home/portal/html/js$1 RewriteRule /css(.*) /home/portal/html/css$1 ProxyPassReverse /portal/ http://localhost:9303/ ProxyPassReverse / http://localhost:9303/ /VirtualHost Tomcat configuration: ## Auto generated on Fri Jan 25 15:09:17 EST 2002## # This file is to be used by the Apache proxy servers proxy.conf. # IfModule !mod_jk.c LoadModule jk_module libexec/mod_jk.so /IfModule JkWorkersFile /usr/local/jakarta-tomcat-3.3a/conf/jk/workers.properties JkLogFile /usr/local/jakarta-tomcat-3.3a/logs/mod_jk.log JkLogLevel emerg As you can see I have a bunch of on their own JSP and I have a web application called SSO which has some JSPs as well... If you need other information, please just ask... Thanks ahead of time Later, Alex -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
doubt
hi , iam now trying to install tomcat 4.0 here iam able to install it. but in writing the context in tomcat server.xml file there are small doubts. i just modify path and docbase in the context element. coz thats what i know present in tomcat 3.2.3 server.xml file. when do this, i am able to browse the web application but when try for the servlet i, it is giving page cannot be displayed or servlet exception , depeding up on the classpath i set. please tell me what are the jar files i need to place in the classpath. but now i have common/lib/servlet.jar and server/lib/catalina.jar in my classpath . also i have CATALINA_HOME set to root dir of my tomcat 4. comments and advices are welcome. thanks prassana -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Includes desappearing
You should check the logs. Probably some exceptions are being thrown. RS Marcelo Mathias Lima [EMAIL PROTECTED] on 04/11/2002 07:45:57 AM Please respond to Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] cc: Subject: Includes desappearing hi! On my JSP project with Tomcat4/Apache sometimes, in some pages, the page is returned incomplete. They come without the includes, that are other JSPs and without parts of the master JSP. It is not normal and I am worried by this... do somebody can help me?? Thank u in advance, Marcelo Mathias Lima Web Developer -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: doubt
Ideally the classpath shouldn't be messed around with in Tomcat 4.0.x. It takes care of it for you. As for you servlet not executing, check your URL and the logs once again. Can you run any servlet in the examples webapp? RS Janarthanan, Prasanna [EMAIL PROTECTED] on 04/11/2002 11:09:17 AM Please respond to Tomcat Users List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc: Subject: doubt hi , iam now trying to install tomcat 4.0 here iam able to install it. but in writing the context in tomcat server.xml file there are small doubts. i just modify path and docbase in the context element. coz thats what i know present in tomcat 3.2.3 server.xml file. when do this, i am able to browse the web application but when try for the servlet i, it is giving page cannot be displayed or servlet exception , depeding up on the classpath i set. please tell me what are the jar files i need to place in the classpath. but now i have common/lib/servlet.jar and server/lib/catalina.jar in my classpath . also i have CATALINA_HOME set to root dir of my tomcat 4. comments and advices are welcome. thanks prassana -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: How to run tomcat as service program in Win2k [[HELP]]
I've followed this thread and am still having no luck. Here's the situation. The TC that comes with jwsdp is TC4.0b7. This release of TC doesn't include a tomcat.exe file, so I grabbed one from the TC4.0.1 release. I then run following from the cmd prompt. %CATALINA_HOME%\bin\tomcat.exe -install Tomcat %JAVA_HOME%\jre\bin\classic\jvm.dll -Djava.class.path= %CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar -Dcatalina.home=%CATALINA_HOME% -Xrs -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop -out %CATALINA_HOME%\logs\stderr.log Response is: The service was successfully installed. Upon starting the service I get: Could not start the service on Local Computer. The service did not return an error. This could be a Windows error or an internal service error. the stderr.log file is created but is empty. Anyone have any ideas? How can I further troubleshoot. Regards Eric -Original Message- From: Jordan C N Chong [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 2:06 AM To: Tomcat Users List Subject: Access local directory with Tomcat 4.0 Dear all, Sorry to post this question again, cause I didn't receive any reply... so I think I should rephrase my question. I am using standalone Apache Tomcat 4.0, on my Windows 2000 machine. I am making a servlet for file downloading using the Tomcat 4.0, but I am not sure how to setup or configure the local directory, cause when I do this: FileInputStream filein = new FileInputStream(C:\\temp\\text.txt); I got IOException for that, because Tomcat 4.0 complains the directory is not accessible... Please help me. Thank you very much. Best regards, Jo -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: AW: AW: Tomcat intermittent failures
Ralph, Thanks again for writing on this subject. We've checked the logs and it does indeed look like Apache is receiving the request, and passing it along to Tomcat. Our current theory is that there is an error in compiling the revised JSP. If the .class and .java files are there from the previous revision, they are displayed. If those files are not there, then we think Tomcat tries to display a standard file error.jsp. Unfortunately, we don't have a copy of error.jsp in every directory, which the leads to the 404 - File Not Found message. That is the theory of operation we've developed, if it contradicts how Tomcat actually works, please let us know. Under this theory our corrective action is to make sure there is a copy of error.jsp in every directory. Dave Bank [EMAIL PROTECTED] 04/10/02 11:34AM Sorry , but if one jsp works and another not, that doesn't nessesarily mean that the one that didn't work hit the server just because the other did it. With verification i wass thinking of looking at the access log. If apache was hit, hat you should find an corresponding entry in the access.log for this request with the error code 404. If tomcat was hit you should see some messages in the logs that are produced by tomcat. (Depends on the verbosity that you defined) If apache was hit but not tomcat, I would expect an error message in the log of apache. If tomcat was hit I would expect an error message in one of the logs of tomcat. Make shure that you start apache and tomcat in way that stderr and stdout are captured in a log file. -Ursprüngliche Nachricht- Von: David Bank [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 10. April 2002 17:21 An: [EMAIL PROTECTED] Betreff: Re: AW: Tomcat intermittent failures Ralph, Thanks for writing. We've been able to reproduce the situation on machines which were directly connected to the same LAN on which the servers are located (and therefore no proxy was involved), and we tried clearing browser caches on these machines. The problem persisted. When the problem occurs, some .JSP files will compile and run fine, others won't. So we know Apache is hitting Tomcat and Tomcat is running because some files work and some don't. It'll just change - as I said before, we'll do the restart thing, or even reboot the whole box, and before, FOO.JSP wouldn't work but BAR.JSP would, and after FOO.JSP will work and BAR.JSP won't. But a .JSP file works each time, confirming that we are hitting Apache and Apache is hitting Tomcat. David Bank NC CATS Project Manager Accountability Services - Testing NC Department of Public Instruction 301 Wilmington Street Raleigh, NC 27601 919-807-3796 [EMAIL PROTECTED] 04/10/02 03:00AM Have you verified if your apache got hit, with the request that caused a 'file not found'? (We have seen in the past some obscure errors that turned out to be caching problems of browsers and proxy caches where the server wasn't hit at all) If your apache got hit, did the request hit tomcat ? If it hit tomcat can you find any error message that may correspond to the failure? (in the tomcat or the apache logs) -Ursprüngliche Nachricht- Von: David Bank [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 9. April 2002 19:56 An: [EMAIL PROTECTED] Betreff: Tomcat intermittent failures exist, but when we attempt to access that particular JSP thru Apache, we get 404 - File Not Found. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re[2]: How to run tomcat as service program in Win2k [[HELP]]
Hello Eric, What JDK are you using? If you are using JDK1.4, there is no such thing as %JAVA_HOME%\jre\bin\classic\jvm.dll. With 1.4, you have a choice between client and server. JDK1.3.1 still has classic, though. Jake Thursday, April 11, 2002, 11:29:00 AM, you wrote: DE I've followed this thread and am still having no luck. Here's the situation. DE The TC that comes with jwsdp is TC4.0b7. This release of TC doesn't include DE a tomcat.exe file, so I grabbed one from the TC4.0.1 release. I then run DE following from the cmd prompt. DE %CATALINA_HOME%\bin\tomcat.exe -install Tomcat DE %JAVA_HOME%\jre\bin\classic\jvm.dll -Djava.class.path= DE %CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar DE -Dcatalina.home=%CATALINA_HOME% -Xrs -start DE org.apache.catalina.startup.Bootstrap -params start -stop DE org.apache.catalina.startup.Bootstrap -params stop -out DE %CATALINA_HOME%\logs\stderr.log DE Response is: DE The service was successfully installed. DE Upon starting the service I get: DE Could not start the service on Local Computer. The service did not return DE an error. This could be a Windows error or an internal service error. DE the stderr.log file is created but is empty. DE Anyone have any ideas? How can I further troubleshoot. Regards Eric DE -Original Message- DE From: Jordan C N Chong [mailto:[EMAIL PROTECTED]] DE Sent: Thursday, April 11, 2002 2:06 AM DE To: Tomcat Users List DE Subject: Access local directory with Tomcat 4.0 DE Dear all, DE Sorry to post this question again, cause I didn't receive any reply... so I DE think I should rephrase my question. DE I am using standalone Apache Tomcat 4.0, on my Windows 2000 machine. DE I am making a servlet for file downloading using the Tomcat 4.0, but I am DE not sure how to setup or configure the local directory, cause when I do DE this: DE FileInputStream filein = new FileInputStream(C:\\temp\\text.txt); DE I got IOException for that, because Tomcat 4.0 complains the directory is DE not accessible... Please help me. Thank you very much. DE Best regards, DE Jo DE -- DE To unsubscribe: mailto:[EMAIL PROTECTED] DE For additional commands: mailto:[EMAIL PROTECTED] DE Troubles with the list: mailto:[EMAIL PROTECTED] DE -- DE To unsubscribe: mailto:[EMAIL PROTECTED] DE For additional commands: mailto:[EMAIL PROTECTED] DE Troubles with the list: mailto:[EMAIL PROTECTED] -- Best regards, Jacobmailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Re[2]: How to run tomcat as service program in Win2k [[HELP]]
Thanks for the response: jdk1.3.1_02 I tried both %JAVA_HOME%\jre\bin\classic\jvm.dll and %JAVA_HOME%\jre\bin\hotspot\jvm.dll same result. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Restricting access by machine
a filter(tc4) would work well for this. You can then define the paths in server.xml that the filter should run against. Charlie -Original Message- From: Iain Darroch [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 11:31 AM To: Tomcat Users List Subject: RE: Restricting access by machine I'm sorry I didnt make it clear. I want the restriction to be in the webserver config files. I could do as you suggest, but I want a general solution that could apply to any servlets, or static html pages for that matter. Thanks Iain On Thu, 11 Apr 2002, Wagoner, Mark wrote: Can you use request.getRemoteAddr() and use the machine's IP address? I dont think that would work as I want other servlets on the webserver to be accessable over the web. Iain On Thu, 11 Apr 2002, Graham Stirling wrote: Have you considered restricting access via a firewall? Cheers, Graham. Subject: Restricting access by machine Hi, I have a servlet that I wish to restrict access to. I can do this very easily by using authentication and requiring a user name and password to be entered. However I would like to take it a step further and restrict access to one particular machine (or perhaps a group of machines). I was wondering what the best way of doing this was? Many Thanks Iain -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Apache 2.0.35 with Tomcat 4.0
In Apache 2.0 Documentation... http://httpd.apache.org/docs-2.0/upgrading.html.en Third Party Modules Extensive changes were made to the server API in Apache 2.0. Existing modules designed for the Apache 1.3 API will not work in Apache 2.0 without modification. Details are provided in the developer documentation. So... Let's wait the mod_jk module for Apache 2.0.. -Original Message- From: Michel COTE [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 12:13 AM To: '[EMAIL PROTECTED]' Subject: Apache 2.0.35 with Tomcat 4.0 Hello from France, I'm trying to use Tomcat 4.0 with Apache 2.0.35. It seems that communication module between both has change. With Apache 1.3 and Tomcat 3, i used to use the mod_jk module. Now it is the mod_webapp module ? Where can i find this module, i've been looking everywhere at www.apache.org, i can't find it ! May i use my old Apache 1.3 module to connect Apache 2.0 to Tomcat 4.0 ? Thanks for any precious help. Michel COTE. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re[4]: How to run tomcat as service program in Win2k [[HELP]]
Hello Eric, Hmmm... you probably should be using server for Tomcat...since it is a server and not a client side gui app, but it should still run in either of the other two. Not sure what else the problem could be at this point? Jake Thursday, April 11, 2002, 11:37:21 AM, you wrote: DE Thanks for the response: DE jdk1.3.1_02 DE I tried both DE %JAVA_HOME%\jre\bin\classic\jvm.dll DE and DE %JAVA_HOME%\jre\bin\hotspot\jvm.dll DE same result. DE -- DE To unsubscribe: mailto:[EMAIL PROTECTED] DE For additional commands: mailto:[EMAIL PROTECTED] DE Troubles with the list: mailto:[EMAIL PROTECTED] -- Best regards, Jacobmailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.x and Database Connection Pooling
On Thu, 11 Apr 2002, Soefara Redzuan wrote: Date: Thu, 11 Apr 2002 10:46:14 +0800 From: Soefara Redzuan [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Tomcat 4.x and Database Connection Pooling Tomcat: As far as I'm concerned, JNDI support is a now and forever more feature of Tomcat 4 and later. It's the standard access mechanism for J2EE app servers as well. This is what I love to hear. With so many changes (servlets to JSP to Struts) over the last few years, future-proofing is so important. Recommendation: If you can, you should use JNDI based access to data sources. This is both portable across containers, and portable across Struts versus non-Struts applications. In addition, it can be used from directly from within a JavaBean implementing your business logic, without requiring a reference to ActionServlet or the servlet context (or the web layer at all). Really ? This is incredibly important news to me. I've been acquiring the JNDI resource within my servlet then passing it as a parameter to my Javabean which is a terrible mechanism because it makes my javabean dependent on the servlet :( So, are we saying that once we've set up a pooled database connection JNDI resource in server.xml and web.xml, any Javabean that is called by a serlvet or JSP can make use of this JNDI resource directly like this In the javabean. import javax.naming.NamingException; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingEnumeration; import javax.naming.directory.InitialDirContext; class mybean() { java.sql.Connection conn get getPooledDatabaseConnection() { Context ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(jdbc/dbpool); conn = ds.getConnection(); } ... } If so, this is going to make development much easier. :-) Yep ... that is exactly the pattern you can use. Nice, isn't it? Soefara. Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Rantings about FileLogger (TC 4.0.3)
I was just perusing the source code for org.apache.catalina.logger.FileLogger because, like many of you, I don't like the clutter of daily log file rotation. I noticed that even if timestamps are turned off, the FileLogger class still calls System.currentTimeMillis() on every log call!! It does this to check the date to see if the file needs to be switched. Not only that, but it creates two new String objects for the timestamp even if you aren't logging it. The only performance gain is the skipped call to write the timestamp to the file. So if you think you're saving resources by turning off timestamps, think again... I also noticed that FileLogger is declared final. WHY!?!?!?!?!? It would be so easy to extend FileLogger to create my own rotation scheme. And while I'm at it, why is LoggerBase NOT public!?!?!?!? So now if I want to create my own logger, I have to implement the Logger interface from scratch. Tomcat developers, what's the deal? My $0.02, Jeff -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Monitoring Tomcat
I know it is not what you had in mind, but I wrote this servlet to allow me to ping it to see if tomcat was still up. With 3.2.x (which we still run on our production server), it would crash once every month or two and I needed to be able to check for that (my script pages me if it is down). I have a scripted telnet thing to issue an http get to my ping servlet url. David Pauline Cantaloup wrote: Hello, I made a search in the Tomcat User List Archive but for each message asking for some monitoring function in Tomcat, I didn't find any answer... Indeed, I would need a way to know about threads' managing and what happens to received requests (are some of them delayed or even dropped ?), in order to tune up my configuration and to prevent any crash. How to know if Tomcat's developpers already talked about such a thing, and above all, how to know what they said about this - I mean, do they think it's a useless function, or do they think it could be usefull but not enough to waste time on this now, etc. ? Thanks for your answers ! Pauline - CANTALOUP Pauline PCOTechnologies Burolines - 2 ter rue Marcel Doret 31700 Blagnac Tél. : 05.34.60.44.17 Web : www.pcotech.fr -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] package com.xerox.pix.servlet; import java.io.OutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.dotech.GenericFactory; /** * This class implements a basic servlet that responds to a GET request. * It can be used to see if the servlet container is up. * * @version $Revision: 1.2 $ $Date: 2002/02/16 20:20:47 $ * @author D. Kavanagh * @author [EMAIL PROTECTED] */ public class PingServlet extends LightServlet { public void doGet( HttpServletRequest request, HttpServletResponse response ){ GenericFactory.debugMax( this, Inside do Get ); OutputStream writer = null; try { setNoCache(response); response.setContentType( text/text ); writer = response.getOutputStream(); writer.write(0); }catch( Exception e ){ writeError( Got exception + e.getMessage() ); GenericFactory.debugException( this, e ); }finally { try { writer.close(); }catch( Exception e ){ } } } public void writeError( String message ){ // can't send html data, so just log it GenericFactory.debugMin( this, message ); } } -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
mod_webapp and *.shtml not working
Hello, I'm using a RedHat 7.0 box, Apache/1.3.22, Tomcat 4.0.2 and a site site-name that use SSI. I cannot make them to work together (Apache to serve *.shtml and Tomcat serve JUST *.jsp). Can you please tell me what I'm doing wrong and what else should I do to make it work? My server.xml looks like: __ --- Server port=8005 shutdown=SHUTDOWN debug=0 !-- Define an Apache-Connector Service -- Service name=Tomcat-Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=10 enableLookups=false appBase=webapps acceptCount=5 debug=0/ Engine className=org.apache.catalina.connector.warp.WarpEngine name=testing debug=0 /Engine /Service /Server _ My httpd.conf looks like: _ --- LoadModule webapp_module libexec/mod_webapp.so AddModule mod_webapp.c --- DirectoryIndex index.shtml index.html index.htm index.php index.php4 index.jsp --- AddIcon /icons/layout.gif .html .shtml .htm .pdf --- AddType text/html .shtml AddHandler server-parsed .shtml --- WebAppConnection warpConnection warp localhost:8008 WebAppInfo /webapp-info --- VirtualHost 192.168.2.15:80 DocumentRoot /web/site-name/htdocs ServerName 192.168.2.15 LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-agent}i\ TransferLog /web/site-name/logs/access.log ErrorLog /web/site-name/logs/error.log WebAppDeploy biocapital-java warpConnection / /VirtualHost mod_include, mod_mime, mod_cgi are also included and enabled for Apache I also have: $CATALINA_HOME/webapps/site-name - /web/site-name/htdocs The result is that Apache is complaining that /index.shtml was not found, but all my *.jsp files are properly handled by Tomcat. If I change WebAppDeploy biocapital-java warpConnection / to look like WebAppDeploy biocapital-java warpConnection /something Apache is not complaining, but I'll be no longer capable to read my *.jsp files. Also, if instead *.shtml I use html (other site) in the same setup, everything goes just fine. Can you help, please? Catalin
Re: Includes desappearing
It is not a (my) program error... there is nothing different on the log... It only occurs on Mozilla and in some pages. Only some parts of the jsp are returned... I think it is a poltergeist problem... {:o) [EMAIL PROTECTED] wrote: You should check the logs. Probably some exceptions are being thrown. RS Marcelo Mathias Lima [EMAIL PROTECTED] on 04/11/2002 07:45:57 AM Please respond to Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] cc: Subject: Includes desappearing hi! On my JSP project with Tomcat4/Apache sometimes, in some pages, the page is returned incomplete. They come without the includes, that are other JSPs and without parts of the master JSP. It is not normal and I am worried by this... do somebody can help me?? Thank u in advance, Marcelo Mathias Lima Web Developer -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: mod_webapp and *.shtml not working
I haven't tried this, but I think it may work. I have a document I will be releasing today that explains some of this: a) Apache 'ignores' all Directory directives when a WebAppDeploy statement takes over the root. b) Apache doesn't ignore Location directives. c) SetHandler's in the Location directives work fine. My suggestion is to put a Location (or Location Match) directive on on the root. Then put a Files directive (if you only want to match files) to match .shtml files. THEN do a SetHandler to 'server-parsed'. What I am not 100% sure of at this point, since I haven't had an opportunity to try, is what actual directory location it will attempt to find the files at. Naturally I would presume it would be based off of the DocumentRoot, but again, I am not 100% sure. Let me know if that works, and when I have a moment I will attempt to try since it will be helpful for the document I wrote up explaining how to install Tomcat on Apache via WARP (it is 95% done at this point). Joseph Molnar http://www.codesta.com/ - Original Message - From: Catalin Mihailescu [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 10:28 AM Subject: mod_webapp and *.shtml not working Hello, I'm using a RedHat 7.0 box, Apache/1.3.22, Tomcat 4.0.2 and a site site-name that use SSI. I cannot make them to work together (Apache to serve *.shtml and Tomcat serve JUST *.jsp). Can you please tell me what I'm doing wrong and what else should I do to make it work? My server.xml looks like: __ --- Server port=8005 shutdown=SHUTDOWN debug=0 !-- Define an Apache-Connector Service -- Service name=Tomcat-Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=10 enableLookups=false appBase=webapps acceptCount=5 debug=0/ Engine className=org.apache.catalina.connector.warp.WarpEngine name=testing debug=0 /Engine /Service /Server _ My httpd.conf looks like: _ --- LoadModule webapp_module libexec/mod_webapp.so AddModule mod_webapp.c --- DirectoryIndex index.shtml index.html index.htm index.php index.php4 index.jsp --- AddIcon /icons/layout.gif .html .shtml .htm .pdf --- AddType text/html .shtml AddHandler server-parsed .shtml --- WebAppConnection warpConnection warp localhost:8008 WebAppInfo /webapp-info --- VirtualHost 192.168.2.15:80 DocumentRoot /web/site-name/htdocs ServerName 192.168.2.15 LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-agent}i\ TransferLog /web/site-name/logs/access.log ErrorLog /web/site-name/logs/error.log WebAppDeploy biocapital-java warpConnection / /VirtualHost mod_include, mod_mime, mod_cgi are also included and enabled for Apache I also have: $CATALINA_HOME/webapps/site-name - /web/site-name/htdocs The result is that Apache is complaining that /index.shtml was not found, but all my *.jsp files are properly handled by Tomcat. If I change WebAppDeploy biocapital-java warpConnection / to look like WebAppDeploy biocapital-java warpConnection /something Apache is not complaining, but I'll be no longer capable to read my *.jsp files. Also, if instead *.shtml I use html (other site) in the same setup, everything goes just fine. Can you help, please? Catalin -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Includes disappearing
Do you have flush=true? I have to include this attribute in the code while I am developing it in Forte (since it is still using the old JSP spec) but found if I don't remove it in production (since Tomcat 4 uses the new spec), I will occasionally have the same problem. -Original Message- From: Marcelo Mathias Lima [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 1:37 PM To: Tomcat Users List Subject: Re: Includes desappearing It is not a (my) program error... there is nothing different on the log... It only occurs on Mozilla and in some pages. Only some parts of the jsp are returned... I think it is a poltergeist problem... {:o) [EMAIL PROTECTED] wrote: You should check the logs. Probably some exceptions are being thrown. RS Marcelo Mathias Lima [EMAIL PROTECTED] on 04/11/2002 07:45:57 AM Please respond to Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] cc: Subject: Includes desappearing hi! On my JSP project with Tomcat4/Apache sometimes, in some pages, the page is returned incomplete. They come without the includes, that are other JSPs and without parts of the master JSP. It is not normal and I am worried by this... do somebody can help me?? Thank u in advance, Marcelo Mathias Lima Web Developer -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Problem starting Tomcat4.0
Hi all, sorry for my poor english My name is Aitziber and i have Tomcat4.0 runing with Cocoon2 in Windows 2000. When i start the server i get this error: Starting service Tomcat-Standalone Apache Tomcat/4.0 Loading catalog: /localhost/cocoon/resources/entities/catalog PARSE error at line 8 column -1 org.xml.sax.SAXParseException: org.apache.crimson.parser/V-036 web- app param-context Server 1.6 is running Press [Ctrl]+[C] to abort PARSE error at line 8 column -1 org.xml.sax.SAXParseException: org.apache.crimson.parser/V-036 web- app param-context PARSE error at line 8 column -1 org.xml.sax.SAXParseException: org.apache.crimson.parser/V-036 web- app param-context Starting service Tomcat-Apache Apache Tomcat/4.0 Something is wrong but i don't what it is. Someone can help me and say why this error? Thanks... _ Con MSN Hotmail súmese al servicio de correo electrónico más grande del mundo. http://www.hotmail.com/ES -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
keytool rejects Verisign certificates !!
Hello, When developing our application, we generated our own certificates using by the Microsoft CA server. When then used keytool to create a keystore file containing resulting certificate so that Tomcat could use the certificate. This worked fine. In our integration lab, we attempt to do the same procedure with certificates issued by Verisign and the keytool complains that the certificates are not valid X.509 certificates. Has anyone experienced this?What needs to be done to get keytool to accept Verisign issued certificates? Thanks, Keith
RE: changing auto log rotation in TC3.3 ?
Hi, Below is something I got from the list from a much older post, if that's the case, how do I tell tomcat to rotate in that fashion (monthly or weekly instead of daily) The workaround I am using now is to have tomcat create a unique servlet log file daily (using timestamp in filename), and I have a cronjob that runs at midnight that creates a symlink to the current day's logfile (my developers are lazy like that :) (hope none of them read this list) outstanding questions I have: 1) how do I make it so that tomcat will only rotate logs weekly or monthly? 2) can I make it so that the servlet logs aren't overwritten every time I restart tomcat? 3) why does tomcat decide to rotate the logs at 1am instead of midnight? 4) Are there any other attributes to LogSetter? (I only see 5 in the doc, with nothing pertaining to rotation) Thank you very, very much for any help you can give me. -Ray From an older post: RE: How do I rotate logs for Tomcat? * From: Ignacio J. Ortega * Subject: RE: How do I rotate logs for Tomcat? * Date: Thu, 01 Feb 2001 12:36:59 -0800 FYI. Proposed Tomcat 3.3 Release , already cycles logs in a flexible basis, allowing to use Month,Day,Year or whatever combination you like as rotation time . Tomcat 4.0 already has this capability too..but only in daily rotation.. Saludos , Ignacio J. Ortega - On Thu, 2002-04-04 at 18:25, Ignacio J. Ortega wrote: ohh sorry not completely read the message i was responding.. Saludos , Ignacio J. Ortega -Mensaje original- De: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] Enviado el: viernes 5 de abril de 2002 2:22 Para: 'Tomcat Users List' Asunto: RE: changing auto log rotation in TC3.3 ? LogSetter name=servlet_log timestamps=true verbosityLevel = INFORMATION path=/var/log/tomcat3/micro-${MMdd}.log / Is a Java Simple Date Format..HTH Saludos , Ignacio J. Ortega -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Local Directory Access using Tomcat 4.0 (SORRY TO REPOST)
Dear all, I am really really sorry that I have to repost the question cause I really couldnt find any solution for that. I really wish there is someone out there could help me me out here... I wish to render the Tomcat 4.0 to access my local directory, what I mean is, I store some files in a directory, and that I could use servlet to download these files. I have tried to do the following: FileInputStream file = new FileInputStream(C:\\Inetpub\\content\\test.txt); or replace the \\ with File.Separator, but the Tomcat 4.0 keeps complaining that the directory is not accessible. I presume I have to do some modification on the server setting or configuration, but I have no idea at all how to proceed. Please help. Thank you very much. Best regards, Jo -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Help using JDBC realm with MySQL
i haven't had that problem - but i don't specify login credentials in my realm connection. could be the grants assigned to your login. Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/securityDB userTable=users userNameCol=username userCredCol=password userRoleTable=userroles roleNameCol=userrole / -Original Message- From: Shawn A. Wilson [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 2:33 PM To: Tomcat Users List Subject: Re: Help using JDBC realm with MySQL Does nobody know a solution to get around this problem? I have received no replies and I desparately need to know how to get around the Cannot disable AUTO_COMMIT error with JDBC realms and MySQL. Thanks, -shawn http://www.shawn-wilson.com On Wed, 10 Apr 2002, Shawn A. Wilson wrote: Please help, I'm using Tomcat 4.0.2 and am trying to setup a JDBC realm with MySQL. Here is the snippet from server.xml: Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/peopleshare?user=hiddenamp;passwo rd=hidden userTable=users userNameCol=user_id userCredCol=password userRoleTable=user_roles roleNameCol=role_id / And here is the exception stack trace: Starting service Tomcat-Standalone Apache Tomcat/4.0.2 Catalina.start: LifecycleException: Exception opening database connection: java.sql.SQLException: Cannot disable AUTO_COMMIT LifecycleException: Exception opening database connection: java.sql.SQLException: Cannot disable A UTO_COMMIT at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108) at org.apache.catalina.core.StandardHost.start(StandardHost.java:614) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) at org.apache.catalina.core.StandardService.start(StandardService.java:388) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) - Root Cause - java.sql.SQLException: Cannot disable AUTO_COMMIT at org.gjt.mm.mysql.Connection.setAutoCommit(Connection.java:396) at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:549) at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108) at org.apache.catalina.core.StandardHost.start(StandardHost.java:614) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) at org.apache.catalina.core.StandardService.start(StandardService.java:388) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
JNDI realm against win2000 DC
Does anyone have a TC 4.0.x configured with a JNDI realm against a windows 2000 domain controller? Or maybe just know how to set this up! I have been looking at the JNDI how-to and I cannot get it working. Thanks, Jacob -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Local Directory Access using Tomcat 4.0 (SORRY TO REPOST)
Jordan, can you please provide the stack trace of the exception thrown by Tomcat? Thanks, -shawn http://www.shawn-wilson.com On Thu, 11 Apr 2002, Jordan C N Chong wrote: Dear all, I am really really sorry that I have to repost the question cause I really couldnt find any solution for that. I really wish there is someone out there could help me me out here... I wish to render the Tomcat 4.0 to access my local directory, what I mean is, I store some files in a directory, and that I could use servlet to download these files. I have tried to do the following: FileInputStream file = new FileInputStream(C:\\Inetpub\\content\\test.txt); or replace the \\ with File.Separator, but the Tomcat 4.0 keeps complaining that the directory is not accessible. I presume I have to do some modification on the server setting or configuration, but I have no idea at all how to proceed. Please help. Thank you very much. Best regards, Jo -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Problems getting jspc to completely work
I recently set up a jspc task in my build.xml, but only for verification. I wasn't bothering to use the output. That was working ok. Now, I'm trying to set it up to really pregenerate the JSP code, compile the generated sources, put the compiled servlet classes into my classes directory, and use an entity declaration in my web.xml file to include the generated servlet mappings. This isn't working quite right, in several areas. I'll try to include all the relevant file pieces and output messages. Sorry this is somewhat long, but I'm trying to include all the relevant information. Here is the top of my web.xml: -- ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/j2ee/dtds/web-app_2_3.dtd; [ !ENTITY webinc PUBLIC webinc file:./webinc.xml ] web-app webinc; ... -- Following this is the section of my build.xml that uses jspc. I don't actually have a separate task for this, I just do it inline for now. This is inside my build-war target. Before this part, I copy into the build directory all but my classes directory. After this part, I copy in the classes directory. --- delete dir=jspc/ mkdir dir=jspc/ java classname=org.apache.jasper.JspC fork=yes arg line=-v -d jspc -p org.apache.jsp -uriroot build -webinc build/WEB-INF/webinc.xml -webapp build / classpath pathelement location=${catalina.home}/lib/jasper-compiler.jar/ pathelement location=${catalina.home}/lib/jasper-runtime.jar/ pathelement location=weblib/servlet.jar/ /classpath /java javac srcdir=jspc destdir=classes debug=on optimize=off deprecation=on classpath pathelement location=${catalina.home}/lib/jasper-compiler.jar/ pathelement location=${catalina.home}/lib/jasper-runtime.jar/ fileset dir=weblib include name=*.jar/ /fileset /classpath include name=**/*.java/ /javac --- The following is an excerpt of the output when I run ant build-war with this: - Copying 2 files to C:\cygwin\home\dmkarr\java\strutstest\build\WEB-INF Copying 16 files to C:\cygwin\home\dmkarr\java\strutstest\build\WEB-INF\tlds Copying 12 files to C:\cygwin\home\dmkarr\java\strutstest\build\WEB-INF\lib Copying 5 files to C:\cygwin\home\dmkarr\java\strutstest\build Deleting directory C:\cygwin\home\dmkarr\java\strutstest\jspc Created dir: C:\cygwin\home\dmkarr\java\strutstest\jspc 2002-04-11 11:27:14 - Exception initializing TldLocationsCache: XML parsing error on file /WEB-INF/web.xml: Invalid PUBLIC ID: webinc Compiling 5 source files to C:\cygwin\home\dmkarr\java\strutstest\classes Copying 3 files to C:\cygwin\home\dmkarr\java\strutstest\build\WEB-INF\classes Building jar: C:\cygwin\home\dmkarr\java\strutstest\deploy\strutstest.war - The parse error is the first problem I see. However, I'm not certain whether this is really causing a problem, as it does complete writing the webinc.xml file, which looks ok, and which begins like this: -- !-- Automatically created by Tomcat JspC. Place this fragement in the web.xml before all icon, display-name, description, distributable, and context-param elements. -- servlet servlet-nameorg.apache.jsp.doImport/servlet-name servlet-classorg.apache.jsp.doImport/servlet-class /servlet -- After this point in the build, I use a class that interfaces to the Manager app to stop and start the application, which works most of the time. However, I see this in the output when it gets to this point: -- Processing URL http://admin:@localhost:8080/manager/stop?path=/strutstest;. FAIL - Encountered exception java.lang.NullPointerException -- In the Tomcat localhost_log file, I found this: -- java.lang.NullPointerException at java.util.Hashtable.remove(Hashtable.java:427) at org.apache.naming.ContextBindings.unbindClassLoader(ContextBindings.java:336) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3465) at org.apache.catalina.core.StandardHost.stop(StandardHost.java:889) at org.apache.catalina.servlets.ManagerServlet.stop(ManagerServlet.java:631) -- Now is when the build process copies in the WAR file. After that, it tries to run the start operation, which gives me this output: -- Processing URL http://admin:@localhost:8080/manager/start?path=/strutstest;. FAIL - Application at context path /strutstest could not be started -- Again, in the log file, I saw this: -- 2002-04-11 11:13:00 ContextConfig[/strutstest] Parse error in application web.xml org.xml.sax.SAXParseException: File file:./webinc.xml
Re: Includes disappearing
Does this occur with the same page everytime? I'm saying this just because then you may be able to narrow down the problem to either specific jsps (which may be the problem...they may be generating a lot of html or some other problem) or with some configuration issues with Tomcat or with the Apache/Tomcat connector. RS Marcelo Mathias Lima [EMAIL PROTECTED] on 04/11/2002 02:00:54 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] cc: Subject: Re: Includes disappearing with or without flus-true it happens... when includes disappears all that is in if conditions disappear too... poutz... it is so hard to solve... :(( Wagoner, Mark wrote: Do you have flush=true? I have to include this attribute in the code while I am developing it in Forte (since it is still using the old JSP spec) but found if I don't remove it in production (since Tomcat 4 uses the new spec), I will occasionally have the same problem. -Original Message- From: Marcelo Mathias Lima [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 1:37 PM To: Tomcat Users List Subject: Re: Includes desappearing It is not a (my) program error... there is nothing different on the log... It only occurs on Mozilla and in some pages. Only some parts of the jsp are returned... I think it is a poltergeist problem... {:o) [EMAIL PROTECTED] wrote: You should check the logs. Probably some exceptions are being thrown. RS Marcelo Mathias Lima [EMAIL PROTECTED] on 04/11/2002 07:45:57 AM Please respond to Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] cc: Subject: Includes desappearing hi! On my JSP project with Tomcat4/Apache sometimes, in some pages, the page is returned incomplete. They come without the includes, that are other JSPs and without parts of the master JSP. It is not normal and I am worried by this... do somebody can help me?? Thank u in advance, Marcelo Mathias Lima Web Developer -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tomcat 4.0.3 and PoolMan 2.0.4
Anyone using Tomcat 4.0.3 with PoolMan 2.0.4? The Tomcat stop script can't shutdown Tomcat after I added a DataSource into poolman.xml. Any idea how I can solve this? Bill -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Local Directory Access using Tomcat 4.0 (SORRY TO REPOST)
Dear Shawn Thank you very much for your email. I just figure out myself... All I have to do is to put the files inside the webapps\myworkDir But... if I want to do this outside the webapps... does it mean I couldn't use the standalone Apache Tomcat 4.0 to do that? Thank you very much. Best regards, Jordan Cheun Ngen, Chong INF-4067 Universiteit Twente Postbus 217 7500 AE Enschede The Netherlands Distributed and Embedded Systems (DIES) Office Phone: +31 53 4894655 Web site: http://www.cs.utwente.nl/~chong Email Add.: [EMAIL PROTECTED] -Original Message- From: Shawn A. Wilson [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 8:42 PM To: Tomcat Users List Subject: Re: Local Directory Access using Tomcat 4.0 (SORRY TO REPOST) Jordan, can you please provide the stack trace of the exception thrown by Tomcat? Thanks, -shawn http://www.shawn-wilson.com On Thu, 11 Apr 2002, Jordan C N Chong wrote: Dear all, I am really really sorry that I have to repost the question cause I really couldnt find any solution for that. I really wish there is someone out there could help me me out here... I wish to render the Tomcat 4.0 to access my local directory, what I mean is, I store some files in a directory, and that I could use servlet to download these files. I have tried to do the following: FileInputStream file = new FileInputStream(C:\\Inetpub\\content\\test.txt); or replace the \\ with File.Separator, but the Tomcat 4.0 keeps complaining that the directory is not accessible. I presume I have to do some modification on the server setting or configuration, but I have no idea at all how to proceed. Please help. Thank you very much. Best regards, Jo -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Help using JDBC realm with MySQL
Add the following parameter to your connection URL: relaxAutocommit=true So it should look like: jdbc:mysql://localhost/peopleshare?relaxAutocommit=trueuser=hiddenpass word=hidden -Original Message- From: Shawn A. Wilson [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 2:33 PM To: Tomcat Users List Subject: Re: Help using JDBC realm with MySQL Does nobody know a solution to get around this problem? I have received no replies and I desparately need to know how to get around the Cannot disable AUTO_COMMIT error with JDBC realms and MySQL. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: changing auto log rotation in TC3.3 ?
De: Ray Pitmon [mailto:[EMAIL PROTECTED]] Enviado el: jueves 11 de abril de 2002 20:35 1) how do I make it so that tomcat will only rotate logs weekly or monthly? add this template ${MM} to your logger filename as timestamp, you will get monthly logs, is a SimpleDateFormat check http://java.sun.com/products/jdk/1.2/docs/api/java/text/SimpleDateForma t.html to know what you can do, search the docs for your JVM version to see what can be done, you can get weekly logs.. and much more.. 2) can I make it so that the servlet logs aren't overwritten every time I restart tomcat? Maybe worth add a new attribute setting for that? please post a RFE to bugzilla for that too, this will remind to add this .. TIA 3) why does tomcat decide to rotate the logs at 1am instead of midnight? You've find a bug , please post it to bugzilla, may be the DST, just started, is not taken into account. 4) Are there any other attributes to LogSetter? (I only see 5 in the doc, with nothing pertaining to rotation) look at http://cvs.apache.org/viewcvs/~checkout~/jakarta-tomcat/src/share/org/a pache/tomcat/modules/config/LogSetter.java?rev=1.14content-type=text/pl ain the setters of the logsetter class are the available attributes, that pertain to the logsetter element in server.xml Shortly will be possible to use log4j, i think that feature is in CVS already, and most of this problems will go away, in all or in part.. ;) Saludos , Ignacio J. Ortega -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
JSP path relative to servlet?
Now that I've got my servlet's XML parsing largely debugged, it's time to see some output. The problem is this (mucho code removed): String target = /MySeatMap/seatmap.jsp; . . . rd = getServletContext().getRequestDispatcher(target); rd.forward(request,response); I get 404'd, with the error that the JSP file can't be located. What am I doing wrong? (rd is declared, I just left that out.) jbm! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Local Directory Access using Tomcat 4.0 (SORRY TO REPOST)
i have code that writes to a file outside of my servlet. specifically, in /tmp. i didn't have to configure tomcat (version 4.02) for writing outside of my webapp. but then again, i'm using jdk 1.4's logging mechansim to do this, so maybe that bypasses whatever security that's in jakarta... On 2002.04.11 11:55 Jordan C N Chong wrote: But... if I want to do this outside the webapps... does it mean I couldn't use the standalone Apache Tomcat 4.0 to do that? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: changing auto log rotation in TC3.3 ?
I haven't personally verified it, but I think there is a bug in Tomcat 3.3.x's logger in that the log file is restarted each day. If the name doesn't change each day, then the log file gets overwritten each day until it does change. The logger needs to be updated to append rather that overwrite when the log is restarted. Ignacio, have you done log rotations longer than daily? The above is based on code inspection, so I could be wrong. Cheers, Larry -Original Message- From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 3:00 PM To: 'Tomcat Users List' Subject: RE: changing auto log rotation in TC3.3 ? De: Ray Pitmon [mailto:[EMAIL PROTECTED]] Enviado el: jueves 11 de abril de 2002 20:35 1) how do I make it so that tomcat will only rotate logs weekly or monthly? add this template ${MM} to your logger filename as timestamp, you will get monthly logs, is a SimpleDateFormat check http://java.sun.com/products/jdk/1.2/docs/api/java/text/Simpl eDateForma t.html to know what you can do, search the docs for your JVM version to see what can be done, you can get weekly logs.. and much more.. 2) can I make it so that the servlet logs aren't overwritten every time I restart tomcat? Maybe worth add a new attribute setting for that? please post a RFE to bugzilla for that too, this will remind to add this .. TIA 3) why does tomcat decide to rotate the logs at 1am instead of midnight? You've find a bug , please post it to bugzilla, may be the DST, just started, is not taken into account. 4) Are there any other attributes to LogSetter? (I only see 5 in the doc, with nothing pertaining to rotation) look at http://cvs.apache.org/viewcvs/~checkout~/jakarta-tomcat/src/share/org/a pache/tomcat/modules/config/LogSetter.java?rev=1.14content-type=text/pl ain the setters of the logsetter class are the available attributes, that pertain to the logsetter element in server.xml Shortly will be possible to use log4j, i think that feature is in CVS already, and most of this problems will go away, in all or in part.. ;) Saludos , Ignacio J. Ortega -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.x and Database Connection Pooling
Thanks to everyone who's commented on this - I can't believe that I hadn't come across the JNDI solution, but it's working beautifully now. So onto the next, closely related issue... I'm accessing my database, via JNDI, using a class called DatabaseManager. My aim is that this class abstracts the database backend, so I can just call addUser(myUser), and it will take care of the SQL stuff behind the scenes. At the moment, this DatabaseManager contains code similar to Soefara's below to get a connection for itself whenever it has to make a db request. My confusion is what to do with this class - Should I declare it as abstract? Does that ruin some of the pooling stuff? I would really like to be able to create a global instance of this class, instantiated when the server starts, since individual requests don't need their own DatabaseManager. But I'm using Struts, and I don't know how to do that! Arghh... Any thoughts/experiences? Ric Searle Web Application Developer -- Dialogue Communications Ltd http://www.dialogue.co.uk +44 (0) 114 221 0307 On Thursday, April 11, 2002, at 06:02 pm, Craig R. McClanahan wrote: On Thu, 11 Apr 2002, Soefara Redzuan wrote: Date: Thu, 11 Apr 2002 10:46:14 +0800 From: Soefara Redzuan [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Tomcat 4.x and Database Connection Pooling Tomcat: As far as I'm concerned, JNDI support is a now and forever more feature of Tomcat 4 and later. It's the standard access mechanism for J2EE app servers as well. This is what I love to hear. With so many changes (servlets to JSP to Struts) over the last few years, future-proofing is so important. Recommendation: If you can, you should use JNDI based access to data sources. This is both portable across containers, and portable across Struts versus non-Struts applications. In addition, it can be used from directly from within a JavaBean implementing your business logic, without requiring a reference to ActionServlet or the servlet context (or the web layer at all). Really ? This is incredibly important news to me. I've been acquiring the JNDI resource within my servlet then passing it as a parameter to my Javabean which is a terrible mechanism because it makes my javabean dependent on the servlet :( So, are we saying that once we've set up a pooled database connection JNDI resource in server.xml and web.xml, any Javabean that is called by a serlvet or JSP can make use of this JNDI resource directly like this In the javabean. import javax.naming.NamingException; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingEnumeration; import javax.naming.directory.InitialDirContext; class mybean() { java.sql.Connection conn get getPooledDatabaseConnection() { Context ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(jdbc/dbpool); conn = ds.getConnection(); } ... } If so, this is going to make development much easier. :-) Yep ... that is exactly the pattern you can use. Nice, isn't it? Soefara. Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.x and Database Connection Pooling
In the javabean. import javax.naming.NamingException; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingEnumeration; import javax.naming.directory.InitialDirContext; class mybean() { java.sql.Connection conn get getPooledDatabaseConnection() { Context ctx = new InitialContext(); Context envCtx = (Context) ctx.lookup(java:/comp/env/); DataSource ds = (DataSource) envCtx.lookup(jdbc/dbpool); conn = ds.getConnection(); } ... } If so, this is going to make development much easier. :-) Yep ... that is exactly the pattern you can use. Nice, isn't it? It's so good we're updating all of our code to use this. Now the whole MVC framework finally makes sense :-) At least in a webapp, that is. I'm not sure how a standalone application would be able to provide the JNDI environment to the same Javabeans but I'll check the Sun JNDI mailing list. Thank you for all the great work on Tomcat, Soefara. _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: mod_webapp and *.shtml not working
OK let me try and get this right: When you add this statement WebAppDeploy biocapital-java warpConnection /something, does Apache parse the .shtml files and Tomcat doesn't execute the jsp's? And when you do this: WebAppDeploy biocapital-java warpConnection /, does Apache say it cannot find the index.shtml file, but tomcat serves the jsps correctly? Did you try adding a Context element for biocapital-java? I'm assuming you have biocapital-java under webapps. And the jsps are under biocapital-java. Host name=site-name debug=0 appBase=webapps unpackWARs=true Context path= docBase=biocapital-java debug=0 reloadable=true crossContext=true Where are the .shtml files located? What's the URL that you use? If I were you, I would break up the process and first get Apache to parse .shtml files and get Tomcat to serve the jsps right. And then add the virtual host block to connect Apache/Tomcat. RS Catalin Mihailescu [EMAIL PROTECTED] on 04/11/2002 12:28:10 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] cc: [EMAIL PROTECTED] Subject: mod_webapp and *.shtml not working Hello, I'm using a RedHat 7.0 box, Apache/1.3.22, Tomcat 4.0.2 and a site site-name that use SSI. I cannot make them to work together (Apache to serve *.shtml and Tomcat serve JUST *.jsp). Can you please tell me what I'm doing wrong and what else should I do to make it work? My server.xml looks like: __ --- Server port=8005 shutdown=SHUTDOWN debug=0 !-- Define an Apache-Connector Service -- Service name=Tomcat-Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=10 enableLookups=false appBase=webapps acceptCount=5 debug=0/ Engine className=org.apache.catalina.connector.warp.WarpEngine name=testing debug=0 /Engine /Service /Server _ My httpd.conf looks like: _ --- LoadModule webapp_module libexec/mod_webapp.so AddModule mod_webapp.c --- DirectoryIndex index.shtml index.html index.htm index.php index.php4 index.jsp --- AddIcon /icons/layout.gif .html .shtml .htm .pdf --- AddType text/html .shtml AddHandler server-parsed .shtml --- WebAppConnection warpConnection warp localhost:8008 WebAppInfo /webapp-info --- VirtualHost 192.168.2.15:80 DocumentRoot /web/site-name/htdocs ServerName 192.168.2.15 LogFormat %h %l %u %t \%r\ %s %b \%{Referer}i\ \%{User-agent}i\ TransferLog /web/site-name/logs/access.log ErrorLog /web/site-name/logs/error.log WebAppDeploy biocapital-java warpConnection / /VirtualHost mod_include, mod_mime, mod_cgi are also included and enabled for Apache I also have: $CATALINA_HOME/webapps/site-name - /web/site-name/htdocs The result is that Apache is complaining that /index.shtml was not found, but all my *.jsp files are properly handled by Tomcat. If I change WebAppDeploy biocapital-java warpConnection / to look like WebAppDeploy biocapital-java warpConnection /something Apache is not complaining, but I'll be no longer capable to read my *.jsp files. Also, if instead *.shtml I use html (other site) in the same setup, everything goes just fine. Can you help, please? Catalin -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: changing auto log rotation in TC3.3 ?
De: Larry Isaacs [mailto:[EMAIL PROTECTED]] Enviado el: jueves 11 de abril de 2002 21:15 Ignacio, have you done log rotations longer than daily? The above is based on code inspection, so I could be wrong. Yep, when i did the log rotation, but never more after that may be i left a bug behind me.. hmmm, yes, you are right, Filewriter is not created in append mode.. Should i commit it? May be add a new attribute to LogSetter to control the appending or not? Better get rid of this capability alltogether and wait for log4j support? Saludos , Ignacio J. Ortega -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: JSP path relative to servlet?
If MySeatMap is your Context root, then you do not need to include that. String target = /seatmap.jsp; rd = getServletContext().getRequestDispatcher(target); should suffice. RS Brook Monroe [EMAIL PROTECTED] on 04/11/2002 02:02:33 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] cc: Subject: JSP path relative to servlet? Now that I've got my servlet's XML parsing largely debugged, it's time to see some output. The problem is this (mucho code removed): String target = /MySeatMap/seatmap.jsp; . . . rd = getServletContext().getRequestDispatcher(target); rd.forward(request,response); I get 404'd, with the error that the JSP file can't be located. What am I doing wrong? (rd is declared, I just left that out.) jbm! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: changing auto log rotation in TC3.3 ?
I was going to try to add an append attribute to LogSetter and have the restarts always append. If you want to commit something, go ahead. If not, I'll look into it. Cheers, Larry -Original Message- From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 3:36 PM To: 'Tomcat Users List' Subject: RE: changing auto log rotation in TC3.3 ? De: Larry Isaacs [mailto:[EMAIL PROTECTED]] Enviado el: jueves 11 de abril de 2002 21:15 Ignacio, have you done log rotations longer than daily? The above is based on code inspection, so I could be wrong. Yep, when i did the log rotation, but never more after that may be i left a bug behind me.. hmmm, yes, you are right, Filewriter is not created in append mode.. Should i commit it? May be add a new attribute to LogSetter to control the appending or not? Better get rid of this capability alltogether and wait for log4j support? Saludos , Ignacio J. Ortega -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Recreate a request for posting to a different server
I have a design in which a POST request is received by Tomcat, passing through several Filters which munge both headers and payload before reaching a servlet which must recreate the (modified) request as a POST to an external server, modifying only essential headers and the URI requested. Two questions: (1) Is there a way to build the text of the outbound request simpler that iterating over headers, cookies, and payload, 'manually' writing each as appropriately formatted text to the outbound request? (2) Is there a way to build the resulting response object simpler than 'manually' parsing the response text and turning it into header, cookie, and payload entries? -- | Craig Berry - http://www.cinenet.net/~cberry/ --*-- All that lives is holy. - William Blake | -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
IIS Redirector Authentication
I've scanned the archives and found several discussions about IIS authentication vs Tomcat, but nothing seems to apply to my situation. I have IIS configured as described in other messages, where IIS does not do any authentication. When I try to access a JSP through IIS the request gets transmitted to Tomcat without prompting for authentication, but Tomcat rejects it with the following: Apache Tomcat/4.0.2 - HTTP Status 403 - Access to the requested resource has been denied type Status report message Access to the requested resource has been denied description Access to the specified resource (Access to the requested resource has been denied) has been forbidden. IIS communicates with Tomcat over ajp13, and I've examined the traffic with a packet sniffer. There are only two packets transmitted. One from IIS to Tomcat containing the request, and the 403 result page back from Tomcat to IIS. The Tomcat log for the interaction says Already Authenticated {} with no other explanation. Any ideas? -- James GarrisonAthens Group, Inc. mailto:[EMAIL PROTECTED]5608 Parkcrest Dr http://www.athensgroup.comAustin, TX 78731 PGP: RSA=0x92E90A3B DH/DSS=0x498D331C (512) 345-0600 x150 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: JSP path relative to servlet?
Cool...I'll check that ASAP. (Had to focus on different project for the afternoon...) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 3:36 PM To: Tomcat Users List Subject: Re: JSP path relative to servlet? If MySeatMap is your Context root, then you do not need to include that. String target = /seatmap.jsp; rd = getServletContext().getRequestDispatcher(target); should suffice. RS Brook Monroe [EMAIL PROTECTED] on 04/11/2002 02:02:33 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] cc: Subject: JSP path relative to servlet? Now that I've got my servlet's XML parsing largely debugged, it's time to see some output. The problem is this (mucho code removed): String target = /MySeatMap/seatmap.jsp; . . . rd = getServletContext().getRequestDispatcher(target); rd.forward(request,response); I get 404'd, with the error that the JSP file can't be located. What am I doing wrong? (rd is declared, I just left that out.) jbm! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
DBCP Pool Collections problems on TC4.0.3
Craig I hope you or Ralph can help me out. I would like to replace Tyrex with the DBCP but I cannot seem to get the factory to work and the exceptions are happenning in the Service invoker. My server.xml looks like the following (please forgive the wrap: Resource name=jdbc/pestanaAdminDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/pestanaAdminDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value10/value /parameter parameter nameuser/name valueusername/value /parameter parameter namepassword/name valuepass/value /parameter parameter namedriverClassName/name valuecom.jnetdirect.jsql.JSQLDriver/value /parameter parameter namelogfile/name valueJSQLConnectLog.txt/value /parameter parameter namedriverName/name valuejdbc:JSQLConnect://pc2.cibertribe.pt:1433/database=pestanaAdmin/val ue /parameter /ResourceParams If I use the default Tyrex pool everything works as it should. Using the above I am getting at the application log: 2002-04-11 20:59:13 org.apache.catalina.INVOKER.AdminLogin: init 2002-04-11 20:59:13 StandardWrapperValve[invoker]: Servlet.service() for servlet invoker threw exception java.lang.IllegalStateException at org.apache.catalina.connector.HttpResponseFacade.sendRedirect(HttpResponseFa cade.java:173) at AdminLogin.doGet(AdminLogin.java:46) at AdminLogin.doPost(AdminLogin.java:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java :446) at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1012) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107 ) at java.lang.Thread.run(Thread.java:496) AdminLogin is a simple login servlet which works in conjunction with a Filter to
Re: Problems getting jspc to completely work
David, I think you shouldn't use file:// for your entity file ! In your war archive, webinc.xml should be in the same directory as web.xml (/WEB-INF) ! Here's my web.xml: !ENTITY auto-web PUBLIC auto-web auto-web.ent web-app auto-web; ... /web-app Also don't worry about the error message reported by Tomcat (XmlMapper) and here's why : This is not an error, rather a warning you can ignore. Namely, Tomcat has several predefined public id's (most specifically it has a cached instance of the entity with public ID -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN, so that it needn't load it from the system id http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; on every startup. This message only informs you that it does not know anything about the document with public ID auto-web.ent, so it will load it from its system ID (that is, from the file you supplied). Hope this helps ! Christian - Original Message - From: David M. Karr [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 11, 2002 2:43 PM Subject: Problems getting jspc to completely work I recently set up a jspc task in my build.xml, but only for verification. I wasn't bothering to use the output. That was working ok. Now, I'm trying to set it up to really pregenerate the JSP code, compile the generated sources, put the compiled servlet classes into my classes directory, and use an entity declaration in my web.xml file to include the generated servlet mappings. This isn't working quite right, in several areas. I'll try to include all the relevant file pieces and output messages. Sorry this is somewhat long, but I'm trying to include all the relevant information. Here is the top of my web.xml: -- ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/j2ee/dtds/web-app_2_3.dtd; [ !ENTITY webinc PUBLIC webinc file:./webinc.xml ] web-app webinc; ... -- Following this is the section of my build.xml that uses jspc. I don't actually have a separate task for this, I just do it inline for now. This is inside my build-war target. Before this part, I copy into the build directory all but my classes directory. After this part, I copy in the classes directory. --- delete dir=jspc/ mkdir dir=jspc/ java classname=org.apache.jasper.JspC fork=yes arg line=-v -d jspc -p org.apache.jsp -uriroot build -webinc build/WEB-INF/webinc.xml -webapp build / classpath pathelement location=${catalina.home}/lib/jasper-compiler.jar/ pathelement location=${catalina.home}/lib/jasper-runtime.jar/ pathelement location=weblib/servlet.jar/ /classpath /java javac srcdir=jspc destdir=classes debug=on optimize=off deprecation=on classpath pathelement location=${catalina.home}/lib/jasper-compiler.jar/ pathelement location=${catalina.home}/lib/jasper-runtime.jar/ fileset dir=weblib include name=*.jar/ /fileset /classpath include name=**/*.java/ /javac --- The following is an excerpt of the output when I run ant build-war with this: - Copying 2 files to C:\cygwin\home\dmkarr\java\strutstest\build\WEB-INF Copying 16 files to C:\cygwin\home\dmkarr\java\strutstest\build\WEB-INF\tlds Copying 12 files to C:\cygwin\home\dmkarr\java\strutstest\build\WEB-INF\lib Copying 5 files to C:\cygwin\home\dmkarr\java\strutstest\build Deleting directory C:\cygwin\home\dmkarr\java\strutstest\jspc Created dir: C:\cygwin\home\dmkarr\java\strutstest\jspc 2002-04-11 11:27:14 - Exception initializing TldLocationsCache: XML parsing error on file /WEB-INF/web.xml: Invalid PUBLIC ID: webinc Compiling 5 source files to C:\cygwin\home\dmkarr\java\strutstest\classes Copying 3 files to C:\cygwin\home\dmkarr\java\strutstest\build\WEB-INF\classes Building jar: C:\cygwin\home\dmkarr\java\strutstest\deploy\strutstest.war - The parse error is the first problem I see. However, I'm not certain whether this is really causing a problem, as it does complete writing the webinc.xml file, which looks ok, and which begins like this: -- !-- Automatically created by Tomcat JspC. Place this fragement in the web.xml before all icon, display-name, description, distributable, and context-param elements. -- servlet servlet-nameorg.apache.jsp.doImport/servlet-name servlet-classorg.apache.jsp.doImport/servlet-class /servlet -- After this point in the build, I use a class that interfaces to the Manager app to stop and start the application, which works most of the time. However, I see this in the output when it gets to this point: -- Processing URL http://admin:@localhost:8080/manager/stop?path=/strutstest;. FAIL - Encountered
memory leak?
Title: memory leak? Hello, Should the memory usage of the Tomcat.exe process be the same before and after a request is processed? My windows task manager indicates that the Tomcat.exe process grabs more and more memory as requests are processed. Is this a memory leak or is it a normal situation that will regulate itself after automatic garbage collection? If it is a memory leack I don't seem to understand what is causing it, once the only global variable in my servlet is the context class of the servlet itself. Thank you Carlos -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]