RE: RPM
Be up to date : use 3.2.2 :) http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.2/rpms/ - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6
RE: Tomcat4 Hosed after redhat 7.1 upgrade !
Thanks to upgrade to latest SDK. The Redhat 7.1 use a new stack model which is only handled by recent JDK. Or add in tomcat.sh : export LD_ASSUME_KERNEL=2.2.5 - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 >-Original Message- >From: Michael A Dustin [mailto:[EMAIL PROTECTED]] >Sent: Friday, June 15, 2001 4:14 AM >To: [EMAIL PROTECTED] >Subject: Tomcat4 Hosed after redhat 7.1 upgrade ! > > >Hello, > > >I had tomcat4-4.0-b1.1.noarch.rpm running just fine until >I upgraded from Redhat 6.2 to Redhat 7.1. When I run > >/etc/rc.d/init.d/tomcat4 start, it never starts, the java >processes get stuck and never bring up catalina. I have >attached the processes, and some strace info. > >Upgrading to tomcat4-manual-4.0-b5.1.noarch.rpm >made no differnce either !! Any ideas what could have happened ?? > >Thanx for any help. > >ps -elf | grep java >000 S root 5222 1 2 69 0- 36448 nanosl 22:09 pts/1 >00:00:00 /usr/java/jdk1.3.0_01/bin/i386/native_threads/java -classpath >/var/tomcat4/bin/b >444 Z root 5251 5222 0 69 0- 0 do_exi 22:09 pts/1 >00:00:00 [java ] >040 S root 5252 1 0 69 0- 36448 nanosl 22:09 pts/1 >00:00:00 /usr/java/jdk1.3.0_01/bin/i386/native_threads/java -classpath >/var/tomcat4/bin/b >040 S root 5253 1 0 69 0- 36448 rt_sig 22:09 pts/1 >00:00:00 /usr/java/jdk1.3.0_01/bin/i386/native_threads/java -classpath >/var/tomcat4/bin/b >000 S root 5258 2048 0 72 0- 357 pipe_w 22:09 pts/1 >00:00:00 grep java > >[root@eniac /root]# strace -p 5222 >nanosleep({0, 100}, {3221213832, 3221213836}) = 0 >nanosleep({0, 100}, {3221213832, 3221213836}) = 0 >nanosleep({0, 100}, {3221213832, 3221213836}) = 0 >nanosleep({0, 100}, {3221213832, 3221213836}) = 0 >nanosleep({0, 100}, {3221213832, 3221213836}) = 0 >nanosleep({0, 100}, {3221213832, 3221213836}) = 0 >nanosleep({0, 100}, {3221213832, 3221213836}) = 0 > >[root@eniac /root]# strace -p 5252 >gettimeofday({992571065, 496346}, NULL) = 0 >nanosleep({0, 375771000}, NULL) = 0 >rt_sigprocmask(SIG_SETMASK, [QUIT RT_0], NULL, 8) = 0 >gettimeofday({992571065, 883513}, NULL) = 0 >rt_sigprocmask(SIG_BLOCK, NULL, [QUIT RT_0], 8) = 0 >rt_sigprocmask(SIG_UNBLOCK, [RT_0], [QUIT RT_0], 8) = 0 >gettimeofday({992571065, 883977}, NULL) = 0 >nanosleep({0, 999536000}, NULL) = 0 >rt_sigprocmask(SIG_SETMASK, [QUIT RT_0], NULL, 8) = 0 > > > > > >-dusty >
당신께 드리는 특별한 이벤트..(원하시지 않는분은 죄송합니다..)
Title: Untitled Document ¾È³çÇϼ¼¿ä! ÀÎÅÍÀÚÀÎ »ê¾÷µðÀÚÀÎÇпø¿¡ ±èº´ÁØÀÔ´Ï´Ù. ¸ÕÀú Çã¶ô¾øÀÌ ¸ÞÀÏÀ» º¸³»µå¸°°Í¿¡ ´ëÇØ ¾çÇظ¦ ±¸ÇÕ´Ï´Ù. ´Ù¸§ÀÌ ¾Æ´Ï¿À¶ó ÀúÈñ°¡ ±Ý¹ø¿¡ ±³À°¿ø¿¡¼10ÁÖ³â Ưº° À̺¥Æ®°¡ ÀÖ¾î ÀÌ·¸°Ô ¸ÞÀÏÀ» ÅëÇØ ¾Ë·Á µå¸³´Ï´Ù. ¢¾7¿ù1Â÷°³° - 6¿ù18ÀÏ 2Â÷°³° - 7¿ù2ÀÏ¢¾ ¼ö°½Åû ¿Â¶óÀÎ ¿¹¾à ¼ºñ½º ½Ç½Ã (¼±Âø¼øÁ¢¼ö) Á¢¼ö¹æ¹ý : ÇϴܺÎÀÇ ¿Â¶óÀÎ »ó´ãÀÛ¼ºÈÄ Àü¼ÛÇØ Áֽøé È®ÀÎÈÄ ±âÀçµÈ ¿¬¶ôó·Î Àüȸ¦ µå¸³´Ï´Ù. ÀÚ¼¼ÇÑ ¹®ÀÇ´Â 02 ) 764-6383·Î ¹®ÀÇ ¹Ù¶ø´Ï´Ù. ¶Ç´Â ȨÆäÀÌ http://web-best.co.kr ¿¡¼ ¼ö°½Åû¼ ¾ç½Ä ÀÛ¼º ÈÄ Àü¼ÛÇØ Áֽøé È®ÀÎÈıâÀçµÈ ¿¬¶ôó·Î Àüȸ¦ µå¸³´Ï´Ù. °í¿ëº¸ÇèÀº °³ÀÎÀÌ ÈƷúñ¿ëÀ» ºÎ´ãÇÏ¿´À» °æ¿ì ºñ¿ëÁö¿øÀÌ ºÒ°¡ÇÕ´Ï´Ù... °í¿ëº¸ÇèÀº ±¹°¡·Î ºÎÅÍ È¯±ÞÀ» ¹Þ´Â °Ì´Ï´Ù.. 1. Á÷ÀåÀÎ °í¿ëº¸Çè ½Ç½Ã(50-90% ÇÒÀÎ)!!! 2. Á¤±Ô µî·Ï½Ã °í±Þ ½ºÄ³³Ê ¶Ç´Â PC Ä«¸Þ¶ó ¼±ÅÃÁõÁ¤!!! 3. ÄÄ°ü·Ã ÀâÁö ¹× ±³Àç ¹«·áÁõÁ¤ !! 4. ¿Â¶óÀÎ °Á °³¼³!!! 5. ¹«·á Àç¼ö° ¹× ¾Æ¸£¹ÙÀÌÆ® Áö¿ø !! ON - LINE »ó´ã ±³À°°úÁ¤ :À¥µðÀÚÀÎ,À¥¸¶½ºÅÍ,ÀüÀÚ»ó°Å·¡,À¥ÄÚµð³×ÀÌÅÍ *À̸§ *E-mail *¿¬¶ôó *»ý³â¿ùÀÏ ³â ¼±Åà 1 2 3 4 5 6 7 8 9 10 11 12 ¿ù ¼±Åà 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
SSO cookie is not present
Downloaded T4-b5 and tried configuring SSO (SingleSignOn) with FORM authentication. When the first webapp gets executed, the SSO cookie is not set (in browser). Here are my properties: server.xml: .. Made a duplicate webapp called test2 from example. Tried the example jsp/security/protected. Both webapps contains the same web.xml: Example Security Constraint Protected Area /jsp/security/protected/* DELETE GET POST PUT tomcat role1 FORM Example Form-Based Authentication Area /jsp/security/login/login.jsp /jsp/security/login/error.jsp This is what the log shows: 2001-06-14 02:53:52 SingleSignOn[localhost]: Process request for '/test2/jsp/security/protected/index.jsp' 2001-06-14 02:53:52 SingleSignOn[localhost]: Checking for SSO cookie 2001-06-14 02:53:52 SingleSignOn[localhost]: SSO cookie is not present 2001-06-14 02:53:52 StandardHost[localhost]: Mapping request URI '/test2/jsp/security/protected/index.jsp' 2001-06-14 02:53:52 StandardHost[localhost]: Mapped to context '/test2' 2001-06-14 02:54:01 SingleSignOn[localhost]: Process request for '/test2/jsp/security/protected/index.jsp' 2001-06-14 02:54:01 SingleSignOn[localhost]: Checking for SSO cookie 2001-06-14 02:54:01 SingleSignOn[localhost]: SSO cookie is not present 2001-06-14 02:54:01 StandardHost[localhost]: Mapping request URI '/test2/jsp/security/protected/index.jsp' 2001-06-14 02:54:01 StandardHost[localhost]: Mapped to context '/test2' 2001-06-14 02:54:01 jsp: init 2001-06-14 02:54:01 SessionListener: sessionCreated('50E620234093A0539630028227494569') 2001-06-14 02:54:18 SingleSignOn[localhost]: Process request for '/test2/jsp/security/protected/index.jsp' 2001-06-14 02:54:18 SingleSignOn[localhost]: Checking for SSO cookie 2001-06-14 02:54:18 SingleSignOn[localhost]: SSO cookie is not present 2001-06-14 02:54:18 StandardHost[localhost]: Mapping request URI '/test2/jsp/security/protected/index.jsp' 2001-06-14 02:54:18 StandardHost[localhost]: Mapped to context '/test2' Thanks. -- keng wong
Re: MultiThreadModel-Problem?
> > Sebastian Schulz wrote: > > > > > [...] > > > the second question is: data-container like HashMap or HashSet > > > are considered to be not Thread-save. Can i use such containers > > > in a MultiThreadModel-Servlet or must i use only slower structures > > > like Vector? > > > > > > your help is realy needed, many thanks > > > in advance! > > > > > > basti Came across a very useful class developed by Doug Lea, author of Concurrent programming in Java in version 1.3.0 of his concurrent package. This package contains ConcurrentHashMap which provides concurrent reads, writes and iterations (including removal during iteration) over the Map. See the package pages http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html Doug says that a class of this sort is likely to be included in JDK1.5 and is looking for feedback on good/bad experiences with the new class. Antony
Running secure tomcat
If I run tomcat 4.0b5 in the secure more and I get following error when I want to grant my application some grants. I am using JDK 1.3.1. java.security.Policy: error adding Entry sun.security.provider.PolicyParser$Gran tEntry@639a3e java.net.MalformedURLException: unknown protocol: jndi I have added following into catalina.policy grant codeBase "jndi:/localhost/webapps/support/WEB-INF/classes/-" { permission java.security.AllPermission; }; Thank you for reply Jan __ Tato komunikace je urcena vyhradne pro adresata a je duverna. This communication is intended solely for the addressee and is confidential.
How do I get mod_webapp.so?
Hi, How do I get mod_webapp.so? I have this mod_webapp.c. I have read this server.xml file where is little guide how to build that module, but it just don´t work. I think that I need mod_webapp.s file and I have to build it somehow from mod_webapp.c file, but how? I have Red Hat 7.1, Apache 1.3.19 and Tomcat 4 b5. Thanks for any help. -jari
Tomcat IIS HowTo
Hi, I am having problem in configuring IIS 4.0 and Jakarta Tomcat 3.2.1. I have followed the instruction given by you in your documentation. I am not able to see "http://localhost/examples/jsp/index.html";. In your trouble shooting section 5.A.3 says "If the number following GET "/..." is 200 or 403, make sure you have checked Execute Access for the jakarta virtual directory in the Advanced Options of the Personal Web Manager. " But i'm not using "Personal Web Manager." I'm using "Internet Service Manager" Please help me in this regard Thanks in Advance Manjunath _ Chat with your friends as soon as they come online. Get Rediff Bol at http://bol.rediff.com
Tomcat4 Hosed after redhat 7.1 upgrade !
Hello, I had tomcat4-4.0-b1.1.noarch.rpm running just fine until I upgraded from Redhat 6.2 to Redhat 7.1. When I run /etc/rc.d/init.d/tomcat4 start, it never starts, the java processes get stuck and never bring up catalina. I have attached the processes, and some strace info. Upgrading to tomcat4-manual-4.0-b5.1.noarch.rpm made no differnce either !! Any ideas what could have happened ?? Thanx for any help. ps -elf | grep java 000 S root 5222 1 2 69 0- 36448 nanosl 22:09 pts/1 00:00:00 /usr/java/jdk1.3.0_01/bin/i386/native_threads/java -classpath /var/tomcat4/bin/b 444 Z root 5251 5222 0 69 0- 0 do_exi 22:09 pts/1 00:00:00 [java ] 040 S root 5252 1 0 69 0- 36448 nanosl 22:09 pts/1 00:00:00 /usr/java/jdk1.3.0_01/bin/i386/native_threads/java -classpath /var/tomcat4/bin/b 040 S root 5253 1 0 69 0- 36448 rt_sig 22:09 pts/1 00:00:00 /usr/java/jdk1.3.0_01/bin/i386/native_threads/java -classpath /var/tomcat4/bin/b 000 S root 5258 2048 0 72 0- 357 pipe_w 22:09 pts/1 00:00:00 grep java [root@eniac /root]# strace -p 5222 nanosleep({0, 100}, {3221213832, 3221213836}) = 0 nanosleep({0, 100}, {3221213832, 3221213836}) = 0 nanosleep({0, 100}, {3221213832, 3221213836}) = 0 nanosleep({0, 100}, {3221213832, 3221213836}) = 0 nanosleep({0, 100}, {3221213832, 3221213836}) = 0 nanosleep({0, 100}, {3221213832, 3221213836}) = 0 nanosleep({0, 100}, {3221213832, 3221213836}) = 0 [root@eniac /root]# strace -p 5252 gettimeofday({992571065, 496346}, NULL) = 0 nanosleep({0, 375771000}, NULL) = 0 rt_sigprocmask(SIG_SETMASK, [QUIT RT_0], NULL, 8) = 0 gettimeofday({992571065, 883513}, NULL) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [QUIT RT_0], 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RT_0], [QUIT RT_0], 8) = 0 gettimeofday({992571065, 883977}, NULL) = 0 nanosleep({0, 999536000}, NULL) = 0 rt_sigprocmask(SIG_SETMASK, [QUIT RT_0], NULL, 8) = 0 -dusty
Tomcat 3.2.2 Install problems
Hello Everyone, Sorry for reposting this...but I could really use some help. Before I begin, I would just like to say that I am a newbie when it comes to the Apache webserver, Tomcat, Java, JSP and to some respects Linux. I am trying to get a good clean grasp as to what I have to have installed and working in order to use JSP and Servlets. I am running Mandrake 8.0, Apache-AdvancedExtranetServer/1.3.19 mod_ssl/2.8.2 OpenSSL/0.9.6 PHP/4.0.4pl1. I downloaded... J2SDK1.3.1 Tomcat 3.2.2 Java servlet (was in the same directory where I downloaded Tomcat from, I assumed I needed it as well.) JRE (Can't quite get it to run with Mozilla) It was my understanding that the JavaSDK needed to be installed as well. So I downloaded it and installed it. I set it up so that all users could execute Java. I modified my path in /etc/profile so all users have access. However, when I log in as root, the path to the Java directory is not there. What have I missed? Also, I have installed Tomcat 3.2.2 and when I try to start it, it fails because I try to start it as root and since the Java dir is not in the path it cannot start. How can I fix this? Is there a good HOW-TO out there that I somehow missed? Thanks in advance. John Brosan JSP programmer in Training.
Re: Tomcat 3.2.2 Install problems
"Howler D. Wolfe" wrote: > > Hello Everyone, > > Sorry for reposting this...but I could really use some help. > > Before I begin, I would just like to say that I am a newbie when it comes > to the Apache webserver, Tomcat, Java, JSP and to some respects Linux. > > I am trying to get a good clean grasp as to what I have to have installed > and working in order to use JSP and Servlets. > > I am running Mandrake 8.0, Apache-AdvancedExtranetServer/1.3.19 > mod_ssl/2.8.2 OpenSSL/0.9.6 PHP/4.0.4pl1. > > I downloaded... > > J2SDK1.3.1 > Tomcat 3.2.2 > Java servlet (was in the same directory where I downloaded Tomcat from, I > assumed I needed it as well.) > JRE (Can't quite get it to run with Mozilla) > > It was my understanding that the JavaSDK needed to be installed as well. So > I downloaded it and installed it. I set it up so that all users could > execute Java. I modified my path in /etc/profile so all users have access. > However, when I log in as root, the path to the Java directory is not there. > What have I missed? Perhaps you should edit your ~/.bashrc file...;-) > > Also, I have installed Tomcat 3.2.2 and when I try to start it, it fails > because I try to start it as root and since the Java dir is not in the path > it cannot start. How can I fix this? Just manually set it in the startup and shutdown scripts i.e. JAVA_HOME=/where/ever/jdk1.3.1 And your tomcat home...;-) Cheers, John Clark -- /) John Clark Naldoza y Lopez (\ / )Software Design Engineer II ( \ _( (__ Web-Application Development_) )_ (((\ \> /_>Cable Modem Network Management System <_\
Re: running examples in Tomcat 4.0 b5
This is where you start. Under \conf\server.xml find To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 4:44 PM Subject: running examples in Tomcat 4.0 b5 > > Hi there! > > I just installed Tomcat 4.0 b5 on linux and I just cannot run the > examples included in the binary bundle... > When I connect to http://localhost:8080/examples/jsp, I receive the > following error message: > > HTTP Status 503 - This application is not currently available > The requested service (This application is not currently available) is > not currently available. > > > The HTML content is served normally, but all JSPs and Servlets do not > work... > Anybody has an idea? > > MA >
Compile mod_jk fails: tomcat 3.2.1 + apache 1.3.9
Hi there, My configuration is as follows: Tomcat 3.2.1 Apache 1.3.9 Solaris 7 J2SE 1.3.0_02 (not used in this compilation) I'm trying to compile mod_jk on Solaris 2.7. Here's what I did: (1) cd to .../jakarta-tomcat-3.2.1-src/src/native/apache1.3 (2) make sure apxs aliased to the correct file, in this case is .../apache/bin/apxs (3) since the apxs script uses cc, I checked the cc version. It is "Workshop Compilers 4.2" (4) from the webpage http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html, I use the following command to compile, using my own java 1.3 (j2se downloaded from sun): apxs -o mod_jk.so -DSOLARIS -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -c *.c ../jk/*.c Warnings and Errors: cc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -KPIC -DSHARED_MODULE -I/kitimat1/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_jni_worker.c"../jk/jk_jni_worker.c", line 731: warning: assignment type mismatch: pointer to function(pointer to pointer to pointer to const struct JNIInvokeInterface_ {pointer to void reserved0, pointer to... "=" pointer to void"../jk/jk_jni_worker.c", line 732: warning: assignment type mismatch: pointer to function(pointer to void) returning long "=" pointer to void cc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -KPIC -DSHARED_MODULE -I/kitimat1/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_uri_worker_map.c"../jk/jk_uri_worker_map.c", line 349: warning: initializer does not fit or is out of range: -1 "../jk/jk_uri_worker_map.c", line 438: warning: newline not last character in file cc -DSOLARIS2=270 -DUSE_EXPAT -I../lib/expat-lite -KPIC -DSHARED_MODULE -I/kitimat1/apache/include -I../jk -I/usr/j2se/include -I/usr/j2se/include/solaris -DSOLARIS -c ../jk/jk_util.c"../jk/jk_util.c", line 211: missing operand"../jk/jk_util.c", line 223: missing operand cc: acomp failed for ../jk/jk_util.c apxs:Break: Command failed with rc=131072 Do you have any ideas on this? Thanks a lot. Also, do you know if anybody has uses the same apache, tomcat and solaris versions and can make it work? Any help will be very much appreciated. = Best regards, Will. Declaration: My postings are not related to my employer in any sense. =
How to avoid messages spamming?
Hi listmates, when i use tomcat on linux/slackware, startup/shutdown and error messages appear on all consoles, even if I used >/dev/null everywhere in tomcat.sh :( how can redirect them to null or to a log file? Thanks in advance :) -- ~ Mario Libraro Progettazione & Sviluppo ~ Fulltrading S.p.A. amm.: 50121 Firenze - Viale Matteotti, 9 sede: 00153 Roma - Via Rosazza, 58 cell.: +39 338 9753 962 +39 347 5205 752 tel.: +39 066 573 170 fax: +39 066 573 529 email: [EMAIL PROTECTED] [EMAIL PROTECTED] web: www.fulltrading.it ~ "Grande disordine sotto il cielo... ...la situazione è ottima" Mao Tse-Tung
RE: Help !!
Thanks a lot!! -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Friday, June 15, 2001 9:59 AM To: [EMAIL PROTECTED]; Jovie Subject: Re: Help !! email [EMAIL PROTECTED] from your email address. On Fri, 15 Jun 2001 09:41, Jovie Castaneda wrote: > Where can I request for my unsubscription from this mailing list? > Thanks Content-Type: text/html; charset="iso-8859-1"; name="Attachment: 1" Content-Transfer-Encoding: quoted-printable Content-Description:
NT-Service-howto.html
Just a minor one, but it's been bugging me. Please change the "Advance Setup" heading to read "Advanced Setup". (It really changes the meaning significantly!) Stephen Oakes senior developer - [EMAIL PROTECTED] - a t o m i c m e d i a Leading Partners Online Level 1 / 216 City Road Southbank, Melbourne, Vic 3006 Australia. +61 3 9695 5777 phone +61 3 9695 5700 fax - www.atomicmedia.com -
Re: Help !!
email [EMAIL PROTECTED] from your email address. On Fri, 15 Jun 2001 09:41, Jovie Castaneda wrote: > Where can I request for my unsubscription from this mailing list? > Thanks Content-Type: text/html; charset="iso-8859-1"; name="Attachment: 1" Content-Transfer-Encoding: quoted-printable Content-Description:
Help !!
Where can I request for my unsubscription from this mailing list? Thanks
RE: memory allocation
um.. i'm pretty sure that it doesn't matter. the system garbage collector MAY reap memory for objects that are set to null. remember once the service method executes all the method variables ( al & it ) go out of scope and are elegible for gc. if you had static or class level members using <%! %> tags then they would not be gc until their references were nullafied. hope this helps. warren. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, 15 June 2001 5:09 AM To: [EMAIL PROTECTED] Subject: memory allocation hi all , i want to ask something about jsp pages sample jsp code = ** <%@ page import = "java.util.*" %> <%@ page import = "MyBean" %> <%@ page contentType="text/html;charset=ISO-8859-9" %> <% ArrayList al = new ArrayList(); mybean.showData(al); // we are going to fill ArrayList Iterator it = al.iterator(); while( it.hasNext() ) { %> <%=(String)it.next()%> <% } //while al = null ; // should i do this ? or is it going to be garbage collected by itself it = null ; // shoul i do this ? or is it going to be garbage collected by itself %> ** my_bean object will be garbage collected because it' scope is page but what about ArrayList and Iterator objects ? thanks Regards Altug
Re: How to avoid messages spamming?
tomcat.sh start > logfile 2>&1 Those messages and errors are going to standard error, not standard out. You also need to redirect standard error. Of course, syntax varies by shell so you may need to consult your shell's documentation. The above command works on bash and possibly others. Best Regards, Jason Koeninger J&J Computer Consulting http://www.jjcc.com On Thu, 14 Jun 2001 19:17:07 +0200, mario libraro wrote: >Hi listmates, > >when i use tomcat on linux/slackware, startup/shutdown and error >messages appear on all consoles, even if I used >/dev/null everywhere in >tomcat.sh :( how can redirect them to null or to a log file? > >Thanks in advance :) > > > >-- >~ >Mario Libraro >Progettazione & Sviluppo >~ >Fulltrading S.p.A. > >amm.: 50121 Firenze - Viale Matteotti, 9 >sede: 00153 Roma - Via Rosazza, 58 >cell.: +39 338 9753 962 > +39 347 5205 752 >tel.: +39 066 573 170 >fax: +39 066 573 529 >email: [EMAIL PROTECTED] > [EMAIL PROTECTED] >web: www.fulltrading.it >~ > >"Grande disordine sotto il cielo... >...la situazione ottima" > >Mao Tse-Tung
JSP and JINI
My apology for posting it twice. Did anyone got the mechanics to fuse JSP and JINI? If yes - please send some code and configuration files. No point to reinvent the wheel... R/L
Re: Order of libraries in CLASSPATH question?
Thanks everyone for your comments. They were very helpful. Brett
Re: How can I make tomcat to instantiate a class
This awfully good... - Original Message - From: "Bo Xu" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 5:15 PM Subject: Re: How can I make tomcat to instantiate a class > > ...But actually my problem was to instantiate a class when > > tomcat boots up...so that i can use that object across sessions.Can u > > suggest something towarsd this. > > [...] > > Hi :-) I find the following is from servlet-2_3-pfd2-spec.pdf(for > Servlet containers which supports Servlet spec2.3): > > * > ... > SRV.10.2.2 An Example of Listener Use > To illustrate a use of the event scheme, consider a simple web application > containing a number of servlets that make use of a database. The developer > has provided a serv-let context listener class for management of the database > connection. > 1. When the application starts up, the listener class is notified. The > application logs on to the database, and stores the connection in the > servlet context. > > 2. Servlets in the application access the connection as needed during > activity in the web application. > > 3. When the web server is shut down, or the application is removed from > the web server, the listener class is notified and the database connection is > closed. > ... > > > * and I think perhaps there is another way: >- make a "startupServlet", and in its "servlet-declaration" in > WEB-INF/web.xml, set the following: > 1 > now/so when TC is started, the "init" method of this "startupServlet" > will be invoked by container >- in the "init" method in this "startupServlet", a SingleTon pattern > "startupUtility" is instantiated: for example, by invoking a public static > "Factory method": > public void init(ServletConfig config) throws ServletException{ > super.init(config); > ... > startupUtility.makeInstance(); > ... > } > >- now after a while(instantiating time), a instance of startupUtility is > available > (for example, a DBConnectionpool) > > > Bo > June 14, 2001 > > >
Re: Graceful Shutdown
At 01:42 PM 6/14/2001, you wrote: >To avoid confusion - let's step thru \bin\tomcat.bat script: > > >bin\tomcat.bat stop Lemme ask you... what makes more sense; zero in on the the script right next to tomcat.bat that is titled "SHUTDOWN.BAT" and perhaps make a "wild" leap of faith, or run to this list to ask you how to "step through" a completely different script? I'm glad you have the time. Avoid confusion indeed. I guess the difference between me and the vast majority of neophytes who ask the most retarded questions on here is that I take two seconds to look around and get a little bit familiar with something before I use it.
running examples in Tomcat 4.0 b5
Hi there! I just installed Tomcat 4.0 b5 on linux and I just cannot run the examples included in the binary bundle... When I connect to http://localhost:8080/examples/jsp, I receive the following error message: HTTP Status 503 - This application is not currently available The requested service (This application is not currently available) is not currently available. The HTML content is served normally, but all JSPs and Servlets do not work... Anybody has an idea? MA
setting vars to null
I apologize but I earlier deleted the message that contained the message that one doesn't have to ever ever set local variables to null... Well, it is almost true. In the "for ever" loop (in servers) large arrays are referenced until method returns. When the method does not return - it might leak memory. Anyways, my apologies for adding to this non-tomcat and non-servlet thread.
Re: How can I make tomcat to instantiate a class
> ...But actually my problem was to instantiate a class when > tomcat boots up...so that i can use that object across sessions.Can u > suggest something towarsd this. > [...] Hi :-) I find the following is from servlet-2_3-pfd2-spec.pdf(for Servlet containers which supports Servlet spec2.3): * ... SRV.10.2.2 An Example of Listener Use To illustrate a use of the event scheme, consider a simple web application containing a number of servlets that make use of a database. The developer has provided a serv-let context listener class for management of the database connection. 1. When the application starts up, the listener class is notified. The application logs on to the database, and stores the connection in the servlet context. 2. Servlets in the application access the connection as needed during activity in the web application. 3. When the web server is shut down, or the application is removed from the web server, the listener class is notified and the database connection is closed. ... * and I think perhaps there is another way: - make a "startupServlet", and in its "servlet-declaration" in WEB-INF/web.xml, set the following: 1 now/so when TC is started, the "init" method of this "startupServlet" will be invoked by container - in the "init" method in this "startupServlet", a SingleTon pattern "startupUtility" is instantiated: for example, by invoking a public static "Factory method": public void init(ServletConfig config) throws ServletException{ super.init(config); ... startupUtility.makeInstance(); ... } - now after a while(instantiating time), a instance of startupUtility is available (for example, a DBConnectionpool) Bo June 14, 2001
Server Side Includes using tags in an .shtml file
Hello, I would like to know if Tomcat supports the use of tags in an shtml file for server side includes? Here's my shtml file: timezone! Example of Server-Side Includes This an places the date and time for various time zones dynamically in this .shtml file. The current time in London is: The CurrentTime class file compiles just fine. I think, Tomcat is not parsing the .shtml file. If that's true, what can I do. I have added a new AddType and AddHandler in the tomcat.conf file: AddType text/x-server-parsed-html .shtml AddHandler server-parsed html Options +Includes But that didn't seem to fix the problem. Any suggestions. As always, thank you in advance for your help. Sincerely, [EMAIL PROTECTED]
memory allocation
hi all , i want to ask something about jsp pages sample jsp code = ** <%@ page import = "java.util.*" %> <%@ page import = "MyBean" %> <%@ page contentType="text/html;charset=ISO-8859-9" %> <% ArrayList al = new ArrayList(); mybean.showData(al); // we are going to fill ArrayList Iterator it = al.iterator(); while( it.hasNext() ) { %> <%=(String)it.next()%> <% } //while al = null ; // should i do this ? or is it going to be garbage collected by itself it = null ; // shoul i do this ? or is it going to be garbage collected by itself %> ** my_bean object will be garbage collected because it' scope is page but what about ArrayList and Iterator objects ? thanks Regards Altug
Re: How can I make tomcat to instantiate a class
This is OK. But I surpose that the writer wanted to create session specific JavaBean. He probably wants to make it a plug-n-play object that servlet tends not to be. Further, to make it session specific - that is preserving session data integrity in the multi-threaded environment - he might want to do Class.newInstance() or deserialization for each unique session. Anyways, there are many ways to skin a cat. R/Luba - Original Message - From: "William Kaufman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 4:05 PM Subject: RE: How can I make tomcat to instantiate a class > Dunno about JSPs, but for servlets, add a element to your > servlet's web.xml file. Look at the servlet spec for more info. > > -- Bill K. > > -Original Message- > From: Debashis Ghosh [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 14, 2001 11:30 AM > To: [EMAIL PROTECTED] > Subject: Re: How can I make tomcat to instantiate a class > > > Hi Luba, > Thanks for this . But actually my problem was to instantiate a class when > tomcat boots up...so that i can use that object across sessions.Can u > suggest > something towarsd this. > Thanks > debashis > On Thursday 14 June 2001 08:18 am, you wrote: > > JSP will do it for you. Example: > > > > > > > > > > <%@ page language="java" %> > > <%@ page import="javabean.Counter" %> > > > > > > > > > > > > <% > > out.println("Count from scriplet = " + counter.getCount()); > > %> > > > > > > > > Count from jsp:getProperty= > > > > > > > > > > > > > > - Original Message - > > From: "Debashis Ghosh" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, June 13, 2001 9:57 PM > > Subject: How can I make tomcat to instantiate a class > > > > > Hi, > > > Can anyone suggest How can I make tomcat to instantiate a class so that > i > > > > can > > > > > access it from my > > > jsp or servlet as an application level variable.Basically i want to > > > instatiate one connection pool class so > > > that i can access it from my servlet to get an connection object out of > > > > it. > > > > > On Wednesday 13 June 2001 06:47 pm, you wrote: > > > > Below is good advice. If the login page does not > > > > come up (btw, what happens does it just take you > > > > direct to the protected resource?) the first place I would > > > > look is the tomcat config files. So basically I would > > > > double-check server.xml and the web-xml for your app. > > > > If you are sure they are correct and you still have a problem > > > > you might want to try posting the relevant sections to the list. > > > > > > > > If you do get JDBCRealm working with tomcat standalone then > > > > to integrate with apache you need to add > > > > > > > > JkMount /examples/jsp/security/login/j_security_check ajp13 > > > > (or ajp12 if using mod_jserv) to httpd.conf to tell apache > > > > to delegate the handling of this bit of magic to tomcat. > > > > > > > > andrew > > > > > > > > On Wed, 13 Jun 2001, you wrote: > > > > > > Mark, I appreciate your help. I have tried > > > > > > to adapt the examples and I believe I have everything > > > > > > in place. However, apache just wont bring the login > > > > > > form when I try to access a protected resource. > > > > > > Would you have any idea where to look at for this problem? > > > > > > > > > > You might want to check and see if you can get a > > > > > JDBCRealm to work with tomcat standalone(i.e. accessing > > > > > you site as http://localhost:8080/... directly). > > > > > If this doesn't work get this working first and > > > > > that's a good place to start from. Once you have > > > > > JDBCRealm working correctly then you can deal with > > > > > making sure it works when passed through apache. > > > > > > > > > > > > > > > --- > > > > > Michael Wentzel > > > > > Software Developer > > > > > Software As We Think - http://www.aswethink.com
Re: Graceful Shutdown
Correction. I guess it was obvious anyways. >bin\tomcat.bat stop if "%1" == "stop" goto stopServer .. :stopServer rem Stopping the Tomcat Server %_RUNJAVA% %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat -stop %2 %3 %4 %5 %6 %7 %8 %9 ... where org.apache.tomcat.startup.Tomcat is a program ... that actually executes shutdown or calls another java program goto cleanup . - Original Message - From: "Luba Powell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 4:42 PM Subject: Re: Graceful Shutdown > To avoid confusion - let's step thru \bin\tomcat.bat script: > > >bin\tomcat.bat stop > > if "%1" == "start" goto startServer > .. > :stopServer > rem Stopping the Tomcat Server > %_RUNJAVA% %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" > org.apache.tomcat.startup.Tomcat -stop %2 %3 %4 %5 %6 %7 %8 %9 > > ... where org.apache.tomcat.startup.Tomcat is a program > ... that actually executes shutdown or calls another java program > > goto cleanup > > . > > > > > > - Original Message - > From: "Randy Layman" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, June 14, 2001 2:41 PM > Subject: RE: Graceful Shutdown > > > > > > No, "tomcat stop" will stop tomcat - shudtown.sh/bat will call > > tomcat.sh/bat with the stop argument. > > > > net stop Tomcat is another way to stop it on NT IF you have > > installed it as a service. > > > > Randy > > > > > > > -Original Message- > > > From: Tim O'Neil [mailto:[EMAIL PROTECTED]] > > > Sent: Thursday, June 14, 2001 1:17 PM > > > To: [EMAIL PROTECTED] > > > Subject: RE: Graceful Shutdown > > > > > > > > > At 09:17 AM 6/14/2001, you wrote: > > > >"tomcat stop" in a new command window > > > > > > > > >Hi, > > > > >Does anyone know how to do a graceful shutdown in Tomcat-3.2 ? > > > > > > Shouldn't he be issuing a ./shutdown.sh in Unix and > > > "net stop Tomcat" (assuming he named the service > > > "Tomcat") in Windows? > > > > > > I don't think "tomcat stop" is going to accomplish anything. > > > > > > >
Re: Graceful Shutdown
To avoid confusion - let's step thru \bin\tomcat.bat script: >bin\tomcat.bat stop if "%1" == "start" goto startServer .. :stopServer rem Stopping the Tomcat Server %_RUNJAVA% %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat -stop %2 %3 %4 %5 %6 %7 %8 %9 ... where org.apache.tomcat.startup.Tomcat is a program ... that actually executes shutdown or calls another java program goto cleanup . - Original Message - From: "Randy Layman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 2:41 PM Subject: RE: Graceful Shutdown > > No, "tomcat stop" will stop tomcat - shudtown.sh/bat will call > tomcat.sh/bat with the stop argument. > > net stop Tomcat is another way to stop it on NT IF you have > installed it as a service. > > Randy > > > > -Original Message- > > From: Tim O'Neil [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, June 14, 2001 1:17 PM > > To: [EMAIL PROTECTED] > > Subject: RE: Graceful Shutdown > > > > > > At 09:17 AM 6/14/2001, you wrote: > > >"tomcat stop" in a new command window > > > > > > >Hi, > > > >Does anyone know how to do a graceful shutdown in Tomcat-3.2 ? > > > > Shouldn't he be issuing a ./shutdown.sh in Unix and > > "net stop Tomcat" (assuming he named the service > > "Tomcat") in Windows? > > > > I don't think "tomcat stop" is going to accomplish anything. > > > >
Re: where to put tag libraries
> If you put the jar under a WEB-INF/lib then it will be available only > to the web app to which that WEB-INF belong. yes - absolutely. I suppose it depends if you want each app to be depended on one thing, or allow them to vary independantly. so $TOMCAT_HOME/lib => means _everything_ in tomcat will have access to the classes. Note that I say classes - there's still a requirement to put the taglib.tld in the application context is there not? $TOMCAT_HOME/webapps/myContext/WEB-INF/lib => means that only things in myContext will have them. I suppose the latter seems to make more sense to me because you need to put the taglib.tld in each context... and that is directly bound to the taglibs... anyway, each to their own (o: thats what they do, use whichever fits your requirements best. cheers dim > > As far as I can tell, to share the jar with all the applications you should > put it under $TOMCAT_HOME/lib. > > The tld file itself seems to have to be somewere under the application's > directory (the parent of WEB-INF) since the in the > web.xml interprets it in relation to that root of the web app. > > See the JSP 1.1 spec sections 5.2.2 and 5.3.1 (and around). > > Cheers, > > --Amos > > -Original Message- > From: Peter Choe [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 14, 2001 5:04 PM > To: [EMAIL PROTECTED] > Subject: Re: where to put tag libraries > > so, something like: > $TOMCAT_HOME/WEB-INF/lib > or > $TOMCAT_HOME/webapps/foobar/WEB_INF/lib > > if i just put the class files in the $TOMCAT_HOME/lib, i just need to > alter the web.xml and put the taglibs in the > $TOMCAT_HOME/webapps/foobar/WEB-INF? > > each webapps needs to have the taglib.tld in its WEB-INF directory? > > peter choe > > Dmitri Colebatch wrote: > > > > Amos Shapira wrote: > > > The class files themself are just like any other library - under > > > Tomcat's lib or anywere in the standard JAva classpath. > > a more appropriate place might be considered to be WEB-INF/lib - that > > way they will not affect anything outside the context they are deployed > > for. > > > > cheers > > dim > > > > > > > > -Original Message- > > > From: Peter Choe [mailto:[EMAIL PROTECTED]] > > > Sent: Thursday, June 14, 2001 3:00 PM > > > To: [EMAIL PROTECTED] > > > Subject: where to put tag libraries > > > > > > where can i put a taglib jar file so that all the applications can use > > > it? > > > > > > peter choe
Re: Forward and Inclide
My understanding is that JSP:FORWARD is translated by into pageContext.forward(String url, String parm) So it is just a JSP specific implementation of javax.servlet.ServletContext interface that provides javax.servlet.RequestDispatcher where you can imlement forward(ServletRequest req, ServletResponse res) method. Additions, corrections?? - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 3:04 PM Subject: Forward and Inclide > Can anybody explain the difference between the RequestDispatcher's Forward > and Include methods in practical terms i.e. Why would you use on and not > the other? Or if you know of any on-line documentation that would be > helpful as well. I've read the Servlet documentation but cannot understand > how they are different. > > > Thanks > > Jeff Sulman >
RE: memory allocation
The only time you need to set a variable to null is when the variable itself sticks around (e.g., a class variable, or an instance variable on some object on a class variable). You never have to null out local variables. This is a general Java question, not a Tomcat question. If my answer didn't make sense, ask on news:comp.lang.java.programmer, or on a Java mailing list. -- Bill K. -Original Message- From: Luba Powell [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 14, 2001 12:11 PM To: [EMAIL PROTECTED] Subject: Re: memory allocation Not to worry. The only time that I know you need to set objects to null is when you write servers and inside you (while (true).. eternal loop. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 1:41 PM Subject: memory allocation hi all , i want to ask something about jsp pages sample jsp code = ** <%@ page import = "java.util.*" %> <%@ page import = "MyBean" %> <%@ page contentType="text/html;charset=ISO-8859-9" %> <% ArrayList al = new ArrayList(); mybean.showData(al); // we are going to fill ArrayList Iterator it = al.iterator(); while( it.hasNext() ) { %> <%=(String)it.next()%> <% } //while al = null ; // should i do this ? or is it going to be garbage collected by itself it = null ; // shoul i do this ? or is it going to be garbage collected by itself %> ** my_bean object will be garbage collected because it' scope is page but what about ArrayList and Iterator objects ? thanks Regards Altug B. Altintas
RE: Error: NET HELPMSG 3534
First, you probably want to use plain text message so that a higher percentage of users can read your message (not every one have HTML/RTF enabled email readers). Second, in general this means "I can't service and I don't know why" - you probably want to check that the path to JAVA_HOME is correct in your wrapper.properties file, as well as make sure that you haven't moved any of the files since you installed the service. Randy -Original Message- From: Oscar Mauricio Bonil Pava [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 14, 2001 3:05 PM To: '[EMAIL PROTECTED]' Subject: Error: NET HELPMSG 3534 Importance: High Hello, When beginning the jakarta service in a server NT the message he appears. The service did not report an error. More help is available by typing NET HELPMSG 3534. That it can be happening? Regard, Oscar Mauricio Bonil P.
Re: session object
Make sure you are still in the same session id. If the servlet and the jsp are in two different contexts then a new session is created and you loose your data. You may also need to set cross context to true but I'm not sure on that one. good luck > Sounds like a pilot error. Works fine: > > <% > session.setAttribute("request",request); > session.getAttribute("request"); > out.println("request: " + request); > %> > > Outputs: > request: org.apache.catalina.connector.HttpRequestFacade@649dcd > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, June 14, 2001 9:05 AM > Subject: session object > > > > Hi ! > > > > I don't understand why but when I put the request object in the session : > > > > session.setAttribute("request", request); > > > > and try to retrieve it later in another jsp page : > > > > request = (HttpServletRequest) session.getAttribute("request"); > > > > I constat that my request object is egal to null > > > > WHY ! > > > > > > Patrick PIERRA > >
Re: Does Tomcat support Server Side Includes
Under Tomcat4 they are in: \webapps\examples\jsp\ I surpose that under Tomcat3 there would be in the same directory but under ... - Original Message - From: "kevin ritter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 2:46 PM Subject: Re: Does Tomcat support Server Side Includes > Please excuse my inability to find these tomcat example JSPs. Could you tell > me where they are? > > Again thank you for your help. > > [EMAIL PROTECTED] > > - Original Message - > From: "Michael Jennings" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; "kevin ritter" > <[EMAIL PROTECTED]> > Sent: Thursday, June 14, 2001 12:13 PM > Subject: Re: Does Tomcat support Server Side Includes > > > > Tomcat is a JSP engine, and the JSP standard has an "include" directive. > > Check out the tomcat example JSPs, they show you the source code for > > a lot of simple JSP tricks. > > > > Hope this helps! > > -Mike > > > > - Original Message - > > From: "kevin ritter" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Thursday, June 14, 2001 9:25 AM > > Subject: Does Tomcat support Server Side Includes > > > > > > > Hi, I'm new to Tomcat and I'm not having any luck with implementing SSI > > with > > > respect to Tomcat. Can anyone tell me does Tomcat support SSI and if so > > can > > > you point me to existing documentation that describes how-to or provide > an > > > example. I have read the Tomcat User's Guide, but did not find any > > specific > > > information on SSI. > > > > > > Thank you in advance. > > > > > > Respectfully, > > > [EMAIL PROTECTED] > > > > > > > > > >
RE: How can I make tomcat to instantiate a class
Dunno about JSPs, but for servlets, add a element to your servlet's web.xml file. Look at the servlet spec for more info. -- Bill K. -Original Message- From: Debashis Ghosh [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 14, 2001 11:30 AM To: [EMAIL PROTECTED] Subject: Re: How can I make tomcat to instantiate a class Hi Luba, Thanks for this . But actually my problem was to instantiate a class when tomcat boots up...so that i can use that object across sessions.Can u suggest something towarsd this. Thanks debashis On Thursday 14 June 2001 08:18 am, you wrote: > JSP will do it for you. Example: > > > > > <%@ page language="java" %> > <%@ page import="javabean.Counter" %> > > > > > > <% > out.println("Count from scriplet = " + counter.getCount()); > %> > > > > Count from jsp:getProperty= > > > > > > > - Original Message - > From: "Debashis Ghosh" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, June 13, 2001 9:57 PM > Subject: How can I make tomcat to instantiate a class > > > Hi, > > Can anyone suggest How can I make tomcat to instantiate a class so that i > > can > > > access it from my > > jsp or servlet as an application level variable.Basically i want to > > instatiate one connection pool class so > > that i can access it from my servlet to get an connection object out of > > it. > > > On Wednesday 13 June 2001 06:47 pm, you wrote: > > > Below is good advice. If the login page does not > > > come up (btw, what happens does it just take you > > > direct to the protected resource?) the first place I would > > > look is the tomcat config files. So basically I would > > > double-check server.xml and the web-xml for your app. > > > If you are sure they are correct and you still have a problem > > > you might want to try posting the relevant sections to the list. > > > > > > If you do get JDBCRealm working with tomcat standalone then > > > to integrate with apache you need to add > > > > > > JkMount /examples/jsp/security/login/j_security_check ajp13 > > > (or ajp12 if using mod_jserv) to httpd.conf to tell apache > > > to delegate the handling of this bit of magic to tomcat. > > > > > > andrew > > > > > > On Wed, 13 Jun 2001, you wrote: > > > > > Mark, I appreciate your help. I have tried > > > > > to adapt the examples and I believe I have everything > > > > > in place. However, apache just wont bring the login > > > > > form when I try to access a protected resource. > > > > > Would you have any idea where to look at for this problem? > > > > > > > > You might want to check and see if you can get a > > > > JDBCRealm to work with tomcat standalone(i.e. accessing > > > > you site as http://localhost:8080/... directly). > > > > If this doesn't work get this working first and > > > > that's a good place to start from. Once you have > > > > JDBCRealm working correctly then you can deal with > > > > making sure it works when passed through apache. > > > > > > > > > > > > --- > > > > Michael Wentzel > > > > Software Developer > > > > Software As We Think - http://www.aswethink.com
Re: How can I make tomcat to instantiate a class
This is what I suggest you do: Create Gateway class (login class) that metes out Session objects to callers via getMySession() method. Inside this method I would deserialize the bean object from the file and added it as an attribute inside the session. It is a common technique for passing Connection and Thread Pool objects within the session. Or simple change scope to session: But I realize that programming with tags is very limited. Hope this helps. R/Luba - Original Message - From: "Debashis Ghosh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 2:29 PM Subject: Re: How can I make tomcat to instantiate a class > Hi Luba, > Thanks for this . But actually my problem was to instantiate a class when > tomcat boots up...so that i can use that object across sessions.Can u suggest > something towarsd this. > Thanks > debashis > On Thursday 14 June 2001 08:18 am, you wrote: > > JSP will do it for you. Example: > > > > > > > > > > <%@ page language="java" %> > > <%@ page import="javabean.Counter" %> > > > > > > > > > > > > <% > > out.println("Count from scriplet = " + counter.getCount()); > > %> > > > > > > > > Count from jsp:getProperty= > > > > > > > > > > > > > > - Original Message - > > From: "Debashis Ghosh" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, June 13, 2001 9:57 PM > > Subject: How can I make tomcat to instantiate a class > > > > > Hi, > > > Can anyone suggest How can I make tomcat to instantiate a class so that i > > > > can > > > > > access it from my > > > jsp or servlet as an application level variable.Basically i want to > > > instatiate one connection pool class so > > > that i can access it from my servlet to get an connection object out of > > > > it. > > > > > On Wednesday 13 June 2001 06:47 pm, you wrote: > > > > Below is good advice. If the login page does not > > > > come up (btw, what happens does it just take you > > > > direct to the protected resource?) the first place I would > > > > look is the tomcat config files. So basically I would > > > > double-check server.xml and the web-xml for your app. > > > > If you are sure they are correct and you still have a problem > > > > you might want to try posting the relevant sections to the list. > > > > > > > > If you do get JDBCRealm working with tomcat standalone then > > > > to integrate with apache you need to add > > > > > > > > JkMount /examples/jsp/security/login/j_security_check ajp13 > > > > (or ajp12 if using mod_jserv) to httpd.conf to tell apache > > > > to delegate the handling of this bit of magic to tomcat. > > > > > > > > andrew > > > > > > > > On Wed, 13 Jun 2001, you wrote: > > > > > > Mark, I appreciate your help. I have tried > > > > > > to adapt the examples and I believe I have everything > > > > > > in place. However, apache just wont bring the login > > > > > > form when I try to access a protected resource. > > > > > > Would you have any idea where to look at for this problem? > > > > > > > > > > You might want to check and see if you can get a > > > > > JDBCRealm to work with tomcat standalone(i.e. accessing > > > > > you site as http://localhost:8080/... directly). > > > > > If this doesn't work get this working first and > > > > > that's a good place to start from. Once you have > > > > > JDBCRealm working correctly then you can deal with > > > > > making sure it works when passed through apache. > > > > > > > > > > > > > > > --- > > > > > Michael Wentzel > > > > > Software Developer > > > > > Software As We Think - http://www.aswethink.com
RE: tomcat 3.2.2 source build missing /util/xml/PopStack.java ?
-Original Message- From: Andrew McGhee [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 14, 2001 12:54 PM To: [EMAIL PROTECTED] Subject: tomcat 3.2.2 source build missing /util/xml/PopStack.java ? We have just compiled tomcat 3.2.2 from both the tar.gz and .zip files, but on starting up the webserver, a class not found exception is being thrown (PopStack.class missing from webserver.jar file). The binary distribution of tomcat does actually have this within the webserver.jar file. Are we missing something from the tomcat 3.2.2 source distribution, or does something need to be added to it to add in this missing java file "PopStack.java"? Has anyone else come across this problem? (I've enclosed the startup output when firing up the newly built tomcat server) Thanks in advance to any help and assistance offer, Regards, Andrew Mc.Ghee [root@localhost bin]# ./startup.sh Using classpath: /usr/src/dist/tomcat//lib/ant.jar:/usr/src/dist/tomcat//lib/jasper.jar:/usr/ src/dist/tomcat//lib/servlet.jar:/usr/src/dist/tomcat//lib/test:/usr/src/dis t/tomcat//lib/webserver.jar:/usr/java/lib/tools.jar:.:/usr/java/lib/classes. zip:/usr/local/ant/lib/ant.jar:/usr/local/ant/lib/jaxp.jar:/usr/local/ant/li b/parser.jar:/usr/java/jre/lib/ext/jsse.jar:/usr/java/jre/lib/ext/jnet.jar:/ usr/java/jre/lib/ext/jcert.jar [root@localhost bin]# Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/util/xml/PopStack at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:178) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
RE: Graceful Shutdown
No, "tomcat stop" will stop tomcat - shudtown.sh/bat will call tomcat.sh/bat with the stop argument. net stop Tomcat is another way to stop it on NT IF you have installed it as a service. Randy > -Original Message- > From: Tim O'Neil [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 14, 2001 1:17 PM > To: [EMAIL PROTECTED] > Subject: RE: Graceful Shutdown > > > At 09:17 AM 6/14/2001, you wrote: > >"tomcat stop" in a new command window > > > > >Hi, > > >Does anyone know how to do a graceful shutdown in Tomcat-3.2 ? > > Shouldn't he be issuing a ./shutdown.sh in Unix and > "net stop Tomcat" (assuming he named the service > "Tomcat") in Windows? > > I don't think "tomcat stop" is going to accomplish anything. > >
Re: memory allocation
Not to worry. The only time that I know you need to set objects to null is when you write servers and inside you (while (true).. eternal loop. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 1:41 PM Subject: memory allocation hi all , i want to ask something about jsp pages sample jsp code = ** <%@ page import = "java.util.*" %> <%@ page import = "MyBean" %> <%@ page contentType="text/html;charset=ISO-8859-9" %> <% ArrayList al = new ArrayList(); mybean.showData(al); // we are going to fill ArrayList Iterator it = al.iterator(); while( it.hasNext() ) { %> <%=(String)it.next()%> <% } //while al = null ; // should i do this ? or is it going to be garbage collected by itself it = null ; // shoul i do this ? or is it going to be garbage collected by itself %> ** my_bean object will be garbage collected because it' scope is page but what about ArrayList and Iterator objects ? thanks Regards Altug B. Altıntas
Error: NET HELPMSG 3534
Title: Error: NET HELPMSG 3534 Hello, When beginning the jakarta service in a server NT the message he appears. The service did not report an error. More help is available by typing NET HELPMSG 3534. That it can be happening? Regard, Oscar Mauricio Bonil P.
RE: Where can I tune the Server-load ?
You can set the number of apache process in the httpd.conf file and the number of tomcat threads in the tomcat server.xml file. http://jakarta.apache.org/tomcat/tomcat-3.2-doc/uguide/tomcat_ug.html goto that link and search for Configuring the Thread Pool -James -Original Message-From: Francesco Marchioni [mailto:[EMAIL PROTECTED]]Sent: Thursday, June 14, 2001 12:11 PMTo: [EMAIL PROTECTED]Subject: Where can I tune the Server-load ? Hi tomcat-users, sorry for posting the question again but I'm stil looking for an answer :( I'd like to know where can I tune the number of Threads/Process that will start or peak...through Apache configuration or through Tomcat ? in other words, the configuration in Tomcat overrides the Apache httpd.conf ? or viceversa? Thanks Francesco
Forward and Inclide
Can anybody explain the difference between the RequestDispatcher's Forward and Include methods in practical terms i.e. Why would you use on and not the other? Or if you know of any on-line documentation that would be helpful as well. I've read the Servlet documentation but cannot understand how they are different. Thanks Jeff Sulman
HTTP1.? between APACHE and TOMCAT?
what's the protocol between apache and tomcat. I have a apache1.3.9 and a tomcat3.2.2 and a mod_jserv.so communication. when I test the RequestInformationExample (from the examples of tomcat) I have : from http://localhost/examples/servlets/RequestInformationExample (via apache): Protocol: HTTP/1.0 from http://localhost:8080/examples/servlets/RequestInformationExample (via tomcat) Protocol: HTTP/1.1 the fact is I have a servlet that take a bit time to respond and when I test it with tomcat: all is OK but when I test it with apache I only have the beginning of my HTML page. any suggestion??? __ Voila vous propose une boite aux lettres gratuite sur Voila Mail: http://mail.voila.fr
Re: Forwarding JSP and Browser Options
Popup windows are best left to JavaScript. I suppose one could create JavaScript code via out.println within <% tag , but too much work for nothing. R/L - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 1:07 PM Subject: Forwarding JSP and Browser Options > When forwarding a JSP you loose the ability to change the browser options > like removing statusbar, menubar, toolbar and locationbar as you do in the > JavaScript OPEN function. How can do this from either within my JSP page > or from the servlet forwarding the JSP? > > Thanks in advance > > Jeff Sulman > >
Re: Graceful Shutdown
tomcat stop should work fine if the tomcat.bat is working correctly. It just executes "org.apache.tomcat.startup.Tomcat -stop" program that hopefully does everything gracefully and then resets ENV variables - Original Message - From: "Tim O'Neil" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 1:16 PM Subject: RE: Graceful Shutdown > At 09:17 AM 6/14/2001, you wrote: > >"tomcat stop" in a new command window > > > > >Hi, > > >Does anyone know how to do a graceful shutdown in Tomcat-3.2 ? > > Shouldn't he be issuing a ./shutdown.sh in Unix and > "net stop Tomcat" (assuming he named the service > "Tomcat") in Windows? > > I don't think "tomcat stop" is going to accomplish anything. > > >
Re: Does Tomcat support Server Side Includes
Please excuse my inability to find these tomcat example JSPs. Could you tell me where they are? Again thank you for your help. [EMAIL PROTECTED] - Original Message - From: "Michael Jennings" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "kevin ritter" <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 12:13 PM Subject: Re: Does Tomcat support Server Side Includes > Tomcat is a JSP engine, and the JSP standard has an "include" directive. > Check out the tomcat example JSPs, they show you the source code for > a lot of simple JSP tricks. > > Hope this helps! > -Mike > > - Original Message - > From: "kevin ritter" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, June 14, 2001 9:25 AM > Subject: Does Tomcat support Server Side Includes > > > > Hi, I'm new to Tomcat and I'm not having any luck with implementing SSI > with > > respect to Tomcat. Can anyone tell me does Tomcat support SSI and if so > can > > you point me to existing documentation that describes how-to or provide an > > example. I have read the Tomcat User's Guide, but did not find any > specific > > information on SSI. > > > > Thank you in advance. > > > > Respectfully, > > [EMAIL PROTECTED] > > > > > >
RE: Graceful Shutdown
I use "tomcat stop" everyday on my Win2000 Pro. No probs. It works.. -Original Message- From: Tim O'Neil [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 14, 2001 1:17 PM To: [EMAIL PROTECTED] Subject: RE: Graceful Shutdown At 09:17 AM 6/14/2001, you wrote: >"tomcat stop" in a new command window > > >Hi, > >Does anyone know how to do a graceful shutdown in Tomcat-3.2 ? Shouldn't he be issuing a ./shutdown.sh in Unix and "net stop Tomcat" (assuming he named the service "Tomcat") in Windows? I don't think "tomcat stop" is going to accomplish anything.
Re: MultiThreadModel-Problem?
OK to use, but only in certain context: protected Map clientList = Collections.synchronizedMap( new HashMap()); Notice the reference to the static method... - Original Message - From: "Bo Xu" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 1:11 PM Subject: Re: MultiThreadModel-Problem? > Sebastian Schulz wrote: > > > [...] > > the second question is: data-container like HashMap or HashSet > > are considered to be not Thread-save. Can i use such containers > > in a MultiThreadModel-Servlet or must i use only slower structures > > like Vector? > > > > your help is realy needed, many thanks > > in advance! > > > > basti > > Hi :-) in a book: "Java Platform Performance" ISBN: 0-201-70969-4, > in about Page 126, there are disscussion and benchmark about the > following: > - Vector > - (mutable) Java 2 Collections > - immutable(unmodifiable) collection wrappers > > BTW, java.util.Collections also has "synchronized wrapper" > > > Bo > June 14, 2001 > > >
Re: Where can I tune the Server-load ?
\conf\server.xml For each connector: port="8080" minProcessors="5" maxProcessors="75" enableLookups="true" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="6"/>
RE: where to put tag libraries
No. I understand the original question was about making the taglibs available to all the web apps, not just one, right? If you put the jar under a WEB-INF/lib then it will be available only to the web app to which that WEB-INF belong. As far as I can tell, to share the jar with all the applications you should put it under $TOMCAT_HOME/lib. The tld file itself seems to have to be somewere under the application's directory (the parent of WEB-INF) since the in the web.xml interprets it in relation to that root of the web app. See the JSP 1.1 spec sections 5.2.2 and 5.3.1 (and around). Cheers, --Amos -Original Message- From: Peter Choe [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 14, 2001 5:04 PM To: [EMAIL PROTECTED] Subject: Re: where to put tag libraries so, something like: $TOMCAT_HOME/WEB-INF/lib or $TOMCAT_HOME/webapps/foobar/WEB_INF/lib if i just put the class files in the $TOMCAT_HOME/lib, i just need to alter the web.xml and put the taglibs in the $TOMCAT_HOME/webapps/foobar/WEB-INF? each webapps needs to have the taglib.tld in its WEB-INF directory? peter choe Dmitri Colebatch wrote: > > Amos Shapira wrote: > > The class files themself are just like any other library - under > > Tomcat's lib or anywere in the standard JAva classpath. > a more appropriate place might be considered to be WEB-INF/lib - that > way they will not affect anything outside the context they are deployed > for. > > cheers > dim > > > > > -Original Message- > > From: Peter Choe [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, June 14, 2001 3:00 PM > > To: [EMAIL PROTECTED] > > Subject: where to put tag libraries > > > > where can i put a taglib jar file so that all the applications can use > > it? > > > > peter choe
RE: Where can I tune the Server-load ?
well, Tomcat and Apache are two different programs, they don't override each others config files at all. if you want to tune Tomcat, you can set the number of threads that the different connectors (HTTP, AJP12, etc) are running. this is done in the server.xml file,. the tomcat user guide explains this in detail http://jakarta.apache.org/tomcat/tomcat-3.2-doc/uguide/tomcat_ug.html Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect [EMAIL PROTECTED] www.filip.net -Original Message- From: Francesco Marchioni [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 14, 2001 10:11 AM To: [EMAIL PROTECTED] Subject: Where can I tune the Server-load ? Hi tomcat-users, sorry for posting the question again but I'm stil looking for an answer :( I'd like to know where can I tune the number of Threads/Process that will start or peak...through Apache configuration or through Tomcat ? in other words, the configuration in Tomcat overrides the Apache httpd.conf ? or viceversa? Thanks Francesco
Re: How can I make tomcat to instantiate a class
Hi Luba, Thanks for this . But actually my problem was to instantiate a class when tomcat boots up...so that i can use that object across sessions.Can u suggest something towarsd this. Thanks debashis On Thursday 14 June 2001 08:18 am, you wrote: > JSP will do it for you. Example: > > > > > <%@ page language="java" %> > <%@ page import="javabean.Counter" %> > > > > > > <% > out.println("Count from scriplet = " + counter.getCount()); > %> > > > > Count from jsp:getProperty= > > > > > > > - Original Message - > From: "Debashis Ghosh" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, June 13, 2001 9:57 PM > Subject: How can I make tomcat to instantiate a class > > > Hi, > > Can anyone suggest How can I make tomcat to instantiate a class so that i > > can > > > access it from my > > jsp or servlet as an application level variable.Basically i want to > > instatiate one connection pool class so > > that i can access it from my servlet to get an connection object out of > > it. > > > On Wednesday 13 June 2001 06:47 pm, you wrote: > > > Below is good advice. If the login page does not > > > come up (btw, what happens does it just take you > > > direct to the protected resource?) the first place I would > > > look is the tomcat config files. So basically I would > > > double-check server.xml and the web-xml for your app. > > > If you are sure they are correct and you still have a problem > > > you might want to try posting the relevant sections to the list. > > > > > > If you do get JDBCRealm working with tomcat standalone then > > > to integrate with apache you need to add > > > > > > JkMount /examples/jsp/security/login/j_security_check ajp13 > > > (or ajp12 if using mod_jserv) to httpd.conf to tell apache > > > to delegate the handling of this bit of magic to tomcat. > > > > > > andrew > > > > > > On Wed, 13 Jun 2001, you wrote: > > > > > Mark, I appreciate your help. I have tried > > > > > to adapt the examples and I believe I have everything > > > > > in place. However, apache just wont bring the login > > > > > form when I try to access a protected resource. > > > > > Would you have any idea where to look at for this problem? > > > > > > > > You might want to check and see if you can get a > > > > JDBCRealm to work with tomcat standalone(i.e. accessing > > > > you site as http://localhost:8080/... directly). > > > > If this doesn't work get this working first and > > > > that's a good place to start from. Once you have > > > > JDBCRealm working correctly then you can deal with > > > > making sure it works when passed through apache. > > > > > > > > > > > > --- > > > > Michael Wentzel > > > > Software Developer > > > > Software As We Think - http://www.aswethink.com
tomcat 3.2.2 source build missing /util/xml/PopStack.java ?
We have just compiled tomcat 3.2.2 from both the tar.gz and .zip files, but on starting up the webserver, a class not found exception is being thrown (PopStack.class missing from webserver.jar file). The binary distribution of tomcat does actually have this within the webserver.jar file. Are we missing something from the tomcat 3.2.2 source distribution, or does something need to be added to it to add in this missing java file "PopStack.java"? Has anyone else come across this problem? (I've enclosed the startup output when firing up the newly built tomcat server) Thanks in advance to any help and assistance offer, Regards, Andrew Mc.Ghee [root@localhost bin]# ./startup.sh Using classpath: /usr/src/dist/tomcat//lib/ant.jar:/usr/src/dist/tomcat//lib/jasper.jar:/usr/ src/dist/tomcat//lib/servlet.jar:/usr/src/dist/tomcat//lib/test:/usr/src/dis t/tomcat//lib/webserver.jar:/usr/java/lib/tools.jar:.:/usr/java/lib/classes. zip:/usr/local/ant/lib/ant.jar:/usr/local/ant/lib/jaxp.jar:/usr/local/ant/li b/parser.jar:/usr/java/jre/lib/ext/jsse.jar:/usr/java/jre/lib/ext/jnet.jar:/ usr/java/jre/lib/ext/jcert.jar [root@localhost bin]# Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/util/xml/PopStack at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:178) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
Re: Bug or feature
Thank you Shahed, you were right. Zsolt Shahed A Moolji wrote: > > My only guess is that perhaps the servlet is loaded from > 2 separate contexts. > I remember having this problem earlier. > I was using the directive in server.xml > to point this web app to an apache virtual host. > At the same time, the auto-conf of server.xml would > also load this web application under a different context > with a seprate class loader, hence your static vars > dont seem to work. > > Just my guess. > Regards > Shahed > - Original Message - > From: "Zsolt Koppany" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, June 14, 2001 9:28 AM > Subject: Bug or feature > > > Hi, > > > > I want a servlet executed when tomcat is started, thus I made the > > following entries in web.xml > > > > > > startup > > cv.servlet.Startup > > > > 1 > > > > > > > > The strange thing is that the init method is always executed twice. I > > have already tried to fix it using static boolean variables to check > > whether this is the second execution, but the static variables seem to > > be always null. I know it sounds strange but this is true. The problem > > is that I have to create a ServerSocket and of course the second time I > > get a BindException. Now how can I figure out whether this is "my" > > socket or not. > > > > I use tomcat-3.2.2 under RedHat-7.1. > > > > Zsolt > > > > -- > > Zsolt Koppany > > Intland GmbH www.intland.com > > Schulze-Delitzsch-Strasse 16 > > D-70565 Stuttgart > > Tel: +49-711-7221873 Fax: +49-711-7871017 > > -- Zsolt Koppany Intland GmbH www.intland.com Schulze-Delitzsch-Strasse 16 D-70565 Stuttgart Tel: +49-711-7221873 Fax: +49-711-7871017
Re: MultiThreadModel-Problem?
No, nothing like that. It is a feature of JVM (and most operating systems). Class and instance variables can be accessed by other thread in the same JVM. Only local variables are not exposed. There are numerous ways to protect the integrity of class and instance data. However, if you are new to the multi-threaded environment you might want to use a single threaded servlet model first. Since this is not a tomcat question - please write to me directly and I can explain you further the cons and pros of each model. R/Luba - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 12:50 PM Subject: RE: MultiThreadModel-Problem? > I'm new to all this, but is this (HttpServlet not being thread safe) a > Tomcat problem, or just a general JSP problem, which will show up no matter > what server I use (weblogic, for instance)? > > -Original Message- > From: Luba Powell [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 14, 2001 8:20 AM > To: [EMAIL PROTECTED] > Subject: Re: MultiThreadModel-Problem? > > > HttpServlet is not thread safe. Synchronize your code where needed > > - Original Message - > From: "Sebastian Schulz" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, June 14, 2001 11:08 AM > Subject: MultiThreadModel-Problem? > > > > hi, > > > > i use a servlet in MultiThreadModel-mode (default). > > when 2 users at the same time makes the same request > > to the servlet (a operation that needs a bit) it seams, that > > only the request of the user who was perhaps a millisecond > > earlier is responded correct, the other seams to be ignored. > > > > (i think, this is perhaps a concurency-problem, but i do not use > > static variables and could not find an error) > > > > the second question is: data-container like HashMap or HashSet > > are considered to be not Thread-save. Can i use such containers > > in a MultiThreadModel-Servlet or must i use only slower structures > > like Vector? > > > > your help is realy needed, many thanks > > in advance! > > > > basti > >
Multiiple Tomcats connecting to a single database..... fails
Hi, Could y'all please guide me about your experience with using multiple tomcats, one apache and a single database. I had the whole set up working great with a database "each" for each of the tomcat instances on seperate machines but now with a single database connection to all the tomcats the whole set up fails :( Just a note, my set up presently consists of 1 Apache 2 Tomcats Ingres DB Jasmine ii App Server Can't think of a solution for now, since why should the server crash when the access to the database is controlled by the application server and NOT by Apache Web Server. It's been quite a while since I am trying to figure out a solution. Please help Thanks in advance, -Andy
Virtual servers and Tomcat
I have two IIS set up with two sites, one running in port 80, one in port 8103. Under both sites, I have a directory called /jsp/, with different content, and on port 8103, I have a directory called /test/ that does not exist on port 80. How do I set up the server.xml file to alias the two jsp directories correctly, and set it so that http://localhost:80/test is NOT displayed by Tomcat? If I got this straight, does this mean I have to run two instances of Tomcat at the same time, with two filters, one for each site? So, if I have 17 sites (each user gets a port), I need 17 Tomcat installations? 103 ports, 103 Tomcats? Anything easier? Silvio
memory allocation
hi all , i want to ask something about jsp pages sample jsp code = ** <%@ page import = "java.util.*" %> <%@ page import = "MyBean" %> <%@ page contentType="text/html;charset=ISO-8859-9" %> <% ArrayList al = new ArrayList(); mybean.showData(al); // we are going to fill ArrayList Iterator it = al.iterator(); while( it.hasNext() ) { %> <%=(String)it.next()%> <% } //while al = null ; // should i do this ? or is it going to be garbage collected by itself it = null ; // shoul i do this ? or is it going to be garbage collected by itself %> ** my_bean object will be garbage collected because it' scope is page but what about ArrayList and Iterator objects ? thanks Regards Altug B. Altıntas
RE: Problem with localhost:8080
If you dont want to use your dialup connection just use the option "Work offline" in the file menu of IE5 -Mensaje original- De: Casstevens, Brian [mailto:[EMAIL PROTECTED]] Enviado el: Jueves, 14 de Junio de 2001 09:50 a.m. Para: '[EMAIL PROTECTED]' Asunto: Problem with localhost:8080 I have installed Tomcat on a Windows 2000 machine. I have a dial-up connection to the Internet. I am able to run Tomcat, but when I open my browser (IE 5) and enter http://localhost:8080, I get a message that says, "This page is not available offline. Would you like to go online?'. Thanks, Brian _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
RE: Config: zip-files
It should work if you rename the file from blah.zip to blah.jar -Original Message- From: Roland Carlsson [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 14, 2001 5:16 AM To: [EMAIL PROTECTED] Subject: Re: Config: zip-files That didn't help. Tomcat still can't find the driver. I have tried to put the zip-files in the TOMCAT_HOME/lib to but that didn't work either. Aren't there anywhere in the config-files where I can add the zip-library to the classpath? Thanks in advance Roland - Original Message - From: "ADAM FOWLER" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 2:06 PM Subject: Re: Config: zip-files > JAVA_HOME/jre/lib > > Adam. > > At 13:51 14/06/2001 +0200, you wrote: > >Hi! > >I got a zip-library containing jdbc drivers. Where do I put this so it is > accesseble to the whole server? > > > >Thanks in advance > >Roland Carlsson > > > > > > > > Adam Fowler > Second year Computer Science undergraduate > University of Wales, Aberystwyth > e-mail: [EMAIL PROTECTED] > web: http://gucciboy.dyndns.org/aff9 > "Every new beginning comes from some > other beginning's end" > >
Forwarding JSP and Browser Options
When forwarding a JSP you loose the ability to change the browser options like removing statusbar, menubar, toolbar and locationbar as you do in the JavaScript OPEN function. How can do this from either within my JSP page or from the servlet forwarding the JSP? Thanks in advance Jeff Sulman
RE: Graceful Shutdown
At 09:17 AM 6/14/2001, you wrote: >"tomcat stop" in a new command window > > >Hi, > >Does anyone know how to do a graceful shutdown in Tomcat-3.2 ? Shouldn't he be issuing a ./shutdown.sh in Unix and "net stop Tomcat" (assuming he named the service "Tomcat") in Windows? I don't think "tomcat stop" is going to accomplish anything.
Re: MultiThreadModel-Problem?
Sebastian Schulz wrote: > [...] > the second question is: data-container like HashMap or HashSet > are considered to be not Thread-save. Can i use such containers > in a MultiThreadModel-Servlet or must i use only slower structures > like Vector? > > your help is realy needed, many thanks > in advance! > > basti Hi :-) in a book: "Java Platform Performance" ISBN: 0-201-70969-4, in about Page 126, there are disscussion and benchmark about the following: - Vector - (mutable) Java 2 Collections - immutable(unmodifiable) collection wrappers BTW, java.util.Collections also has "synchronized wrapper" Bo June 14, 2001
Re: Does Tomcat support Server Side Includes
Tomcat is a JSP engine, and the JSP standard has an "include" directive. Check out the tomcat example JSPs, they show you the source code for a lot of simple JSP tricks. Hope this helps! -Mike - Original Message - From: "kevin ritter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 9:25 AM Subject: Does Tomcat support Server Side Includes > Hi, I'm new to Tomcat and I'm not having any luck with implementing SSI with > respect to Tomcat. Can anyone tell me does Tomcat support SSI and if so can > you point me to existing documentation that describes how-to or provide an > example. I have read the Tomcat User's Guide, but did not find any specific > information on SSI. > > Thank you in advance. > > Respectfully, > [EMAIL PROTECTED] > > >
Where can I tune the Server-load ?
Hi tomcat-users, sorry for posting the question again but I'm stil looking for an answer :( I'd like to know where can I tune the number of Threads/Process that will start or peak...through Apache configuration or through Tomcat ? in other words, the configuration in Tomcat overrides the Apache httpd.conf ? or viceversa? Thanks Francesco
RE: MultiThreadModel-Problem?
I'm new to all this, but is this (HttpServlet not being thread safe) a Tomcat problem, or just a general JSP problem, which will show up no matter what server I use (weblogic, for instance)? -Original Message- From: Luba Powell [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 14, 2001 8:20 AM To: [EMAIL PROTECTED] Subject: Re: MultiThreadModel-Problem? HttpServlet is not thread safe. Synchronize your code where needed - Original Message - From: "Sebastian Schulz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 11:08 AM Subject: MultiThreadModel-Problem? > hi, > > i use a servlet in MultiThreadModel-mode (default). > when 2 users at the same time makes the same request > to the servlet (a operation that needs a bit) it seams, that > only the request of the user who was perhaps a millisecond > earlier is responded correct, the other seams to be ignored. > > (i think, this is perhaps a concurency-problem, but i do not use > static variables and could not find an error) > > the second question is: data-container like HashMap or HashSet > are considered to be not Thread-save. Can i use such containers > in a MultiThreadModel-Servlet or must i use only slower structures > like Vector? > > your help is realy needed, many thanks > in advance! > > basti >
file ownerships
hi! I'm running tomcat on linux. I want to start the server from a particular account (ie not root). It has been run as root, so there are a load of generates files that are owned by root and can't be over written by another user. Is it safe to /chown -R tomcat.tomcat/ the whole directory, or will this break things? ta Rob (favouring heavy blunt instruments :)
RE: Tomcat 4.0: Can webapps dir contain links?
Thanks for the interest. I am setting up a separate context for each student. The problem is that Tomcat doesn't want to follow the soft link (Solaris) to the student's directory. Bob At 10:58 AM 6/13/2001 -0400, you wrote: >Why can't you set up a separate context for each student? In server.xml, >you could set the doc base in each context to the appropriate student's >directory. > >-Original Message- >From: Robert Evans [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, June 13, 2001 10:28 AM >To: [EMAIL PROTECTED] >Subject: Tomcat 4.0: Can webapps dir contain links? > > >Greetings, > >I am trying to set up a Tomcat server to be used for some web development >classes. I would like to have each student have there own webapp, so that >in the webapp dir there would be a link to their public_html directory. In >Tomcat4B5, it seems as though tomcat will not follow a soft link to the >students home directory. If I make a new directory in webapps, it works >fine, but the link gives me a 403 application not available message. > >If anyone has set up a system like this, I would greatly appreciate their >help > >Bob Evans >Johns Hopkins University
Does Tomcat support Server Side Includes
Hi, I'm new to Tomcat and I'm not having any luck with implementing SSI with respect to Tomcat. Can anyone tell me does Tomcat support SSI and if so can you point me to existing documentation that describes how-to or provide an example. I have read the Tomcat User's Guide, but did not find any specific information on SSI. Thank you in advance. Respectfully, [EMAIL PROTECTED]
Apache 1.3.20 + tomcat 4.0b5 Configuration problem
Hello dear all ! I try to link apache and tomcat together. I start tomcat and configure the httpd.conf file to add tomcat connector: #tomcat with apache LoadModule webapp_module modules/mod_webapp.dll WebAppConnection MyConnection warp localhost:8080 WebAppDeploy try MyConnection /try/ I have the following error when starting apache: "Invalid virtual host name" --- WebAppDeploy [application name] [connection name] [URL path] host name= application name ??? under tomcat I have the try project under webapps/try/ Can anybody find the real problem? Is that a naming problem?? Thank you for your help! Arnaud.
RE: Graceful Shutdown
"tomcat stop" in a new command window -Original Message- From: Shai Deljo [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 14, 2001 4:53 AM To: '[EMAIL PROTECTED]' Subject: Graceful Shutdown Hi, Does anyone know how to do a graceful shutdown in Tomcat-3.2 ? 10x Shai
RE: Order of libraries in CLASSPATH question?
> -Original Message- > From: Brett G. Palmer [mailto:[EMAIL PROTECTED]] > > We are having random problems with some of our application > libraries when we > deploy them in their separate contexts. The question I have > is what is the > default behavior for Tomcat to load class libraries into its > CLASSPATH. Do > libraries from the $TOMCAT_HOME/lib directory get added to > the CLASSPATH > before libraries for a particular web application (e.g. > webapps/someapp/WEB-INF/lib/*) or viceversa. > I believe that the order is: "system classes" including installed extensions. .zips/.jars in $TOMCAT_HOME/lib WEB-INF/classes WEB-INF/lib/*.jar > I have also seen problems where my web application can't find > a particular > library when it is added to the "webapps/someapp/WEB-INF/lib" > but it can > find it when it is added to the $TOMCAT_HOME/lib directory. > This particular > problem occurred when I tried to use Oracle's jdbc drivers (i.e. > classes12.zip). I would get class not found errors when the > classes12.zip > file was located in the WEB-INF/lib directory, but the errors > went away when > I used the $TOMCAT_HOME/lib directory. > if they were still named *.zip, the classloader ignores them. We just have Ant rename them to *.jar before deploying to webapps//WEB-INF/lib, and they work fine. > What is the recommended place for putting class libraries in > the classpath > for Tomcat? Any suggestions would be greatly appreciated. If there is any chance that the Tomcat installation will be hosting more than one webapp, I strongly suggest that you put the libraries for each webapp in its own WEB-INF/lib. Clashing jars do not make pretty sounds. > > Thanks in advance, > > > Brett > > George McKinney, Developer Tantalus Communications Inc. 500-1122 Mainland Street Vancouver, BC, Canada V6B 5L1 [EMAIL PROTECTED] Direct 604.726.6753 Main604.609.0700 Fax 604.609.0705 "The Oracle Experts" www.tantalus.com
Configuration Question
I have tomcat-apache up and running with several virtual hosts. Most of these vhosts all use one group of java files that are located in the tomcat_home/classes path. However, there are some vhosts I want to set up that are going to need their own web applications and class files, but will also need to use some of the default ones that I have in tomcat_home/classes directory. Where can I look to best find this type of configuration, or has anyone done anything like this already? Brandon
RE: MultiThreadModel-Problem?
> -Original Message- > From: Sebastian Schulz [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 14, 2001 11:09 AM > To: [EMAIL PROTECTED] > Subject: MultiThreadModel-Problem? > > > hi, > > i use a servlet in MultiThreadModel-mode (default). > when 2 users at the same time makes the same request > to the servlet (a operation that needs a bit) it seams, that > only the request of the user who was perhaps a millisecond > earlier is responded correct, the other seams to be ignored. > > (i think, this is perhaps a concurency-problem, but i do not use > static variables and could not find an error) I would check on access to synchronized objects/methods and resource access (sockets, files, etc) to make sure that one isn't being blocked by the other. > > the second question is: data-container like HashMap or HashSet > are considered to be not Thread-save. Can i use such containers > in a MultiThreadModel-Servlet or must i use only slower structures > like Vector? It depends upon how you use them - if you use a single structure for each request (i.e. you have one Map that is passed between methods and not shared with other threads) then you are fine. If you need to use them from multiple requests, then you need to use a synchronized structure if you want to avoid strange bugs later. There are methods on the java.util.Collections class to make particular types of collections synchronized. I don't know if these are faster then their cousins (Vector, Hashtable, etc), but you might want to check them out. > > your help is realy needed, many thanks > in advance! > > basti > Randy
RE: Tomcat config problem??
14/06/2001 15:28:44, Robert Slifka <[EMAIL PROTECTED]> wrote: Cheers, Tried that, exactly the same problem. Only jars in classpath are the original ones installed in \lib and C:\jdk1.3\tools.jar Seems like there's a change in the API structure, hence the NoSuchMethod error?? Any ideas gladly accepted >Maybe blank your classpath before starting 3.2.2? You didn't add any .jarS >to the new $TOMCAT_HOME/lib, did you? > >- r > >> -Original Message- >> From: Peter Cave [mailto:[EMAIL PROTECTED]] >> Sent: June 14, 2001 10:04 AM >> To: [EMAIL PROTECTED] >> Subject: Tomcat config problem?? >> >> >> Hi, >> >> Attempting to move to tomcat 3.2.2 (dated 28/5/2001) from 3.1 (working >> out-of-process with apache 1.3) on win2K, using the same webapps setup >> as before, but I keep getting an exception thrown when I try >> and compile >> any jsp page (including the samples - servlets work fine). >> I've checked >> that there's only one version of jasper.jar anywhere on the classpath, >> tomcat initialises OK and all contexts are set up correctly >> for the new >> setup. Below is a print of the stacktrace given when I try and execute >> the numguess jsp example: >> >> Can anyone shed light on the cause of this, and say what to >> do to remedy >> the situation? >> >> Cheers, >> Peter >> >> >> Error: 500 >> Location: /examples/jsp/num/numguess.jsp >> Internal Servlet Error: >> >> javax.servlet.ServletException >> at >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) >> at >> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper >> .java:405) >> at org.apache.tomcat.core.Handler.service(Handler.java:287) >> at >> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) >> at >> org.apache.tomcat.core.ContextManager.internalService(ContextM >> anager.java:797) >> at >> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) >> at >> org.apache.tomcat.service.http.HttpConnectionHandler.processCo >> nnection(HttpConnectionHandler.java:213) >> at >> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin >> t.java:416) >> at >> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo >> ol.java:501) >> at java.lang.Thread.run(Thread.java:484) >> >> Root cause: >> java.lang.NoSuchMethodError >> at >> org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:209) >> at >> jsp.num._0002fjsp_0002fnum_0002fnumguess_0002ejspnumguess_jsp_ >> 0._jspService(_0002fjsp_0002fnum_0002fnumguess_0002ejspnumgues >> s_jsp_0.java:150) >> at >> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) >> at >> org.apache.jasper.servlet.JspServlet$JspCountedServlet.service >> (JspServlet.java:130) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) >> at >> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service >> (JspServlet.java:282) >> at >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet >> .java:429) >> at >> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) >> at >> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper >> .java:405) >> at org.apache.tomcat.core.Handler.service(Handler.java:287) >> at >> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) >> at >> org.apache.tomcat.core.ContextManager.internalService(ContextM >> anager.java:797) >> at >> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) >> at >> org.apache.tomcat.service.http.HttpConnectionHandler.processCo >> nnection(HttpConnectionHandler.java:213) >> at >> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin >> t.java:416) >> at >> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo >> ol.java:501) >> at java.lang.Thread.run(Thread.java:484) >> >
RE: Order of libraries in CLASSPATH question?
See comments intermixed... > -Original Message- > From: Brett G. Palmer [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 14, 2001 11:08 AM > To: [EMAIL PROTECTED] > Subject: Order of libraries in CLASSPATH question? > > > We are having random problems with some of our application > libraries when we > deploy them in their separate contexts. The question I have > is what is the > default behavior for Tomcat to load class libraries into its > CLASSPATH. Do > libraries from the $TOMCAT_HOME/lib directory get added to > the CLASSPATH > before libraries for a particular web application (e.g. > webapps/someapp/WEB-INF/lib/*) or viceversa. If you look in your %TOMCAT_HOME%/logs/jasper.log file, it will show you the classpath it is using for each request. In general the effective classpath for a webapp will be: WEB-INF/classes/ WEB-INF/lib/*.jar (in aplpabetical order I believe) %TOMCAT_HOME%/classes (only if using Unix's tomcat.sh) %TOMCAT_HOME%/lib/*.jar (in alphabetical order, only if using Windows's tomcat.bat) %TOMCAT_HOME%/lib/* (in alphabetical order, only if using Unix's tomcat.sh) System Classpath (in orginial order) Remember that the classpath is searched from first to last. > > I have also seen problems where my web application can't find > a particular > library when it is added to the "webapps/someapp/WEB-INF/lib" > but it can > find it when it is added to the $TOMCAT_HOME/lib directory. > This particular > problem occurred when I tried to use Oracle's jdbc drivers (i.e. > classes12.zip). I would get class not found errors when the > classes12.zip > file was located in the WEB-INF/lib directory, but the errors > went away when > I used the $TOMCAT_HOME/lib directory. The automatic loading for the WEB-INF/lib directory only includes .jar files - its implied from the Spec that other behavior is non-compliant. The tomcat/lib directory depends on your startup script > > What is the recommended place for putting class libraries in > the classpath > for Tomcat? Any suggestions would be greatly appreciated. You shouldn't edit your classpath for Tomcat - you should put your classes into the WEB-INF{/lib/*.jar|/classes/} (preferred) or %TOMCAT_HOME%/lib. Many people will argue that if the classes are common across webapps then you should use the second one, but I would caution against this as it makes it hard to upgrade one webapp at a time to new versions of libraries. > > Thanks in advance, > > > Brett > Randy
RE: MultiThreadModel-Problem?
It isn't just 'static' variables that you have to be careful of, normal instance variables should be avoided too. You see, one instance of a servlet may service many many people (often there is only ever one instance of a particular servlet!). If you are sharing any data structure between threads, then you have to protect them with synchronized blocks. That means that you could use HashMap, even if it is being shared but you will have to make sure that only one thread ever tries to access it at any time.. -ie by gaining a lock on the HashMap itself. I hope that helps, but with out seeing code I cann't be much more exact. - Chris. Brainbench MVP Java2. > -Original Message- > From: Sebastian Schulz [mailto:[EMAIL PROTECTED]] > Sent: 14 June 2001 16:09 > To: [EMAIL PROTECTED] > Subject: MultiThreadModel-Problem? > > > hi, > > i use a servlet in MultiThreadModel-mode (default). > when 2 users at the same time makes the same request > to the servlet (a operation that needs a bit) it seams, that > only the request of the user who was perhaps a millisecond > earlier is responded correct, the other seams to be ignored. > > (i think, this is perhaps a concurency-problem, but i do not use > static variables and could not find an error) > > the second question is: data-container like HashMap or HashSet > are considered to be not Thread-save. Can i use such containers > in a MultiThreadModel-Servlet or must i use only slower structures > like Vector? > > your help is realy needed, many thanks > in advance! > > basti > -- NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected.
Problem with localhost:8080
I have installed Tomcat on a Windows 2000 machine. I have a dial-up connection to the Internet. I am able to run Tomcat, but when I open my browser (IE 5) and enter http://localhost:8080, I get a message that says, "This page is not available offline. Would you like to go online?'. Thanks, Brian
Re: Using JSP to Save file
In fact, Mr. Hao's code works perfectly. The file "economic.txt" is just located under your \bin. KC --- Luba Powell <[EMAIL PROTECTED]> wrote: > Here is the example that works: > > > > > > <%@ page import="java.util.*, java.io.*" %> > > <% > Properties props = (Properties) > application.getAttribute("PROPERTIES"); > > if (props == null) > { > props = new Properties(); > props.load(new > FileInputStream("c:/tomcat4/webapps/myapp/application/props.txt")); > application.setAttribute("PROPERTIES", props); > out.println("Property file is loaded"); > } > else > { > Enumeration enum = props.propertyNames(); > while (enum.hasMoreElements()) > { >String name = (String) enum.nextElement(); >out.println ( "name: " + props.getProperty(name) > + " value: " + props.getProperty(name) + > "" > ); > } > } > > %> > > > > > > > - Original Message - > From: "Foo Shi Hao" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, June 14, 2001 8:45 AM > Subject: Using JSP to Save file > > > > Hey all~! > > Got something to ask. I'm running a simple jsp > page as shown below. It has > no errors but the file is not being > written/created...any ideas? > > > > <%@ page import="java.io.*"%> > > > > File Saver > > > > <% > > PrintWriter textFile = null; > > try > > { > > textFile = new PrintWriter(new > > FileOutputStream("economic.txt")); > > } > > catch(IOException e) > > { > > System.out.println("File I/O Error."); > > } > > textFile.println("Testing Phase"); > > textFile.close(); > > %> > > > > > > -- > > > > Get your free email from www.doramail.com with 30 > Megs of disk space in > webhosting and e-mail storage! > > > > > > > > > > > > Powered by Outblaze > __ Do You Yahoo!? Spot the hottest trends in music, movies, and more. http://buzz.yahoo.com/
Re: Bug or feature
Stupid question on my part, but you certainly called super.init(config)? - Original Message - From: "Zsolt Koppany" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 10:28 AM Subject: Bug or feature > Hi, > > I want a servlet executed when tomcat is started, thus I made the > following entries in web.xml > > > startup > cv.servlet.Startup > > 1 > > > > The strange thing is that the init method is always executed twice. I > have already tried to fix it using static boolean variables to check > whether this is the second execution, but the static variables seem to > be always null. I know it sounds strange but this is true. The problem > is that I have to create a ServerSocket and of course the second time I > get a BindException. Now how can I figure out whether this is "my" > socket or not. > > I use tomcat-3.2.2 under RedHat-7.1. > > Zsolt > > -- > Zsolt Koppany > Intland GmbH www.intland.com > Schulze-Delitzsch-Strasse 16 > D-70565 Stuttgart > Tel: +49-711-7221873 Fax: +49-711-7871017
Re: MultiThreadModel-Problem?
HttpServlet is not thread safe. Synchronize your code where needed - Original Message - From: "Sebastian Schulz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 11:08 AM Subject: MultiThreadModel-Problem? > hi, > > i use a servlet in MultiThreadModel-mode (default). > when 2 users at the same time makes the same request > to the servlet (a operation that needs a bit) it seams, that > only the request of the user who was perhaps a millisecond > earlier is responded correct, the other seams to be ignored. > > (i think, this is perhaps a concurency-problem, but i do not use > static variables and could not find an error) > > the second question is: data-container like HashMap or HashSet > are considered to be not Thread-save. Can i use such containers > in a MultiThreadModel-Servlet or must i use only slower structures > like Vector? > > your help is realy needed, many thanks > in advance! > > basti >
Re: How can I make tomcat to instantiate a class
JSP will do it for you. Example: <%@ page language="java" %> <%@ page import="javabean.Counter" %> <% out.println("Count from scriplet = " + counter.getCount()); %> Count from jsp:getProperty= - Original Message - From: "Debashis Ghosh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 13, 2001 9:57 PM Subject: How can I make tomcat to instantiate a class > Hi, > Can anyone suggest How can I make tomcat to instantiate a class so that i can > access it from my > jsp or servlet as an application level variable.Basically i want to > instatiate one connection pool class so > that i can access it from my servlet to get an connection object out of it. > > On Wednesday 13 June 2001 06:47 pm, you wrote: > > Below is good advice. If the login page does not > > come up (btw, what happens does it just take you > > direct to the protected resource?) the first place I would > > look is the tomcat config files. So basically I would > > double-check server.xml and the web-xml for your app. > > If you are sure they are correct and you still have a problem > > you might want to try posting the relevant sections to the list. > > > > If you do get JDBCRealm working with tomcat standalone then > > to integrate with apache you need to add > > > > JkMount /examples/jsp/security/login/j_security_check ajp13 > > (or ajp12 if using mod_jserv) to httpd.conf to tell apache > > to delegate the handling of this bit of magic to tomcat. > > > > andrew > > > > On Wed, 13 Jun 2001, you wrote: > > > > Mark, I appreciate your help. I have tried > > > > to adapt the examples and I believe I have everything > > > > in place. However, apache just wont bring the login > > > > form when I try to access a protected resource. > > > > Would you have any idea where to look at for this problem? > > > > > > You might want to check and see if you can get a > > > JDBCRealm to work with tomcat standalone(i.e. accessing > > > you site as http://localhost:8080/... directly). > > > If this doesn't work get this working first and > > > that's a good place to start from. Once you have > > > JDBCRealm working correctly then you can deal with > > > making sure it works when passed through apache. > > > > > > > > > --- > > > Michael Wentzel > > > Software Developer > > > Software As We Think - http://www.aswethink.com
Re: installation of tomcat on windows 98
From: \bin type: tomcat start - Original Message - From: Prasad Medepalli To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, June 13, 2001 11:02 PM Subject: installation of tomcat on windows 98 Hi, I downloaded JDK 1.3 and tomcat 3.2 on my c drive. How do I make tomcat run. What are the changes I need to make in my autoexe bat for windows 98 and in configuration files. I am rearry stuck and want to move forward. I hope someone could help me with the list to go about. sorry I am new and a student thanks
JSP/Jini
Any suggestions on the best way to hook JSP and Jini? Thanks.
Re: Problem with localhost:8080
Just click "yes go online" or whatever the exact wording is. When you connect to http://localhost you are actually going online, even thought the server you are connecting to is on the local machine - Original Message - From: Casstevens, Brian To: '[EMAIL PROTECTED]' Sent: Thursday, June 14, 2001 9:49 AM Subject: Problem with localhost:8080 I have installed Tomcat on a Windows 2000 machine. I have a dial-up connection to the Internet. I am able to run Tomcat, but when I open my browser (IE 5) and enter http://localhost:8080, I get a message that says, "This page is not available offline. Would you like to go online?'. Thanks, Brian
RE: Tomcat as Service Crashing.
Hi Rauh, I am having the same problem. Let me know if you get any positive replies. Thanks. Good Luck, -Andy -Original Message- From: Christian Rauh [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 13, 2001 2:45 PM To: Tomcat User Discussion List Subject: Tomcat as Service Crashing. Dear People, I have set up Tomcat to work as a service in Win2000. Everything works fine but it crashes after some time up. What I am getting on the stderr is the following: ContextManager: SocketException reading request, ignored - java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read at java.net.SocketInputStream.socketRead(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:86) at java.io.BufferedInputStream.fill(BufferedInputStream.java:186) at java.io.BufferedInputStream.read(BufferedInputStream.java:204) at org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestAdapter.java:115) at org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServletInputStream.java:106) at org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServletInputStream.java:128) at javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138) at org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(HttpRequestAdapter.java:129) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:195) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Any ideas on what is causing this? Yours, Christian Rauh
jakarta_nt_service and Class Not Found
Hey, I have found that the wrapper.properties file included with TC3.3m3 specifies what I think is the wrong startup class. what is specified is wrapper.startup_class=org.apache.tomcat.startup.Tomcat This will only work if you specify all the jars lib/apps lib/common and lib/container as wrapper.class_path properties. In order to make TC work like it does from the startup scripts I needed to change the startup class to be: wrapper.startup_class=org.apache.tomcat.startup.Main HTH *** Brett Knights 250-338-3509 work [EMAIL PROTECTED] 250-334-8309 home ***
Re: Using JSP to save file
In fact, your code works. Indeed, the file "economic.txt" is located under "\bin" KC "Foo Shi Hao" <[EMAIL PROTECTED]> | Block Address | Add to Address Book To: [EMAIL PROTECTED] Date: Thu, 14 Jun 2001 20:45:05 +0800 Subject: Using JSP to Save file Hey all~! Got something to ask. I'm running a simple jsp page as shown below. It has no errors but the file is not being written/created...any ideas? <%@ page import="java.io.*"%> File Saver <% PrintWriter textFile = null; try { textFile = new PrintWriter(new FileOutputStream("economic.txt")); } catch(IOException e) { System.out.println("File I/O Error."); } textFile.println("Testing Phase"); textFile.close(); %> -- Get your free email from www.doramail.com with 30 Megs of disk space in webhosting and e-mail storage! __ Do You Yahoo!? Spot the hottest trends in music, movies, and more. http://buzz.yahoo.com/
Re: Using JSP to Save file
Sorry - send you the wrong example. replacd file name with the complete path. Don't forget to flush. - Original Message - From: "Foo Shi Hao" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 8:45 AM Subject: Using JSP to Save file > Hey all~! > Got something to ask. I'm running a simple jsp page as shown below. It has no errors but the file is not being written/created...any ideas? > > <%@ page import="java.io.*"%> > > File Saver > > <% > PrintWriter textFile = null; > try > { > textFile = new PrintWriter(new > FileOutputStream("economic.txt")); > } > catch(IOException e) > { > System.out.println("File I/O Error."); > } > textFile.println("Testing Phase"); > textFile.close(); > %> > > > -- > > Get your free email from www.doramail.com with 30 Megs of disk space in webhosting and e-mail storage! > > > > > > Powered by Outblaze
Tomcat 3.2.2 Install problems
Hello Everyone, Before I begin, I would just like to say that I am a newbie when it comes to the Apache webserver, Tomcat, Java, JSP and to some respects Linux. I am trying to get a good clean grasp as to what I have to have installed and working in order to use JSP and Servlets. I am running Mandrake 8.0, Apache-AdvancedExtranetServer/1.3.19 mod_ssl/2.8.2 OpenSSL/0.9.6 PHP/4.0.4pl1. I downloaded... J2SDK1.3.1 Tomcat 3.2.2 Java servlet (was in the same directory where I downloaded Tomcat from, I assumed I needed it as well.) JRE (Can't quite get it to run with Mozilla) It was my understanding that the JavaSDK needed to be installed as well. So I downloaded it and installed it. I set it up so that all users could execute Java. I modified my path in /etc/profile so all users have access. However, when I log in as root, the path to the Java directory is not there. What have I missed? Also, I have installed Tomcat 3.2.2 and when I try to start it, it fails because I try to start it as root and since the Java dir is not in the path it cannot start. How can I fix this? Is there a good HOW-TO out there that I somehow missed? Thanks in advance. John Brosan JSP programmer in Training.
Re: Using JSP to Save file
Here is the example that works: <%@ page import="java.util.*, java.io.*" %> <% Properties props = (Properties) application.getAttribute("PROPERTIES"); if (props == null) { props = new Properties(); props.load(new FileInputStream("c:/tomcat4/webapps/myapp/application/props.txt")); application.setAttribute("PROPERTIES", props); out.println("Property file is loaded"); } else { Enumeration enum = props.propertyNames(); while (enum.hasMoreElements()) { String name = (String) enum.nextElement(); out.println ( "name: " + props.getProperty(name) + " value: " + props.getProperty(name) + "" ); } } %> - Original Message - From: "Foo Shi Hao" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 8:45 AM Subject: Using JSP to Save file > Hey all~! > Got something to ask. I'm running a simple jsp page as shown below. It has no errors but the file is not being written/created...any ideas? > > <%@ page import="java.io.*"%> > > File Saver > > <% > PrintWriter textFile = null; > try > { > textFile = new PrintWriter(new > FileOutputStream("economic.txt")); > } > catch(IOException e) > { > System.out.println("File I/O Error."); > } > textFile.println("Testing Phase"); > textFile.close(); > %> > > > -- > > Get your free email from www.doramail.com with 30 Megs of disk space in webhosting and e-mail storage! > > > > > > Powered by Outblaze
MultiThreadModel-Problem?
hi, i use a servlet in MultiThreadModel-mode (default). when 2 users at the same time makes the same request to the servlet (a operation that needs a bit) it seams, that only the request of the user who was perhaps a millisecond earlier is responded correct, the other seams to be ignored. (i think, this is perhaps a concurency-problem, but i do not use static variables and could not find an error) the second question is: data-container like HashMap or HashSet are considered to be not Thread-save. Can i use such containers in a MultiThreadModel-Servlet or must i use only slower structures like Vector? your help is realy needed, many thanks in advance! basti
Order of libraries in CLASSPATH question?
We are having random problems with some of our application libraries when we deploy them in their separate contexts. The question I have is what is the default behavior for Tomcat to load class libraries into its CLASSPATH. Do libraries from the $TOMCAT_HOME/lib directory get added to the CLASSPATH before libraries for a particular web application (e.g. webapps/someapp/WEB-INF/lib/*) or viceversa. I have also seen problems where my web application can't find a particular library when it is added to the "webapps/someapp/WEB-INF/lib" but it can find it when it is added to the $TOMCAT_HOME/lib directory. This particular problem occurred when I tried to use Oracle's jdbc drivers (i.e. classes12.zip). I would get class not found errors when the classes12.zip file was located in the WEB-INF/lib directory, but the errors went away when I used the $TOMCAT_HOME/lib directory. What is the recommended place for putting class libraries in the classpath for Tomcat? Any suggestions would be greatly appreciated. Thanks in advance, Brett
Re: session object
Sounds like a pilot error. Works fine: <% session.setAttribute("request",request); session.getAttribute("request"); out.println("request: " + request); %> Outputs: request: org.apache.catalina.connector.HttpRequestFacade@649dcd - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 9:05 AM Subject: session object > Hi ! > > I don't understand why but when I put the request object in the session : > > session.setAttribute("request", request); > > and try to retrieve it later in another jsp page : > > request = (HttpServletRequest) session.getAttribute("request"); > > I constat that my request object is egal to null > > WHY ! > > > Patrick PIERRA >
problems with tomcat configuration and use
hello, I have currently one problem in the tomcat configuration. I use a 3.1 version, with Apache, on Digital Unix, with a JDK 1.2.2 I have the following line in the server.xml file (for example): But, when I start Tomcat, the resulting tomcat-apache.conf file produced includes the following: Alias /kekhia /urisc/si/delebecq/tomcat/build/tomcat/webapps/kekhia and the same wrong path for the following lines It should be simple, but I don't have found the solution neither in the FAQ, or in the mailing list archives... Thanks for your help __ | Henri Delebecque[EMAIL PROTECTED] | | Webmaster | | Supelec Tel (33) 01.69.85.14.91 | | 3 rue Joliot-Curie | | Plateau de Moulon Fax:(33) 01.69.85.12.34 | | 91190 Gif sur Yvette| | FRANCE | |_|
Re: Bug or feature
My only guess is that perhaps the servlet is loaded from 2 separate contexts. I remember having this problem earlier. I was using the directive in server.xml to point this web app to an apache virtual host. At the same time, the auto-conf of server.xml would also load this web application under a different context with a seprate class loader, hence your static vars dont seem to work. Just my guess. Regards Shahed - Original Message - From: "Zsolt Koppany" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 9:28 AM Subject: Bug or feature > Hi, > > I want a servlet executed when tomcat is started, thus I made the > following entries in web.xml > > > startup > cv.servlet.Startup > > 1 > > > > The strange thing is that the init method is always executed twice. I > have already tried to fix it using static boolean variables to check > whether this is the second execution, but the static variables seem to > be always null. I know it sounds strange but this is true. The problem > is that I have to create a ServerSocket and of course the second time I > get a BindException. Now how can I figure out whether this is "my" > socket or not. > > I use tomcat-3.2.2 under RedHat-7.1. > > Zsolt > > -- > Zsolt Koppany > Intland GmbH www.intland.com > Schulze-Delitzsch-Strasse 16 > D-70565 Stuttgart > Tel: +49-711-7221873 Fax: +49-711-7871017 >