Re: Getting Apache2 forwarding to tomcat5
compressableMimeType=text/html,text/xml -- !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -- !-- Connector port=8443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS / -- !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 / !-- Define a Proxied HTTP/1.1 Connector on port 8082 -- !-- See proxy documentation for more information about using this. -- !-- Connector port=8082 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false acceptCount=100 debug=0 connectionTimeout=2 proxyPort=80 disableUploadTimeout=true / -- ... !-- Logger shared by all Contexts related to this virtual host. By default (when using FileLogger), log files are created in the logs directory relative to $CATALINA_HOME. If you wish, you can specify a different directory with the directory attribute. Specify eith er a relative (to $CATALINA_HOME) or absolute path to the desired directory.-- Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ Context path=/patientConnect docBase=/usr/local/mediture/gateway_patient_connect/webapp debug= 0 reloadable=true crossContext=true/ Context path= docBase=/srv/www/htdocs debug=0 reloadable=true cr ossContext=true/ /Host Thank you for any help or direction you can place me. If you think I should have read something first then tell me to read it. I may have skipped over it or I may have read it. I have seen a lot of different ways of doing that same thing and tried all so I may be missing up a few of them. Again thank you. -- Dan Chesmore Systems Admin Mediture 7700 Equitable Dr Suite 100 Eden Prairie, MN 55344 952-400-0315 www.mediture.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Lyndon Tiu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Dan Chesmore Systems Admin Mediture 7700 Equitable Dr Suite 100 Eden Prairie, MN 55344 952-400-0315 www.mediture.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting Apache2 forwarding to tomcat5
/ Context path=/patientConnect docBase=/usr/local/mediture/gateway_patient_connect/webapp debug= 0 reloadable=true crossContext=true/ Context path= docBase=/srv/www/htdocs debug=0 reloadable=true cr ossContext=true/ /Host Thank you for any help or direction you can place me. If you think I should have read something first then tell me to read it. I may have skipped over it or I may have read it. I have seen a lot of different ways of doing that same thing and tried all so I may be missing up a few of them. Again thank you. -- Dan Chesmore Systems Admin Mediture 7700 Equitable Dr Suite 100 Eden Prairie, MN 55344 952-400-0315 www.mediture.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Manager webapp and virtual hosts
Mikolaj, Hi. Sorry to bother you but I saw this posting on the Tomcat list and was wondering if you were able to successfully set up what you describe? I have mod_jk working fine and I'm now trying to do exactly what you mentioned: my1.domain.com (apache + mod_jk) === tomcat.domain.com/webapp1 my2.domain.com (apache + mod_jk) === tomcat.domain.com/webapp2 So far I haven't had much success. If you've gained any insights that you can share with me, I'd be very grateful. Cheers, Dan On 8/25/05, Mikolaj Rydzewski [EMAIL PROTECTED] wrote: Hello, My configuration is very simple: tomcat listens on localhost with various apps in their contexts. Now I'd like to setup a virtual host for another one. Will it be possible to deploy/reload such application using manager webapp running on localhost? In other words: do I have to install separate manager webapp for each virtual host? And the second question is: is it possible to connect apache with virtual host + mod_jk + tomcat with webapp in it's context? I.e.: my1.domain.com (apache + mod_jk) === tomcat.domain.com/webapp1 my2.domain.com (apache + mod_jk) === tomcat.domain.com/webapp2 ? -- Mikolaj Rydzewski [EMAIL PROTECTED] Becomo S.A. tel. (12) 2927104 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and Apache
From: Christian Stalp [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: Tomcat Users List tomcat-user@jakarta.apache.org Subject: Re: Tomcat and Apache Date: Mon, 11 Jul 2005 13:53:09 +0200 Am Montag, 11. Juli 2005 13:34 schrieb Ivan Rodriguez: I don t know details about your problem but i can answer that j_secutiry_check is not a way of integrating tomcat into apache. It is an authentition scheme defined by J2EE specs. What you need is the jk_mount apache module, to let your Apache install bypass the dynamic calls to tomcat, and then to serve only static content with apache. Details of configuration can be found at: http://jakarta.apache.org/tomcat/connectors-doc-archive/jk2/ No this isn't the solution. Tomcat and Apache are full independent. They don't cooperate together nor they communicate. Apache listens at port 80 and Tomcat at port 8180 ( its the Debian Solution ). But I cannot run tomcat under these configuration. I get an error dump each time: [quote] HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:432) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.access$000 (ApplicationFilterChain.java:51) at org.apache.cata. .. [/quote] Apache works fine and makes no trouble. Gruss Christian -- Christian Stalp Institut für Medizinische Biometrie, Epidemiologie und Informatik Johannes-Gutenberg-Universität Mainz Tel.: 06131 / 17-3107 E-Mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Tomcat and apache are fully independent, but to enable Apache to use Tomcat as the J2EE container, you need to use mod_jk, which is what Ivan stated. Then when a request comes into Apache, your jk mount point will tell it to deliver the JSP from tomcat. That's a high level anyway. Do you really need apache? You can just use Tomcat for your static content, JSP, beans etc... _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 and SQL Server
From: Sue Roe [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: 'Tomcat Users List' tomcat-user@jakarta.apache.org Subject: RE: Tomcat 5.5 and SQL Server Date: Mon, 11 Jul 2005 17:10:01 +0100 Ok. I haven't any experience with that, but I can say we were having similar sporadic errors here with a Driver from Inet software (Merlia.jar),and having upgraded it recently, the issue seems to have been resolved. I was told that it was something to do with SQL Server throwing the connections out, occasionally. So possibly it's a driver bug, not maintaining your connections. That's as much as I know! Good luck... -Original Message- From: Anderson, M. Paul [mailto:[EMAIL PROTECTED] Sent: 11 July 2005 16:47 To: Tomcat Users List Subject: RE: Tomcat 5.5 and SQL Server com.microsoft.jdbc.sqlserver.SQLServerDriver -Original Message- From: Sue Roe [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 11:43 AM To: 'Tomcat Users List' Subject: RE: Tomcat 5.5 and SQL Server What driver are you using between Tomcat and SQL server? -Original Message- From: Anderson, M. Paul [mailto:[EMAIL PROTECTED] Sent: 11 July 2005 16:35 To: Tomcat Users List Subject: Tomcat 5.5 and SQL Server I am running Tomcat 5.5 with SQL Server on a separate machine. I am getting the following error at random times: Java.lang.Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection rest by peer: socket write error. I have been unable to determine a trigger for this error - it just seems to happen randomly. When it occurs, no user can then log in to the application - I must reboot the SQL server machine to get a connection to be made for subsequent logins. Has anyone seen this and can point me to a solution? Thanks, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ***Disclaimer*** The contents of this Email may be privileged and are confidential. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Should you wish to use Email as a mode of communication, CMi plc and its subsidiaries are unable to guarantee the security of Email content outside of our own computer systems. This footnote also confirms that this Email message has been checked by MIMESweeper for the presence of computer viruses. Whilst we run anti-virus software, you are solely responsible for ensuring that any Email or attachment you receive is virus free. We disclaim any liability for any damage you suffer as a consequence of receiving any virus. Checkmate International plc (CMi) Registered in England No: 1899857 Registered Office 4th Floor, 35 New Bridge Street, London, EC4V 6BW - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ***Disclaimer*** The contents of this Email may be privileged and are confidential. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Should you wish to use Email as a mode of communication, CMi plc and its subsidiaries are unable to guarantee the security of Email content outside of our own computer systems. This footnote also confirms that this Email message has been checked by MIMESweeper for the presence of computer viruses. Whilst we run anti-virus software, you are solely responsible for ensuring that any Email or attachment you receive is virus free. We disclaim any liability for any damage you suffer as a consequence of receiving any virus. Checkmate International plc (CMi) Registered in England No: 1899857 Registered Office 4th Floor, 35 New Bridge Street, London, EC4V 6BW - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] the driver these guy's provided works pretty well. http://jtds.sourceforge.net/faq.html _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache 2 Tomcat 5.5
I used these in reference to Tomcat 5.0.28 and Apache 2. Maybe they will send you in the right direction. http://httpd.apache.org/docs-2.0/install.html#page-header Build apache, compile, install etc.. http://www.onjava.com/pub/a/onjava/2002/11/20/tomcat.html?page=1 configuration extras. http://johnturner.com/howto/winxp-howto.html more how tos.. but on Windows. http://www.thebluesmokeband.com/mod_ntlm.php Mod_ntlm http://jakarta.apache.org/tomcat/tomcat-3.3-doc/mod_jk-howto.html#s73 Mod_jk how tos. http://johnturner.com/howto/apache2-tomcat4112-sol8-howto.html build mod_jk From: Paul Wallace [EMAIL PROTECTED] Reply-To: Paul Wallace [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Subject: Apache 2 Tomcat 5.5 Date: Thu, 30 Jun 2005 16:54:02 +0800 Hello, Can somneone point me in the right (any) direction of documentation/resource on how to integrate the above two please? -- thanks Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to catch and fix this error
can you post excerts from the localhost log and catalint.out? From: st946tbf [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: Tomcat Users List tomcat-user@jakarta.apache.org Subject: How to catch and fix this error Date: Wed, 29 Jun 2005 14:15:55 -0400 We have a web app running on Tomcat 5.028. When running at our company, it works. However, it crashes (exits) at client site when access certain page (it used to work). When we ask them to sent us the database used and run it at our company, it works fine. There is an Sql query in this page. Records are written out to the page. Some records already came down before it crashes. Please tell me how do I trouble shoot this? What kind of log can I make? This is an urgent problem. Please help. Thank you very much for your time. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: VirtualHost configuration SSL
I found this URL. http://www.asiaosc.org/article_243.html . I'm testing this now. From: Bruno Georges [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: Tomcat Users List tomcat-user@jakarta.apache.org CC: Tomcat Users List tomcat-user@jakarta.apache.org Subject: Re: VirtualHost configuration SSL Date: Thu, 23 Jun 2005 13:41:24 +0200 Lars Correction: Name-based virtual hosting cannot be used with SSL secure servers because of the nature of the SSL protocol. You will need to use IP-Based virtual hosting when enabling SSL. Hope this helps. Bruno Georges Glencore International AG Tel. +41 41 709 3204 Fax +41 41 709 3000 |-+ | | Bruno Georges| | | [EMAIL PROTECTED]| | | encore.com | | || | | 23.06.05 13:38 | | | Please respond to| | | Tomcat Users| | | List| | || |-+ --| | | |To: Tomcat Users List tomcat-user@jakarta.apache.org | |cc: | |Subject: Re: VirtualHost configuration SSL | | | |Distribute: | |Personal? |---| | || [ ] x | | ||---| | | | --| Hi Lars You need to use name-based Virtual hosting. I assume you use apache in front of tomcat. Docs are available on line at: http://httpd.apache.org/docs-2.0/vhosts/ Best Regards Bruno Georges Glencore International AG Tel. +41 41 709 3204 Fax +41 41 709 3000 Lars Nielsen LindTo: 'Tomcat Users List' tomcat-user@jakarta.apache.org [EMAIL PROTECTED] cc: ine.dk Subject: VirtualHost configuration SSL 23.06.05 13:30 Distribute: Please respond Personal? |---| to Tomcat Users | [ ] x | List|---| Hi. I want to configure the following: www.domain.com http://www.domain.com/ port 80 - start page and unsecure area www.domain.com http://www.domain.com/ port 443 - redirects to ssl.domain.com:443 ssl.domain.com port 80 redirects to ssl.domain.com port 443 ssl.domain.com port 443 - secure area They all use make use of the same IP-address. Is it possible and how do I do that? Thanks moonie * * LEGAL DISCLAIMER * This message contains confidential information for * the exclusive use of the person mentioned above. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * * LEGAL DISCLAIMER * This message contains confidential information for * the exclusive use of the person mentioned above. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Building connector JK-1.2.11
Hi, I'm attempting to build JK-1.2.11 on Solaris 2.8 (sparc) for use with Apache 1.3. The build crashes out when it gets to the apache-1.3 Makefile. Here's the relevant output from running make (I included the complete output from make as well as the output from running configure at the bottom). [...] Making all in apache-1.3 make: Fatal error in reader: Makefile, line 23: Unexpected end of line seen Current working directory /dna1/baggott2/install/WORKING/jakarta-tomcat-connectors-1.2.11-src/jk/native/apache-1.3 *** Error code 1 make: Fatal error: Command failed for target `all-recursive' The contents of the apache-1.3 Makefile are below. For what it's worth, I get the same error message when trying to build version 1.2.10. Any suggestions would be greatly appreciated, Dan Here's the contents of the Makefile: bash-2.03$ cat -n apache-1.3/Makefile 1 2 ## configure should make the Makefile out of this file. 3 4 srcdir=. 5 top_srcdir=.. 6 7 APXS=/apache/bin/apxs 8 OS= 9 JAVA_HOME= 10 CP=/usr/bin/cp 11 APACHE_DIR=/usr/apache 12 MKDIR=/usr/bin/mkdir 13 DESTDIR=/usr/apache 14 LIBTOOL=$(SHELL) $(top_builddir)/libtool 15 CP=/usr/bin/cp 16 CC=gcc 17 18 top_builddir=.. 19 20 OEXT=.lo 21 libexecdir=${APACHE_DIR}/libexec 22 JK_DIR := .. 23 BUILD_DIR = ${JK_DIR}/../build/jk/apache13 24 25 APACHE_FILES = Makefile.tmpl Makefile.libdir libjk.module 26 27 JK=../common/ 28 JK_INCL=-DUSE_APACHE_MD5 -I ${top_srcdir}/common 29 JAVA_INCL=-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS} 30 JAVA_LIB=-L ${JAVA_HOME}/jre/lib/${ARCH} -L ${JAVA_HOME}/lib/${ARCH}/native_threads 31 APACHE_CFLAGS=-I/usr/apache/include -DEAPI -DMOD_PERL -DUSE_EXPAT -O -DJK_PREFORK -g -O2 -DEAPI -I${top_srcdir}/common 32 33 # Compile commands 34 JK_CFLAGS = $(JK_INCL) $(JAVA_INCL) $(APACHE_CFLAGS) 35 COMPILE= $(CC) 36 SH_COMPILE = $(LIBTOOL) --mode=compile $(COMPILE) $(JK_CFLAGS) 37 MOD_LINK = $(LIBTOOL) --mode=link $(CC) 38 39 include ../common/list.mk 40 41 all: mod_jk.so 42 43 # 44 # install part 45 # 46 install: install_dynamic 47 48 install_static: mod_jk.a 49 @echo 50 @echo Copying files to Apache Modules Directory... 51 -${MKDIR} ${APACHE_DIR}/src/modules/jk 52 ${LIBTOOL} --mode=install ${CP} $ ${APACHE_DIR}/src/modules/jk/mod_jk.a 53 -${CP} Makefile.tmpl ${APACHE_DIR}/src/modules/jk 54 -${CP} Makefile.libdir ${APACHE_DIR}/src/modules/jk 55 -${CP} mod_jk.c ${APACHE_DIR}/src/modules/jk 56 -${MKDIR} ${APACHE_DIR}/src/modules/jk/include 57 -${CP} ../common/*.h ${APACHE_DIR}/src/modules/jk/include 58 @echo 59 @echo Please be sure to re-compile Apache... 60 @echo 61 @echo cd ${APACHE_DIR} 62 @echo ./config.status --activate-module=src/modules/jk/libjk.a \\ 63 @echo --enable-module=dir \\ 64 @echo --disable-shared=dir 65 @echo make 66 @echo 67 install_dynamic: mod_jk.la 68 @echo 69 @echo Copying files to Apache libexec Directory... 70 ${LIBTOOL} --mode=install ${CP} $ ${libexecdir}/mod_jk.so 71 72 # 73 # Clean part. 74 # 75 clean: 76 rm -rf *.lo *.la *.a 77 rm -rf *.o .libs *.so 78 79 # 80 # Compile part. 81 # 82 mod_jk.la: mod_jk.lo $(APACHE_OBJECTS) 83 ${MOD_LINK} -o $@ -module -rpath ${libexecdir} $^ 84 mod_jk.a: mod_jk.lo $(APACHE_OBJECTS) 85 ${MOD_LINK} -o $@ $^ 86 87 mod_jk.so: mod_jk.la 88 $(LIBTOOL) --mode=install cp $ `pwd`/$@ 89 90 # 91 # Common part. 92 # 93 mod_jk.lo: mod_jk.c 94 ${SH_COMPILE} -c $ -o $@ 95 96 .c.lo: 97 ${SH_COMPILE} -c $ -o $@ And here's the complete output from configure and make: ./configure --with-apxs=/apache/bin/apxs --enable-EAPI checking build system type... sparc-sun-solaris2.8 checking host system type... sparc-sun-solaris2.8 checking target system type... sparc-sun-solaris2.8 checking for a BSD-compatible install... scripts/build/unix/install-sh -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed
Re: Apache as front-end for several tomcat
If you are running multiple instances of Tomcat, from what I understand and from my configuration (i run two Tomcat/mod_jk2 with Apache) you would then need each of them to listen on a different port. Right now the only instance that will receive requests via the worker is the instance that is using port 8009. At 01:33 PM 3/30/2005, Christophe Lemaire wrote: Not sure. I have seen several config of name based virtual hosts that listen on the same port. On 30-mars-05, at 23:02, Didier McGillis wrote: would it be the fact that your sending the requests through the same port number? From: Christophe Lemaire [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: tomcat-user@jakarta.apache.org Subject: Apache as front-end for several tomcat Date: Wed, 30 Mar 2005 22:12:27 +0200 Hello, I would like to setup a Apache 2.0.53 as front-end for several Tomcat 5.0.19. I use JK1.2.8 as connector. I have defined one worker per tomcat server. I use three name based virtual hosts in the apache config. The problem is only the first virtual host works. In the mod_jk.log, I can see that every request sent to the apache are checked with the JkMount from the first virtual host only. Here are my config files : workers.properties --- worker.list=demo1,demo2,demo3,stat worker.demo1.type=ajp13 worker.demo1.host=192.168.0.1 worker.demo1.port=8009 worker.demo2.type=ajp13 worker.demo2.host=192.168.0.2 worker.demo2.port=8009 worker.demo3.type=ajp13 worker.demo3.host=192.168.0.3 worker.demo3.port=8009 worker.stat.type=ajp13 worker.stat.host=192.168.0.3 worker.stat.port=7201 - end of workers.properties --- In the httpd.conf file, I include the file mod_jk.conf (no other virtual hosts are defined in httpd.conf): mod_jk.conf --- # Load mod_jk module LoadModule jk_module modules/mod_jk.so # Where to find workers.properties JkWorkersFile conf/workers.properties # Where to put jk logs JkLogFile logs/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # Select the log format JkLogStampFormat [%a %b %d %H:%M:%S %Y] # JkRequestLogFormat set the request format JkRequestLogFormat %w %V %T NameVirtualHost *:81 VirtualHost *:81 ServerName demo1.myweb.org JkMount /*/tracking/* stat JkMount /tracking/* stat JkMount /web/* demo1 JkMount /ald/* demo1 JkMount /htmleditor/* demo1 JkMount /* demo1 /VirtualHost VirtualHost *:81 ServerName demo2.myweb.org JkMount /*/tracking/* stat JkMount /* demo2 /VirtualHost VirtualHost *:81 ServerName demo3.myweb.org JkMount /*/tracking/* stat JkMount /* demo3 /VirtualHost - end of mod_jk.conf --- Extract from mod_jk.log : URL typed in the browser : http://demo3.myweb.org:81/ [Wed Mar 30 22:15:46 2005] [12762:8192] [debug] map_uri_to_worker::jk_uri_worker_map.c (700): Attempting to map URI '/' from 6 maps [Wed Mar 30 22:15:46 2005] [12762:8192] [debug] map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI '/*/tracking/*' [Wed Mar 30 22:15:46 2005] [12762:8192] [debug] map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI '/tracking/*' [Wed Mar 30 22:15:46 2005] [12762:8192] [debug] map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI '/web/*' [Wed Mar 30 22:15:46 2005] [12762:8192] [debug] map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI '/ald/*' [Wed Mar 30 22:15:46 2005] [12762:8192] [debug] map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI '/htmleditor/*' [Wed Mar 30 22:15:46 2005] [12762:8192] [debug] map_uri_to_worker::jk_uri_worker_map.c (718): Attempting to map context URI '/*' [Wed Mar 30 22:15:46 2005] [12762:8192] [debug] map_uri_to_worker::jk_uri_worker_map.c (755): Found a context match demo1 - / [Wed Mar 30 22:15:46 2005] [12762:8192] [debug] jk_handler::mod_jk.c (1715): Into handler jakarta-servlet worker=demo1 r-proxyreq=0 [Wed Mar 30 22:15:46 2005] [12762:8192] [debug] wc_get_worker_for_name::jk_worker.c (92): found a worker demo1 [Wed Mar 30 22:15:46 2005] [12762:8192] [debug] init_ws_service::mod_jk.c (479): agsp=81 agsn=demo3.myweb.org hostn=demo3.myweb.org shostn=demo1.myweb.org cbsport=0 sport=0 claport=81 But I get the homepage of demo1.myweb.org... Any idea why this happen? Thanks in advance, Christophe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Answer: Tomcat5 port redirect issue
I figured I would post this in answer to my own question, just in case anyone else has the same problem. The issue was I two boxes set up one had apache, and tomcat on it, the other just had tomcat. The box with apache, and tomcat had tomcat running something unrelated to the secondary box. What I wanted to do was if a particular context was requested from the apache/tomcat domain to redirect to the other domain and to the appropriate ports (ie 8080/8443) the redirect was simple enough, with a rewrite rule in the apache configuration. RewriteRule ^/({specific context})(.*) http://{domain of tomcat box}/$1 [R] for {specific context} you would substitute the context you wish to map to the URL on the other domain. for {domain of tomcat box} substitute the domain of the box you wish to redirect to, from the apache box. this was straight forward enough the trick was to redirect traffic on the other box from port 80 to 8080 and port 443 to 8443. I found these easiest way to do this is by adding iptable rules on the tomcat box. iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080 iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443 iptables -t nat -I OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 8080 iptables -t nat -I OUTPUT -p tcp --dport 443 -j REDIRECT --to-ports 8443 the first 2 rules redirect external incoming requests, and the next 2 redirect localhost requests. (the second isn't always necessary, but in this case it was appropriate.) I hope this helps someone else out of the mess of sorting this sort of thing out. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to redirect to a different host
Is there anyway to configure Tomcat (without using apache) to redirect requests for a particular context to a new url (and host) Here's the scenario on the main page there is a link to a shopping cart context. This webapp does not run on this machine, it's running on a totally separate system, so what I want to do is: when the context webhost:8080/shopping is requested the request is redirected to shoppingcarthost:8080/shopping. Is it possible to do this in the server.xml file, or does it have to be done somewhere else. I know how to do this with apache, but using apache is not an option in this case. I need to know how to to do this independent of apache. Just using Tomcat configuration files. Thanks Daniel McMillan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: How to redirect to a different host Balancer Rules
Thanks for the Idea Vinod, unfortunately I don't have control of the jsp content, so that rather elegant solution won't work. However I'm definitely tucking that away in my mental rolodex. Thanks for the tip!!! Does anyone else know if there's a way to redirect to a different host I was looking at the balancer rules, and it looks like I might be able to use them, but I don't quite understand how to do this. The rule I need to develop is basically the requested URL of http://{webhost}:8080/shopping needs to be redirected to http://{shoppinghost}:8080/shopping. Anyone know how to do this? Original Message - From: Ramu, Vinod [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Date: Today 03:16:35 pm Subject: RE: How to redirect to a different host You may have to use JSTL in your page. JSTL provides a tag called import that has the capability to import contents from other site to your page. So you may built a page that looks like %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % c:import url=http://shoppingcarthost:8080/shopping/ When the user requests webhost:8080/shopping use the response.sendRedirect() to direct to his request to this new page. This page will in turn post a request to a new container on a different machine. Don't forget to include JSTL jar files into your container. Vinod - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serious Tomcat Question
Not sure what your need or frequency is for routine adding/deleting of a virtual host is, but have you considered running multiple instances of Tomcat and connecting them each over different jk port? Perhaps, one instance runs your stable virtual hosts - another runs your dynamic set of virtual hosts? I have experienced that Tomcat tends to startup more slowly the more virtual hosts you have in the config. I run with multiple instances of Tomcat and when I do need to restart Tomcat, it is relatively quick. Doesn't address your session issue though. btw I run FC2/Apache 2.0/JK2/Tomcat 5.0.28 At 05:33 PM 3/17/2005, Bernard wrote: Hi, I would like to hear opinions from users or developers who have a little more experience with mod-jk/Tomcat then me. With multiple virtual hosts, I would like to add and delete virtual hosts on a routine basis. This is achieved by re-starting both httpd and tomcat after re-configuration (I don't know any other way). Surprisingly, Apache immediately returns a server error 500 response while Tomcat is re-starting. IMHO this renders almost useless the init() and destroy() servlet logic that is used to make user sessions persistent before and after a server restart. If, for example, the expected servlet response is JavaScript that is embedded in a web page, then the whole web application gets broken without even showing an error by this. This is so because there is no way that I can catch this error in JavaScript. The error 500 response is HTML and and the script engine cannot read it. This is just a special case but I think an error 500 response for a server re-start could be considered a disaster in most other cases as well. What can be done about this? I have filed a bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=34050 Do you agree with my view? How long would a thing like this take to fix? Many thanks, Bernard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Failing a JK Worker thread
I didn't hear back from any one so I looked through the code. I couldn't find any sign of code that would provide this functionality, so I added the following before line 605 of jk_ajp_common.c. I recompiled and it seems to be working as intended so far. if (d-status=500) { jk_log(l, JK_LOG_ERROR, Tomcat server returned status=%d,d-status); JK_TRACE_EXIT(l); return JK_FALSE; } I may end up using a case statement and preventing apache from trying the next worker on bad request or something like that. Hope this helps some one else too. -Dan Thiffault On Mar 13, 2005, at 12:01 PM, Dan Thiffault wrote: I am running apache web server 2.0.49 connected to tomcat 5.0.28 using the jk connector version 1.2.8. From my understanding, if I set the reply_timeout property of an ajpv13 worker, once the reply_timeout elapses for a particular request to a worker, apache web server will make a new request to the next worker in the group. Is there any way from within the webapp that is being contacted to induce a failure other than not returning before the reply_timeout? For instance, can you return an HTTP error message from tomcat that would cause web server to retry the request to the next worker in the group (assuming full recovery mode)? Thanks for any suggestions -Dan Thiffault - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.028 with Apache 2.053 on different machines
Hi I'm trying to setup Apache 2.053 on one machine, and Tomcat 5.028 on another. I've put mod_jk.so in my modules directory. Configured bother the httpd.conf and the workers.properties file on the apache machine. Here are the lines httpd.conf LoadModule jk_modulemodules/mod_jk.so JkWorkersFile/httpd/conf/workers.properties JkLogFile /httpd/logs/mod_jk.log JkLogLevel info JkLogStampFormat[%a %b %d %H:%M:%S %Y] JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat %w %V %T JkMount /shopping/*worker1 worker.properties worker.list=worker1 worker.worker1.type=ajp13 worker.worker1.host={tomcat machine hostname} --- edited for privacy. worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.recycle_timeout=300 The server.xml file is already set to listen on port 8009 Connector port=8009 enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 / As far as I know those are the only 2 items you need, but when I try to call anything from apache with the context /shopping ie http://{host}/shopping/index.jsp it tries to finding /shopping on the apache machine. It's like it hasn't mounted the directory. Do the web apps have to be on the apache machine? I would like to keep all the Tomcat stuff on that machine, and away from the apache box. The mod_jk.log file has this line in it. [Tue Mar 15 02:23:33 2005] [info] jk_handler::mod_jk.c (1883): Could not find a worker for worker name=worker1 there is no error in the error_log file and access_log has this GET /shopping/index.jsp HTTP/1.1 500 648 Am I missing something? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Failing a JK Worker thread
We have an application running as a webapp which requires legacy systems and network resources which are not fault-tolerant. Luckily these resources are stateless. So we have replicated these resources so that one is available per tomcat instance. When we attempt to use one of these resources from within the webapp and it fails, we need a way to try the next pair (tomcat legacy) in the group. This will allow us to provide a balanced fault-tolerant service with a webapp interface. Since the tomcat instance is responding and functioning, the reply_timeout was not met so apache webserver considered the request a success. Providing a application error from tomcat (maybe a 503 or 401 instead of 500) seemed like the rightest way to do it. I see a few other options: 1. Put a layer on top of apache that tests the response and makes a new request. This doesn't buy us anything and circumvents the use of jk 2. (some how/maigcally) Send an out of process message from tomcat back to apache that the resource is down. 3. Modify AJP to handle this error (this may already have a mechanism that I missed) Does any one have any other suggestions for ensuring reliability when there is a 3rd party piece of hardware/software which your webapp relies on that has no fault-tolerance of its own? Thanks for any suggestions, Dan On Mar 15, 2005, at 2:50 PM, Guernsey, Byron ((GE Consumer Industrial)) wrote: What is the situation where you find this useful? Byron -Original Message- From: Dan Thiffault [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 1:41 PM To: Tomcat Users List Subject: Re: Failing a JK Worker thread I didn't hear back from any one so I looked through the code. I couldn't find any sign of code that would provide this functionality, so I added the following before line 605 of jk_ajp_common.c. I recompiled and it seems to be working as intended so far. if (d-status=500) { jk_log(l, JK_LOG_ERROR, Tomcat server returned status=%d,d-status); JK_TRACE_EXIT(l); return JK_FALSE; } I may end up using a case statement and preventing apache from trying the next worker on bad request or something like that. Hope this helps some one else too. -Dan Thiffault On Mar 13, 2005, at 12:01 PM, Dan Thiffault wrote: I am running apache web server 2.0.49 connected to tomcat 5.0.28 using the jk connector version 1.2.8. From my understanding, if I set the reply_timeout property of an ajpv13 worker, once the reply_timeout elapses for a particular request to a worker, apache web server will make a new request to the next worker in the group. Is there any way from within the webapp that is being contacted to induce a failure other than not returning before the reply_timeout? For instance, can you return an HTTP error message from tomcat that would cause web server to retry the request to the next worker in the group (assuming full recovery mode)? Thanks for any suggestions -Dan Thiffault - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Failing a JK Worker thread
I am running apache web server 2.0.49 connected to tomcat 5.0.28 using the jk connector version 1.2.8. From my understanding, if I set the reply_timeout property of an ajpv13 worker, once the reply_timeout elapses for a particular request to a worker, apache web server will make a new request to the next worker in the group. Is there any way from within the webapp that is being contacted to induce a failure other than not returning before the reply_timeout? For instance, can you return an HTTP error message from tomcat that would cause web server to retry the request to the next worker in the group (assuming full recovery mode)? Thanks for any suggestions -Dan Thiffault - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat load-balancing maintenance strategy?
Filip, Yes, That would be awesome. Thanks, Dan -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Fri 3/11/2005 2:11 PM To: Tomcat Users List Cc: Subject: Re: tomcat load-balancing maintenance strategy? its fixed in 5.5.x, you need a patch for 5.0.x? Dan Carwin wrote: I also experienced cluster failure when restarting a downed cluster member in 5.0. I tested with Tomcat 5.0.30. Randall, what version of Tomcat did you succeed with? Thanks, Dan -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 10:45 AM To: Tomcat Users List Subject: RE: tomcat load-balancing maintenance strategy? Jim, Also check the archives for my post on restarting a downed Tomcat cluster member. This was not working well prior to Tomcat 5.5.8. When the instance was restarted it would throw exceptions trying to re-synchronize vi session replication. - Richard -Original Message- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 9:40 AM To: Tomcat Users List Subject: RE: tomcat load-balancing maintenance strategy? You need to implement either in memory session replication or persist the session in a database or a shared file system. I have finally got my tomcat cluster working and session replication is functional. Randall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat load-balancing maintenance strategy?
I also experienced cluster failure when restarting a downed cluster member in 5.0. I tested with Tomcat 5.0.30. Randall, what version of Tomcat did you succeed with? Thanks, Dan -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 10:45 AM To: Tomcat Users List Subject: RE: tomcat load-balancing maintenance strategy? Jim, Also check the archives for my post on restarting a downed Tomcat cluster member. This was not working well prior to Tomcat 5.5.8. When the instance was restarted it would throw exceptions trying to re-synchronize vi session replication. - Richard -Original Message- From: Randall Svancara [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 9:40 AM To: Tomcat Users List Subject: RE: tomcat load-balancing maintenance strategy? You need to implement either in memory session replication or persist the session in a database or a shared file system. I have finally got my tomcat cluster working and session replication is functional. Randall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: display my index.jsp as default
Add the Context tag to your Host section of the Engine section in the conf/server.xml file (look for this section): Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false then add this below that: Context path= docBase=myDirectory/ debug=0/ At 09:19 AM 3/3/2005, you wrote: bhupendra bendale wrote: I have placed my directory under %catalina_home%/webapps/ now i want to configure tomcat to display my index.jsp page by entering only http://localhost:8080/; what changes should i make. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jspISAPI solution?
I've used it since 08/04 on an IIS v5 Tomcat v4 system. It's okay but it has some major bugs. The biggest glitch is that it spits out random strings in the returned HTML which can make the page render incorrectly. My pages display fine when I'm viewing them locally, but when I go to a local computer training center and view them my HTML tables come out all wrong. Looking at source code shows extra 2000 strings and other random strings in the source. JspISAPI support says that this problem only happens when connecting through one particular proxy server (and an older version at that). However, pages served through JspISAPI will not validate using the W3C's validator (though directly through Tomcat they do). Also my cached pages on Yahoo also display the HTML table problem. My decision. It's buggy and either no longer supported or poorly supported. Last week I found a project on sourceforge that does the same thing: http://iisrelayj.sourceforge.net/ I installed it on a test system. Couldn't get v3 to work but v2 worked. Using this my pages did at least validate using W3Cs validator. They also don't have the random strings when viewing them through a spider simulator. I haven't gotten to the local computer training center to see if my HTML tables are rendering correctly. At 11:22 AM 3/2/2005, Matt wrote: I've created a new thread, just in case this got lost in the shuffle... Does anyone know anything about the below solution (+ or -) and/or recommend (or not recommend) it? Thanks, -Matt On Mon, 28 Feb 2005, Matt wrote: Something else you may want to look into (and I'd LOVE to hear feedback on from this list?) is the following: http://jspisapi.neurospeech.com/ We are now using this on our production IIS 6 server, mostly due to the conflciting, or at least the lack of concise and authoratative, docs out there (and mostly due to timing - this needed to be setup ASAP for a professor). I don't directly maintain the IIS 6 server, and its admin got antsy waiting for us to iron-out the confugration issues (and dreading future changes taking as much effort, like SSL support) with Tomcat and went with this instead ($50). Was this wise? Anyone? I'm curious (and not in front of this system now either) if it uses jk2 or jk and what version, and anything else it may be doing. Thanks, -Matt On Mon, 28 Feb 2005, Fadil wrote: Thanks a lot I'll test this ASAP. Unfortunately, I must setup IIS6 / Tomcat because it's my production environement and I've no choice : I don't want to learn dotnet !! I'm a beginner J2EE developper. [snip] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need access to classes outside Tomcat for JSPs
Do people read anymore? As previously stated in the original post, these classes need to be available to other non-web, non TomCat applications. I do not want to have to maintain two different repositories. Also as previously stated I have the desired configuration running on another box but I cannot duplicate the setup on this box. If your only advice is to move them into TomCat, then please don't even bother replying. At 08:21 AM 3/1/2005, David wrote: Why do you want your classes outside of Tomcat? Copy the classes to your project when you build and eliminate the dependency. Or better yet, use a build environment like Ant to do the copying for you. As a bonus, it'll catch errors before you get to production and the webapp will be more portable. --David Dan wrote: Classpath problem. Really frustrating. I'm trying to duplicate a setup on system A to system B and can't get it working. My problem is when I access the JSP page, Tomcat complains of a ClassNotFound exception. This happens with all of my custom classes. If I create a simple JSP page with no custom classes the JSP compiles fine. When I manually execute the class via java com.xxx.MyClass it responds appropriately (my environment's CLASSPATH includes the custom library paths). My custom classes live outside of the Tomcat directory (see below) because I use these classes in other non-web based applications, so they need to be available system wide. I have melted my brain today trying to figure out why system A works with this configuration but system B gives me the ClassNotFound exception. I have even copied my entire Tomcat directory from system A to system B with no change. I thought perhaps I was starting the service with additional parameters but I don't see any in the registry settings. Does anyone have an educated guess as to why I can't get this thing to work the way it's working on the other system and/or how I can get this working with my custom classes OUTSIDE of Tomcat. Win2K SP4 Tomcat v5.0.27 as NT Service e:\java\tomcat e:\java\sdk (JDK 1.4.2) e:\java\library\custom\ (custom libraries) e:\java\library\basic (libraries from other sources) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need access to classes outside Tomcat for JSPs
My apologies for being over the edge, but after pulling my hair out for the last few days and reading all kinds of web and USENET postings, along with searching the list archives, I came across all kinds of writings that did not address the issue of if (and how) this could be done, most just say to put them in the WEB-INF or the shared directories of TomCat. I know it can be done because that's the way I have my other box setup now. My shared classes are in E:\java\library. My WEB-INF\classes directory is empty, and TomCat compiles the JSPs fine. But for the life of me I cannot duplicate this setup on the new box. That's what really makes this frustrating. I've done a system search for files containing library\custom and nothing relevant shows up. Searching the registry turns up nothing as well. The only tidbit that I've come across is that parameter java.class.path is ignored when running as a service, instead Imagepath can specify a classpath. But I don't remember doing this on my other machine, and my registry entries for the service don't show any additional startup parameters. I wonder if procrun stores these values someplace else, but if so it's not stored anyplace within the Tomcat directory since I've copied the entire Tomcat directory from the working box to this box. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need access to classes outside Tomcat for JSPs
Just as soon as I hit send Registry entry. HKLM | Software | Apache Software Foundation | Procrun 2.0 | Tomcat5 | Parameters | Java Classpath = .;e:\java\library\basic;e:\java\library\custom;E:\java\Tomcat\bin\bootstrap.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need access to classes outside Tomcat for JSPs
You could do it that way but I don't feel that placing common resources in a specific application directory is the proper approach. For example, if I had shared dlls that are used for Microsoft Office, I wouldn't place them into the Word application's directory. At 10:50 AM 3/1/2005, Doug wrote: Just a curious question to this, I know Dan has his setup already but is there any reason that this could not be set up the other way around? I mean that the classes/jars are in the normal spot in Tomcat and the outside app accesses them there. The outside app shouldn't care where the files reside as long as the path to them is known and this way Tomcat is a untouched normal install. Or am I missing something here? I am just trying to learn. Dan wrote: Just as soon as I hit send Registry entry. HKLM | Software | Apache Software Foundation | Procrun 2.0 | Tomcat5 | Parameters | Java Classpath = .;e:\java\library\basic;e:\java\library\custom;E:\java\Tomcat\bin\bootstrap.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need access to classes outside Tomcat for JSPs
Classpath problem. Really frustrating. I'm trying to duplicate a setup on system A to system B and can't get it working. My problem is when I access the JSP page, Tomcat complains of a ClassNotFound exception. This happens with all of my custom classes. If I create a simple JSP page with no custom classes the JSP compiles fine. When I manually execute the class via java com.xxx.MyClass it responds appropriately (my environment's CLASSPATH includes the custom library paths). My custom classes live outside of the Tomcat directory (see below) because I use these classes in other non-web based applications, so they need to be available system wide. I have melted my brain today trying to figure out why system A works with this configuration but system B gives me the ClassNotFound exception. I have even copied my entire Tomcat directory from system A to system B with no change. I thought perhaps I was starting the service with additional parameters but I don't see any in the registry settings. Does anyone have an educated guess as to why I can't get this thing to work the way it's working on the other system and/or how I can get this working with my custom classes OUTSIDE of Tomcat. Win2K SP4 Tomcat v5.0.27 as NT Service e:\java\tomcat e:\java\sdk (JDK 1.4.2) e:\java\library\custom\ (custom libraries) e:\java\library\basic (libraries from other sources) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Native session replication/failover in tomcat 5.0.30
I have the tomcat 5.0.30 replication partially working on redhat as3. Here's what I see: 1. both tomcats up 2. use tcrepl (provided by Richard Mixon) app to etablish session on one tomcat (verify by tailing log file) 3. kill that tomcat 4. session fails over to other tomcat successfully 5. Problems occur after bringing downed tomcat back up. When I start the tomcat instance that I had taken down I get three java errors during tomcat startup (listed below) 6. After the downed tomcat finally comes back up it causes the session to try to fail back over. But that fail over fails and the session croaks, resulting in 500 errors. (first error) Feb 22, 2005 3:49:46 PM org.apache.struts.util.MessageResourcesFactory createFactory SEVERE: MessageResourcesFactory.createFactory java.lang.ClassNotFoundException: org.apache.struts.util.PropertyMessageResourcesFactory (second error) Feb 22, 2005 3:50:16 PM org.apache.catalina.cluster.tcp.ReplicationTransmitter sendMessageData WARNING: Unable to send replicated message, is server down? java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) (third error) java.lang.ExceptionInInitializerError at sun.misc.Unsafe.ensureClassInitialized(Native Method) at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAcces sorFactory.java:20) at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:12 2) at java.lang.reflect.Field.acquireFieldAccessor(Field.java:779) at java.lang.reflect.Field.getFieldAccessor(Field.java:760) What is the expected behavior? Side note - differences between clustering in 5.0 and 5.5: 5.0 doesn't have the JvmRouteBinderValve 5.0 doesn't have the JvmRouteSessionIDBinderLifecycleListener 5.0 doesn't have StoreConfigLifecycleListener - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session replication with jk 1.2.8
I'm setting up session replication in tomcat 5.0.30, using apache 2.0.52 with jk 1.2.8 as the LB mechanism. I'm currently failing to get sessions to stick to a tomcat instance. I used this article for a reference: http://www.javaworld.com/javaworld/jw-12-2004/jw-1220-tomcat.html But the author is doing it with jk2, and hasn't updated his article for jk config yet. He references the jvmRoute=servername variable which needs to match a like variable tomcatId in workers2.properties. Of course workers.properties doesn't have the tomcatId variable. The funny thing is in the change notes for the jk connector, I see that Bill Barker made some change referencing the jvmRoute variable: Check all JSESSIONID cookies for a valid jvmRoute. If you have multiple Tomcats with overlapping domains, then you can get multiple cookies without a defined order. This will route correctly as long as the different domains don't have any Tomcats in common. (billbarker) So I infer that somehow jvmRoute is now relevant in the jk conector, and if so there might be some need for a matching tomcatId variable. What is the syntax for these variables in the jk 1.2.8 world, and where do they go? (I am assuming jk2.properties does not exist) Current file syntax: Workers.properties worker.list=ajp13 worker.ajp13a.port=8009 worker.ajp13a.host=localhost worker.ajp13a.type=ajp13 worker.ajp13a.lbfactor=50 worker.ajp13b.port=8010 worker.ajp13b.host=localhost worker.ajp13b.type=ajp13 worker.ajp13b.lbfactor=50 worker.ajp13.type=lb worker.ajp13.balance_workers=ajp13a,ajp13b - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need simple app to test tc5 session failover - please
Hello Tomcat users and creators. Thank you all for helping out. Can anyone point to me a simple app that I can use to test if tomcat 5 session failover is working? I don't think any of the standard tomcat examples will work. I tried numguess, but my guess count gets reset to 1 each time I fail over. I'm not a java programmer so I'm not able to write my own test app. I do know from the docs page that an app has to meet (at least) the following two requirements: 1. All your session attributes must implement java.io.Serializable 2. Make sure your web.xml has the distributable/ element I'm using tomcat 5.0.30 on linux. I have just set up jk-based load balancing and uncommented the cluster section in the server.xml. Thanks very much, [EMAIL PROTECTED]
tomcat and apples
Hi, I try to put applets in html pages under Tomcat 5.0 when I try to look at the result, the applet is not started and I have the following error... java.security.AccessControlException: access denied (java.net.SocketPermission 10 resolve) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270) at java.security.AccessController.checkPermission(AccessController.java:401) Can anyone tell me something about this error? Have a nice day, Dan a. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataSourceRealm says Name jdbc is not bound in this Context
Dominik, that worked! Champion!!! My revised context.xml looks like this: Context path=/mind docBase=D:/Development/Projects/mind/src/webapp debug=99 reloadable=true Resource name=jdbc/MindDB auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=mind password=*** driverClassName=org.postgresql.Driver url=jdbc:postgresql://localhost/mind/ Realm className=org.apache.catalina.realm.DataSourceRealm debug=99 dataSourceName=jdbc/MindDB localDataSource=true userTable=mind_user userNameCol=alias userCredCol=password userRoleTable=mind_user_role roleNameCol=name/ /Context On Mon, 07 Feb 2005 08:57:08 +0100, Dominik Drzewiecki [EMAIL PROTECTED] wrote: Dan Washusen [EMAIL PROTECTED] wrote: Hi Sven, I can access the data source from within my code using the name java:/comp/env/jdbc/MindDB and everything works great. It's just that the Realm can't... I have found a few other posts to this list with the same problem and one of the email suggested that the Realm is configured before the DataSource causing an error to be thrown during realm initialisation (as the DataSource is missing). It looks like the solution is to move the DataSource configuration to the Global configuration area or to use the JBDCRealm. It is not necessary to make the datasource global. Try adding localDataSource=true to your context Realm definition. Having consulted the docs for 4.1.x, 5.0.x and 5.5.x, t seems that this flag is only allowed in the latest version of tomcat. There's a chance though that it has been backported without having the docs updated. HTH, /dd -- Jar-Jar makes the Ewoks look like f*%#ing Shaft! - Tim Bisley - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataSourceRealm says Name jdbc is not bound in this Context
Hi Sven, I can access the data source from within my code using the name java:/comp/env/jdbc/MindDB and everything works great. It's just that the Realm can't... I have found a few other posts to this list with the same problem and one of the email suggested that the Realm is configured before the DataSource causing an error to be thrown during realm initialisation (as the DataSource is missing). It looks like the solution is to move the DataSource configuration to the Global configuration area or to use the JBDCRealm. To some it up, given the number of emails I've found with this problem I believe it's a bug in Tomcat. Cheers, Dan On Sun, 6 Feb 2005 10:38:14 -0800 (PST), sven morales [EMAIL PROTECTED] wrote: Hi, This is an excerpt of my code, to get a Context. Try and see if it works for you. 31 private void initDataSource () { 32 try { 33 Context initCtx = new InitialContext(); 34 Context envCtx = (Context) initCtx.lookup(java:comp/env); 35 dataSource = (DataSource) envCtx.lookup(jdbc/Taglib); 36 } 37 catch (NamingException e) { 38 System.out.println(ERR: Unable to Initialize Data Source ( + e + )); 39 } 40 } Configs of web.xml is similar to yours. However am not sure if you need an additional parameter to web-app like so: 8 context-param 9 param-namedataSource/param-name 10 param-valuejdbc/Taglib/param-value 11 /context-param Check the dtd description at http://java.sun.com/j2ee/dtds/web-app_2.3.dtd for further info. aka_sergio --- Dan Washusen [EMAIL PROTECTED] wrote: Hi All, I'm trying to get container managed authentication going under Tomcat 5.5 using the org.apache.catalina.realm.DataSourceRealm class. I've configured a DataSource using the name jdbc/MindDB and I can access that from within my app, but when the configured DataSourceRealm tries to access it I get javax.naming.NameNotFoundException: Name jdbc is not bound in this Context. My context.xml looks like this: Context path=/mind docBase=D:/Development/Projects/mind/src/webapp debug=5 reloadable=true Resource name=jdbc/MindDB auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=mind password= driverClassName=org.postgresql.Driver url=jdbc:postgresql://localhost/mind/ Realm className=org.apache.catalina.realm.DataSourceRealm debug=99 dataSourceName=jdbc/MindDB userTable=mind_user userNameCol=alias userCredCol=password userRoleTable=mind_user_role roleNameCol=name/ /Context And the relevant section of my web.xml looks like this: ... resource-ref descriptionMind DB Connection/description res-ref-namejdbc/MindDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref ... I've also tried using the full name of java:/comp/env/jdbc/MindDB that works in my code but that just changes my error to javax.naming.NameNotFoundException: Name java: is not bound in this Context. Any help would be greatly appreciated... Cheers, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250 -- Jar-Jar makes the Ewoks look like f*%#ing Shaft! - Tim Bisley - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DataSourceRealm says Name jdbc is not bound in this Context
Hi All, I'm trying to get container managed authentication going under Tomcat 5.5 using the org.apache.catalina.realm.DataSourceRealm class. I've configured a DataSource using the name jdbc/MindDB and I can access that from within my app, but when the configured DataSourceRealm tries to access it I get javax.naming.NameNotFoundException: Name jdbc is not bound in this Context. My context.xml looks like this: Context path=/mind docBase=D:/Development/Projects/mind/src/webapp debug=5 reloadable=true Resource name=jdbc/MindDB auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=mind password= driverClassName=org.postgresql.Driver url=jdbc:postgresql://localhost/mind/ Realm className=org.apache.catalina.realm.DataSourceRealm debug=99 dataSourceName=jdbc/MindDB userTable=mind_user userNameCol=alias userCredCol=password userRoleTable=mind_user_role roleNameCol=name/ /Context And the relevant section of my web.xml looks like this: ... resource-ref descriptionMind DB Connection/description res-ref-namejdbc/MindDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref ... I've also tried using the full name of java:/comp/env/jdbc/MindDB that works in my code but that just changes my error to javax.naming.NameNotFoundException: Name java: is not bound in this Context. Any help would be greatly appreciated... Cheers, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to disable directory listing
Have a look at your tomcat-root/conf/web.xml file - you can turn off listings in here for all servlets by setting the listings initi-param to false in the default servlet section. Dan At 06:28 PM 1/11/2005, Garret Wilson wrote: You can't do it in your app's web.xml---unless you install another servlet (which can be the Tomcat default servlet) mapped to root in your own web.xml. But then you have to cart around all the Tomcat servlet jars in your webapp, because the one that is really the default was loaded by another classloader. Garret Phillip Qin wrote: Do it in your app's web.xml -Original Message- From: Lee Chin Khiong [mailto:[EMAIL PROTECTED] Sent: November 24, 2004 1:29 AM To: 'Tomcat Users List' Subject: RE: How to disable directory listing Is there any better way to configure Tomcat 5 to no Directory listing just like IIS ? -Original Message- From: Quinton Delpeche [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 2:19 PM To: tomcat-user@jakarta.apache.org Subject: Re: How to disable directory listing On Wednesday 24 November 2004 08:09, Lee Chin Khiong wrote: How to disable directory listing under Tomcat 5 ? I use a blank index.html file and put it in all the directories that I don't want to have listed. :) Q - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 notably slower than tomcat 4...more info
Hi, I've learned more since my last questions about tomcat 5 vs 4 performance. The reason that it seems so much slower is that there are more than twice as many packets being returned from the application server...most of which are SYN/SYN-ACK packets (no exaggeration, from 300 packets in tomcat 4 to 800 in tomcat 5). Initially the SYN requests come from the browser (true for IE and FireFox). Theorizing that the problem could be solved changing the connectionLinger setting from the default of 0 to 2000 ms we tried, but had no consistent change in the amount of SYN/SYN-ACK packets being exchanged between the browser and tomcat. The inconsistency in behavior leads me to believe that the problem is somehow related to load (network/cpu/etc), on occasion tomcat 5 will respond as tomcat 4 does (no extra chatter). Tomcat 4 running across the same exact network, through the same context switch does not exhibit this everthere is a single SYN/SYN-ACK initially and then just typical request/responses. Anybody else seen this? Tomcat 5.0.28/5.0.29 Tomcat 4.0.6 Java JSDK 1.4.2_02 -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat/Java and SMP
10 application servers. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Friday, December 03, 2004 6:53 AM To: Tomcat Users List Subject: Re: Tomcat/Java and SMP Dan, U have 10 application servers on one machine or 10 application on 10 distinct machines ? Dan Foreman wrote: Hi, I have a setup of 10 application servers using Tomcat 4/5, jsdk 1.4.2_02, SMP, win2k. In watching the performance under load I am concerned that only one CPU is being utilized at a time. To validate my theory I try hitting the application server with a request to generate a large report and then making another connection. The second connection is painfully slow and task manager only reports a 50% CPU utilization. After doing some reading on SMP/native threads and windows, I wrote a test java application that spawns n infinite loop threads from a single JVM with a delay between each creation. Sure enough one cpu (task manager reporting 50%) and then the other cpu are consumed (task manager reporting 100%). This test tells me that Java is capable of using both CPU's via native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. Is it possible for tomcat to use more than one CPU or is there a critical flaw in my logic? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat/Java and SMP
Yes, 10 separate boxes with a single JVM (tomcat instance) running on each box. All boxes are SMP. -Original Message- From: David Boyer [mailto:[EMAIL PROTECTED] Sent: Friday, December 03, 2004 12:32 PM To: [EMAIL PROTECTED] Subject: RE: Tomcat/Java and SMP So these are 10 separate boxes? I think the clarification is necessary because application server in the context of java usually refers to the J2EE or (sometimes) servlet container. Are you taling about 10 instances of tomcat each running on their own box? [EMAIL PROTECTED] 12/3/2004 11:20:55 AM 10 application servers. -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Friday, December 03, 2004 6:53 AM To: Tomcat Users List Subject: Re: Tomcat/Java and SMP Dan, U have 10 application servers on one machine or 10 application on 10 distinct machines ? Dan Foreman wrote: Hi, I have a setup of 10 application servers using Tomcat 4/5, jsdk 1.4.2_02, SMP, win2k. In watching the performance under load I am concerned that only one CPU is being utilized at a time. To validate my theory I try hitting the application server with a request to generate a large report and then making another connection. The second connection is painfully slow and task manager only reports a 50% CPU utilization. After doing some reading on SMP/native threads and windows, I wrote a test java application that spawns n infinite loop threads from a single JVM with a delay between each creation. Sure enough one cpu (task manager reporting 50%) and then the other cpu are consumed (task manager reporting 100%). This test tells me that Java is capable of using both CPU's via native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. Is it possible for tomcat to use more than one CPU or is there a critical flaw in my logic? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems loading mod_jk into apache.
Hi All. I downloaded the suse 9.0 pre-made mod_jk module for SuSE 9.0 (i386) and installed it. When I try to restart apache with mod_jk, I'm getting an: Syntax error on line 226 of /etc/httpd/httpd.conf: Cannot load /usr/lib/apache/mod_jk.so into server: /usr/lib/apache/mod_jk.so: undefined symbol: apr_sockaddr_ip_get Line 226 in /etc/httpd/httpd.conf contains: LoadModule mod_jk /usr/lib/apache/mod_jk.so I've also included the directives: Include /var/tomcat3/conf/jk/mod_jk.conf-auto AddModule mod_jk.c Again, we're using SuSE 9.0 on x86. Let me know if there's more information I can give. Any help at all would be really appreciated, I'm thoroughly stumped. Thanks, -Dan - Dan Zubey N7NMD Network Engineer / Information Security United Drugs Corporate Office 602.678.1179 x270 800.800.2988 602.678.0772 Fax
RE: Problems loading mod_jk into apache.
Hi Jerry That's exactly it. We're using Apache 1.3.28. I'll get the sources and recompile the module *without* EAPI, and we'll try again and see how that works out. Thanks! -Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, December 02, 2004 4:28 PM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Problems loading mod_jk into apache. Dan: What version of Apache do you have? Your precompiled mod_jk is looking for an APR socket that your Apache does not have. APR is the Apache Portable Runtime project, a feature related to Apache 2.x. You probably have a 1.3.x httpd, which does not have APR. You will either need to recompile your Apache 1.3.x with EAPI, or compile a mod_jk with no EAPI. Jerry Dan Zubey said: Hi All. I downloaded the suse 9.0 pre-made mod_jk module for SuSE 9.0 (i386) and installed it. When I try to restart apache with mod_jk, I'm getting an: Syntax error on line 226 of /etc/httpd/httpd.conf: Cannot load /usr/lib/apache/mod_jk.so into server: /usr/lib/apache/mod_jk.so: undefined symbol: apr_sockaddr_ip_get Line 226 in /etc/httpd/httpd.conf contains: LoadModule mod_jk /usr/lib/apache/mod_jk.so I've also included the directives: Include /var/tomcat3/conf/jk/mod_jk.conf-auto AddModule mod_jk.c Again, we're using SuSE 9.0 on x86. Let me know if there's more information I can give. Any help at all would be really appreciated, I'm thoroughly stumped. Thanks, -Dan - Dan Zubey N7NMD Network Engineer / Information Security United Drugs Corporate Office 602.678.1179 x270 800.800.2988 602.678.0772 Fax - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: Tomcat 5 notably slower than tomcat 4
Hi, While upgrading application servers from Tomcat 4.0.5 to Tomcat 5.0.29 I am noticing slower browser response when hitting the tomcat 5 servers. We use tomcat as an application server for a data collection application. In one of our larger installs where there are 10 application servers, I have started upgrading to Tomcat 5 from Tomcat 4.0.5. All 10 application servers have identical configuration (less disk space differences), 2x1.4GHz (SMP), Win2k, 2GB RAM. All 10 are running j2sdk 1.4.2_02. Just off the cuff, I'd say it's 15% slower than tomcat 4.0.5. Watching CPU performance, the hardware is not being taxed on either the old version or the new one, but the time for the browser to update is slower. I'm fairly certain that the network is not a contributing factor as all servers are on the same 1 GB backbone and I'm testing to the same endpoint over the internet. The tomcat 5 install has no special configuration, no session replication (I removed the balancer, ROOT and server web applications from the filesystem). Anyone else seen this? Any ideas where to look? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat/Java and SMP
Hi, I have a setup of 10 application servers using Tomcat 4/5, jsdk 1.4.2_02, SMP, win2k. In watching the performance under load I am concerned that only one CPU is being utilized at a time. To validate my theory I try hitting the application server with a request to generate a large report and then making another connection. The second connection is painfully slow and task manager only reports a 50% CPU utilization. After doing some reading on SMP/native threads and windows, I wrote a test java application that spawns n infinite loop threads from a single JVM with a delay between each creation. Sure enough one cpu (task manager reporting 50%) and then the other cpu are consumed (task manager reporting 100%). This test tells me that Java is capable of using both CPU's via native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. Is it possible for tomcat to use more than one CPU or is there a critical flaw in my logic? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat/Java and SMP
Hi, Yes, my test was from my workstation with two browser windows open (separate sessions). I have also observed a 50% cpu load from tomcat on the server, hit that server while someone else was presumably generating a large report and not able to get the cpu to go above 50% yet observed slw performance. -Dan -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Thursday, December 02, 2004 10:18 PM To: Tomcat Users List Subject: Re: Tomcat/Java and SMP Dan, Did you start the second connection from the same machine? Doug - Original Message - From: Dan Foreman [EMAIL PROTECTED] To: Tomcat-User [EMAIL PROTECTED] Sent: Thursday, December 02, 2004 10:40 PM Subject: Tomcat/Java and SMP Hi, I have a setup of 10 application servers using Tomcat 4/5, jsdk 1.4.2_02, SMP, win2k. In watching the performance under load I am concerned that only one CPU is being utilized at a time. To validate my theory I try hitting the application server with a request to generate a large report and then making another connection. The second connection is painfully slow and task manager only reports a 50% CPU utilization. After doing some reading on SMP/native threads and windows, I wrote a test java application that spawns n infinite loop threads from a single JVM with a delay between each creation. Sure enough one cpu (task manager reporting 50%) and then the other cpu are consumed (task manager reporting 100%). This test tells me that Java is capable of using both CPU's via native threading and some black magic in the windows dll's but that this scenario isn't happening in tomcat. Is it possible for tomcat to use more than one CPU or is there a critical flaw in my logic? -Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNI, tomcat thread safety
Hello, I'm loading a native library within tomcat - the library is loaded with the System.loadLibrary() via a static object so that it is only loaded once - will tomcat manage any threading issues for calls to the library from the JNI wrapper class? Thanks, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to tell if JNI Library Loaded at Tomcat Startup?
Hello, How can you determine in Tomcat if a JNI library has been loaded as a shared resource for web applications? I have a Wrapper class and the library both living tomcat-root/shared/lib. Thanks. Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNI Error with Tomcat
Hello, I am having trouble loading a native library for use within Tomcat web applications. I read the wiki entry and found the latest JNI posts - but I still don't quite get it and still have an error. I'm hoping someone out there has been through this and has some suggestions. My environment is Tomcat 5.0.28, Fedora Core 2, JDK 1.5.0, Apache 2.0.52 connecting to Tomcat with jk2. I created a wrapper class to load the library libmpascript.so and placed the class file into the tomcat-root/shared/classes directory so it would load with the built in tomcat shared classloader and be available for all web applications. This sound correct? public class MapScriptWrapper { static { System.loadLibrary(mapscript); } native void load(); } The library lives in /usr/local/lib/special and when starting up tomcat I set JAVA_OPTS=-Djava.library.path=/usr/local/lib/special in the /etc/init.d/tomcat script. Does this need to be in tomcat-root/bin/catalina.sh? I could also make it a global variable in /etc/profile but have not tried that yet. excerpt from /etc/init.d/tomcat ... start() { echo -n Starting tomcat: JAVA_OPTS='-Djava.library.path=/usr/local/lib/special' export JAVA_OPTS set | grep JAVA chown -R $TOMCAT_USER:$TOMCAT_USER /usr/local/tomcat/* su -l $TOMCAT_USER -c '/usr/local/tomcat/bin/startup.sh' RETVAL=$? echo [ $RETVAL = 0 ] touch /var/lock/subsys/tomcat return $RETVAL } ... There is a correpsonding mapscript.jar file which maps obejcts to the library that is available via the CLASSPATH and when I create a jsp file and try to create an object that points to the library I get the dreaded UnsatisfiedLinkError - which tells me the library is not loaded and available. java.lang.UnsatisfiedLinkError: new_mapObj edu.umn.gis.mapscript.mapscriptJNI.new_mapObj(NativeMethod) edu.umn.gis.mapscript.mapObj.init(mapObj.java:334) org.apache.jsp.mapscript_002dtest_jsp._jspService(mapscript_002dtest_jsp.java:52) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Any ideas would be appreciated! Thanks! Dan Barron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5 - coyote/jk2 connector defaults - maxthreads, timeout?
Resending...anyone know??? -Original Message- From: Dan Carwin Sent: Friday, November 05, 2004 11:01 AM To: [EMAIL PROTECTED] Subject: Tomcat 5 - coyote/jk2 connector defaults - maxthreads, timeout? what is the default maxThreads in tomcat 5 jk2/coyote connector? What is the default serverTimeout ? #channelSocket.serverTimeout=??? #channelSocket.maxThreads=??? (fwiw I'm referring to the version included in tc 5.0.28) Thanks, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 - coyote/jk2 connector defaults - maxthreads, timeout?
what is the default maxThreads in tomcat 5 jk2/coyote connector? What is the default serverTimeout ? #channelSocket.serverTimeout=??? #channelSocket.maxThreads=??? (fwiw I'm referring to the version included in tc 5.0.28) Thanks, Dan
JK2 sending directory listings to tomcat, it should not
There's a known bug in the jk connector: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25104 Which forwards directory requests to tomcat even when -ForwardDirectories is turned off. Testing jk2 I'm seeing the same behavior. Is there a known way to prevent directory listings from being forwarded to tomcat with jk2? [you cannot put JkOptions -ForwardDirectories into the apache conf with jk2] Does JK2 lack a way to prevent directory forwarding to Tomcat? Thanks, Dan Carwin [EMAIL PROTECTED] Recreation details: 1. set: DirectoryIndex index.html index.html.var home.html Default.htm Default.html index.jsp index.htm index.cgi Default.jsp 2. create empty directory under docroot. e.g. /htdocs/empty 3. specify in workers2.properties [uri:/*.jsp] info=mapping all jsp to tomcat 4. Visit empty directory, instead of dir listing or apache error, see a tomcat 500 error.
JkOptions -ForwardDirectories equivalent in JK2?
There's a known bug in the jk connector: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25104 Which forwards directory requests to tomcat even when -ForwardDirectories is turned off. So I have switched to jk2. Unfortunately I'm still getting the same behavior with JK2. Is there a known way to prevent directory listings from being forwarded to tomcat with jk2? [you cannot put JkOptions -ForwardDirectories into the apache conf with jk2] Thanks, Dan Carwin [EMAIL PROTECTED]
Tomcat 5.0.27 virtual paths
I have been searching thru the docs but I cannot figure this out. I just deployed and started my first webApp: /usr/tomcat/webapps/j606. I browse to this without a problem at http://localhost:8080/j606. But what I want is j606 to be the base folder when I use virtual paths inside it. to use virtual paths now I have to go /j606/images/xxx.png, but i need /images/xxx.png. I've been searching around for this, but there doesn't seem to be a great deal of tomcat documentation when compared to apache httpd. I don't care what the url is like, with apache httpd i have serveral virtual hosts all on different ports, but localhost:8080/myAppName would be find too. I would just set this up whichever way is the easiest! any help greatly appreciated! Thank You, DJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.27 virtual paths
Thanks for the reply, but I think I may be in more trouble than i thought. I've tried quite a few different things, with no luck. First of all, maybe I'm missing some needed steps before I even get this far. All that I have done is created a directory under webapps, deployed the directory in tomcat manager, started the web application in the manager and then confirmed that I could access http://localhost:8080/j606. I assume this is all i need to do to start??? Now I've tried to add a context element to /tomcat/conf/server.xml with path= and path=/j606, i added a whole new Host item, I tried to create /j606/WEB-INF/server.xml and j606.xml with context items, but nothing has worked for me. any chance of an example that works? I feel like I'm just trying random configurations now in hope that something works. Thanks for the help. On Fri, 20 Aug 2004 14:38:35 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, One way to go about this is to define path= in conf/server.xml for your webapp. So you need a Context element for it whose path attribute is set to . I wouldn't claim the Tomcat does are as good or complete as Apache httpd's, but we make an effort and we especially try to quickly incorporate any patches and enhancements submitted by users. So if you see a need or have something to contribute, please post it and we'll gladly look at it. Yoav Shapira Millennium Research Informatics -Original Message- From: Dan Schwartz [mailto:[EMAIL PROTECTED] Sent: Friday, August 20, 2004 2:36 PM To: [EMAIL PROTECTED] Subject: Tomcat 5.0.27 virtual paths I have been searching thru the docs but I cannot figure this out. I just deployed and started my first webApp: /usr/tomcat/webapps/j606. I browse to this without a problem at http://localhost:8080/j606. But what I want is j606 to be the base folder when I use virtual paths inside it. to use virtual paths now I have to go /j606/images/xxx.png, but i need /images/xxx.png. I've been searching around for this, but there doesn't seem to be a great deal of tomcat documentation when compared to apache httpd. I don't care what the url is like, with apache httpd i have serveral virtual hosts all on different ports, but localhost:8080/myAppName would be find too. I would just set this up whichever way is the easiest! any help greatly appreciated! Thank You, DJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.27 virtual paths
all i'm trying to do is create a web application (/usr/tomcat/webapps/j606) that will allow me to use virtual paths. right now a href=/links/index.jsp goes to http://localhost:8080, i want it to go to http://localhost:8080/j606/links/index.jsp. JSP's are my main concern, just trying to get to a good starting point to learn! On Fri, 20 Aug 2004 16:08:39 -0500, QM [EMAIL PROTECTED] wrote: On Fri, Aug 20, 2004 at 04:01:48PM -0500, Dan Schwartz wrote: : Now I've tried to add a context element to /tomcat/conf/server.xml : with path= and path=/j606, i added a whole new Host item, I : tried to create /j606/WEB-INF/server.xml and j606.xml with context : items, but nothing has worked for me. server.xml goes in the global Tomcat /conf dir. Maybe you're thinking of context.xml, which goes in your webapp's /META-INF dir (if a WAR) or in {tomcat}/conf/{engine}/{host}/{context name}.xml. : I feel like I'm just trying random configurations now in hope : that something works. Thanks for the help. Perhaps ;) Take a deep breath, walk away from it for a bit, then slowly follow the docs again. It's easy to miss something when you're in a hurry or frustrated, and J2EE webapp development gives you a lot to absorb if you're new to most of the concepts. I missed your first post. What are you trying to do? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.0.27 virtual paths
thanks for the info. I'm thinking a newer book might be better, maybe Wrox Professional Tomcat 5? anyone have any comments about that book or other suggestions? The one thing i'm really having a hard time with is the difference between these, why does one require the j606 in the path and one does not? they will both retreive the same file. (both on page /usr/tomcat/webapps/j606/index.jsp) jsp:include page=/includes/header.jsp / img src=/j606/includes/header.jsp / Thanks! On Fri, 20 Aug 2004 16:19:32 -0500, QM [EMAIL PROTECTED] wrote: A few things: 1/ look into the JSTL c:url / tag, it's meant to create context-relative links just for this purpose. It's either that, or hard-code /j606 in all of your pages, which you already seem to know is a bad idea. 2/ Spend some time reading up on servlet technology before you dive in. (Inside Servlets is a fantastic reference, though it was written for spec 2.3.) Get to know terminology such as context and understand what roles are played by the different actors (container vs webapp, etc) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jk_module: can't find symbol
Folks, 1) I am getting the following message each time I tried to start my apache server. Syntax error on line 4 of /opt/tomcat/conf/auto/mod_jk.conf: Can't locate API module structure `jk_module' in file /opt/apache/modules/mod_jk2.so: ld.so.1: /opt/apache/bin/httpd: fatal: jk_module: can't find symbol I have the following setup: Solaris 8 Apache 2.0.50 Tomcat 5.027 connector 2.0.4 My mod_jk.conf's header is as follow: ## Auto generated on Tue Aug 10 10:00:10 EDT 2004## IfModule !mod_jk.c LoadModule jk_module /opt/apache/modules/mod_jk2.so /IfModule JkWorkersFile /opt/jakarta-tomcat-5.0.27/conf/jk/workers.properties JkLogFile /opt/jakarta-tomcat-5.0.27/logs/mod_jk.log JkLogLevel emerg 2) Oh, in addition, I am getting the following from catalina.out. [INFO] StandardHostDeployer - Installing web application at context path /balanc er from URL file:/opt/jakarta-tomcat-5.0.27/webapps/balancer [ERROR] Context - Error filterStart [ERROR] Context - Context startup failed due to previous errors And localhost_log.date 2004-08-09 16:08:46 StandardContext[/balancer]Exception starting filter Balancer Filter java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester I am not using the balancer. Is this message a concern? Any help is greatly appreciated. TIA, Dan _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache2, Tomcat5 and servlets
/jsptoserv/jsptoservlet.jsp ajp13 JkMount /jsp-examples/jsp2/tagfiles/products.jsp ajp13 JkMount /jsp-examples/error/err.jsp ajp13 JkMount /jsp-examples/security/protected/login.jsp ajp13 JkMount /jsp-examples/dates/date.jsp ajp13 JkMount /jsp-examples/jsp2/jspx/textRotate.jspx ajp13 JkMount /jsp-examples/plugin/plugin.jsp ajp13 JkMount /jsp-examples/jsp2/misc/config.jsp ajp13 JkMount /jsp-examples/*.jsp ajp13 JkMount /jsp-examples/colors/colrs.jsp ajp13 JkMount /jsp-examples/*.jspx ajp13 JkMount /jsp-examples/forward/forward.jsp ajp13 JkMount /jsp-examples/jsp2/jspattribute/shuffle.jsp ajp13 JkMount /jsp-examples/include/include.jsp ajp13 JkMount /jsp-examples/source.jsp ajp13 JkMount /jsp-examples/jsp2/el/implicit-objects.jsp ajp13 JkMount /jsp-examples/error/errorpge.jsp ajp13 JkMount /jsp-examples/jsp2/simpletag/repeat.jsp ajp13 JkMount /jsp-examples/security/protected/error.jsp ajp13 JkMount /jsp-examples/tagplugin/choose.jsp ajp13 JkMount /jsp-examples/jsp2/el/basic-comparisons.jsp ajp13 JkMount /jsp-examples/tagplugin/if.jsp ajp13 JkMount /jsp-examples/num/numguess.jsp ajp13 JkMount /jsp-examples/jsp2/el/functions.jsp ajp13 JkMount /jsp-examples/servletToJsp ajp13 JkMount /jsp-examples/include/foo.jsp ajp13 JkMount /jsp-examples/jsp2/tagfiles/hello.jsp ajp13 JkMount /jsp-examples/jsp2/simpletag/book.jsp ajp13 JkMount /jsp-examples/sessions/carts.jsp ajp13 JkMount /jsp-examples/xml/xml.jsp ajp13 JkMount /jsp-examples/jsp2/simpletag/hello.jsp ajp13 /VirtualHost From: Debra Bartling [EMAIL PROTECTED] To: Dan Lee [EMAIL PROTECTED] CC: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Apache2, Tomcat5 and servlets Date: Tue, 10 Aug 2004 13:31:16 -0700 At 03:57 PM 8/10/2004 -0400, you wrote: Can I have a copy of these files as well? In addition, I have the same setup/version as you except in Solaris 8. I configured the tomcat and connector properly. However, I am having problem with running apache to use the jk module. In my httpd.conf, Include /opt/tomcat/conf/auto/mod_jk.conf However, I recieve the following message when I try to start Apache. Syntax error on line 4 of /opt/tomcat/conf/auto/mod_jk.conf: Can't locate API module structure `jk_module' in file /opt/apache/modules/mod_jk2.so: ld.so.1: /opt/apache/bin/httpd: fatal: jk_module: can't find symbol Have you run into this? No. I don't think you need mod_jk.conf for version 5 and jk2. What's in it? _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Compile all JSPs on startup
Here's what I want to do: After Tomcat has been restarted, I want to recompile all of the JSPs in a certain directory (and all child directories). I wrote a servlet that does this and works fine when I run it in command line after Tomcat boots. I want to precompile so the first visitor to a JSP doesn't experience that wait time for Tomcat to compile. So I tried loading my servlet (load-at-startup) at startup in Tomcat's web.xml (no go), my application's web.xml (no go), and even a 'dummy application's web.xml (no go). The problem seems to be that the JSP pages are not available until Tomcat has finished the bootup process. My servlet gets called, but when it tries to fetch the first URL (http://domain.com/page.jsp?precompile=true) nothing else happens. Obviously the java.net.URL cannot make a connection since Tomcat hasn't finished booting to make JSPs available. Besides stopping/starting Tomcat and recompiling the JSPs from a batch script, am I just wasting my time here or is there someway to do this after Tomcat boots? stdout.log: Aug 6, 2004 3:39:33 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Aug 6, 2004 3:39:33 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2188 ms Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.27 Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Aug 6, 2004 3:39:34 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\admin.xml Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Aug 6, 2004 3:39:36 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\balancer.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\manager.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /aatz from URL file:E:\java\Tomcat\webapps\aatz Aug 6, 2004 3:39:38 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aatz] Aug 6, 2004 3:39:39 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /dummy from URL file:E:\java\Tomcat\webapps\dummy RUNNING TOMCATSTARTUP url=http://www.domain.com/page2.jsp?precompile=true fetching http://www.domain.com/page2.jsp?precompile=true (this is where it hangs) At 10:44 AM 8/5/2004, you wrote: Hi, Is there a configuration setting for Tomcat to it recompile all JSP files at start up? No. You can precompile your JSPs as noted at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html#Web%20 Application%20Compilation and other locations. If this is the only way, how and where do you specify startup servlets in tomcat? And what if I want to enable/disable this feature on startup -- what's best approach for setting the flag in tomcats config files? You might want to read the Servlet Specification at some point. You specify startup servlets in Tomcat the way you do in all other servlet containers: by adding load-on-startup[number]/load-on-startup to their declaration in your web.xml file. Since you would code this servlet, you can handle enable/disable of this precompilation however you want. A likely choice would be a simple servlet init-parameter, also in web.xml. This is not specific to Tomcat and would not go in Tomcat's configuration files. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Compile all JSPs on startup
I don't believe this will work. I need something that runs automatically when Tomcat is restarted, and I prefer to do it without external scripts or batch files, etc.. At 04:20 PM 8/6/2004, you wrote: this is what you are looking for: http://cvs.apache.org/~fhanik/precompile.html Filip - Original Message - From: Dan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, August 06, 2004 2:54 PM Subject: RE: Compile all JSPs on startup Here's what I want to do: After Tomcat has been restarted, I want to recompile all of the JSPs in a certain directory (and all child directories). I wrote a servlet that does this and works fine when I run it in command line after Tomcat boots. I want to precompile so the first visitor to a JSP doesn't experience that wait time for Tomcat to compile. So I tried loading my servlet (load-at-startup) at startup in Tomcat's web.xml (no go), my application's web.xml (no go), and even a 'dummy application's web.xml (no go). The problem seems to be that the JSP pages are not available until Tomcat has finished the bootup process. My servlet gets called, but when it tries to fetch the first URL (http://domain.com/page.jsp?precompile=true) nothing else happens. Obviously the java.net.URL cannot make a connection since Tomcat hasn't finished booting to make JSPs available. Besides stopping/starting Tomcat and recompiling the JSPs from a batch script, am I just wasting my time here or is there someway to do this after Tomcat boots? stdout.log: Aug 6, 2004 3:39:33 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Aug 6, 2004 3:39:33 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2188 ms Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.27 Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Aug 6, 2004 3:39:34 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\admin.xml Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Aug 6, 2004 3:39:36 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\balancer.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\manager.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /aatz from URL file:E:\java\Tomcat\webapps\aatz Aug 6, 2004 3:39:38 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aatz] Aug 6, 2004 3:39:39 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /dummy from URL file:E:\java\Tomcat\webapps\dummy RUNNING TOMCATSTARTUP url=http://www.domain.com/page2.jsp?precompile=true fetching http://www.domain.com/page2.jsp?precompile=true (this is where it hangs) At 10:44 AM 8/5/2004, you wrote: Hi, Is there a configuration setting for Tomcat to it recompile all JSP files at start up? No. You can precompile your JSPs as noted at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html#Web%20 Application%20Compilation and other locations. If this is the only way, how and where do you specify startup servlets in tomcat? And what if I want to enable/disable this feature on startup -- what's best approach for setting the flag in tomcats config files? You might want to read the Servlet Specification at some point. You specify startup servlets in Tomcat the way you do in all other servlet containers: by adding load-on-startup[number]/load-on-startup to their declaration in your web.xml file. Since you would code this servlet, you can handle enable/disable of this precompilation
RE: Compile all JSPs on startup
What I ended up doing was to spawn a Thread from my servlet class. This thread waits for 60 seconds and then fetches the JSP pages. Not the best solution but it works for now. At 03:54 PM 8/6/2004, you wrote: Here's what I want to do: After Tomcat has been restarted, I want to recompile all of the JSPs in a certain directory (and all child directories). I wrote a servlet that does this and works fine when I run it in command line after Tomcat boots. I want to precompile so the first visitor to a JSP doesn't experience that wait time for Tomcat to compile. So I tried loading my servlet (load-at-startup) at startup in Tomcat's web.xml (no go), my application's web.xml (no go), and even a 'dummy application's web.xml (no go). The problem seems to be that the JSP pages are not available until Tomcat has finished the bootup process. My servlet gets called, but when it tries to fetch the first URL (http://domain.com/page.jsp?precompile=true) nothing else happens. Obviously the java.net.URL cannot make a connection since Tomcat hasn't finished booting to make JSPs available. Besides stopping/starting Tomcat and recompiling the JSPs from a batch script, am I just wasting my time here or is there someway to do this after Tomcat boots? stdout.log: Aug 6, 2004 3:39:33 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Aug 6, 2004 3:39:33 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2188 ms Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.27 Aug 6, 2004 3:39:33 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Aug 6, 2004 3:39:34 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[] Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Aug 6, 2004 3:39:35 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\admin.xml Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Aug 6, 2004 3:39:35 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Aug 6, 2004 3:39:36 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\balancer.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:E:\java\Tomcat\conf\Catalina\localhost\manager.xml Aug 6, 2004 3:39:38 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /aatz from URL file:E:\java\Tomcat\webapps\aatz Aug 6, 2004 3:39:38 PM org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/aatz] Aug 6, 2004 3:39:39 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /dummy from URL file:E:\java\Tomcat\webapps\dummy RUNNING TOMCATSTARTUP url=http://www.domain.com/page2.jsp?precompile=true fetching http://www.domain.com/page2.jsp?precompile=true (this is where it hangs) At 10:44 AM 8/5/2004, you wrote: Hi, Is there a configuration setting for Tomcat to it recompile all JSP files at start up? No. You can precompile your JSPs as noted at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html#Web%20 Application%20Compilation and other locations. If this is the only way, how and where do you specify startup servlets in tomcat? And what if I want to enable/disable this feature on startup -- what's best approach for setting the flag in tomcats config files? You might want to read the Servlet Specification at some point. You specify startup servlets in Tomcat the way you do in all other servlet containers: by adding load-on-startup[number]/load-on-startup to their declaration in your web.xml file. Since you would code this servlet, you can handle enable/disable of this precompilation however you want. A likely choice would be a simple servlet init-parameter, also in web.xml. This is not specific to Tomcat and would not go in Tomcat's configuration files.
Compile all JSPs on startup
OK, I've searched through the archives and didn't find anything that really settled this. Is there a configuration setting for Tomcat to it recompile all JSP files at start up? The only thing I saw was that one could create a startup servlet that would go through all directories searching for JSP pages then create a URLConnection and call the page with the querystring precompile=true http://my-server.com/my-page.jsp?precompile=true If this is the only way, how and where do you specify startup servlets in tomcat? And what if I want to enable/disable this feature on startup -- what's best approach for setting the flag in tomcats config files? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
webapp in webapp
Hi, can I make a webapp in another webapp ? somethig like: \root = myFirstApp (WEB-INF - folder) \root\xam\nettools\ = mySecondApp (WEB-INF -folder) whitout modify the configuration files for server, only the local xml for \root? Thanks, DAG - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: webapp in webapp
hi, the http://server.domain.com/root/xam/nettools/index.html is complied/interpreted by the root application, but in this folder is another web-app with full web.xml and WEB-INF folders. I think it will be somethig like Context in Context I try all I know on tomcat, all configuration... all Nothing:) I will be gratefull for any ideea DAG - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, July 12, 2004 8:00 AM Subject: Re: webapp in webapp agarlita,dan wrote: Hi, can I make a webapp in another webapp ? somethig like: \root = myFirstApp (WEB-INF - folder) \root\xam\nettools\ = mySecondApp (WEB-INF -folder) whitout modify the configuration files for server, only the local xml for \root? Each web-app MUST have it's descriptor and MUST be deployed by the container. I'm not sure how Tomcat handles two web-apps with overlapping URI. In other words, URI: http://server.domain.com/root/xam/nettools/index.html matches both web applications. Is there a specification on this issue? Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: webapp in webapp
:) Thank for this informations. I know that. with 2 different apps works. I know... But the concept and the ideea behind that is a little big... Thanks for the info anyway. Thanks, Dag - Original Message - From: Nikola Milutinovic [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, July 12, 2004 9:19 AM Subject: Re: webapp in webapp agarlita,dan wrote: hi, the http://server.domain.com/root/xam/nettools/index.html is complied/interpreted by the root application, but in this folder is another web-app with full web.xml and WEB-INF folders. I think it will be somethig like Context in Context I try all I know on tomcat, all configuration... all Nothing:) I will be gratefull for any ideea DAG OK, first of all, there is no such concept in Java Servlet specification as web-app in web-app, nested web apps, if you like. If you have two (distinct) web applications, the should be placed in SEPARATE directory hierarchies, each one deployed as if they had no dependance at all. Then you can try to play with deployment, so that corresponding URIs that are attached to these applications *overlap*. Doing what you did will not do what you want - IOW, there will be only one web application and the other will be treated as a set of files. Granted, JSPs will execute, but servlets and all classes within the second (deeper) WEB-INF will not be deployed or treated as a part of a second WEB-INF. They will be accessable as just plain files. If you do it my way you might get what you wanted, but I cannot guarantee it works on other JSP/Servlet containers. I'm not sure what the spec says (if anything) on the subject of overlapping deployment URI. Guys, anyone? Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: strange error when processing stylesheets: tomcat, jdk1.4, windows, xalan
Have you tried just testing (title) instead of (./title)? The added ./ seems unneceassry. At 02:25 AM 7/1/2004, you wrote: Hi *, I get the following error when trying to transform a xml document with a XSLT stylesheet: ; SystemID: jndi:/localhost/ipas/xsl/minutes_pdf.xsl; Line#: 298; Column#: 66 javax.xml.transform.TransformerException: Unknown error in XPath at org.apache.xpath.XPath.bool(XPath.java:411) at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:198) ... In the stylesheet, I test for an empty string: xsl:if test=not(string(./title)) The error occurs: - with ANY test condition that tests for an empty string (e.g. with string-length(./entry) = 0 - with having xalan.jar, xml-apis.jar and xercesImpl.jar in my WEB-INF/lib from any xalan versions of 2.5.0, 2.5.2, 2.6.0 - with Tomcat 4.1.29 on Windows 2000 and JDK 1.4x - NOT with JDK 1.3 - NOT on Linux - NOT with resin It's these kind of errors that makes being a programmer a real fun! Does anyone have a tip on what to do? -- Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Toimcat / Apache / Modjk
jk file mod_jk.conf it is like this JkMount /*.jsp worker JkMount /*.htm worker JkMount /*.whatever ext you want - just not *.php or * or jk2 file workers2.properties you would do something like [uri:/*.jsp] [uri:/*.htm] [uri:/*.whatever ext you want - just not *.php or *] hope this helps. At 08:25 AM 6/24/2004, James Sherwood wrote: Hello, I have posted this problem before to no avail and thought I would try again I have apache 2.049 in front of tomcat 5.025 and they are linked with modjk 1.2 I want everything for a site such as www.mydomain.com to go through tomcat EXCEPT for any php pages. Is there a way I can JkMount everything BUT something? Basically I want to mount everything EXCEPT url's ending in .php Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Tomcat Instances with Linux
Jon, I have used the CATALINA_HOME/common/lib to share jar files among different Service instances. Not sure if that answers your question though. Dan At 10:54 AM 6/21/2004, you wrote: Dan, Thanks for the post, good ideas I'm going to try them. One thing I'm still not clear on. My application is configured to deploy shared modules (jar files) under CATALINA_HOME/shared/lib. If I create multiple instances, how do I configure the apps to share the correct version of CATALINA_HOME/shared/lib? Do you create a separate document root that contains a shared/lib for each Service entry in the server.xml configuration? Jon --- Dan Barron [EMAIL PROTECTED] wrote: Jon, I run multiple tomcat services on a Linux box with Apache for various development and distributions. The way I went about it is to setup multiple Service configurations within the server.xml file. Each service has it own port for connectivity and its own worker for mod_jk. I create a virtual host entry in mod_jk.conf file which mounts the assigned worker which in turn points to the specific tomcat service. Here's the three files I touch to make it work and an example entry. My environment is Tomcat 4.1.29, mod_jk, and Apache 1.3.27. Hope this helps. Dan *FILE:mod_jk.conf #~~~ # domain.com Virtual Host Definition #~~~ VirtualHost 10.10.1.10 ServerName www.domain.com DocumentRoot /usr/www/domain.com ErrorLog logs/domain.com/error_log CustomLog logs/domain.com/access_log common ScriptAlias /cgi-bin/ /usr/www/domain.com/cgi-bin/ Directory /usr/www/domain.com/cgi-bin AllowOverride None Options None Order allow,deny Allow from all /Directory JkMount /servlet/* domain_worker JkMount /alpha/*.jsp domain_worker JkMount /*.jsp domain_worker /VirtualHost **FILE: workers.properties worker.list=ajp13, domain_worker worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=20 worker.ajp13.cachesize=20 worker.domain_worker.port=8010 worker.domain_worker.host=localhost worker.domain_worker.type=ajp13 worker.domain_worker.lbfactor=20 worker.domain_worker.cachesize=20 *FILE:server.xml Server... ... Service name=domain !-- Define a non-SSL HTTP/1.1 Connector on port 8081 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8081 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Define an AJP 1.3 Connector on port 8010 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8010 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ !-- Define the top level container in our container hierarchy -- Engine name=domain defaultHost=www.domain.com debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_domain_log. suffix=.txt timestamp=true/ !-- Because this Realm is here, an instance will be shared globally -- Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=www.domain.com debug=0 appBase=webapps/domain.com unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=domain_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=domain_log. suffix=.txt timestamp=true/ !-- domain Root Context -- Context path= docBase= debug=0/ /Host /Engine /Service /Server At 05:26 PM 6/18/2004, Jon Feauto wrote: I see this question posted quite often, but rarely answers abound. Is it because this is too complex a topic to explain in a user group? I would think it is fairly common, anyone have ideas? Jon --- Jon Feauto [EMAIL PROTECTED] wrote: Hello, I'm certain I am behind the curve on this one, but I've been looking around for several days now and haven't found the answers I need. I'm looking to setup multiple environments for Tomcat 4x on a single linux server. One for each developer and several others for different versions of test. From the mail list archives I've come to understand that CATALINA_BASE can be used to configure multiple instances. However, most examples I've seen use this in coordination with multiple server.xml files. I'm
Allow user to change password in JDBCRealm
Hello, I've looked around for some time now for a clear answer on this topic, but have not had much luck. I have user authentication setup using JDBCRealm w/ MySQL and am able to login/logout and authenticate users just fine. My question is, once a user is logged in, is the user's login information (uname/pass) available somewhere where I can easily grab it and modify it so I can allow my users to change their password? Thanks, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Tomcat Instances with Linux
Jon, I run multiple tomcat services on a Linux box with Apache for various development and distributions. The way I went about it is to setup multiple Service configurations within the server.xml file. Each service has it own port for connectivity and its own worker for mod_jk. I create a virtual host entry in mod_jk.conf file which mounts the assigned worker which in turn points to the specific tomcat service. Here's the three files I touch to make it work and an example entry. My environment is Tomcat 4.1.29, mod_jk, and Apache 1.3.27. Hope this helps. Dan *FILE:mod_jk.conf #~~~ # domain.com Virtual Host Definition #~~~ VirtualHost 10.10.1.10 ServerName www.domain.com DocumentRoot /usr/www/domain.com ErrorLog logs/domain.com/error_log CustomLog logs/domain.com/access_log common ScriptAlias /cgi-bin/ /usr/www/domain.com/cgi-bin/ Directory /usr/www/domain.com/cgi-bin AllowOverride None Options None Order allow,deny Allow from all /Directory JkMount /servlet/* domain_worker JkMount /alpha/*.jsp domain_worker JkMount /*.jsp domain_worker /VirtualHost **FILE: workers.properties worker.list=ajp13, domain_worker worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=20 worker.ajp13.cachesize=20 worker.domain_worker.port=8010 worker.domain_worker.host=localhost worker.domain_worker.type=ajp13 worker.domain_worker.lbfactor=20 worker.domain_worker.cachesize=20 *FILE:server.xml Server... ... Service name=domain !-- Define a non-SSL HTTP/1.1 Connector on port 8081 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8081 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Define an AJP 1.3 Connector on port 8010 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8010 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ !-- Define the top level container in our container hierarchy -- Engine name=domain defaultHost=www.domain.com debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_domain_log. suffix=.txt timestamp=true/ !-- Because this Realm is here, an instance will be shared globally -- Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=www.domain.com debug=0 appBase=webapps/domain.com unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=domain_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=domain_log. suffix=.txt timestamp=true/ !-- domain Root Context -- Context path= docBase= debug=0/ /Host /Engine /Service /Server At 05:26 PM 6/18/2004, Jon Feauto wrote: I see this question posted quite often, but rarely answers abound. Is it because this is too complex a topic to explain in a user group? I would think it is fairly common, anyone have ideas? Jon --- Jon Feauto [EMAIL PROTECTED] wrote: Hello, I'm certain I am behind the curve on this one, but I've been looking around for several days now and haven't found the answers I need. I'm looking to setup multiple environments for Tomcat 4x on a single linux server. One for each developer and several others for different versions of test. From the mail list archives I've come to understand that CATALINA_BASE can be used to configure multiple instances. However, most examples I've seen use this in coordination with multiple server.xml files. I'm hoping there is a trick to this that I'm missing. I don't mind the extra configuration as long as that is the recommended approach. For an installation supporting a linux service, does the /etc/init.d/tomcat4 script need to be modified to set the CATALINA_BASE for each instance started? Do I need to use different port numbers to access those instances? Is the CATALINA_HOME/shared/lib actually shared across instances or can it be unique to an instance according to CATALINA_BASE? Is virtual hosting required to support this type of environment? Any help is appreciated. Thanks, Jon __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: Looking for sample config files mod_jk2.
I need to integrate Tomcat 3.3 with Apache 2.0.48. Does any body sample configuration files for mod_jk2 to go with this configuration. I will be happy, even if the files for a different configuration. Here's basic jk2.properties file and workers2.properties for a fresh Tomcat 5.0.24, Apache 2.0.49 and jk2 2.0.4 install on Linux workers2.properties file: # Define the communication channel [channel.socket:localhost:8009] info=Ajp13 forwarding over socket tomcatId=localhost:8009 # Map the Tomcat examples webapp to the Web server uri space [uri:/jsp-examples/*] info=Map the whole webapp jk2.properties file: # Set the desired handler list handler.list=request,channelSocket
Re: Problems building mod_jk2 (aclocal)
I just recently successfully built mod_jk2 v2.0.4 under Fedora Core 2 Test 3. I first had to rebuild Apache - I used v2.0.49 - for apxs to work properly when compiling jk2. I then brought down the latest src for jk2 - v2.0.4. Here are the configure scripts I used for httpd and jk2. They are based off the relevant information in the Tomcat wiki links http://www.reliablepenguin.com/clients/misc/tomcat/ and http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html. myconfigure-jk.sh #! /bin/sh ./configure --with-apxs2=/usr/sbin/apxs \ --with-apr-lib=/usr/lib \ --with-tomcat-41=/usr/local/tomcat \ --with-java-home=/usr/local/java/ \ --with-jni myconfigure-httpd.sh file: #! /bin/sh ./configure -C \ --prefix=/etc \ --exec-prefix=/etc \ --bindir=/usr/bin \ --sbindir=/usr/sbin \ --mandir=/usr/share/man \ --libdir=/usr/lib \ --sysconfdir=/etc/httpd/conf \ --includedir=/usr/include/httpd \ --libexecdir=/usr/lib/httpd/modules \ --datadir=/usr/www \ --enable-suexec \ --with-suexec \ --with-suexec-caller=apache \ --with-suexec-docroot=/usr/www \ --with-suexec-logfile=/var/log/httpd/suexec.log \ --with-suexec-bin=/usr/sbin/suexec \ --with-suexec-uidmin=500 \ --with-suexec-gidmin=500 \ --with-devrandom \ --enable-cache=shared \ --enable-disk-cache=shared \ --enable-mem-cache=shared \ --enable-ssl=shared \ --with-ssl \ --enable-deflate \ --enable-access=shared \ --enable-auth=shared \ --enable-include=shared \ --enable-deflate=shared \ --enable-log-config=shared \ --enable-env=shared \ --enable-setenvif=shared \ --enable-mime=shared \ --enable-auth-anon=shared \ --enable-status=shared \ --enable-autoindex=shared \ --enable-asis=shared \ --enable-suexec=shared \ --enable-auth-dbm=shared \ --enable-cgi=shared \ --enable-negotiation=shared \ --enable-dir=shared \ --enable-auth-digest=shared \ --enable-imap=shared \ --enable-actions=shared \ --enable-userdir=shared \ --enable-mime-magic=shared \ --enable-alias=shared \ --enable-cern-meta=shared \ --enable-expires=shared \ --enable-headers=shared \ --enable-unique-id=shared \ --enable-usertrack=shared \ --enable-dav=shared \ --enable-info=shared \ --enable-dav-fs=shared \ --enable-vhost-alias=shared \ --enable-speling=shared \ --enable-rewrite=shared \ --enable-proxy=shared \ --enable-proxy-http=shared \ --enable-proxy-ftp=shared \ --enable-proxy-connect=shared At 12:38 AM 5/28/2004, Lars Nielsen Lind wrote: I have problems building mod_jk2 with Fedora Core 2. It seems to a problem with the mod_jk2 aclocal script??? Anyone that has successfully build mod_jk2 with Fedora Core 2? Here are the output: snip.. /Lars Nielsen Lind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jakarta-tomcat-5.0.24.tar.gz really a Windows Dist?
Maybe a silly question. Seems the jakarta-tomcat-5.0.24.tar.gz is really a Windows binary distribution. And then the jakarta-tomcat-5.0.24.zip contains both Windows and Unix distribution. Am I out of my mind here or can someone please confirm what I'm seeing is true? Thanks. Dan Barron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: erro pages
Hello, how about 500 Error? Compiler error? how can I catch that? Thanks, Dan - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 14, 2004 4:50 AM Subject: Re: erro pages FAQ http://jakarta.apache.org/tomcat/faq/misc.html#error -Tim Dionisio Ruiz de Zarate wrote: hellow. one question. how can i configure tomcat for showing one error page whe the documents doesn't exists? the HTTP 404 - HTTP 403 - . error tipes how can i configure them int tomcat conf file? thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: erro pages
HI, I that's ok :) I know that. I work at a JspTagLib and I want to centralize all the errors, 500 errors, JS Errors, Database ... in one ErrorManager .. I read on FAQ list that this is posible, but I don't know how... Thanks, agarlita, dan - Original Message - From: Mike Curwen [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, May 14, 2004 7:26 AM Subject: RE: erro pages 500: same way. error-code500/error-code As for compiler errors: why would you want a customized error page for this? If you're actively developing a site, when one might expect a page to be compiled and recompiled, then it's useful to see the full stack trace, etc. But once you've eliminated compile errors, you should never see them again in production, and so... no need for a custom user friendly error page. -Original Message- From: agarlita,dan [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 6:38 PM To: Tomcat Users List Subject: Re: erro pages Hello, how about 500 Error? Compiler error? how can I catch that? Thanks, Dan - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 14, 2004 4:50 AM Subject: Re: erro pages FAQ http://jakarta.apache.org/tomcat/faq/misc.html#error -Tim Dionisio Ruiz de Zarate wrote: hellow. one question. how can i configure tomcat for showing one error page whe the documents doesn't exists? the HTTP 404 - HTTP 403 - . error tipes how can i configure them int tomcat conf file? thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Definitive Documentation for RH9, mod_jk2, Apache2 Tomcat 5?
Thanks. I came across a link that is the best I have seen so far: http://www.reliablepenguin.com/clients/misc/tomcat/ At 06:02 AM 5/12/2004, Shapira, Yoav wrote: Hi, Definitive in the true sense of the word, no. Helpful docs are aplenty, though, on the tomcat wiki (http://wiki.apache.org/jakarta-tomcat) UsefulLinks page. Yoav Shapira Millennium Research Informatics -Original Message- From: Dan Barron [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 11, 2004 6:32 PM To: Tomcat Users List Subject: Definitive Documentation for RH9, mod_jk2, Apache2 Tomcat 5? Hello, Is anyone aware of any definitive documentation for compiling, installing, and configuring mod_jk2 on Red Hat9 with Apache2 and Tomcat5? Thank you, Dan Barron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Definitive Documentation for RH9, mod_jk2, Apache2 Tomcat 5?
Hello, Is anyone aware of any definitive documentation for compiling, installing, and configuring mod_jk2 on Red Hat9 with Apache2 and Tomcat5? Thank you, Dan Barron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
error sset
hello, I have some questions about error customisation. I want to change the look of 500 Error. (that is org.apache.jasper.JasperException) so, I want to redirect all strings to the new page. so, for example the 404 error is simple becouse we know that is Page Not Found but, the 500 Error can report errors like According to the TLD or the tag file, attribute operation is mandatory for tag sql how can I send that string (exception string) in the new page? Thanks, r_a_v_e_n - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: good webhosting
http://www.hostforweb.com is a good service, I work with them about 3 years - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 18, 2004 9:40 PM Subject: good webhosting Hello everyone. I was woundering if anyone could point me to a web hosting company that supports tomcat and php Thanks if you can help - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can AccessLogValve Cause Tomcat Performance Hit?
Hello, We are seeing a performance hit to our server whenever we turn on AccessLogValve for a virtual host in tomcat. Is this common or has anyone else experienced this? Any suggestions on how to configure for optimal performance? Below is the virtual host entry in server.xml - tomcat is running stand alone on a Red Hat 9 Linux box - the box is dedicated to running tomcat - there are two virtual hosts configured for the server, and only one has any real traffic. Host name=www.mysite.net debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false !-- Aliaswww.mysite.net/Alias -- Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=mysite.net. suffix=.txt timestamp=true/ Valve className=org.apache.catalina.valves.AccessLogValve directory=logs/mysite.net-acesslogs pattern=%t %a %A %h %m %p %U prefix=access_log. suffix=.txt timestamp=true/ Context path= docBase=mysite.net/production debug=0/ /Host Thanks in advance! Dan Barron [EMAIL PROTECTED]
RE: Can AccessLogValve Cause Tomcat Performance Hit?
Certainly one understands the costs of adding processing in the pipeline, but AccessLogValve seems to come with a large price to performance even with DNS lookups turned off and minimal fields being saved in the output. We have turned it off for now and tomcat performance is significantly improved. Any other methods to get access logs out of Tomcat w/o using AccessLogValve? I suppose I could write my own, but would prefer a known solution. Dan Barron Destination Software LLC [EMAIL PROTECTED] At 05:57 AM 4/7/2004, Shapira, Yoav wrote: Hi, How can you expect the addition of ANY component to the processing pipeline NOT to cause a performance hit? Of course AccessLogValve adds something, nothing comes for free. You can control the hit by modifying what you're logging and disabling DNS lookups, as others have suggested. Yoav Shapira Millennium Research Informatics -Original Message- From: Dan Barron [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 2:09 AM To: Tomcat Users List Cc: Dan Anderson Subject: Can AccessLogValve Cause Tomcat Performance Hit? Hello, We are seeing a performance hit to our server whenever we turn on AccessLogValve for a virtual host in tomcat. Is this common or has anyone else experienced this? Any suggestions on how to configure for optimal performance? Below is the virtual host entry in server.xml - tomcat is running stand alone on a Red Hat 9 Linux box - the box is dedicated to running tomcat - there are two virtual hosts configured for the server, and only one has any real traffic. Host name=www.mysite.net debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false !-- Aliaswww.mysite.net/Alias -- Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=mysite.net. suffix=.txt timestamp=true/ Valve className=org.apache.catalina.valves.AccessLogValve directory=logs/mysite.net-acesslogs pattern=%t %a %A %h %m %p %U prefix=access_log. suffix=.txt timestamp=true/ Context path= docBase=mysite.net/production debug=0/ /Host Thanks in advance! Dan Barron [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: scalability
Check out the app server matrix over at http://www.theserverside.com/reviews/matrix.tss http://www.theserverside.com/reviews/matrix.tss They also review of tomcat: http://www.theserverside.com/reviews/thread.tss?thread_id=18243 http://www.theserverside.com/reviews/thread.tss?thread_id=18243 Daniel J. Roehl, SCJP Programmer/Analyst Austin Energy Office: (512)322-6341 Mobile: (512)576-6810 Fax: (512)322-6025 -Original Message- From: MacManus, Brett C [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 10:38 AM To: [EMAIL PROTECTED] Subject: scalability Hello, I am needing information on the scalability of Tomcat. We are currently using Web Logic, but are considering Tomcat and our only concern in scalability. Can anyone help me out with this as I am unable to track down any specifics. Thank You Brett
Re: Tomcat and JApplet / Applet
Hi Lars, put the applet in another folder than WEB-INF I have the same problem, and I put the applet in a diferrent folder and works. Dan A. - Original Message - From: Lars Nielsen Lind [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, March 28, 2004 1:18 PM Subject: Tomcat and JApplet / Applet Hi. How do I run JApplets / Applets with the Tomcat server? I place the applets in /WEB-INF/classes/package_name/package_name/JAppeltExample.class, but the browser can't see them. /Lars Nielsen Lind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I know this is a stupid question
Hi all, how do I catch http errors with tomcat? 404 Error, 403 Error. I put the same question 2 years ago :) but I forgot I remember that are some tags in config xml, something like ? Thanks, Dan A. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JAAS and Datasources
Hello, I am trying to transition my companies internal applications from IIS contained ASP pages to jsp pages using struts on tomcat. Currently we are using tomcat 4 but we could easily be swayed to switching to version 5 as we are just in the beginning stages of development. Currently our internal web apps are secured using integrated windows authentication. We have a custom component to check user roles in active directory. Connections to our sql db are handled using a component which runs under fixed permissions. With our new setup we would like to continue using windows integrated authentication. We already have a form based login working with active directory. Secondly, but more importantly, after authenticating the user as valid for the particular resource, we would like to use their credentials to log on to our MS SQL server, which we currently have using mixed mode authentication. I've searched through a number of web sites but I feel a little lost as to where to begin. My best guess is that we want to use JAAS with Kerberos 5 for authenticating but I'm not sure once a user is authenticated within an app how that would be applied to a datasource's credentials. Is the db connection made using a JAAS run as? Thank you for any direction, ideas, or sample code. -Dan T - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to pass paremters from javascript to jsp
I think this is kind of off topic in a Tomcat discussion group, but I am not sure since I am not savy on the culture here. As far as I know you cannot directly communicate from Javascript to JSP. There is a fundamental problem here and that is that a JSP page is transduced into a servlet and outputs HTML/XHTML that can contain Javascript or link to a Javascript file. Javascript is utilized by the browser, so there is no JSP per se to talk to, just HTML/XHTML to act on. However, you could have them communicate indirectly. You could have Javascript do a submit a form with paramters and direct this to a JSP and the JSP can parse out the paramaters. If you direct the submit to the same JSP, you are in a sense passing information to the JSP. Another mechanism that is available is that Javascript has the capability to communicate with an Applet. The Applet can open up a socket or whatever with the server it as served from and communicate this way to the server. In addition, Javascript can write to a cookie and information can be passed to JSPs this way. Dan Hello Can any body tell me how to pass parmeters got from html file to javascript function and sending or assigning it to a variable defined in jsp file. thanks in advance, Mano Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver
Andreas, Not sure if you got a response yet. Generally, when I have seen the error above, it seemed to be coming from the web app saying that it didn't get the parameters. I am fighting this same error. Strange enough, though, I had it working as you have yours setup. Another thing is that the order that the XML elements are in is critical...i.e. it needs to follow the dtd. This means that resource-ref elements need to be in the right order relative to the other elements(like servlet and servlet-mapping). Anyway, if it was a driver problem like the jar was in the wrong place, the log would have told you it can't find the class. If you have figured out how to get this working or if you have gotten it to work with the gloabal jndi resource context, please let me know. I will check back later and I will help you figure it out as I will be working on it too. Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
what are some things people have done if tomcat fails to start
Even though a web app can have an error page, what have some people done to indicate to its audience if the tomcat server is not up and running? It has been explained to me that when a seperate instance of tomcat is started on the same machine while an instance is already running, when a user attempts to connect to a web app the message, server is starting, will be returned. I am dealing with Tomcat 3.3 at the moment. 1) Is it possible to start a second instance of tomcat with the same server.xml, etc. while one instance is already running? 2) How have some people redirected users to a useful error page when a Tomcat server does not successfully come up? Thank you for your time and consideration, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
simple virtual host question
I am using Tomcat 4.1.29 with JDK 1.4.x. The network is configured with a router with a firewall to the Internet and a Tomcat server with a static IP(maintained by the router for forwarding purposes) behind the firewall. The router's IP is 12.12.12.12 and I have it forward all http requests to the Tomcat machine at IP 192.168.1.1. So, for purposes of connecting to the server from the Internet, I must send the request to the router which forwards the request to the Tomcat server. So, what do I define my virtual host as: 12.12.12.12 or 192.168.1.1? It seems that the browsers are sending the requst to 12.12.12.12, so I would build a virtual host for this host name? And localhost if I am building on the same machine. OT: If I want the same multiple contexts deployed to two virtual hosts(server IP and localhost), do I have to repeat the context elements in both? Is there a way to cut down on the redundancy or normalize the code so the context is defined in one location with the same properties for both virtual hosts? Thank you for any insight, Dan Doyle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: simple virtual host question
Thank you Miquel. Let me repeat what you are saying. Essentially, I set up a host element entry in my server.xml with my lan servers IP. The router, when it receves a request to IP 12.12.12.12:80 will translate that request into 192.168.1.1:80 and sent it to the lan server. Thanks again. Dan Dear Dan, If you want to use Virtual hosting based on Server name you need to use the servername you have. If you an internet domain and you want your lan server to be accessed from the internet, then you have to use that servername. About the IPs, you need to use the lan IP, not the router one. If the router is using NAT then It will make the translation for you. HTH Miguel I am using Tomcat 4.1.29 with JDK 1.4.x. The network is configured with a router with a firewall to the Internet and a Tomcat server with a static IP(maintained by the router for forwarding purposes) behind the firewall. The router's IP is 12.12.12.12 and I have it forward all http requests to the Tomcat machine at IP 192.168.1.1. So, for purposes of connecting to the server from the Internet, I must send the request to the router which forwards the request to the Tomcat server. So, what do I define my virtual host as: 12.12.12.12 or 192.168.1.1? It seems that the browsers are sending the requst to 12.12.12.12, so I would build a virtual host for this host name? And localhost if I am building on the same machine. OT: If I want the same multiple contexts deployed to two virtual hosts(server IP and localhost), do I have to repeat the context elements in both? Is there a way to cut down on the redundancy or normalize the code so the context is defined in one location with the same properties for both virtual hosts? Thank you for any insight, Dan Doyle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I turn off secure cookies for session IDs?
I have a web site that uses SSL on the main page for logging in (to encrypt the password) but uses standard HTTP on most pages thereafter. I set a value in the session that tells me the user is logged in and that value is checked on every page. If the value is not present, the application redirects the user to the login page. Oddly, the user has had to log in twice in this scenario. I have identified the problem, which I will describe below, but have not found a solution. Hopefully there is a configuration setting somewhere that will fix it. The Problem === The login page creates a session and sets a cookie as follows: Set-Cookie: JSESSIONID=A26A878059077E1ABEE058A62541957C; Path=/; Secure The Secure on the end tells the web browser NOT to send the cookie back to the server unless it is an SSL connection. When the user is redirected to the next non-SSL page, no cookie is sent back to the server, a new session is created, and a new cookie is set as follows: Set-Cookie: JSESSIONID=082E4CACA42D045D7E1F1F55CB073C48; Path=/ My application, assuming the user is not logged in, redirects the user back to the main page. There is an existing session, so it is used for the login variable. Since the cookie is no longer labeled Secure it is valid for all pages. Possible Solutions == This is where I need some help. If it is simply a configuration setting, I have missed it. Otherwise I need to make sure a non-secure cookie exists before displaying the login page. This could mean redirecting to a non-SSL page first if the session is new or somehow grabbing the Cookie object before it is sent to the browser and calling setSecure(false), neither of which seem like an elegant solution. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I turn off secure cookies for session IDs?
On Fri, 23 Jan 2004 13:15:18 -0800, Justin Ruthenbeck [EMAIL PROTECTED] wrote: At 12:59 PM 1/23/2004, you wrote: The Problem === The login page creates a session and sets a cookie as follows: Set-Cookie: JSESSIONID=A26A878059077E1ABEE058A62541957C; Path=/; Secure The Secure on the end tells the web browser NOT to send the cookie back to the server unless it is an SSL connection. When the user is redirected to the next non-SSL page, no cookie is sent back to the server, a new session is created, and a new cookie is set as follows: Set-Cookie: JSESSIONID=082E4CACA42D045D7E1F1F55CB073C48; Path=/ My application, assuming the user is not logged in, redirects the user back to the main page. There is an existing session, so it is used for the login variable. Since the cookie is no longer labeled Secure it is valid for all pages. Possible Solutions == This is where I need some help. If it is simply a configuration setting, I have missed it. Otherwise I need to make sure a non-secure cookie exists before displaying the login page. This could mean redirecting to a non-SSL page first if the session is new or somehow grabbing the Cookie object before it is sent to the browser and calling setSecure(false), neither of which seem like an elegant solution. The general problem that you're hitting here is that you shouldn't/can't start a session over a secure connection, then use the same session for non-secure communication (this is logical and necessary). In this case, you don't want a secure session -- you want only the l/p to be transfered more securely. The general solution, as you suggested, is to start the session over an insecure connection to establish it as insecure. After the session has been started, authenticate (more) securely and then continue to use the same session when you switch back to insecure comm. Note, of course, that starting a session with an insecure connection makes it vulnerable when you switch over to secure. Presumably, however, you're not *that* worried about the implications of this and are more interested in hiding the l/p from curious eyes. justin __ Justin Ruthenbeck Software Engineer, NextEngine Inc. justinr - AT - nextengine DOT com Confidential. See: http://www.nextengine.com/confidentiality.php Thanks for your quick response, Justin. It was not the answer I wanted, but prompted me to find a workaround. I can understand why one would usually want a secure cookie, but I would think it would be a configurable option. This behavior is not exhibited when running Apache in front of Tomcat or when using URL rewriting for session management. It only exhibits itself when using Tomcat by itself with SSL and cookies turned on. I found a workaround: I can set an identical JSESSIONID cookie without the secure setting and it propagates, but now my web application is Tomcat-specific. If anyone knows of a better method, I would sure appreciate hearing about it. Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2 instances of Tomcat
what about having two JDK? Iain As you have identified, this all falls back on having multiple production environments (with its own set of installed software of specific versions) deployed on the same machine. The good new is that java is multiple-deploy-enabled. I e, the java binaries does not in any way crave a specific install point, a specific set of (system global) environment variables being set or anything like that. When consulting enterprising running Java I consistently give this piece of advice regarding install-points and environment variables: * If you have a single production environment on one machine: - Prefer a version-dependent install-point (e g c:\j2sdk1.4.2_02 on windows) and create a version-independent virtual install-point (short-cut c:\j2se). - Use a version-independent install-point if you have to - Set JAVA_HOME on system level to the version-independent virtual install-point. - When updating: install the new version at a ('nother) version-dependent install-point, redirect your virtual install-point, and you're ready to go. You will (of course) have to restart your services that use java, but nothing more drastical then that. * If you have multiple production environments on the same machine - Use version-dependent install-points for your different versions - Never use version-independent install-points - Do not set JAVA_HOME on system level. Instead, set it in the scripts that start your different services. - When updating: install the new version (at its on install-point), and change the service-start scripts. OK: now you have your JVMs set up. Time to install Tomcat. Good news: Tomcat is also multiple-deploy enabled. So, just follow the same rules (this time the rule referring to CATALINA_HOME). [An interesting note: by setting CATALINA_BASE to an external directory, you can easily update tomcat and reuse your configurations and logs (as long as the format of server.xml have not changed, that is).] Reboot your machine; start your services; take off Good luck Dan Johnsson, System Architect and Security Consultant __ Dan Johnsson | Säkerhetsarkitekt [EMAIL PROTECTED] | www.omegapoint.se tel 0709-15 88 43 | fax 08-517 008 29 Omegapoint AB - din säkra punkt i tillvaron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Database pool problem
I understand that you do not have a choice, but please not that the JDBC-ODBC bridge is *not for production* [according to Sun], it is *solely* for development and evaluation. The bridge contains identified bugs that will not be addressed [i e support is EOLed]. So, you are using this at your own risk. Check out the bug parade of the bridge; you might have encountered a well-known, documented bug. It that case, there might be a published work-around. Otherwise: I am sorry to say that you are out in the wilderness alone. Dan Johnsson, System Architect and Security Consultant Chaikin, Yaakov Y (US SSA) wrote: Hi, I am having the following problem and how someone can point out to me what I am doing wrong. I am trying to configure Tomcat to have a database connection pool for my database, but when I try to access the database through a jsp, it gives me wrong password for the database... BUT it IS the right password. I am using MS Access as the database (not much choice right now) and have set up a System DNS. The weird part is that I am using the same values for a Realm I defined and I know that it DOES create a connection to the database and authentication works. The Realm that I have is this: Realm className=org.apache.catalina.realm.JDBCRealm connectionName=default connectionPassword=afecrelease2003 connectionURL=jdbc:odbc:afec debug=0 driverName=sun.jdbc.odbc.JdbcOdbcDriver roleNameCol=UserRole userCredCol=UserPassword userNameCol=UserName userRoleTable=TestUsers userTable=TestUsers validate=true/ My server.xml file has this context: !--*** BEGIN AFECWEB Context ***-- Context className=org.apache.catalina.core.StandardContext cachingAllowed=true charsetMapperClass=org.apache.catalina.util.CharsetMapper cookies=true crossContext=true debug=0 displayName=AFECWEB docBase=c:/corej2ee/stage/wls/afecWebApp/afecWEB.war mapperClass=org.apache.catalina.core.StandardContextMapper path=/afecWEB privileged=false reloadable=true swallowOutput=false useNaming=true wrapperClass=org.apache.catalina.core.StandardWrapper Logger className=org.apache.catalina.logger.FileLogger debug=0 directory=logs prefix=localhost_afecWEB_log. suffix=.txt timestamp=true verbosity=99/ Resource name=jdbc/afecWEBDB auth=Container description=AFEC database; stores info about documents, login type=javax.sql.DataSource scope=Shareable / ResourceParams name=jdbc/afecWEBDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value1/value /parameter parameter namemaxIdle/name value1/value /parameter parameter namemaxWait/name value1/value /parameter parameter namedriverClassName/name valuesun.jdbc.odbc.JdbcOdbcDriver/value /parameter parameter nameurl/name valuejdbc:odbc:afec/value /parameter parameter nameuser/name valuedefault/value /parameter parameter namepassword/name valueafecrelease2003/value /parameter parameter nameconnectionName/name valuedefault/value /parameter parameter nameconnectionPassword/name valueafecrelease2003/value /parameter parameter nameconnectionURL/name valuejdbc:odbc:afec/value /parameter parameter namedriverName/name valuesun.jdbc.odbc.JdbcOdbcDriver/value /parameter /ResourceParams /Context !--*** END AFECWEB Context ***-- Any help would be greatly appreciated. Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- __ Dan Johnsson | Säkerhetsarkitekt [EMAIL PROTECTED] | www.omegapoint.se tel 0709-15 88 43 | fax 08-517 008 29 Omegapoint AB - din säkra punkt i tillvaron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XSL Transform Problem: Seeing SAXParseException: Content is not allowed in prolog
Hello, I'm seeing an SAXParseException when I am trying to do a simple xml transform inside a simple jsp file. I see the exception: SAXParseException: Content is not allowed in prolog I have checked the prolog in both the xml and xsl files and there are no extra characters. I can run the transform from the command line with no errors and it works fine. Any one have any clues on this problem they would like share? Included below is my environment, test.xml file, test.xsl file, test.jsp file, the command line transform, and the tomcat log otput of the exception. Thanks! Dan Barron [EMAIL PROTECTED] *** environment *** redhat 7.3 apache 1.3 tomcat 4.1.29 mod_jk 1.2 Java 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06) *** test.xml file *** ?xml version=1.0 encoding=UTF-8? main titleHello World - xml to xsl test/title /main *** test.xsl file *** ?xml version=1.0 encoding=UTF-8? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 !-- Main Template -- xsl:template match=main xsl:value-of select=title/ /xsl:template /xsl:stylesheet *** test.jsp file *** %@ page import=java.io.*% %@ page import=javax.xml.transform.stream.*% %@ page import=javax.xml.transform.*% % out.print(barronfamily.net - /charlineanddan/jsp/test.jsp); try { //~~~ get Transformer object stylesheet to use for transformation ~~~ TransformerFactory tFactory = TransformerFactory.newInstance(); StreamSource xslFile = new StreamSource(/usr/www/barronfamily.net/charlineanddan/xsl/test.xsl); Transformer transformer = tFactory.newTransformer( xslFile ); //~~~ setup stream reader and writer ~~~ StringReader stream = new StringReader(/usr/www/barronfamily.net/charlineanddan/xml/test.xml); StringWriter writer = new StringWriter( ); //~~~ transform the xml via the stylesheet ~~~ transformer.transform(new StreamSource(stream), new StreamResult(writer)); out.print(writer.toString()); } catch(Exception e ) { out.print(br/br/ERROR: XML Tansformation was unsuccessful:\n); e.printStackTrace(); } % *** Run at Command Line *** [EMAIL PROTECTED] java org.apache.xalan.xslt.Process -in ./xml/test.xml -xsl ./xsl/test.xsl ?xml version=1.0 encoding=UTF-8? Hello World - xml to xsl test [EMAIL PROTECTED] *** Catalina/Tomcat Log of javax.xml.transform.TransformerException *** javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:686) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1088) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1066) at org.apache.jsp.test_jsp._jspService(test_jsp.java:64) ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Servlet not found unless port specified and run thru Tomcat's Man ager; getting a seg fault in the error_log file
Hi, I'm currently running Apache1.3.27/Tomcat4.1.24/mod_jk-1.3-eapi.so/Solaris. I can't get this application to find and run the servlet. The file structure for this app is: /usr/local/jak/webapps/ProbLog/WEB-INF/classes /usr/local/jak/webapps/ProbLog/WEB-INF/lib/probserver.jar /usr/local/jak/webapps/ProbLog/probapplet.jar Now the application works just fine when I use the Tomcat Manager to invoke it. I've tried dropping a HelloworldServet under the ROOT but can't get it to run either! Thanks in advance for any help, Dan All related info follows: * Error generated: Clear classloader cache ... completed. I'm in the search applet Before servlet call; tablename=log_user java.lang.Exception at lib.url.URLChoiceList.init(URLChoiceList.java:38) at lib.awt.AwtSearchForm.init(AwtSearchForm.java:155) at lib.awt.AwtSearchApplet.init(AwtSearchApplet.java:19) at sun.applet.AppletPanel.run(AppletPanel.java:348) at java.lang.Thread.run(Thread.java:536) list_site=http://pandemic.itc.nrcs.usda.gov/servlet/lib.servlet.getChoices?t able=log_userobs=true IO Exception in input stream java.net.SocketException: Unexpected end of file from server Did I get this far? Buffered Read I/O exceptionjava.lang.NullPointerException null java.lang.NullPointerException at lib.url.URLChoiceList.init(URLChoiceList.java:78) at lib.awt.AwtSearchForm.init(AwtSearchForm.java:155) at lib.awt.AwtSearchApplet.init(AwtSearchApplet.java:19) at sun.applet.AppletPanel.run(AppletPanel.java:348) at java.lang.Thread.run(Thread.java:536) * Apache access_log: 199.141.41.198 - - [24/Oct/2003:10:04:23 -0600] GET /ProbLog/probapplet .jar HTTP/1.1 304 - 199.141.41.198 - - [24/Oct/2003:10:04:24 -0600] GET /servlet/lib.servle t.getChoices?table=log_userobs=true HTTP/1.1 404 302 * Apache Error_log: [Mon Oct 27 11:58:50 2003] [notice] Apache/1.3.27 (Unix) mod_jk/1.2.1 mod_perl/1.2 7 mod_ssl/2.8.12 OpenSSL/0.9.7 configured -- resuming normal operations [Mon Oct 27 11:58:50 2003] [info] Server built: May 13 2003 11:27:35 [Mon Oct 27 11:58:50 2003] [notice] Accept mutex: fcntl (Default: fcntl) [Mon Oct 27 11:59:05 2003] [notice] child pid 461 exit signal Segmentation Fault ( 11) [Mon Oct 27 11:59:05 2003] [notice] child pid 460 exit signal Segmentation Fault ( 11) * Apache mod_jk_log: [Mon Oct 27 11:59:04 2003] [jk_uri_worker_map.c (477)]: Attempting to map URI '/servlet/lib.servlet.getChoices' [Mon Oct 27 11:59:04 2003] [jk_uri_worker_map.c (502)]: jk_uri_worker_map_t::map_ uri_to_worker, Found a context match ajp13 - /servlet/ [Mon Oct 27 11:59:04 2003] [jk_worker.c (132)]: Into wc_get_worker_for_name ajp13 [Mon Oct 27 11:59:04 2003] [jk_worker.c (136)]: wc_get_worker_for_name, done found a worker * Workers.properties: worker.list=ajp13 worker.ajp13.type=ajp13 worker.ajp13.host=localhost worker.ajp13.port=8009 ** httpd.conf: ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # ServerType is either inetd, or standalone. Inetd mode is only support ed on # Unix platforms. # ServerType standalone # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation # (available at URL:http://www.apache.org/docs/mod/core.html#lockfile) ; # you will save yourself a lot of trouble. # ServerRoot /usr/local/apache # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, in addition to the default. See also the VirtualHost # directive. # Listen 80 Listen 8080 Listen 8100 # Tomcat listens on 8081 LoadModule jk_module libexec/mod_jk.so # The mod_jk.conf file is autogenerated by tomcat each time it is starte d and # therefore very current on the configuration. (Not using it currently) # Include /usr/local/jakarta-tomcat-4.1.24/conf/auto/mod_jk.conf # Reconstruction of the complete module list from all available modules # (static and shared ones) to achieve correct module execution order. # [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO] # ClearModuleList # AddModule mod_env.c # AddModule mod_log_config.c # AddModule mod_mime.c # AddModule mod_negotiation.c # AddModule mod_status.c # AddModule mod_include.c # AddModule mod_autoindex.c # AddModule mod_dir.c # AddModule mod_cgi.c # AddModule
Apache1.3.27/Tomcat4.1.24/mod_jk-1.3-eapi.so/Solaris
Hi, I'm having a similar problem and can't seem to get past it. I'm currently running Apache1.3.27/Tomcat4.1.24/mod_jk-1.3-eapi.so/Solaris. I've been thru the archives and I've seen a number of similar problems to mine but they haven't solved my problem. I've got the examples working as well as my own but only if I'm using the port number I've assigned with the connector 8081. Without the port number (ie. http://localhost:8081/test.helloworld.class) this fails to find the servlet, with it, it works like a champ. Also, I'm wondering why the workers.properties file specifies port 8009. Finally, it seems were really trying to get it all to work on port 80, hence the dropping of the port number 8081. Forgive my confusion as this is my first time with tomcat, apache, mod_jk. Thanks in advance for any help, Dan All related info follows: * Error generated: Clear classloader cache ... completed. I'm in the search applet Before servlet call; tablename=log_user java.lang.Exception at lib.url.URLChoiceList.init(URLChoiceList.java:37) at lib.awt.AwtSearchForm.init(AwtSearchForm.java:155) at lib.awt.AwtSearchApplet.init(AwtSearchApplet.java:19) at sun.applet.AppletPanel.run(AppletPanel.java:348) at java.lang.Thread.run(Thread.java:536) list_site=http://pandemic.itc.nrcs.usda.gov/servlet/lib.servlet.getChoices?t able=log_userobs=true IO Exception in input stream java.io.FileNotFoundException: http://pandemic.itc.nrcs.usda.gov/servlet/lib.servlet.getChoices?table=log_u serobs=true Did I get this far? Buffered Read I/O exceptionjava.lang.NullPointerException null java.lang.NullPointerException at lib.url.URLChoiceList.init(URLChoiceList.java:77) at lib.awt.AwtSearchForm.init(AwtSearchForm.java:155) at lib.awt.AwtSearchApplet.init(AwtSearchApplet.java:19) at sun.applet.AppletPanel.run(AppletPanel.java:348) at java.lang.Thread.run(Thread.java:536) * Apache access_log: 199.141.41.198 - - [24/Oct/2003:10:04:23 -0600] GET /ProbLog/probapplet .jar HTTP/1.1 304 - 199.141.41.198 - - [24/Oct/2003:10:04:24 -0600] GET /servlet/lib.servle t.getChoices?table=log_userobs=true HTTP/1.1 404 302 * Apache Error_log: [Fri Oct 24 10:04:24 2003] [error] [client 199.141.41.198] File does not exist: /usr/local/jakarta-tomcat-4.1.24/webapps/ProbLog/servlet/lib.servlet.getChoi ces * Apache mod_jk_log: [Fri Oct 24 10:04:23 2003] [jk_uri_worker_map.c (477)]: Attempting to map URI '/ProbLog/probapplet.jar' [Fri Oct 24 10:04:23 2003] [jk_uri_worker_map.c (599)]: jk_uri_worker_m ap_t::map_uri_to_worker, done without a match [Fri Oct 24 10:04:24 2003] [jk_uri_worker_map.c (460)]: Into jk_uri_wor ker_map_t::map_uri_to_worker [Fri Oct 24 10:04:24 2003] [jk_uri_worker_map.c (477)]: Attempting to m ap URI '/servlet/lib.servlet.getChoices' [Fri Oct 24 10:04:24 2003] [jk_uri_worker_map.c (599)]: jk_uri_worker_m ap_t::map_uri_to_worker, done without a match * Workers.properties: worker.list=ajp13 worker.ajp13.type=ajp13 worker.ajp13.host=localhost worker.ajp13.port=8009 ** httpd.conf: ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # ServerType is either inetd, or standalone. Inetd mode is only support ed on # Unix platforms. # ServerType standalone # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation # (available at URL:http://www.apache.org/docs/mod/core.html#lockfile) ; # you will save yourself a lot of trouble. # ServerRoot /usr/local/apache # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, in addition to the default. See also the VirtualHost # directive. # Listen 80 Listen 8080 Listen 8100 # Tomcat listens on 8081 LoadModule jk_module libexec/mod_jk.so # The mod_jk.conf file is autogenerated by tomcat each time it is starte d and # therefore very current on the configuration. (Not using it currently) # Include /usr/local/jakarta-tomcat-4.1.24/conf/auto/mod_jk.conf # Reconstruction of the complete module list from all available modules # (static and shared ones) to achieve correct module execution order. # [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO] # ClearModuleList # AddModule mod_env.c # AddModule mod_log_config.c # AddModule mod_mime.c
RE: Apache1.3.27/Tomcat4.1.24/mod_jk-1.3-eapi.so/Solaris
Yes they arewith the directories corresponding to the package names within classes! -Original Message- From: Oscar Carrillo [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 10:46 AM To: Tomcat Users List Subject: Re: Apache1.3.27/Tomcat4.1.24/mod_jk-1.3-eapi.so/Solaris Port 8009 should be the port that Apache tries to talk to modjk, or is it mod_jk talks to Tomcat on that port. I don't recall but you get the idea. Is your class in this location?: $TOMCAT_HOME/webapps/yourapp/WEB-INF/classes/ Oscar On Fri, 24 Oct 2003, Kengott, Dan wrote: Hi, I'm having a similar problem and can't seem to get past it. I'm currently running Apache1.3.27/Tomcat4.1.24/mod_jk-1.3-eapi.so/Solaris. I've been thru the archives and I've seen a number of similar problems to mine but they haven't solved my problem. I've got the examples working as well as my own but only if I'm using the port number I've assigned with the connector 8081. Without the port number (ie. http://localhost:8081/test.helloworld.class) this fails to find the servlet, with it, it works like a champ. Also, I'm wondering why the workers.properties file specifies port 8009. Finally, it seems were really trying to get it all to work on port 80, hence the dropping of the port number 8081. Forgive my confusion as this is my first time with tomcat, apache, mod_jk. Thanks in advance for any help, Dan All related info follows: * Error generated: Clear classloader cache ... completed. I'm in the search applet Before servlet call; tablename=log_user java.lang.Exception at lib.url.URLChoiceList.init(URLChoiceList.java:37) at lib.awt.AwtSearchForm.init(AwtSearchForm.java:155) at lib.awt.AwtSearchApplet.init(AwtSearchApplet.java:19) at sun.applet.AppletPanel.run(AppletPanel.java:348) at java.lang.Thread.run(Thread.java:536) list_site=http://pandemic.itc.nrcs.usda.gov/servlet/lib.servlet.getChoices?t able=log_userobs=true IO Exception in input stream java.io.FileNotFoundException: http://pandemic.itc.nrcs.usda.gov/servlet/lib.servlet.getChoices?table=log_u serobs=true Did I get this far? Buffered Read I/O exceptionjava.lang.NullPointerException null java.lang.NullPointerException at lib.url.URLChoiceList.init(URLChoiceList.java:77) at lib.awt.AwtSearchForm.init(AwtSearchForm.java:155) at lib.awt.AwtSearchApplet.init(AwtSearchApplet.java:19) at sun.applet.AppletPanel.run(AppletPanel.java:348) at java.lang.Thread.run(Thread.java:536) * Apache access_log: 199.141.41.198 - - [24/Oct/2003:10:04:23 -0600] GET /ProbLog/probapplet .jar HTTP/1.1 304 - 199.141.41.198 - - [24/Oct/2003:10:04:24 -0600] GET /servlet/lib.servle t.getChoices?table=log_userobs=true HTTP/1.1 404 302 * Apache Error_log: [Fri Oct 24 10:04:24 2003] [error] [client 199.141.41.198] File does not exist: /usr/local/jakarta-tomcat-4.1.24/webapps/ProbLog/servlet/lib.servlet.g etChoi ces * Apache mod_jk_log: [Fri Oct 24 10:04:23 2003] [jk_uri_worker_map.c (477)]: Attempting to map URI '/ProbLog/probapplet.jar' [Fri Oct 24 10:04:23 2003] [jk_uri_worker_map.c (599)]: jk_uri_worker_m ap_t::map_uri_to_worker, done without a match [Fri Oct 24 10:04:24 2003] [jk_uri_worker_map.c (460)]: Into jk_uri_wor ker_map_t::map_uri_to_worker [Fri Oct 24 10:04:24 2003] [jk_uri_worker_map.c (477)]: Attempting to m ap URI '/servlet/lib.servlet.getChoices' [Fri Oct 24 10:04:24 2003] [jk_uri_worker_map.c (599)]: jk_uri_worker_m ap_t::map_uri_to_worker, done without a match * Workers.properties: worker.list=ajp13 worker.ajp13.type=ajp13 worker.ajp13.host=localhost worker.ajp13.port=8009 ** httpd.conf: ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # ServerType is either inetd, or standalone. Inetd mode is only support ed on # Unix platforms. # ServerType standalone # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation # (available at URL:http://www.apache.org/docs/mod/core.html#lockfile) ; # you will save yourself a lot of trouble. # ServerRoot /usr/local/apache # Listen: Allows you to bind Apache to specific IP addresses and/or # ports
RE: Apache1.3.27/Tomcat4.1.24/mod_jk-1.3-eapi.so/Solaris
I've tried examples/servlets and examples/jsp both work fine as long as the port number is specified. -Original Message- From: Oscar Carrillo [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 11:11 AM To: Tomcat Users List Subject: RE: Apache1.3.27/Tomcat4.1.24/mod_jk-1.3-eapi.so/Solaris Have you tried just a simple jsp page for starters? I like to do that in case there's some class loading issues. Then you might be able to nail it down to a mod_jk issue, or a class loading issue. Oscar On Fri, 24 Oct 2003, Kengott, Dan wrote: Yes they arewith the directories corresponding to the package names within classes! -Original Message- From: Oscar Carrillo [mailto:[EMAIL PROTECTED] Sent: Friday, October 24, 2003 10:46 AM To: Tomcat Users List Subject: Re: Apache1.3.27/Tomcat4.1.24/mod_jk-1.3-eapi.so/Solaris Port 8009 should be the port that Apache tries to talk to modjk, or is it mod_jk talks to Tomcat on that port. I don't recall but you get the idea. Is your class in this location?: $TOMCAT_HOME/webapps/yourapp/WEB-INF/classes/ Oscar On Fri, 24 Oct 2003, Kengott, Dan wrote: Hi, I'm having a similar problem and can't seem to get past it. I'm currently running Apache1.3.27/Tomcat4.1.24/mod_jk-1.3-eapi.so/Solaris. I've been thru the archives and I've seen a number of similar problems to mine but they haven't solved my problem. I've got the examples working as well as my own but only if I'm using the port number I've assigned with the connector 8081. Without the port number (ie. http://localhost:8081/test.helloworld.class) this fails to find the servlet, with it, it works like a champ. Also, I'm wondering why the workers.properties file specifies port 8009. Finally, it seems were really trying to get it all to work on port 80, hence the dropping of the port number 8081. Forgive my confusion as this is my first time with tomcat, apache, mod_jk. Thanks in advance for any help, Dan All related info follows: * Error generated: Clear classloader cache ... completed. I'm in the search applet Before servlet call; tablename=log_user java.lang.Exception at lib.url.URLChoiceList.init(URLChoiceList.java:37) at lib.awt.AwtSearchForm.init(AwtSearchForm.java:155) at lib.awt.AwtSearchApplet.init(AwtSearchApplet.java:19) at sun.applet.AppletPanel.run(AppletPanel.java:348) at java.lang.Thread.run(Thread.java:536) list_site=http://pandemic.itc.nrcs.usda.gov/servlet/lib.servlet.getCho ices?t able=log_userobs=true IO Exception in input stream java.io.FileNotFoundException: http://pandemic.itc.nrcs.usda.gov/servlet/lib.servlet.getChoices?table =log_u serobs=true Did I get this far? Buffered Read I/O exceptionjava.lang.NullPointerException null java.lang.NullPointerException at lib.url.URLChoiceList.init(URLChoiceList.java:77) at lib.awt.AwtSearchForm.init(AwtSearchForm.java:155) at lib.awt.AwtSearchApplet.init(AwtSearchApplet.java:19) at sun.applet.AppletPanel.run(AppletPanel.java:348) at java.lang.Thread.run(Thread.java:536) * Apache access_log: 199.141.41.198 - - [24/Oct/2003:10:04:23 -0600] GET /ProbLog/probapplet .jar HTTP/1.1 304 - 199.141.41.198 - - [24/Oct/2003:10:04:24 -0600] GET /servlet/lib.servle t.getChoices?table=log_userobs=true HTTP/1.1 404 302 * Apache Error_log: [Fri Oct 24 10:04:24 2003] [error] [client 199.141.41.198] File does not exist: /usr/local/jakarta-tomcat-4.1.24/webapps/ProbLog/servlet/lib.servlet .g etChoi ces * Apache mod_jk_log: [Fri Oct 24 10:04:23 2003] [jk_uri_worker_map.c (477)]: Attempting to map URI '/ProbLog/probapplet.jar' [Fri Oct 24 10:04:23 2003] [jk_uri_worker_map.c (599)]: jk_uri_worker_m ap_t::map_uri_to_worker, done without a match [Fri Oct 24 10:04:24 2003] [jk_uri_worker_map.c (460)]: Into jk_uri_wor ker_map_t::map_uri_to_worker [Fri Oct 24 10:04:24 2003] [jk_uri_worker_map.c (477)]: Attempting to m ap URI '/servlet/lib.servlet.getChoices' [Fri Oct 24 10:04:24 2003] [jk_uri_worker_map.c (599)]: jk_uri_worker_m ap_t::map_uri_to_worker, done without a match * Workers.properties: worker.list=ajp13 worker.ajp13.type=ajp13 worker.ajp13.host=localhost worker.ajp13.port=8009 ** httpd.conf: ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent
portal and portlets
I'm about to start a project for my company that would take Tomcat/Struts and Cold Fusion to build a portal for the company's intranet. The portal apps that they have looked at where Jahia, Jetspeed and another open source portal. The thought is to get these portals and then build the custom portlets in Cold Fusion. My questions are: Anyone doing this? Anyone recommend this? Anyone have other good portal solutions? Anything i didnt cover? dan = Theres no such thing as a problem unless the servers are on fire! __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat4 denial of service in debian...
Hi, Does anyone know if the version of tomcat4 mentioned in the following advisory applies to 4.0.6? http://www.securityfocus.com/archive/1/341310 I get the idea that it only applies to the debian packaged version (4.0.3?)... ?? Regards, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat4 denial of service in debian...
Thanks Yoav, as always you're very helpful. However, I'd still like to be certain that 4.0.6 is ok... Perhaps I should post to the developer's list..? Regards, Dan On Thu, 16 Oct 2003, Shapira, Yoav wrote: Howdy, I think 4.0.6 is OK. The 4.1 branch stable releases are OK as well, and recommended as they use the Coyote connector by default (which is relevant to this security advisory). Yoav Shapira Millennium ChemInformatics -Original Message- From: Dan K. [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2003 11:37 AM To: Tomcat Users List Subject: Tomcat4 denial of service in debian... Hi, Does anyone know if the version of tomcat4 mentioned in the following advisory applies to 4.0.6? http://www.securityfocus.com/archive/1/341310 I get the idea that it only applies to the debian packaged version (4.0.3?)... ?? Regards, Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]