Re: Can't import apache ssl key to tomcat keystore
The Bicore utility has always worked for me. Getting on-topic, I'm assuming that since you have an Apache cert, that you have openssl installed. The alternative method is to use openssl to generate a pkcs12 file, and use that as your keystore. Something like: openssl pkcs12 -export -chain -inkey server.key -in server.crt -name tomcat \ -out server.p12 -cafile ca.crt -caname root Of course, if your server.crt is signed by Verisign (please, no flames :) or Thwate, then you can omit the '-cafile' and '-caname' arguments, since JSSE already knows about the signers. Then in the Factory element (for Tomcat 4, for Tomcat 5 it's the Connector element) set 'keystoreFile=/path/to/server.p12 keystoreType=pkcs12'. James Tolles [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks in advance, We are trying to import an existing apache ssl crt/key into a tomcat keystore. First step was discover that the jdk1.4 / keytool does not support import a private key into a keystore. (s this still true?) Next step was to get the importKey.jar tool from Biocore and try that. Two three ssl-keys have imported correctly. The third one however seems to get broken. Would anyone know of a more direct way to get an existing apache compatible ssl key into a tomcat keystore? Thanks for any help.. - James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat port on the web
Hi all, Is it nessasary to have default 80 port if tomcat is used as standalone server on the web or is it possible to put any port (say like 8080). How to configure tomcat 4.1.24 so that it can receive the http request when DNS name is typed in the browser? Any help is welcome. Thanks in advance, Bopanna, Sr. Software Engineer, RCS Technologies, Bangalore. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Filter for Form Authentication Problem
Joerg Heinicke [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Tim Funk wrote: You can't intercept j_security_check with a filter, it violates the spec. -Tim This is at least one answer to my thread started last week: http://www.mail-archive.com/[EMAIL PROTECTED]/msg104931.html. What are the consequences/possibilities to set the request character encoding with servlet standard API mechanisms instead of using the Tomcat proprietary solution of using a Valve? This is a really interesting issue. I would hope that you would send a message to [EMAIL PROTECTED] to hopefully get the expert-team to clarify this before the 2.4 spec goes final. Because the Servlet-2.2 spec lacks the request.setCharacterEncoding method, Tomcat 3.3 jumps through a lot of hoops to try and guess the charset. These were dropped in Tomcat 4+, since the request.setCharacterEncoding method was supposed to solve all of these problems. As you have pointed out, it is not possible to use this in a Filter for the standard Form-auth config (for the simple reason that Auth is called before Filters). Therefore, the j_security_check target is flying blind wrt charset. Joerg Lawence wrote: Dear All, I wrote a filter servlet that does some preprocessing. Basically it intercepts the call of j_secuity_check. The problem is that most of the time it was just bypassed. The only way to trigger it as I found is to first fill the form and got authenticated, then go back and try the authentication again. Anybody knows the solution? Another question is how to sepcify the url pattern of j_security_check. My login page is /secured/login.jsp, I think the url should be /secured/j_security_check, am I right? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk_ajp12_worker.lo: unknown file type
At a quick guess, you've got Sun's 'ld' ahead of the GNU 'ld' in your path. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi Folks, I have the following configuration: Solaris 8 Apache 2.0.45 Tomcat 4.1.27 Jakarta-tomcat-connectors-jk 1.2.4 I am following similar procedure as posted on www.johnturner.com/howto (minus the version differences). I am running into a problem as below. Please advise me what to do next. TIA, Dan #make Making all in common make[1]: Entering directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native/common' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native/common' Making all in apache-2.0 make[1]: Entering directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native/apache-2.0' /bin/ksh /opt/apache/build/libtool --silent --mode=link /usr/local/bin/gcc -I/opt/apache/include -g -O2 -DUSE_APACHE_MD5 -I ../common -I /usr/j2se/include -I /usr/j2se/include/unix -DSOLARIS2=7 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -g -O2 -pthreads -g -O2 -g -O2 -pthreads -DSOLARIS2=7 -D_POSIX_PTHREAD_SEMAN TICS -D_REENTRANT -o mod_jk.la -module -rpath /opt/apache/modules -avoid-version mod_jk.lo ../common/jk_ajp12_worker.lo ../common/jk_connect.lo ../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo ../common/jk_pool.lo ../common/jk_worker.lo ../common/jk_ajp13_worker.lo ../common/jk_lb_worker.lo ../common/jk_sockbuf.lo ../common/jk_map.lo ../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo ../common/jk_ajp14_worker.lo ../common/jk_md5.lo ../common/jk_ajp_common.lo ../common/jk_context.lo ld: fatal: file ../common/jk_ajp12_worker.lo: unknown file type ld: fatal: File processing errors. No output written to .libs/mod_jk.so make[1]: *** [mod_jk.la] Error 1 make[1]: Leaving directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native/apache-2.0' make: *** [all-recursive] Error 1 __ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Request Handling Question
The Servlet spec (2.2-2.4) requires that each Request is handled by a single Thread. Especially with the Jk2-Coyote connector (that links Tomcat to Apache/IIS/SunOne), the thread may be re-used for requests from different clients. However, it will always serve one Request from start-to-finish before starting another one. At a guess (since I obviously can't see it :), I'd guess that your implementation is sub-optimal, but will work. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, From not having too much experience programming threads I have run into a design snag that I need some help with. Long story short, I need to be absolutely sure that the tomcat servlet container handles each request in a unique thread. So (for example) if there are 300 simultaneous connections they are processed in 300 unique threads. The reason behind this desperation is because I have created a framework that uses the threadlocal class to create a singleton like class for each request that stores references to the request and response objects so all classes during the request can access these objects without having to pass parameters around from class to class. If for some reason 2 different requests were handled in the same thread that could be a huge flaw in my design. Thanks! Duncan Krebs Bank One This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Modifying Requests; Interceptors ?
Thanks a lot Adam. I hadn't noticed that in the server.xml. It kind of satisfies my current needs. I would also require to modify the requests or create responses based on the requests before they are processed by the webapp. How should I go about this ? Interceptors ? If so, can someone please direct me to how I can procure their API, since I do not seem to have that on my tomcat 4.x Thank you in advance --Steven. --- Adam Hardy [EMAIL PROTECTED] wrote: Hi Steven, check out the AccessLogValve in your server.xml Adam On 09/29/2003 11:35 AM Steven Perry wrote: Hello All, I have got Tomcat 4.1. I would like to read all the requests that are passed onto Tomcat from all the different applications, and print them either onto the screen or a file. I could be wrong, but I so far I understand that Interceptors can be used for such a job. The thing is, I cannot find the API for Interceptors in Tomcat 4.1. a) How would I be able to get the API for Interceptors ? b) Are Interceptors the right way to go about it in the first place ? c) If not, is there any other suitable method ? --Steven. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
iis5 + tomcat5
hi, Could you teach me how to run jsp in iis5?? May be my config have some misstake. I have isntall tomcat5 and can go to http://localhost:8080 isapi_redirector.dll added to isapi added regedit by this file iis_redirect.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0] extension_uri=/jakarta/isapi_redirector.dll log_file=C:\\TOMCAT\\dist\\logs\\iis_redirect.log log_level=emerg worker_file=C:\\tomcat\\dist\\conf\\worker.properties worker_mount_file=C:\\tomcat\\dist\\conf\\uriworkermap.properties worker.properties worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp13 worker.tomcat_home=C:\tomcat\dist worker.java_home=C:\j2sdk1.4.1_03 ps=\ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost uriworkermap.properties /examples/*=ajp13 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Modifying Requests; Interceptors ?
I notice that the BaseInterceptor is there in tomcat 3.3.1. How come it is not included in 4.1.27 and 5.0.12 ? Or prolly it is, and I cannot seem to locate it ?? --Steven --- Steven Perry [EMAIL PROTECTED] wrote: Thanks a lot Adam. I hadn't noticed that in the server.xml. It kind of satisfies my current needs. I would also require to modify the requests or create responses based on the requests before they are processed by the webapp. How should I go about this ? Interceptors ? If so, can someone please direct me to how I can procure their API, since I do not seem to have that on my tomcat 4.x Thank you in advance --Steven. --- Adam Hardy [EMAIL PROTECTED] wrote: Hi Steven, check out the AccessLogValve in your server.xml Adam On 09/29/2003 11:35 AM Steven Perry wrote: Hello All, I have got Tomcat 4.1. I would like to read all the requests that are passed onto Tomcat from all the different applications, and print them either onto the screen or a file. I could be wrong, but I so far I understand that Interceptors can be used for such a job. The thing is, I cannot find the API for Interceptors in Tomcat 4.1. a) How would I be able to get the API for Interceptors ? b) Are Interceptors the right way to go about it in the first place ? c) If not, is there any other suitable method ? --Steven. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: iis5 + tomcat5
Is the isapi filer installed ok? That is, do you have a green up-pointing arrow next to it? Can you reach the url: http://localhost/jakarta/isapi_redirector.dll What is the error message you get? Mats chi wrote: hi, Could you teach me how to run jsp in iis5?? May be my config have some misstake. I have isntall tomcat5 and can go to http://localhost:8080 isapi_redirector.dll added to isapi added regedit by this file iis_redirect.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0] extension_uri=/jakarta/isapi_redirector.dll log_file=C:\\TOMCAT\\dist\\logs\\iis_redirect.log log_level=emerg worker_file=C:\\tomcat\\dist\\conf\\worker.properties worker_mount_file=C:\\tomcat\\dist\\conf\\uriworkermap.properties worker.properties worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp13 worker.tomcat_home=C:\tomcat\dist worker.java_home=C:\j2sdk1.4.1_03 ps=\ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost uriworkermap.properties /examples/*=ajp13 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New list memberr -- Tomcat w/Win XP Pro and IE 6.1 problems
Hi quoting Yoav Shapira: unless tomcat's installation on her machine is messed up. her machine ? tomcat is a she ? nice kitten... *pike http://www.fogscreen.com/ .. tv in thin air .. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat port on the web
Bopana, You can have your Tomcat web server running on port 8080 but not a good idea since that port is normally used for the administration server. Having said that however is also true that you can change the admin server port to whatever you want assuming you have the rights to do it and that it is free. Check your 'server.xml' file under '$TOMACAT/conf' and look for the string 'Service name=Catalina''. Under it you should see another string like 'Connector...'; look for the 'port' parameter which should be '8080'; change it to whatever you would like. Restart the server and check the log files to make sure things are ok. Once you've changed the admin server to another port than '8080' you can now use it for serving your content on the web. --JM -Original Message- From: N.B.Bopanna [mailto:[EMAIL PROTECTED] Sent: 30 September 2003 07:06 To: [EMAIL PROTECTED] Subject: tomcat port on the web Hi all, Is it nessasary to have default 80 port if tomcat is used as standalone server on the web or is it possible to put any port (say like 8080). How to configure tomcat 4.1.24 so that it can receive the http request when DNS name is typed in the browser? Any help is welcome. Thanks in advance, Bopanna, Sr. Software Engineer, RCS Technologies, Bangalore. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jakarta-struts-1.1-rc1 and jakarta-tomcat-4.1.24-LE-jdk14
I'm running struts 1.1-rc1 with jakarta-tomcat-4.1.24-LE-jdk14 but I have the following error when I launch tomcat : Catalina.start: java.lang.ClassNotFoundException: org.apache.catalina.core.StandardServer java.lang.ClassNotFoundException: org.apache.catalina.core.StandardServer at org.apache.commons.digester.Digester.createSAXException(Digester.java:2383) at org.apache.commons.digester.Digester.createSAXException(Digester.java:2409) at org.apache.commons.digester.Digester.startElement(Digester.java:1271) at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1284) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:949) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098) at org.apache.commons.digester.Digester.parse(Digester.java:1543) at org.apache.catalina.startup.Catalina.start(Catalina.java:449) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) I found an existing bug at http://archives.real-time.com/pipermail/tomcat-users/2003-February/096065.html (from Mark Hloden - Feb 3 2003) but no response. When I delete the commons-digester.jar from my classpath tomcat run but I have an error on my web application. Does anybody help me ? Thanks. --- Antony GUILLOTEAU - Système U Ouest Service : DSI - Normes / Méthodes / Qualité Tél: 02.40.68.59.59 poste 51.08 E-mail : [EMAIL PROTECTED]
Custom authenticate
For 2 weeks I'm fighting with the authentication in Tomcat. Is it possible to make it authenticate the user with 3 params. For example username, password, and group belongs to. I need the third one because the roles of the user are different for different groups. I tried to make my own Valve and realm and to use the Valve as authenticator but I can't get it work. Some ideas ? 10x in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with Property Files
Hi all, I have build a Package (jar) which should be used from different Contexts. I put the jar in the shared/lib/ folder from Tomcat and the classes are found by Tomcat. The Package needs for proper initialisation 2 .properties files (log4j.properties and an application specific one) I put these Property Files in the Jar but Tomcat ignore them (tried also to put them into shared/classes). During developing (Eclipse) the Property Files are always found when they are in the Classpath... Where do I have to put the Property Files to be found by my Package? thanks in advance, Martin Grüneberg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HttpSessionListener
Hi! I want to implement an HttpSessionListener. When will the container (Tomcat 5) call the method sessionDestroyed(HttpSessionEvent se). Before or after the session was invalidated (destroyed)? I can't find any documentation about that detail anywhere. Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat and virtual hosts
I have set up tomcat and apache... bind them with a JK2 connector both on port 80. I have 2 domains running on the machine. I made the virtual hosts work in apache with editting httpd.conf The apache docs are located on the following location: /export/home/webroot/site1 (www.site1.com) /export/home/webroot/site2 (www.site2.com) I would like to access jsp files on both the website's like www.site1.com/index.jsp and www.site2.com/index.jsp and store the jsp files at the same location as the html docs. This means locate them in /export/home/webroot/site1 and /export/home/webroot/site2 How do I make tomcat understeand that it must be running jsp files on this locations. Anybody knows how to do this? You have to add some things to server.xml i know that buth what and do have to edit httpd.conf in some way to make this work? A working example of a server.xml/httpd.conf file is welcome and also any tip hint and clue :-) Thanks already, Johan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpSessionListener
In servlet spec version 2.3 the javadoc comments for sessionDestroyed are: Notification that a session was invalidated. It's already invalidated, not always what you want :( In servlet spec version 2.4 (proposed final draft 3) the javadoc comments for sessionDestroyed are now: Notification that a session is about to be invalidated. Tomcat 4.x.x implements the former spec, Tomcat 5 will implement the 2.4 spec. HTH, Jon Thorsten Möller wrote: Hi! I want to implement an HttpSessionListener. When will the container (Tomcat 5) call the method sessionDestroyed(HttpSessionEvent se). Before or after the session was invalidated (destroyed)? I can't find any documentation about that detail anywhere. Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Filter for Form Authentication Problem
Did that alrady. Here's the gory details and the conclusion is valid for 4 and 5. It seems the spec folks took care of the character encoding issue but forgot how to fix it for j_security_check. So the short term solution is probably a custom solution per platform. :( (Maybe google has the answer, haven't checked yet) http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21795 -Tim Bill Barker wrote: This is a really interesting issue. I would hope that you would send a message to [EMAIL PROTECTED] to hopefully get the expert-team to clarify this before the 2.4 spec goes final. Because the Servlet-2.2 spec lacks the request.setCharacterEncoding method, Tomcat 3.3 jumps through a lot of hoops to try and guess the charset. These were dropped in Tomcat 4+, since the request.setCharacterEncoding method was supposed to solve all of these problems. As you have pointed out, it is not possible to use this in a Filter for the standard Form-auth config (for the simple reason that Auth is called before Filters). Therefore, the j_security_check target is flying blind wrt charset. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat not showing pages-----
You probably have a servlet.jar floating around somewhere where it shouldn't be. -Tim kgsat wrote: Hi I am running the tomcat version 4.1.24 for my web application. When i start the tomcat it gets started well with the usual prompt messages. But when i try to access the example directory or any sample pages, it does not show the jsp or html pages at all.The IE window comes out to be empty and i am not getting any error or exception in the server prompt. On further analysis, it has been revealed that catalina log gives the following error messages. 2003-09-26 10:33:28 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getUserPrincipal()Ljava/security/Princ ipal; at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:455) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help with Tomcat
Hi all, I want to know if there is any command line tool to get the status of the java processes that tomcat is running from a remote machine. For example I would like to know if some process is frozen, locked up or if it's Ok. Any help is welcome. Thanks in advance. Lucas. System administrator. Pictage, inc. nal commands, e-mail: [EMAIL PROTECTED] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: requestdispatcher question
Put the pages in any subdirectory under WEB-INF. -Tim Josh G wrote: I have a quick question, how do I set up my system so that I can return some pages through a requestdispatcher that can't be requested by the user direct from the browser? Cheers, -Josh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom authenticate
Can you just change the username to be [EMAIL PROTECTED] or username/group and then write a custom Realm on that. Custom Realms == easy to write. Custom authenticator Valves == PITA. Look for any Bill Barker posts in the archives with Authenticator for more information about writing custom ones. -Tim Damian Minkov wrote: For 2 weeks I'm fighting with the authentication in Tomcat. Is it possible to make it authenticate the user with 3 params. For example username, password, and group belongs to. I need the third one because the roles of the user are different for different groups. I tried to make my own Valve and realm and to use the Valve as authenticator but I can't get it work. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat not showing pages-----
Hi Tim, I do not really understand how the servlet.jar is outof place as i did not tamper with any of the classpath settings and the tomcat location etc... i have been trying to find out the xact solution. could you help me out? thanks sat - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 7:59 PM Subject: Re: Tomcat not showing pages- You probably have a servlet.jar floating around somewhere where it shouldn't be. -Tim kgsat wrote: Hi I am running the tomcat version 4.1.24 for my web application. When i start the tomcat it gets started well with the usual prompt messages. But when i try to access the example directory or any sample pages, it does not show the jsp or html pages at all.The IE window comes out to be empty and i am not getting any error or exception in the server prompt. On further analysis, it has been revealed that catalina log gives the following error messages. 2003-09-26 10:33:28 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getUserPrincipal()Ljava/security/Princ ipal; at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:455) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re[2]: Custom authenticate
Hello Tim, Tuesday, September 30, 2003, 2:05:20 PM, you wrote: TF Can you just change the username to be [EMAIL PROTECTED] or username/group and TF then write a custom Realm on that. Custom Realms == easy to write. Custom TF authenticator Valves == PITA. TF Look for any Bill Barker posts in the archives with Authenticator for more TF information about writing custom ones. TF -Tim TF Damian Minkov wrote: For 2 weeks I'm fighting with the authentication in Tomcat. Is it possible to make it authenticate the user with 3 params. For example username, password, and group belongs to. I need the third one because the roles of the user are different for different groups. I tried to make my own Valve and realm and to use the Valve as authenticator but I can't get it work. TF - TF To unsubscribe, e-mail: [EMAIL PROTECTED] TF For additional commands, e-mail: [EMAIL PROTECTED] No I can't make it this way beacuse i have a to step login page First step : username and password Second step : choose group / the groups you choose from are loaded according the username And this two steps doesn't allow me to make it this way. -- Best regards, Damianmailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
vm crasj on Redhat 8 while communicating with apache/Coyote (Unexpected Signal : 11, socketWrite0)
Hi As usual, this problem is Urgent, I suppose that is the situation for most post on the list :-) I have problems identifying a fix for this problem, java is crashing when using the service. It looks like the crash occurs when communicationg between tomcat and apache/browser, maybe because the stream is terminated from the browser. I have indications that the commons upload component might be causing the problem, but I have not been able to isolate the reason for the crash. I am using the following systems: Redhat 8 (or maybe 9) tomcat-4.1.27-LE-jdk14 struts 1.1 (have also tested 1.0.1) mod_jk.so.ap2.0.40.rh9 apache 2.0 commons-upload 1.0 j2sdk1.4.2 (have tried other versions) tomcat logs the following data: Unexpected Signal : 11 occurred at PC=0x402A9A53 Function=JVM_handle_linux_signal+0x93 Library=/usr/j2sdk1.4.1_01/j2sdk1.4.2/jre/lib/i386/client/libjvm.so Current Java thread: at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599) at org.apache.jk.server.JkCoyoteHandler.doWrite(JkCoyoteHandler.java:218) at org.apache.coyote.Response.doWrite(Response.java:524) at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:384) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439) at org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java:345) at org.apache.coyote.tomcat4.OutputBuffer.close(OutputBuffer.java:323) at org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.java: 500) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:224) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:263) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:619) at java.lang.Thread.run(Thread.java:534) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat not showing pages-----
The root cause is java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getUserPrincipal()Ljava/security/Princ Meaning that a class cannot find getUserPrincipal() in HttpServletRequest. This is usualyl due to having and extra copy of HttpServletRequest in the wrong spot. Either in the system classloader (java/ext/) or in WEB-INF/lib, or something VERY similar. -Tim kgsat wrote: Hi Tim, I do not really understand how the servlet.jar is outof place as i did not tamper with any of the classpath settings and the tomcat location etc... i have been trying to find out the xact solution. could you help me out? thanks sat - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 7:59 PM Subject: Re: Tomcat not showing pages- You probably have a servlet.jar floating around somewhere where it shouldn't be. -Tim kgsat wrote: Hi I am running the tomcat version 4.1.24 for my web application. When i start the tomcat it gets started well with the usual prompt messages. But when i try to access the example directory or any sample pages, it does not show the jsp or html pages at all.The IE window comes out to be empty and i am not getting any error or exception in the server prompt. On further analysis, it has been revealed that catalina log gives the following error messages. 2003-09-26 10:33:28 CoyoteAdapter An exception or error occurred in the container during the request processing java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getUserPrincipal()Ljava/security/Princ ipal; at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:455) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom authenticate
WIth those restrictions, I would dump container based authorization and rely on filters. Your webapp would then be portable for other containers as well as non-dependent on tomcat internals. -Tim Damian Minkov wrote: Hello Tim, Tuesday, September 30, 2003, 2:05:20 PM, you wrote: TF Can you just change the username to be [EMAIL PROTECTED] or username/group and TF then write a custom Realm on that. Custom Realms == easy to write. Custom TF authenticator Valves == PITA. TF Look for any Bill Barker posts in the archives with Authenticator for more TF information about writing custom ones. TF -Tim TF Damian Minkov wrote: For 2 weeks I'm fighting with the authentication in Tomcat. Is it possible to make it authenticate the user with 3 params. For example username, password, and group belongs to. I need the third one because the roles of the user are different for different groups. I tried to make my own Valve and realm and to use the Valve as authenticator but I can't get it work. TF - TF To unsubscribe, e-mail: [EMAIL PROTECTED] TF For additional commands, e-mail: [EMAIL PROTECTED] No I can't make it this way beacuse i have a to step login page First step : username and password Second step : choose group / the groups you choose from are loaded according the username And this two steps doesn't allow me to make it this way. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re[2]: Custom authenticate
Hello Tim, Tuesday, September 30, 2003, 2:21:26 PM, you wrote: TF WIth those restrictions, I would dump container based authorization and rely TF on filters. Your webapp would then be portable for other containers as well TF as non-dependent on tomcat internals. TF -Tim TF Damian Minkov wrote: Hello Tim, Tuesday, September 30, 2003, 2:05:20 PM, you wrote: TF Can you just change the username to be [EMAIL PROTECTED] or username/group and TF then write a custom Realm on that. Custom Realms == easy to write. Custom TF authenticator Valves == PITA. TF Look for any Bill Barker posts in the archives with Authenticator for more TF information about writing custom ones. TF -Tim TF Damian Minkov wrote: For 2 weeks I'm fighting with the authentication in Tomcat. Is it possible to make it authenticate the user with 3 params. For example username, password, and group belongs to. I need the third one because the roles of the user are different for different groups. I tried to make my own Valve and realm and to use the Valve as authenticator but I can't get it work. TF - TF To unsubscribe, e-mail: [EMAIL PROTECTED] TF For additional commands, e-mail: [EMAIL PROTECTED] No I can't make it this way beacuse i have a to step login page First step : username and password Second step : choose group / the groups you choose from are loaded according the username And this two steps doesn't allow me to make it this way. TF - TF To unsubscribe, e-mail: [EMAIL PROTECTED] TF For additional commands, e-mail: [EMAIL PROTECTED] I didn't fully understand your suggestion . How can i do this? -- Best regards, Damianmailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom authenticate
Via ... http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=write+servlet+authentication+filterbtnG=Google+Search http://java.sun.com/products/servlet/Filters.html -Tim Damian Minkov wrote: Hello Tim, Tuesday, September 30, 2003, 2:21:26 PM, you wrote: TF WIth those restrictions, I would dump container based authorization and rely TF on filters. Your webapp would then be portable for other containers as well TF as non-dependent on tomcat internals. TF -Tim TF Damian Minkov wrote: I didn't fully understand your suggestion . How can i do this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JasperException?
Look at the reply to the post titled: org.apache.jasper.JasperException. (20 or so messages before this one) Its in a different context but I think you have the same problem as I had. -Nirmit hi, I get the foll. error message when I try to run my JSP, which has just one expression. Since I get the exception even when I comment this out, this leads me to think that somehow Tomcat is not able to run my JSP. Any ideas? thanks, Rishi exception org.apache.jasper.JasperException at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) root cause java.lang.NullPointerException at org.apache.jsp.createReader_jsp._jspService(createReader_jsp.java:136) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at
Re: HttpSessionListener
Jon Wingfield [EMAIL PROTECTED] wrote: Notification that a session is about to be invalidated. Tomcat 4.x.x implements the former spec, Tomcat 5 will implement the 2.4 spec. HTH, Thanks a lot, now my nerves have steadied ;-) Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help! First Web App does not work
Howdy, You probably haven't customized build.xml correctly, so it's trying to connect to a dummy host that doesn't exist on your network. Yoav Shapira Millennium ChemInformatics -Original Message- From: Thomas Chen [mailto:[EMAIL PROTECTED] Sent: Monday, September 29, 2003 7:22 PM To: [EMAIL PROTECTED] Subject: Help! First Web App does not work Hi, I installed the Tomcat, JDK and Ant on my NT box, and followed instructions on install the first web app, everything goes well except when I ran ant install I get follow error messages: BUILD FAILED: file:/e:/testApp/build.xml: 364 java.net.UnknownHostException: E Can someone tell me what is going on? Thanks in advance... Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with Property Files
Howdy, If they're in shared/classes, they're on the classpath. If they're in the jar itself, they're also on the classpath. Either one will work. If you give us a more specific explanation than Tomcat ignore them maybe we could help more ;) Personally, especially since you're in a logging configuration use-case, I would keep all the libraries and configuration files separate, i.e. have a copy in each webapp's WEB-INF/lib or WEB-INF/classes directory, and not use shared/lib or shared/classes at all. Yoav Shapira Millennium ChemInformatics -Original Message- From: Martin Grüneberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 5:45 AM To: [EMAIL PROTECTED] Subject: Problems with Property Files Hi all, I have build a Package (jar) which should be used from different Contexts. I put the jar in the shared/lib/ folder from Tomcat and the classes are found by Tomcat. The Package needs for proper initialisation 2 .properties files (log4j.properties and an application specific one) I put these Property Files in the Jar but Tomcat ignore them (tried also to put them into shared/classes). During developing (Eclipse) the Property Files are always found when they are in the Classpath... Where do I have to put the Property Files to be found by my Package? thanks in advance, Martin Grüneberg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat on Netware
I've been successfully running Tomcat 4.0.4 on Novell Netware with the Novell (ie Netscape) Enterprise Server (using nsapi_rd.nlm) for many months, and now I want to upgrade to Tomcat 4.1.27. I installed and configured 4.1.27 just like 4.0.4 (ajp13, workers etc), and now it's giving the following error when I try to start it: Bootstrap: Class loader creation threw exception java.lang.IllegalMonitorStateException: current thread not owner The log file shows: [Tue Sep 30 22:27:31 2003] [jk_worker.c (88)]: Into wc_open [Tue Sep 30 22:27:31 2003] [jk_worker.c (222)]: Into build_worker_map, creating 1 workers [Tue Sep 30 22:27:31 2003] [jk_worker.c (228)]: build_worker_map, creating worker worker1 [Tue Sep 30 22:27:31 2003] [jk_worker.c (148)]: Into wc_create_worker [Tue Sep 30 22:27:31 2003] [jk_worker.c (162)]: wc_create_worker, about to create instance worker1 of ajp13 [Tue Sep 30 22:27:31 2003] [jk_ajp13_worker.c (108)]: Into ajp13_worker_factory [Tue Sep 30 22:27:31 2003] [jk_worker.c (171)]: wc_create_worker, about to validate and init worker1 [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker worker1 contact is localhost:8009 [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1267)]: Into jk_worker_t::init [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1287)]: In jk_worker_t::init, setting socket timeout to 0 [Tue Sep 30 22:27:31 2003] [jk_worker.c (187)]: wc_create_worker, done [Tue Sep 30 22:27:31 2003] [jk_worker.c (238)]: build_worker_map, removing old worker1 worker [Tue Sep 30 22:27:31 2003] [jk_worker.c (250)]: build_worker_map, done [Tue Sep 30 22:27:31 2003] [jk_worker.c (111)]: wc_open, done 1 [Tue Sep 30 22:28:28 2003] [jk_nsapi_plugin.c (298)]: jk_init, a second passed [Tue Sep 30 22:29:22 2003] [jk_worker.c (118)]: Into wc_close [Tue Sep 30 22:29:22 2003] [jk_worker.c (199)]: close_workers got 1 workers to destroy [Tue Sep 30 22:29:22 2003] [jk_worker.c (206)]: close_workers will destroy worker worker1 [Tue Sep 30 22:29:22 2003] [jk_ajp_common.c (1324)]: Into jk_worker_t::destroy [Tue Sep 30 22:29:22 2003] [jk_ajp_common.c (1331)]: Into jk_worker_t::destroy up to 1 endpoint to close [Tue Sep 30 22:29:22 2003] [jk_worker.c (120)]: wc_close, done The server setup is Netware 5.1 sp6, JVM 1.1.3.8, NES 5.1. Does anyone know what would cause an IllegalMonitorStateException ??? TIA
RE: Tomcat on Netware
Yeah, The fact that you need to have the call to the method synchronized its the same as using the wait() method implemented in the Object class you need to own the lock before you can call this method eg. some method { synchronized (this) { //this is ok wait(); } } where as some method { wait(); } would throw an IllegalMonitorStateException. Hope this helps Pete -Original Message- From: Aziz Yacoub [mailto:[EMAIL PROTECTED] Sent: 30 September 2003 13:51 To: Subject: Tomcat on Netware I've been successfully running Tomcat 4.0.4 on Novell Netware with the Novell (ie Netscape) Enterprise Server (using nsapi_rd.nlm) for many months, and now I want to upgrade to Tomcat 4.1.27. I installed and configured 4.1.27 just like 4.0.4 (ajp13, workers etc), and now it's giving the following error when I try to start it: Bootstrap: Class loader creation threw exception java.lang.IllegalMonitorStateException: current thread not owner The log file shows: [Tue Sep 30 22:27:31 2003] [jk_worker.c (88)]: Into wc_open [Tue Sep 30 22:27:31 2003] [jk_worker.c (222)]: Into build_worker_map, creating 1 workers [Tue Sep 30 22:27:31 2003] [jk_worker.c (228)]: build_worker_map, creating worker worker1 [Tue Sep 30 22:27:31 2003] [jk_worker.c (148)]: Into wc_create_worker [Tue Sep 30 22:27:31 2003] [jk_worker.c (162)]: wc_create_worker, about to create instance worker1 of ajp13 [Tue Sep 30 22:27:31 2003] [jk_ajp13_worker.c (108)]: Into ajp13_worker_factory [Tue Sep 30 22:27:31 2003] [jk_worker.c (171)]: wc_create_worker, about to validate and init worker1 [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker worker1 contact is localhost:8009 [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1267)]: Into jk_worker_t::init [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1287)]: In jk_worker_t::init, setting socket timeout to 0 [Tue Sep 30 22:27:31 2003] [jk_worker.c (187)]: wc_create_worker, done [Tue Sep 30 22:27:31 2003] [jk_worker.c (238)]: build_worker_map, removing old worker1 worker [Tue Sep 30 22:27:31 2003] [jk_worker.c (250)]: build_worker_map, done [Tue Sep 30 22:27:31 2003] [jk_worker.c (111)]: wc_open, done 1 [Tue Sep 30 22:28:28 2003] [jk_nsapi_plugin.c (298)]: jk_init, a second passed [Tue Sep 30 22:29:22 2003] [jk_worker.c (118)]: Into wc_close [Tue Sep 30 22:29:22 2003] [jk_worker.c (199)]: close_workers got 1 workers to destroy [Tue Sep 30 22:29:22 2003] [jk_worker.c (206)]: close_workers will destroy worker worker1 [Tue Sep 30 22:29:22 2003] [jk_ajp_common.c (1324)]: Into jk_worker_t::destroy [Tue Sep 30 22:29:22 2003] [jk_ajp_common.c (1331)]: Into jk_worker_t::destroy up to 1 endpoint to close [Tue Sep 30 22:29:22 2003] [jk_worker.c (120)]: wc_close, done The server setup is Netware 5.1 sp6, JVM 1.1.3.8, NES 5.1. Does anyone know what would cause an IllegalMonitorStateException ??? TIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Strange Perfomance Issue, Tomcat more than 10 times slower than Jetty
Howdy, Can you please open a Bugzilla issue for this, attaching your tested and test class source code? Thanks, Yoav Shapira Millennium ChemInformatics -Original Message- From: Christoph Gaffga [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 8:44 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Strange Perfomance Issue, Tomcat more than 10 times slower than Jetty hi, i posted this issue before, and decided to run my test with another servlet container, before saying: it a problem with tomcat. (I'm running tomcat 4.1.27 with JDK 1.4.2 on RH8) I have a small test class, that - Lookup an Entity EJB - get a property from the Bean - serialize the bean using betwixt I runned the classes main-method form different environments, but all with the same jvm parameters (-server -Xms1200m -Xmx1200m). In tomcat it slowes down dramaticly: |Command Line | from Servlet | from Servlet | | in Tomcat| in Jetty --+-+--+--- Lookup| 144 ms | 2490 ms | 143 ms Getter| 17 ms | 2843 ms |21 ms Serialize | 708 ms | 64147 ms | 947 ms Has anybody an idea what causes this slowdown, or anybody seen something similar before? What am I doing wrong? Any help would be apriciated. Thanks a lot, regards Christoph Gaffga [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Custom authenticate
Damian, Tim suggested user/group or [EMAIL PROTECTED]. That didn't work for you but what about role in group where this is really a set of roles for which you allow the user to specify the group part of the name. In this case your security model would have roles such as customer and vendor and groups such as retail and wholesale but the Tomcat authentication structure would have roles of retail-customer, retail-vendor, wholesale-customer and wholesale-vendor. The number of roles may get fairly large and you may want to consider a tool to manage them but the concept would probably work. I think you would have to write your own isUserInRole check to allow you to concatenate the variables retrieved from the application but it wouldn't be very complicated. Murray -Original Message- From: Damian Minkov [mailto:[EMAIL PROTECTED] Sent: Tuesday, 30 September 2003 19:40 To: [EMAIL PROTECTED] Subject: Custom authenticate For 2 weeks I'm fighting with the authentication in Tomcat. Is it possible to make it authenticate the user with 3 params. For example username, password, and group belongs to. I need the third one because the roles of the user are different for different groups. I tried to make my own Valve and realm and to use the Valve as authenticator but I can't get it work. Some ideas ? 10x in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk_ajp12_worker.lo: unknown file type
Bill and to all, I am using the GNU 'ld' and it is in my path before the Sun's ld. Additional info, I have Sun JSDK2.0 installed. Any more suggestion is greatly appreciated. TIA, Dan Bill Barker [EMAIL PROTECTED] wrote: At a quick guess, you've got Sun's 'ld' ahead of the GNU 'ld' in your path. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi Folks, I have the following configuration: Solaris 8 Apache 2.0.45 Tomcat 4.1.27 Jakarta-tomcat-connectors-jk 1.2.4 I am following similar procedure as posted on www.johnturner.com/howto (minus the version differences). I am running into a problem as below. Please advise me what to do next. TIA, Dan #make Making all in common make[1]: Entering directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native/common' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native/common' Making all in apache-2.0 make[1]: Entering directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native/apache-2.0' /bin/ksh /opt/apache/build/libtool --silent --mode=link /usr/local/bin/gcc -I/opt/apache/include -g -O2 -DUSE_APACHE_MD5 -I ../common -I /usr/j2se/include -I /usr/j2se/include/unix -DSOLARIS2=7 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -g -O2 -pthreads -g -O2 -g -O2 -pthreads -DSOLARIS2=7 -D_POSIX_PTHREAD_SEMAN TICS -D_REENTRANT -o mod_jk.la -module -rpath /opt/apache/modules -avoid-version mod_jk.lo ../common/jk_ajp12_worker.lo ../common/jk_connect.lo ../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo ../common/jk_pool.lo ../common/jk_worker.lo ../common/jk_ajp13_worker.lo ../common/jk_lb_worker.lo ../common/jk_sockbuf.lo ../common/jk_map.lo ../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo ../common/jk_ajp14_worker.lo ../common/jk_md5.lo ../common/jk_ajp_common.lo ../common/jk_context.lo ld: fatal: file ../common/jk_ajp12_worker.lo: unknown file type ld: fatal: File processing errors. No output written to .libs/mod_jk.so make[1]: *** [mod_jk.la] Error 1 make[1]: Leaving directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native/apache-2.0' make: *** [all-recursive] Error 1 __ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Alternate Port to 8009?
That's not the issue.. Tomcat is listening on the right port (38009) but mod_jk2 is not trying to connect to that port. Blake On 9/29/03 4:07 PM, Tim Funk [EMAIL PROTECTED] wrote: The port your are listneing on is declared in server.xml for tomcat inside the connector. Look for 8009 in server.xml. -Tim Blake Crosby (CBC) wrote: Version 4.1.27 (Tomcat) This is a tomcat problem and not a mod_jk2 issue? Blake On 29/09/2003 12:55 PM, Jeff Tulley [EMAIL PROTECTED] wrote: Which version of Tomcat? It seems that there was a problem like this in the 4.0.x series, which was fixed sometime in the 4.1.x series. (Sorry so vague, I don't remember the details. It might have even been between 4.1.12 and 4.1.15 or so). Jeff Tulley ([EMAIL PROTECTED]) (801)861-5322 Novell, Inc., The Leading Provider of Net Business Solutions http://www.novell.com [EMAIL PROTECTED] 9/29/03 9:41:12 AM Has anyone got mod_jk2 and apache 1.3 connecting to Tomcat4 (via ajp13) on any other port than 8009? For some reason, no matter what port I configure in workers2.properties, jk2/apache always want to connect to port 8009. Tomcat is listening in port 38009 and my workers2.properties file looks like this: [config:] file=${serverRoot}/conf/workers2.properties debug=10 debugEnv=10 # SHM Stuff [shm] info=Scoreboard. file=${serverRoot}/logs/jk2.shm size=1048576 # Where is Tomcat Listening? [channel.socket:localhost:38009] port=38009 host=127.0.0.1 # define the worker [ajp13:localhost:38009] channel=channel.socket:localhost:38009 [uri:/examples/*] info=Example webapp in the default context. context=/examples worker=ajp13:localhost:38009 debug=1 #define the worker [status:status] # Uri mapping [uri:/jkstatus/*] worker=status:status - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Blake Crosby - CBC.ca Operations Platform Administrator voice://+1.416.205.3103 mobile://+1.416.884.5828 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat on Netware
Thanks... do you know why tomcat would be doing this on startup?? Peter Guyatt [EMAIL PROTECTED] 30/09/2003 11:04:36 pm Yeah, The fact that you need to have the call to the method synchronized its the same as using the wait() method implemented in the Object class you need to own the lock before you can call this method eg. some method { synchronized (this) { //this is ok wait(); } } where as some method { wait(); } would throw an IllegalMonitorStateException. Hope this helps Pete -Original Message- From: Aziz Yacoub [ mailto:[EMAIL PROTECTED] Sent: 30 September 2003 13:51 To: Subject: Tomcat on Netware I've been successfully running Tomcat 4.0.4 on Novell Netware with the Novell (ie Netscape) Enterprise Server (using nsapi_rd.nlm) for many months, and now I want to upgrade to Tomcat 4.1.27. I installed and configured 4.1.27 just like 4.0.4 (ajp13, workers etc), and now it's giving the following error when I try to start it: Bootstrap: Class loader creation threw exception java.lang.IllegalMonitorStateException: current thread not owner The log file shows: [Tue Sep 30 22:27:31 2003] [jk_worker.c (88)]: Into wc_open [Tue Sep 30 22:27:31 2003] [jk_worker.c (222)]: Into build_worker_map, creating 1 workers [Tue Sep 30 22:27:31 2003] [jk_worker.c (228)]: build_worker_map, creating worker worker1 [Tue Sep 30 22:27:31 2003] [jk_worker.c (148)]: Into wc_create_worker [Tue Sep 30 22:27:31 2003] [jk_worker.c (162)]: wc_create_worker, about to create instance worker1 of ajp13 [Tue Sep 30 22:27:31 2003] [jk_ajp13_worker.c (108)]: Into ajp13_worker_factory [Tue Sep 30 22:27:31 2003] [jk_worker.c (171)]: wc_create_worker, about to validate and init worker1 [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker worker1 contact is localhost:8009 [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1267)]: Into jk_worker_t::init [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1287)]: In jk_worker_t::init, setting socket timeout to 0 [Tue Sep 30 22:27:31 2003] [jk_worker.c (187)]: wc_create_worker, done [Tue Sep 30 22:27:31 2003] [jk_worker.c (238)]: build_worker_map, removing old worker1 worker [Tue Sep 30 22:27:31 2003] [jk_worker.c (250)]: build_worker_map, done [Tue Sep 30 22:27:31 2003] [jk_worker.c (111)]: wc_open, done 1 [Tue Sep 30 22:28:28 2003] [jk_nsapi_plugin.c (298)]: jk_init, a second passed [Tue Sep 30 22:29:22 2003] [jk_worker.c (118)]: Into wc_close [Tue Sep 30 22:29:22 2003] [jk_worker.c (199)]: close_workers got 1 workers to destroy [Tue Sep 30 22:29:22 2003] [jk_worker.c (206)]: close_workers will destroy worker worker1 [Tue Sep 30 22:29:22 2003] [jk_ajp_common.c (1324)]: Into jk_worker_t::destroy [Tue Sep 30 22:29:22 2003] [jk_ajp_common.c (1331)]: Into jk_worker_t::destroy up to 1 endpoint to close [Tue Sep 30 22:29:22 2003] [jk_worker.c (120)]: wc_close, done The server setup is Netware 5.1 sp6, JVM 1.1.3.8, NES 5.1. Does anyone know what would cause an IllegalMonitorStateException ??? TIA
Re: jk_ajp12_worker.lo: unknown file type
Just curious, when I did ./configure --with-apxs=/opt/apache/bin/apxs before the make, I received the following message: need to check for Perl first, apxs depends on it... checking for perl... /usr/local/bin/perl building connector for apache-2.0 checking for target platform... unix no apache given= configure: creating ./config.status config.status: creating Makefile config.status: creating apache-1.3/Makefile config.status: creating apache-1.3/Makefile.apxs config.status: creating apache-2.0/Makefile config.status: creating apache-2.0/Makefile.apxs config.status: creating common/Makefile config.status: creating common/list.mk config.status: creating jni/Makefile config.status: executing depfiles commands There is no report of error after the configure. Is the no apache given message of a concern? Sorry, I am a baby to the tomcat world. TIA. [EMAIL PROTECTED] wrote: Bill and to all, I am using the GNU 'ld' and it is in my path before the Sun's ld. Additional info, I have Sun JSDK2.0 installed. Any more suggestion is greatly appreciated. TIA, Dan Bill Barker [EMAIL PROTECTED] wrote: At a quick guess, you've got Sun's 'ld' ahead of the GNU 'ld' in your path. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi Folks, I have the following configuration: Solaris 8 Apache 2.0.45 Tomcat 4.1.27 Jakarta-tomcat-connectors-jk 1.2.4 I am following similar procedure as posted on www.johnturner.com/howto (minus the version differences). I am running into a problem as below. Please advise me what to do next. TIA, Dan #make Making all in common make[1]: Entering directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native/common' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native/common' Making all in apache-2.0 make[1]: Entering directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native/apache-2.0' /bin/ksh /opt/apache/build/libtool --silent --mode=link /usr/local/bin/gcc -I/opt/apache/include -g -O2 -DUSE_APACHE_MD5 -I ../common -I /usr/j2se/include -I /usr/j2se/include/unix -DSOLARIS2=7 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -g -O2 -pthreads -g -O2 -g -O2 -pthreads -DSOLARIS2=7 -D_POSIX_PTHREAD_SEMAN TICS -D_REENTRANT -o mod_jk.la -module -rpath /opt/apache/modules -avoid-version mod_jk.lo ../common/jk_ajp12_worker.lo ../common/jk_connect.lo ../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo ../common/jk_pool.lo ../common/jk_worker.lo ../common/jk_ajp13_worker.lo ../common/jk_lb_worker.lo ../common/jk_sockbuf.lo ../common/jk_map.lo ../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo ../common/jk_ajp14_worker.lo ../common/jk_md5.lo ../common/jk_ajp_common.lo ../common/jk_context.lo ld: fatal: file ../common/jk_ajp12_worker.lo: unknown file type ld: fatal: File processing errors. No output written to .libs/mod_jk.so make[1]: *** [mod_jk.la] Error 1 make[1]: Leaving directory `/usr/local/src/jakarta-tomcat-connectors-jk-1.2.4-src/jk/native/apache-2.0' make: *** [all-recursive] Error 1 __ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem Deploying A Web App Under Tomcat 4.0.6
I've written a Web app that uses JSTL 1.0.3 that deploys and runs successfully under Tomcat 4.1.24 in a development environment. I deploy it as a WAR file, along with a context XML file of the same name. Tomcat 4.1.24 picks up both successfully and creates the JNDI data source I need without a problem. Our production environment uses Tomcat 4.0.6. I deploy the app by putting the WAR and context XML in the Tomcat 4.0.6 webapps directory and bouncing the service. When I do, the app fails when I invoke its index.jsp. I get the following exception in the Tomcat localhost log: 2003-09-30 08:43:22 Could not load TagLibraryValidator class org.apache.taglibs.standard.tlv.JstlCoreTLV: EXCEPTION: null 2003-09-30 08:43:22 2003-09-30 08:43:22 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: /index.jsp(4,0) No such tag redirect in the tag library imported with prefix c I can go into the standard.jar that I have in TOMCAT_HOME/common/lib and see the class org.apache.taglibs.standard.tlv.JstlCoreTLV in there. I've got all the Jakarta Commons JARs and all the others that I need to use JSTL. I can reproduce the error. I downloaded Tomcat 4.0.6, installed it on my Win XP desktop as a service, and deployed my WAR file. It gave me the same exception. Why does it load successfully under Tomcat 4.1.24 and not under Tomcat 4.0.6? What am I doing wrong? Please advise. Thanks - MOD __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat on Netware
Hi There, Sorry I don't, you may have to raise a bug report for this problem. I am positive that it will be an easy fix so it should be solved relatively quickly. Hope this is ok Thanks Pete -Original Message- From: Aziz Yacoub [mailto:[EMAIL PROTECTED] Sent: 30 September 2003 15:08 To: [EMAIL PROTECTED] Subject: RE: Tomcat on Netware Thanks... do you know why tomcat would be doing this on startup?? Peter Guyatt [EMAIL PROTECTED] 30/09/2003 11:04:36 pm Yeah, The fact that you need to have the call to the method synchronized its the same as using the wait() method implemented in the Object class you need to own the lock before you can call this method eg. some method { synchronized (this) { //this is ok wait(); } } where as some method { wait(); } would throw an IllegalMonitorStateException. Hope this helps Pete -Original Message- From: Aziz Yacoub [ mailto:[EMAIL PROTECTED] Sent: 30 September 2003 13:51 To: Subject: Tomcat on Netware I've been successfully running Tomcat 4.0.4 on Novell Netware with the Novell (ie Netscape) Enterprise Server (using nsapi_rd.nlm) for many months, and now I want to upgrade to Tomcat 4.1.27. I installed and configured 4.1.27 just like 4.0.4 (ajp13, workers etc), and now it's giving the following error when I try to start it: Bootstrap: Class loader creation threw exception java.lang.IllegalMonitorStateException: current thread not owner The log file shows: [Tue Sep 30 22:27:31 2003] [jk_worker.c (88)]: Into wc_open [Tue Sep 30 22:27:31 2003] [jk_worker.c (222)]: Into build_worker_map, creating 1 workers [Tue Sep 30 22:27:31 2003] [jk_worker.c (228)]: build_worker_map, creating worker worker1 [Tue Sep 30 22:27:31 2003] [jk_worker.c (148)]: Into wc_create_worker [Tue Sep 30 22:27:31 2003] [jk_worker.c (162)]: wc_create_worker, about to create instance worker1 of ajp13 [Tue Sep 30 22:27:31 2003] [jk_ajp13_worker.c (108)]: Into ajp13_worker_factory [Tue Sep 30 22:27:31 2003] [jk_worker.c (171)]: wc_create_worker, about to validate and init worker1 [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker worker1 contact is localhost:8009 [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1267)]: Into jk_worker_t::init [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1287)]: In jk_worker_t::init, setting socket timeout to 0 [Tue Sep 30 22:27:31 2003] [jk_worker.c (187)]: wc_create_worker, done [Tue Sep 30 22:27:31 2003] [jk_worker.c (238)]: build_worker_map, removing old worker1 worker [Tue Sep 30 22:27:31 2003] [jk_worker.c (250)]: build_worker_map, done [Tue Sep 30 22:27:31 2003] [jk_worker.c (111)]: wc_open, done 1 [Tue Sep 30 22:28:28 2003] [jk_nsapi_plugin.c (298)]: jk_init, a second passed [Tue Sep 30 22:29:22 2003] [jk_worker.c (118)]: Into wc_close [Tue Sep 30 22:29:22 2003] [jk_worker.c (199)]: close_workers got 1 workers to destroy [Tue Sep 30 22:29:22 2003] [jk_worker.c (206)]: close_workers will destroy worker worker1 [Tue Sep 30 22:29:22 2003] [jk_ajp_common.c (1324)]: Into jk_worker_t::destroy [Tue Sep 30 22:29:22 2003] [jk_ajp_common.c (1331)]: Into jk_worker_t::destroy up to 1 endpoint to close [Tue Sep 30 22:29:22 2003] [jk_worker.c (120)]: wc_close, done The server setup is Netware 5.1 sp6, JVM 1.1.3.8, NES 5.1. Does anyone know what would cause an IllegalMonitorStateException ??? TIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Full Package Names??
Return Receipt Your RE: Full Package Names?? document : was Jose Carlos Garcia/CEG/CSC received by: at: 09/30/2003 10:04:43 AM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP Compilation Issues
I have a JSP page that is large (contains a large series of tables for displaying lots of data). It is about 2000 lines of HTML. When trying to run this on Tomcat 4.1.27 I get the following error: [ServletException in:/schedule/operational/view.month.jsp] Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file C:\dean\dev-tools\Tomcat 4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:116 12: code too large for try statement } catch (Throwable t) { ^ C:\dean\dev-tools\Tomcat 4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:30: code too large for try statement try { ^ C:\dean\dev-tools\Tomcat 4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:17: code too large public void _jspService(HttpServletRequest request, HttpServletResponse response) ^ 3 errors ' I reviewed the jsp_*.java file that was created (I am assuming by Jasper) and saw that evert individual HTML taq is outputted to the new line, e.g. table width=80trtd align=center colspan=5nbsp;/td/trtrtd align=center colspan=5RDO/td/tr trtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/ td/tr/table Which is two lines in my JSP, becomes the following in the servlet/java file: out.write(table width=\80\); out.write(tr); out.write(td align=\center\ colspan=\5\nbsp;); out.write(/td); out.write(/tr); out.write(tr); out.write(td align=\center\ colspan=\5\RDO); out.write(/td); out.write(/tr\r\n\t\t\t\t\t\t\t\t\t\t); out.write(tr); out.write(tdnbsp;); out.write(/td); out.write(tdnbsp;); out.write(/td); out.write(tdnbsp;); out.write(/td); out.write(tdnbsp;); out.write(/td); out.write(tdnbsp;); out.write(/td); out.write(/tr); out.write(/table\r\n\t\t\t\t\t); i.e. it is blowing out the individual tags to individual lines (including end tags), and thus making my 2000 line html become 11,000 lines in the servlet and causing the above error (I believe that the there is a 10,000 line limit for a try statement). Is there options to force jasper to compile and not parse out any tag to a new line?? Or is there a way around this??? Dean - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ssl on a port other than 8443
Hi, I have an environment with win 2000 p4(2..4Ghz - 4GB RAM) running 2 apache tomcat (4.0.4) servers running.I am able to get ssl working on port 8443 and non-ssl running on 8005 I used the same server.xml, modified 8005 to 8205 and the ssl port from 8443 to 8444.I am not able to use the ssl port 8444. Also changed were the apj connect port from 8009 to 8409 netstat check before I started the 2nd apache server revealed that none of the ports(8444, 8409, 8205) were used The errors I get with a debug level of 10 are (I have replaced the actual values with value): 2003-09-26 12:17:27 StandardEngine[Standalone]: Trying the default host 2003-09-26 12:17:27 HttpProcessor[8200][49] parseConnection: address=server.domain.com/ipaddress, port=8200 2003-09-26 12:17:27 HttpProcessor[8200][1] parseConnection: address=server.domain.com/ipaddress, port=8200 2003-09-26 12:17:35 HttpProcessor[8444][4] An incoming request is being assigned 2003-09-26 12:17:35 HttpProcessor[8444][4] The incoming request has been awaited 2003-09-26 12:17:35 HttpProcessor[8444][4] parseConnection: address=server.domain.com/ipaddress, port=8444 2003-09-26 12:17:35 HttpProcessor[8444][4] An incoming request is being assigned 2003-09-26 12:17:35 HttpProcessor[8444][4] The incoming request has been awaited 2003-09-26 12:17:35 HttpProcessor[8444][4] parseConnection: address=server.domain.com/ipaddress, port=8444 2003-09-26 12:18:27 Ajp13Connector[8409] active threads=6 2003-09-26 12:19:27 Ajp13Connector[8409] active threads=6 2003-09-26 12:20:27 Ajp13Connector[8409] active threads=6 2003-09-26 12:21:27 Ajp13Connector[8409] active threads=6 2003-09-26 12:22:27 Ajp13Connector[8409] active threads=6 2003-09-26 12:23:28 Ajp13Connector[8409] active threads=6 2003-09-26 12:24:28 Ajp13Connector[8409] active threads=6 2003-09-26 12:25:28 Ajp13Connector[8409] active threads=6 2003-09-26 12:26:28 Ajp13Connector[8409] active threads=6 2003-09-26 12:26:49 HttpProcessor[8444][4] An incoming request is being assigned 2003-09-26 12:26:49 HttpProcessor[8444][4] The incoming request has been awaited 2003-09-26 12:26:49 HttpProcessor[8444][4] parseConnection: address=server.domain.com/ipaddress, port=8444 2003-09-26 12:26:49 HttpProcessor[8444][4] An incoming request is being assigned 2003-09-26 12:26:49 HttpProcessor[8444][4] The incoming request has been awaited 2003-09-26 12:26:49 HttpProcessor[8444][4] parseConnection: address=server.domain.com/ipaddress, port=8444 2003-09-26 12:27:28 Ajp13Connector[8409] active threads=6 2003-09-26 12:28:29 Ajp13Connector[8409] active threads=6 Any clues on what is happening and what can be done to be able to listen with ssl on 8444? Thanks and Regards, Mandar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Signal 11 Error: An unexpected exception in native code outside the VM
Right now the server has all of the latest and greatest patches from Red Hat. We are still seeing crashes about once a day. I am also observing a significant memory leak on this box, though I can't figure out if its Tomcat, java, the code or something else - once the memory gets low enough tomcat crashes. I am planning on making the following config changes to hopefully remedy this problem: -Xms512m -Xmx512m -XX:NewSize=256m -XX:MaxNewSize=512m -Xincgc This machine has about 2gb of memory and the app running on it is fairly database intensive. Can someone tell me if these settings make sense? Thanks again. --- Shapira, Yoav [EMAIL PROTECTED] wrote: Howdy, Signal 11 is a segmentation error (I think), which would be caused by attempting to access an invalid memory address. This in turn might be caused by attempting (in native code) to construct an instance of a Java class that the class loader can't find, something like: This is unnecessarily restrictive, although a possible explanation, as signal 11 is not just segmentation fault. HotSpot categorizes many external/native exceptions as signal 11's. The most frequent cause for these errors is a missing or old OS patch, e.g. the threading library. You must ensure your OS is properly updated. For example, the Solaris patches for JDK 1.4.2 are here: http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/J2SE The RedHat patches should be somewhere on the RedHat site. A second cause for this, though increasingly rare nowadays, is an improperly compiled JVM. Then again, if you know enough to build your own JVM in the first place I don't think you're even reading this message ;) Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Signal 11 Error: An unexpected exception in native code outside the VM
Howdy, Right now the server has all of the latest and greatest patches from Red Hat. We are still seeing crashes about once a day. OK, so we can rule out OS patches as the cause ;) I am also observing a significant memory leak on this box, though I can't figure out if its Tomcat, java, the code or something else - once the memory gets low enough tomcat crashes. Once the memory gets low enough, the server will crash, yes. It's likely that if you find and fix the memory leak, your crashing problem will go away. I am planning on making the following config changes to hopefully remedy this problem: -Xms512m -Xmx512m -XX:NewSize=256m -XX:MaxNewSize=512m -Xincgc Doesn't make sense at all. The new generation size should never be the entire heap, as that leaves no room for long-lived objects and will have your JVM thrashing all the time. If your machine has 2GB of memory, maybe something like -Xmx1024m -XX:MaxNewSize=256m is more reasonable. Experiment with incremental collection (-Xincgc) but don't expect it to be a miracle cure. Finally, if your memory leak is serious enough, your garbage collections settings may not help at all. Use a profiler to determine where and why the memory leak is happening, and fix it in the code. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache Authentication with Tomcat
I'm trying to protect a /downloads url in apache. My webapp in Tomcat is in ROOT. So in the workers2.properties file under apache, I have: # Map the webapp to the Web server uri space [uri:/*] info=my website So my app is working fine requests for /* are passed to Tomcat and things are wonderful. But I want to protect /downloads using apache. But there really is no directory under apache called \apache\apache2\htdocs\downloads. There is no need for one since requests are sent to Tomcat. The real directory is \Tomcat4.1\webapps\ROOT\downloads. When I remove [uri:/*] from workers2.properties and create a dummy htdocs\downloads directory under apache, the apache authentication works fine. But when I put [uri:/*] back, I do not get prompted for ID/Password. Here is what I have in httpd.conf. Any ideas? Directory d:\Apache\Apache2\htdocs\downloads AuthType Basic AuthName FGIC Downloads AuthUserFile d:\apache\apache2\conf\passwords AuthGroupFile d:\apache\apache2\conf\groups Require group FGICMoodys /Directory I tried using: Directory d:\Tomcat4.1\webapps\ROOT\downloads but that didn't work. Ideally, I want to tell apache to protect a URL not a file system path, but obviously, that is not the syntax for the Directory directive. Windows 2000 Tomcat 4.1.27 Apache 2.0.47 JK2 2.0.43 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNDIRealm LDAP Configuration Problem
Hi I am using the following Tomcat: 4.1.27-LE-jdk14 Apache: 2.0.47 Java : 1.4.2 Linux OS: 7.3 iPlanet LDAP Server I am trying to configure LDAP authentication mechanism to my application. 1) In this regard i have downloaded the latest JNDI API and then copied the ldap.jar file to $CATALINA_HOME/server/lib directory. 2) The i have added the following entry to the server.xml file. Realm className=org.apache.catalina.realm.JNDIRealm connectionURL=ldap://ldap.mycompany.com:389; userBase=ou=active,ou=employees,ou=people,o=mycompany.com userSearch=(uid={0}) roleSearch=(uniqueMember={0}) roleName=cn debug=99 contextFactory=com.sun.jndi.ldap.LdapCtxFactory / 3) In my application web.xml file i have added the following security-constraint web-resource-collection web-resource-nameNrt/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameCEC/realm-name /login-config Then i have restarted the tomcat and apache. I get the prompt for userid and password, but when i provide the correct userid/password i get an message saying incorrect userid and password, i think i am missing something in the configuration and tomcat is not talking with LDAP, was wondering if you can provide some inputs on this. Appreciate your help and time. Thanks - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
RE: Apache Authentication with Tomcat
Hi Neil, Use a Location directive in your httpd.conf instead. e.g.: Location /downloads AuthType Basic AuthName FGIC Downloads AuthUserFile d:\apache\apache2\conf\passwords AuthGroupFile d:\apache\apache2\conf\groups Require group FGICMoodys /Location Directory directives apply to the filesystem, Location directives apply to the URL space. See the Apache manual for more details: http://httpd.apache.org/docs-2.0/mod/core.html#location Regards, Morgan -Original Message- From: Boemio, Neil (GEI, FGI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 17:17 To: [EMAIL PROTECTED] Subject: Apache Authentication with Tomcat I'm trying to protect a /downloads url in apache. My webapp in Tomcat is in ROOT. So in the workers2.properties file under apache, I have: # Map the webapp to the Web server uri space [uri:/*] info=my website So my app is working fine requests for /* are passed to Tomcat and things are wonderful. But I want to protect /downloads using apache. But there really is no directory under apache called \apache\apache2\htdocs\downloads. There is no need for one since requests are sent to Tomcat. The real directory is \Tomcat4.1\webapps\ROOT\downloads. When I remove [uri:/*] from workers2.properties and create a dummy htdocs\downloads directory under apache, the apache authentication works fine. But when I put [uri:/*] back, I do not get prompted for ID/Password. Here is what I have in httpd.conf. Any ideas? Directory d:\Apache\Apache2\htdocs\downloads AuthType Basic AuthName FGIC Downloads AuthUserFile d:\apache\apache2\conf\passwords AuthGroupFile d:\apache\apache2\conf\groups Require group FGICMoodys /Directory I tried using: Directory d:\Tomcat4.1\webapps\ROOT\downloads but that didn't work. Ideally, I want to tell apache to protect a URL not a file system path, but obviously, that is not the syntax for the Directory directive. Windows 2000 Tomcat 4.1.27 Apache 2.0.47 JK2 2.0.43 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpSessionListener
Jon Wingfield [EMAIL PROTECTED] wrote: In servlet spec version 2.4 (proposed final draft 3) the javadoc comments for sessionDestroyed are now: Notification that a session is about to be invalidated. Tomcat 4.x.x implements the former spec, Tomcat 5 will implement the 2.4 spec. In the meantime I tested this on Tomcat 5.0.9. But it seems that Tomcat calls the method after it has invalidated the session. I get an exception: 14:51:34,893 INFO [ManagerBase] Session event listener threw exception java.lang.IllegalStateException: getAttribute: Session already invalidated at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.jav a:982) at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessi onFacade.java:166) at de.jexam.web.servlet.WebUserSessionLoginManager.sessionDestroyed(WebUserSess ionLoginManager.java:99) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:683) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:641) at org.apache.catalina.session.StandardManager.processExpires(StandardManager.j ava:819) at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.j ava:4363) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC hildren(ContainerBase.java:1660) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC hildren(ContainerBase.java:1669) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processC hildren(ContainerBase.java:1669) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(Cont ainerBase.java:1649) at java.lang.Thread.run(Thread.java:536) If I interpret the Servlet 2.4 draft specification right than Tomcat shows a wrong behaviour. Maybe it's time to open a bug? Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat sucks at receiving large messages
When receiving a HTTP 1.0 POST with a 10kbyte payload, my doPost() method writes the message body to a file. The file is the right size, but my data is nulled out (set to 0) after correctly receiving about 2kbytes. In frustration, I set the Connector bufferSize parameter to 100, to discover that I could now receive about 4kbytes of my 10kbyte message. I then proceeded to write my own Java server to receive the message and write it to a file, and it works just fine. I am at a loss - can anyone suggest what could be causing this problem? Vitals: Tomcat version: 4.1.27 Tomcat configuration: Out-of-the-box (except for my app's WEB-INF) OS: solaris 2.9 My servlet skill level: medium-low - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests
Thanks, Larry. Not knowing any Java I managed to write (or rather copy) something for postRequest. Seems to work fine. Now my question is, is it possible to compile that module so I get a single .class file that I can copy somewhere in the official binary tree? What works for me is have the .java in share/org/apache/tomcat/modules/loggers, add org... to modules.xml and server.xml and have ant make new jar files. I couldn't find anything in the docs in that regard that I could understand. Thanks, Michael -Original Message- From: Larry Isaacs Sent: Monday, September 29, 2003 7:32 PM To: Tomcat Users List Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests You could implement your own interceptor and use one of the hooks more suitable than beforeCommit(), perhaps postReadRequest(), contextMap(), or postRequest(). I don't know if there is an existing interceptor that with the right debug level would give you want you want without giving you too much log output. Larry -Original Message- From: Lemke, Michael IZ/HZA-IE5 Sent: Monday, September 29, 2003 6:40 AM To: 'Tomcat Users List' Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests A long time ago I sent the attached message. There was no solution to the problem. It has just come up again and I am wondering what options there are to get *everything* logged. Would a combination with Apache solve this? We need to somehow be able to proove that we have or have not received a certain request. Thanks, Michael -Original Message- From: Larry Isaacs Sent: Tuesday, July 02, 2002 2:10 PM To: 'Tomcat Users List' Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests AcessLogInterceptor writes the log entry using the beforeCommit() hook. If no response is generated by the request, then it appears that no log entry would be created. Cheers, Larry -Original Message- From: Lemke, Michael IZ/HZA-IC1 Sent: Tuesday, July 02, 2002 4:10 AM To: 'Tomcat Users List' Subject: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests We are running Tomcat 3.3.1 in standalone mode (no Apache etc) and log requestes to AccessLog with AccessLogInterceptor. Unless we misconfigured something it seems like PUT requests only show up in the log if they produced an error (404, 500). Is this a configuration problem or is there something wrong with AccessLogInterceptor? Thnaks, Michael -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat sucks at receiving large messages
Howdy, Perhaps if you share your servlet which writes the message body to a file, we could help you write a better servlet ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Stewart, Daniel J [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 11:31 AM To: [EMAIL PROTECTED] Subject: Tomcat sucks at receiving large messages When receiving a HTTP 1.0 POST with a 10kbyte payload, my doPost() method writes the message body to a file. The file is the right size, but my data is nulled out (set to 0) after correctly receiving about 2kbytes. In frustration, I set the Connector bufferSize parameter to 100, to discover that I could now receive about 4kbytes of my 10kbyte message. I then proceeded to write my own Java server to receive the message and write it to a file, and it works just fine. I am at a loss - can anyone suggest what could be causing this problem? Vitals: Tomcat version: 4.1.27 Tomcat configuration: Out-of-the-box (except for my app's WEB-INF) OS: solaris 2.9 My servlet skill level: medium-low - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JasperException?
It's a NullPointerException at line 136 of the servlet createReader_jsp.java generated from your jsp source. Have a look at that file. It's somewhere in tomcat's work directory. As to commenting out: if you've used a HTML comment in the jsp then the underlying java code is still generated and executed at runtime. If you use java comments within the scriptlet then it won't ;) Again, have a look in the createReader_jsp.java file to see what actually got generated. Jon Rishikesh Tembe wrote: hi, I get the foll. error message when I try to run my JSP, which has just one expression. Since I get the exception even when I comment this out, this leads me to think that somehow Tomcat is not able to run my JSP. Any ideas? thanks, Rishi exception org.apache.jasper.JasperException at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) root cause java.lang.NullPointerException at org.apache.jsp.createReader_jsp._jspService(createReader_jsp.java:136) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at
Re: JSP Compilation Issues
There is a JAVA language spec limitation that a method may only be so big. You are over the limit. There is a jasper option to map text to a file. I've never used it myself and don't know if it works (still). But look at $TOMCAT_HOME/conf/web.xml and look at the JSP options. There should be something about mappedFiles documented there. -Tim Dean Fantham wrote: I have a JSP page that is large (contains a large series of tables for displaying lots of data). It is about 2000 lines of HTML. When trying to run this on Tomcat 4.1.27 I get the following error: [ServletException in:/schedule/operational/view.month.jsp] Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Compiling 1 source file C:\dean\dev-tools\Tomcat 4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:116 12: code too large for try statement } catch (Throwable t) { ^ C:\dean\dev-tools\Tomcat 4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:30: code too large for try statement try { ^ C:\dean\dev-tools\Tomcat 4.1\work\Standalone\localhost\_\schedule\operational\view_month_jsp.java:17: code too large public void _jspService(HttpServletRequest request, HttpServletResponse response) ^ 3 errors ' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache Authentication with Tomcat
Excellent! This did the trick. Thanks! Now I get prompted and I can login but for some reason, request.getRemoteUser(), returns null. I am porting this application to Tomcat and this used to work just fine in JRun. Any ideas? -Original Message- From: Morgan Pyne [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 11:27 AM To: Tomcat Users List Subject: RE: Apache Authentication with Tomcat Hi Neil, Use a Location directive in your httpd.conf instead. e.g.: Location /downloads AuthType Basic AuthName FGIC Downloads AuthUserFile d:\apache\apache2\conf\passwords AuthGroupFile d:\apache\apache2\conf\groups Require group FGICMoodys /Location Directory directives apply to the filesystem, Location directives apply to the URL space. See the Apache manual for more details: http://httpd.apache.org/docs-2.0/mod/core.html#location Regards, Morgan -Original Message- From: Boemio, Neil (GEI, FGI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 17:17 To: [EMAIL PROTECTED] Subject: Apache Authentication with Tomcat I'm trying to protect a /downloads url in apache. My webapp in Tomcat is in ROOT. So in the workers2.properties file under apache, I have: # Map the webapp to the Web server uri space [uri:/*] info=my website So my app is working fine requests for /* are passed to Tomcat and things are wonderful. But I want to protect /downloads using apache. But there really is no directory under apache called \apache\apache2\htdocs\downloads. There is no need for one since requests are sent to Tomcat. The real directory is \Tomcat4.1\webapps\ROOT\downloads. When I remove [uri:/*] from workers2.properties and create a dummy htdocs\downloads directory under apache, the apache authentication works fine. But when I put [uri:/*] back, I do not get prompted for ID/Password. Here is what I have in httpd.conf. Any ideas? Directory d:\Apache\Apache2\htdocs\downloads AuthType Basic AuthName FGIC Downloads AuthUserFile d:\apache\apache2\conf\passwords AuthGroupFile d:\apache\apache2\conf\groups Require group FGICMoodys /Directory I tried using: Directory d:\Tomcat4.1\webapps\ROOT\downloads but that didn't work. Ideally, I want to tell apache to protect a URL not a file system path, but obviously, that is not the syntax for the Directory directive. Windows 2000 Tomcat 4.1.27 Apache 2.0.47 JK2 2.0.43 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache Authentication with Tomcat
http://marc.theaimsgroup.com/?l=tomcat-userm=106070071117870w=2 -Original Message- From: Boemio, Neil (GEI, FGI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 11:59 AM To: Tomcat Users List Subject: RE: Apache Authentication with Tomcat Excellent! This did the trick. Thanks! Now I get prompted and I can login but for some reason, request.getRemoteUser(), returns null. I am porting this application to Tomcat and this used to work just fine in JRun. Any ideas? -Original Message- From: Morgan Pyne [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 11:27 AM To: Tomcat Users List Subject: RE: Apache Authentication with Tomcat Hi Neil, Use a Location directive in your httpd.conf instead. e.g.: Location /downloads AuthType Basic AuthName FGIC Downloads AuthUserFile d:\apache\apache2\conf\passwords AuthGroupFile d:\apache\apache2\conf\groups Require group FGICMoodys /Location Directory directives apply to the filesystem, Location directives apply to the URL space. See the Apache manual for more details: http://httpd.apache.org/docs-2.0/mod/core.html#location Regards, Morgan -Original Message- From: Boemio, Neil (GEI, FGI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 17:17 To: [EMAIL PROTECTED] Subject: Apache Authentication with Tomcat I'm trying to protect a /downloads url in apache. My webapp in Tomcat is in ROOT. So in the workers2.properties file under apache, I have: # Map the webapp to the Web server uri space [uri:/*] info=my website So my app is working fine requests for /* are passed to Tomcat and things are wonderful. But I want to protect /downloads using apache. But there really is no directory under apache called \apache\apache2\htdocs\downloads. There is no need for one since requests are sent to Tomcat. The real directory is \Tomcat4.1\webapps\ROOT\downloads. When I remove [uri:/*] from workers2.properties and create a dummy htdocs\downloads directory under apache, the apache authentication works fine. But when I put [uri:/*] back, I do not get prompted for ID/Password. Here is what I have in httpd.conf. Any ideas? Directory d:\Apache\Apache2\htdocs\downloads AuthType Basic AuthName FGIC Downloads AuthUserFile d:\apache\apache2\conf\passwords AuthGroupFile d:\apache\apache2\conf\groups Require group FGICMoodys /Directory I tried using: Directory d:\Tomcat4.1\webapps\ROOT\downloads but that didn't work. Ideally, I want to tell apache to protect a URL not a file system path, but obviously, that is not the syntax for the Directory directive. Windows 2000 Tomcat 4.1.27 Apache 2.0.47 JK2 2.0.43 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Web App Using JSTL Is Still Failing Under Tomcat 4.0.6
Yoav Shapiro, I hope you're still out there. I wrote earlier this morning about a Web app, deployed as a WAR with a context.xml, that deployed and ran fine under Tomcat 4.1.24 but failed under 4.0.6. You pointed out that 4.0.6 requires modifications to the server.xml. I modified my server.xml for Tomcat 4.0.6, per your suggestion. When I did it, I added three apps, all of which use JSTL: (1) An HTTP echo JSP that simply echoes back header and request info. It lets me make sure that I'm connecting properly. It uses the JSTL core and format tags. (2) A JNDI data source that lets me enter ad hoc SQL queries in a text area and displays the results in a table. It lets me check to be sure that I can connect to a database properly and have my data source set up right. It uses the JSTL core, format, and SQL tags. (3) My Web app that uses JSTL core and format tags. (1) and (2) deploy and run perfectly. (3) deploys without any error messages to the log, but I still get that exception when I invoke the index.jsp: 2003-09-30 12:16:10 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: /index.jsp(4,0) No such tag redirect in the tag library imported with prefix c I checked the standard.jar to make sure that it was there and the URI in the .tld file was correct. The JSP itself is quite simple: %@ page language=java % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % c:redirect url=api-welcome.jsp/ It complains about the c:redirect tag. Why does this app have problems with JSTL tags and the others don't? - MOD __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Pointing a ServerOutputStream at the printer? Possible?
Hi, I want to have a print button on my site which prints the result of a JSP being processed. What I don't want is for this JSP to have to be viewed by the user. I could just bring the jsp up in another frame and then have the JavaScript print that frame. What I would prefer is to have is something that the user clicks on and it streams (this word may be misleading here) the result of rendering the JSP to the printer. I can do this so that it sends the text to a file using the ServletOutputStream myOs = res.getOutputStream() and then using myOs.write(byte[]) to send data to a file but I don't know how to send the data to the printer. Can you please help? Kind regards, Andoni. PS: If anyone wants the code for the file version just let me know. A.
Re: Pointing a ServerOutputStream at the printer? Possible?
The JSP output stream is HTML, of course, so your printer would have to be smart enough to take HTML and render it like a browser. I think if you just send the stream to a printer, all you'll get out is the HTML text. That aside, have a look at the javax.print API. That will let you send to a printer. Maybe you can render your data as a PDF or something else and then print that. - MOD --- Andoni [EMAIL PROTECTED] wrote: Hi, I want to have a print button on my site which prints the result of a JSP being processed. What I don't want is for this JSP to have to be viewed by the user. I could just bring the jsp up in another frame and then have the JavaScript print that frame. What I would prefer is to have is something that the user clicks on and it streams (this word may be misleading here) the result of rendering the JSP to the printer. I can do this so that it sends the text to a file using the ServletOutputStream myOs = res.getOutputStream() and then using myOs.write(byte[]) to send data to a file but I don't know how to send the data to the printer. Can you please help? Kind regards, Andoni. PS: If anyone wants the code for the file version just let me know. A. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
admin app problems
Hi, I have a server with tomcat 4.1.27 installed. The server is located somewhere else and I can not change any non tomcat software or settings. The server has a admin application to administer the server over the internet. i don't know how this is done. Now tomcat has an admin app itself. It can be reached by something like : http://mydomain.com/admin At least that would be the case if all was normal. Now the admin app of the server itself will be started. I renamed the tomcat admin app to admin2. I renamed the admin.xml file in webapps to admin2.xml and changed the context path to /admin2. When I now use http://mydomain.com/admin2 I start the tomcat admin app and I have to login. All is normal so far. I get the normal page and can choose several items under Resources and User Definitions. When I select one of these items I get an error message 503. In the tomcat log it says : javax.servlet.UnavailableException: MBeanServer is not available Can someone explain to me what this means and how I can solve it ? Sorry for all the noise in the message but I'm not sure what is necessary for an answer. Kind regards Werner van Mook - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Web App Using JSTL Is Still Failing Under Tomcat 4.0.6
Howdy, Yoav Shapiro, I hope you're still out there. I'm always out here ;) Sometimes I don't feel like answering but as I mentioned on taglibs-user, this is more interesting than most questions on the list. (1) and (2) deploy and run perfectly. (3) deploys without any error messages to the log, but I still get that exception when I invoke the index.jsp: OK, so we know your JSTL implementation used by apps 1 and 2 is fine, and that your tomcat installation is fine. The problem has to be in how webapp 3, your app, configures JSTL. Are the taglib files in the right place? Do the declarations in webapp 3's web.xml file match the taglib locations? You're also sure you have the distributed version of the core taglib, right? Not some customized version that may not have the redirect tag defined? In any case, it can't hurt to double-check the core .tld file and make sure the redirect tag is defined there. The JSP itself is quite simple: %@ page language=java % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % c:redirect url=api-welcome.jsp/ It complains about the c:redirect tag. Yup, line 4 char 0 from the error messages is that redirect tag. I would also enable more verbose output from the JSP servlet (defined in $CATALINA_HOME/conf/web.xml). Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
enable GET within Tomcat
I am migrating from a IIS box to Tomcat, and we had enabled the write function to a designated site, so I could accept PUT data. I tried using existing code, but I am getting a 403, which tells me I need to somehow turn PUT on within the Tomcat. I am running Tomcat 4.0.6 on Win2000. Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem regarding a popup related to: org.apache.catalina.startup.Bootstrap
Hello, I get a pop up icon for org.apache.catalina.startup.Bootstrap on my doc on MAC OS X when I click on the link in my web app which generates and sends a pdf file to the client browser. Once this popup is there the application works as expected, but if I quit this popup, tomcat shuts off automatically. Catalina.out doesn't show any log information for this action. If I run the same web app on Windows XP I do not get any pop ups. Here is the configuration of both platforms that I tested on, Platform: Mac OS X (10.2.6), Tomcat 4.1.18, jdk 1.4.1 Platform: Windows XP, Tomcat 4.1.18, jdk 1.4.1 From my search on the web, for this strange pop up behaviour, I learnt that org.apache.catalina.startup.Bootstrap is used to load the jar files at the application level. Here is the list of jar files that I use and are in WEB-INF/lib forlder of my application: 1. avalon-framework.jar 2. Batik.jar 3. fop.jar 4. xalan.jar 5. mysql-connector.jar (The first 4 are used in the pdf generation and the 5th jar is the mysql jdbc driver) I don't want this popup icon to appear in my doc of MAC OS X. Can anybody suggest as to what could be the reason for this pop up and what could be done so that it would not show up? Thanks, Mufaddal. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Strange Perfomance Issue, Tomcat more than 10 times slower than Jetty
hi, i posted this issue before, and decided to run my test with another servlet container, before saying: it a problem with tomcat. (I'm running tomcat 4.1.27 with JDK 1.4.2 on RH8) I have a small test class, that - Lookup an Entity EJB - get a property from the Bean - serialize the bean using betwixt I runned the classes main-method form different environments, but all with the same jvm parameters (-server -Xms1200m -Xmx1200m). In tomcat it slowes down dramaticly: |Command Line | from Servlet | from Servlet | | in Tomcat| in Jetty --+-+--+--- Lookup| 144 ms | 2490 ms | 143 ms Getter| 17 ms | 2843 ms |21 ms Serialize | 708 ms | 64147 ms | 947 ms Has anybody an idea what causes this slowdown, or anybody seen something similar before? What am I doing wrong? Any help would be apriciated. Thanks a lot, regards Christoph Gaffga [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat manager is not working
I just install tomcat 4.1.27/j2sdk1.4 on redhat 7.3. I also add admin and manger roles for my self. The tomcat admin is working fine but not tomcat manager. I also check the permissions that everything is correct. Does anyone experience this? HTTP Status 403 - Access to the requested resource has been denied type Status report message Access to the requested resource has been denied description Access to the specified resource (Access to the requested resource has been denied) has been forbidden. Apache Tomcat/4.1.27 Cody Wang Programmer / Analyst California Lutheran University -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat manager is not working
Howdy, A little more information would be helpful, namely: - Your tomcat-users.xml file - Your access log (if you don't have it enabled, comment in the AccessLogValve in server.xml) Yoav Shapira Millennium ChemInformatics -Original Message- From: cody wang [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 1:48 PM To: [EMAIL PROTECTED] Subject: Tomcat manager is not working I just install tomcat 4.1.27/j2sdk1.4 on redhat 7.3. I also add admin and manger roles for my self. The tomcat admin is working fine but not tomcat manager. I also check the permissions that everything is correct. Does anyone experience this? HTTP Status 403 - Access to the requested resource has been denied --- - type Status report message Access to the requested resource has been denied description Access to the specified resource (Access to the requested resource has been denied) has been forbidden. --- - Apache Tomcat/4.1.27 Cody Wang Programmer / Analyst California Lutheran University -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat manager is not working
What is the url? The correct one should be http://localhost/manager/html/, please refer to http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html -Original Message- From: cody wang [mailto:[EMAIL PROTECTED] Sent: September 30, 2003 1:48 PM To: [EMAIL PROTECTED] Subject: Tomcat manager is not working I just install tomcat 4.1.27/j2sdk1.4 on redhat 7.3. I also add admin and manger roles for my self. The tomcat admin is working fine but not tomcat manager. I also check the permissions that everything is correct. Does anyone experience this? HTTP Status 403 - Access to the requested resource has been denied type Status report message Access to the requested resource has been denied description Access to the specified resource (Access to the requested resource has been denied) has been forbidden. Apache Tomcat/4.1.27 Cody Wang Programmer / Analyst California Lutheran University -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat manager is not working
Why is my link point to http://localhost:8080/manager/html? How can I correct? -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 10:53 AM To: 'Tomcat Users List' Subject: RE: Tomcat manager is not working What is the url? The correct one should be http://localhost/manager/html/, please refer to http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html -Original Message- From: cody wang [mailto:[EMAIL PROTECTED] Sent: September 30, 2003 1:48 PM To: [EMAIL PROTECTED] Subject: Tomcat manager is not working I just install tomcat 4.1.27/j2sdk1.4 on redhat 7.3. I also add admin and manger roles for my self. The tomcat admin is working fine but not tomcat manager. I also check the permissions that everything is correct. Does anyone experience this? HTTP Status 403 - Access to the requested resource has been denied type Status report message Access to the requested resource has been denied description Access to the specified resource (Access to the requested resource has been denied) has been forbidden. Apache Tomcat/4.1.27 Cody Wang Programmer / Analyst California Lutheran University -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet *** -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat sucks at receiving large messages
Here it is: public class AdapterServlet extends HttpServlet { public void service(HttpServletRequest req, HttpServletResponse res) { BufferedReader reader = req.getReader(); try { char [] charArr = new char[req.getContentLength()]; reader.read(charArr); String str = new String(charArr); try { File f = new File(servlet.out); PrintWriter out = new PrintWriter(new FileWriter(f)); out.print(str); out.flush(); out.close(); } catch(IOException err { System.err.println(err.toString()); } } catch(IOException err) { System.err.println(err.toString()); } } -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 8:34 AM To: Tomcat Users List Subject: RE: Tomcat sucks at receiving large messages Howdy, Perhaps if you share your servlet which writes the message body to a file, we could help you write a better servlet ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Stewart, Daniel J [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 11:31 AM To: [EMAIL PROTECTED] Subject: Tomcat sucks at receiving large messages When receiving a HTTP 1.0 POST with a 10kbyte payload, my doPost() method writes the message body to a file. The file is the right size, but my data is nulled out (set to 0) after correctly receiving about 2kbytes. In frustration, I set the Connector bufferSize parameter to 100, to discover that I could now receive about 4kbytes of my 10kbyte message. I then proceeded to write my own Java server to receive the message and write it to a file, and it works just fine. I am at a loss - can anyone suggest what could be causing this problem? Vitals: Tomcat version: 4.1.27 Tomcat configuration: Out-of-the-box (except for my app's WEB-INF) OS: solaris 2.9 My servlet skill level: medium-low - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SSL Client Authorization
I'm looking for a good overview of how to achieve certificated based client authorization using Tomcat. I've configured SSL and have set the clientAuth=true. This seems to prohibit client access. I'm assuming this is because the client is not authorized. My question might be somewhat elementary: who creates client certificates, how are they created, and what needs to be done on the server to authorize a client in Tomcat, etc.? I'd appreciate any help! Thanks, Rich = = Rich Paterson [EMAIL PROTECTED] 214.405.5618 = __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Objects lost in session
Sorry for the long email. I am using Tomcat 4.124 for my servlet engine and IIS for my web server. I am monitoring exceptions that occur in my system and this one has me confused. The exception is: java.lang.NullPointerException at ParentClass.getQualificationMessage(ParentClass.java:483) at ChildClass.finishDocumentUpload(ChildClass.java:135) at ... The parent class method is failing when it tries to call a method on the Position object that it retrieved from the session. It looks like the Position object is null in the session: protected static final String getQualificationMessage( HttpServletRequest request){ HttpSession session = request.getSession(); int employerId = ((Integer)session.getAttribute(RC.EMPLOYER_ID)) .intValue(); (483)int positionId = ((Position)session.getAttribute(RC.POSITION)).getPositionId(); ... What I can't explain is that the ChildClass method that has called the above method was able to retrieve the position object from the session and call a method on it. That makes me believe that the position object existed in the session at that time: I have a Position object stored as a session attribute with the attribure name RC.POSITION. protected static final String finishDocumentUpload( HttpServletRequest request, EmployerConfiguration ec){ HttpSession session =request.getSession(); Position position = (Position)session.getAttribute(RC.POSITION); if (position.attachDocumentsOnly()){ return forwardToOriginalPage(request, ec); } else { 135 return getQualificationMessage(request); } } I cannot reproduce this error (which is making me crazy), but I see similar things happening every once in a while in my exception log. Any ideas? Thanks for your help, -tim
RE: Tomcat sucks at receiving large messages
Howdy, public void service(HttpServletRequest req, HttpServletResponse res) { BufferedReader reader = req.getReader(); try { char [] charArr = new char[req.getContentLength()]; reader.read(charArr); String str = new String(charArr); try { File f = new File(servlet.out); PrintWriter out = new PrintWriter(new FileWriter(f)); out.print(str); out.flush(); out.close(); } catch(IOException err { System.err.println(err.toString()); } } catch(IOException err) { System.err.println(err.toString()); } } What happens if you ditch the req.getContentLength() approach (there are times when it will be -1 anyways), and do something like: BufferedReader reader = req.getReader(); StringBuffer contents = new StringBuffer(); String line = null; while((line = reader.readLine()) != null) { contents.append(line); } System.out.println(contents); (Later we'll worry about the writing -- first make sure you're reading the entire contents). Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LE-jdk14 Required for J2SDK 1.4?
Have been using Tomcat 4.1.27 under J2SDK 1.4.2_01. Am I required to use version 4.1.27-LE-jdk14 instead, or is that just an alternative in case (fill in the blank)? -- Seth -Original Message- From: Rich Paterson [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 2:06 PM To: [EMAIL PROTECTED] Subject: SSL Client Authorization I'm looking for a good overview of how to achieve certificated based client authorization using Tomcat. I've configured SSL and have set the clientAuth=true. This seems to prohibit client access. I'm assuming this is because the client is not authorized. My question might be somewhat elementary: who creates client certificates, how are they created, and what needs to be done on the server to authorize a client in Tomcat, etc.? I'd appreciate any help! Thanks, Rich = = Rich Paterson [EMAIL PROTECTED] 214.405.5618 = __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
j2ee.jar - need JMS services from another server
I need to get JMS (J2EE) services from another server - and accordingly need a number of classes in the j2ee.jar. Apparently, one is not able to add this jar to the common/lib directory because of conflicts with some of the Tomcat jars having duplicate classes. Is there a standard (or customary) approach to make J2EE classes available to a Tomcat deployed application? Thx, Marvin Toll -- *** *Email: mailto:[EMAIL PROTECTED] * Cell Phone: 248.866.4897 [USA] * Text Message: mailto:[EMAIL PROTECTED] * Web: http://gtcGroup.com ***
RE: LE-jdk14 Required for J2SDK 1.4?
Howdy, It's just an alternative for some special cases. If the full edition works fine (as it should) for you, keep using it. Yoav Shapira Millennium ChemInformatics -Original Message- From: Seth Rubin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 2:40 PM To: Tomcat Users List Subject: LE-jdk14 Required for J2SDK 1.4? Have been using Tomcat 4.1.27 under J2SDK 1.4.2_01. Am I required to use version 4.1.27-LE-jdk14 instead, or is that just an alternative in case (fill in the blank)? -- Seth -Original Message- From: Rich Paterson [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 2:06 PM To: [EMAIL PROTECTED] Subject: SSL Client Authorization I'm looking for a good overview of how to achieve certificated based client authorization using Tomcat. I've configured SSL and have set the clientAuth=true. This seems to prohibit client access. I'm assuming this is because the client is not authorized. My question might be somewhat elementary: who creates client certificates, how are they created, and what needs to be done on the server to authorize a client in Tomcat, etc.? I'd appreciate any help! Thanks, Rich = = Rich Paterson [EMAIL PROTECTED] 214.405.5618 = __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: j2ee.jar - need JMS services from another server
Howdy, There's no standard: it depends on what you need. Jms.jar and your server's InitialContext implementation jar (e.g. openjms-x.y.z-client.jar for OpenJMS) are typically used for connecting tomcat to a remote JMS server. Yoav Shapira Millennium ChemInformatics -Original Message- From: Marvin D. Toll [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 2:44 PM To: [EMAIL PROTECTED] Subject: j2ee.jar - need JMS services from another server I need to get JMS (J2EE) services from another server - and accordingly need a number of classes in the j2ee.jar. Apparently, one is not able to add this jar to the common/lib directory because of conflicts with some of the Tomcat jars having duplicate classes. Is there a standard (or customary) approach to make J2EE classes available to a Tomcat deployed application? Thx, Marvin Toll -- *** *Email: mailto:[EMAIL PROTECTED] * Cell Phone: 248.866.4897 [USA] * Text Message: mailto:[EMAIL PROTECTED] * Web: http://gtcGroup.com *** This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
StackOverFlowError--Please help
Hi All, I am having a problem when doing servlet chaining. I have a code snippet like this if(flag) { requestdispatcher.forward(request,response); } else { requestdispatcher.forward(request,response); } The problem is if flag is true the forward and I get the desired result. But in the else case I get a java.lang.StackOverFlowError . The stack trace is java.lang.StackOverflowError at org.apache.catalina.core.ApplicationHttpRequest.removeAttribute(ApplicationH ttpRequest.java:229) And the error is at the forward of the false case. Can somebody help me with this problem. Thanks in advance, shyam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NullPointerException during HttpServletRequest.getSession
New to tomcat and Servlet code, and for that matter posting on this forum so please bear with me ;-) The symptom is a NullPointerException when I call getSession() on an HttpServletRequest object. The HttpServletRequest object had previously been saved as an attribute of the Session that it contained. I've tried to excise the code as much as possible, and in doing so omitted mention of the original HttpServlet subclass (SiteServlet in the stack trace) that created the original request. Let me know if it would be helpful to include that. Note that getSession() did not throw an exception until after the HttpServletRequest object was stored (while authentication took place) and later retrieved. I tried looking at the CoyoteRequestFacade code but the directory containing it in the public download site was empty! That was the code that threw the actual exception so I'm sure it could give some insight. Here is the stack trace (truncated for your viewing pleasure:) java.lang.NullPointerException org.apache.coyote.tomcat4.CoyoteRequestFacade.getSession(CoyoteRequestFacade.java:365) @cbil.gus.servlet.annotator.AnnotPage.generatePage(AnnotPage.java:210) @cbil.jweb.pages.PasswordPage.invokeOriginalRequest(PasswordPage.java:118) @cbil.jweb.pages.PasswordPage.generatePage(PasswordPage.java:160) @cbil.jweb.SiteServlet.authenticatedAccess(SiteServlet.java:941) @cbil.jweb.SiteServlet.doGet(SiteServlet.java:1002) @cbil.jweb.SiteServlet.doPost(SiteServlet.java:1075) @javax.servlet.http.HttpServlet.service(HttpServlet.java:760) @javax.servlet.http.HttpServlet.service(HttpServlet.java:853) @org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) (etc) Here are the classes in question; again I've tried to only include the original code: //Code: /** * Receives the HttpServletRequest, stores it in the original session, * creates HTML to allow user to login, retrieves the login information * via a separate HttpServletRequest. If authentication worked, calls * invokeOriginalRequest using the original HttpServletRequest and the * original handler who made the request (in this case, the AnnotPage client). */ public class PasswordPage extends PageGeneratorA implements AuthenticatorI { public void authenticateUser(PrintWriter pw, HttpServletRequest orig_request, HttpServletResponse rp, PageGeneratorI orig_handler){ // Save original request information HttpSession session = orig_request.getSession(true); session.setAttribute(request_key, orig_request); session.setAttribute(handler_key, orig_handler); generateLoginForm(pw, session); } //note that nothing is done with the original session from the original //request. I'm not sure if the session is saved somewhere else or not. //(I'm assuming it is, but I'm not very clear on how Sessions are passed //around. The reason for my assumption is that the session is where the //original HttpServletRequest is stored.) public void generateLoginForm(PrintWriter pw, HttpSession session) { QueryUtils.generateInputDialogPage(this, pw, style, pagetitle, login_dialog, true); } /** * The generatePage method handles requests generated by the * login form. */ public void generatePage(PrintWriter pw, HttpServletRequest rq, HttpServletResponse rp) { if (rq.getParameter(login) != null) { String username = rq.getParameter(username); String password = rq.getParameter(password); HttpSession session = rq.getSession(false); if (allowAccess(username, password)) { //essentially reads from file // Store name of authenticated user in the current session session.setAttribute(user_key, username); session.setAttribute(time_key, new Date()); // Allow request to continue // invokeOriginalRequest(pw, session, rp); } } } //the original HttpServletRequest is retrieved here. It is retrieved //from the session contained in the other HttpServletRequest that is sent //when the user types in the password and clicks 'submit.' //I thought this might lead to a problem since I wasn't sure that that //session was the same in which we stored the original HttpServletRequest //(indeed they have different memory locations.) However, //the original HttpServletRequest *was* found in this session (at //least, it has the same memory location as the one we stored.) However, //when 'getSession' is called on this retrieved HttpServletRequest, //a NullPointerException is thrown (see AnnotPage.java). protected void invokeOriginalRequest(PrintWriter pw, HttpSession session, HttpServletResponse rp) { HttpServletRequest original_request =
Re: StackOverFlowError--Please help
Is it just me, or are both halves of that if statement exactly identical? Based on this snippet of code only, you should get the same results regardless of flag's value. Is there other code that checks this flag, and does the getRequestDispatcher call differently? It sounds like you are forwarding to yourself, and that whatever logic determines the value of flag is based on the forwarded request parameters, so it will always keep determining it to be false and forward once more to itself = infinite recursion. Jeff Tulley ([EMAIL PROTECTED]) (801)861-5322 Novell, Inc., The Leading Provider of Net Business Solutions http://www.novell.com [EMAIL PROTECTED] 9/30/03 12:39:12 PM Hi All, I am having a problem when doing servlet chaining. I have a code snippet like this if(flag) { requestdispatcher.forward(request,response); } else { requestdispatcher.forward(request,response); } The problem is if flag is true the forward and I get the desired result. But in the else case I get a java.lang.StackOverFlowError . The stack trace is java.lang.StackOverflowError at org.apache.catalina.core.ApplicationHttpRequest.removeAttribute(ApplicationH ttpRequest.java:229) And the error is at the forward of the false case. Can somebody help me with this problem. Thanks in advance, shyam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
enable 'PUT' followup
Hello, I am still trying to figure out how to enable 'PUT' method on a webapp. I found some old threads, and it looks like I need to find the 'security constraints' area of tomcat. Here is the thread I was following: http://www.mail-archive.com/[EMAIL PROTECTED]/msg105102.html Does anyone know how to enable this 'PUT'. Thanks, Scott -Original Message- From: Scott Purcell Sent: Tuesday, September 30, 2003 12:24 PM To: [EMAIL PROTECTED] Subject: enable GET within Tomcat I am migrating from a IIS box to Tomcat, and we had enabled the write function to a designated site, so I could accept PUT data. I tried using existing code, but I am getting a 403, which tells me I need to somehow turn PUT on within the Tomcat. I am running Tomcat 4.0.6 on Win2000. Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tag Lifecycle
All the detail you need ... http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16001 -Tim Lukas Bradley wrote: What is the lifecycle of custom tags? Are tag objects reused throughout a page? It seems as if my tags are not always being created. They are not *always* reused however. Lukas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat manager is not working
Sorry, if you don't use tomcat connector, your url should be right. -Original Message- From: cody wang [mailto:[EMAIL PROTECTED] Sent: September 30, 2003 1:58 PM To: 'Tomcat Users List' Subject: RE: Tomcat manager is not working Why is my link point to http://localhost:8080/manager/html? How can I correct? -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 10:53 AM To: 'Tomcat Users List' Subject: RE: Tomcat manager is not working What is the url? The correct one should be http://localhost/manager/html/, please refer to http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html -Original Message- From: cody wang [mailto:[EMAIL PROTECTED] Sent: September 30, 2003 1:48 PM To: [EMAIL PROTECTED] Subject: Tomcat manager is not working I just install tomcat 4.1.27/j2sdk1.4 on redhat 7.3. I also add admin and manger roles for my self. The tomcat admin is working fine but not tomcat manager. I also check the permissions that everything is correct. Does anyone experience this? HTTP Status 403 - Access to the requested resource has been denied type Status report message Access to the requested resource has been denied description Access to the specified resource (Access to the requested resource has been denied) has been forbidden. Apache Tomcat/4.1.27 Cody Wang Programmer / Analyst California Lutheran University -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet *** -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat manager is not working
When you add roles, do you also add user in tomcat-users.xml? user username=manager password=abcd roles=manager/ -Original Message- From: cody wang [mailto:[EMAIL PROTECTED] Sent: September 30, 2003 1:58 PM To: 'Tomcat Users List' Subject: RE: Tomcat manager is not working Why is my link point to http://localhost:8080/manager/html? How can I correct? -Original Message- From: Phillip Qin [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 10:53 AM To: 'Tomcat Users List' Subject: RE: Tomcat manager is not working What is the url? The correct one should be http://localhost/manager/html/, please refer to http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html -Original Message- From: cody wang [mailto:[EMAIL PROTECTED] Sent: September 30, 2003 1:48 PM To: [EMAIL PROTECTED] Subject: Tomcat manager is not working I just install tomcat 4.1.27/j2sdk1.4 on redhat 7.3. I also add admin and manger roles for my self. The tomcat admin is working fine but not tomcat manager. I also check the permissions that everything is correct. Does anyone experience this? HTTP Status 403 - Access to the requested resource has been denied type Status report message Access to the requested resource has been denied description Access to the specified resource (Access to the requested resource has been denied) has been forbidden. Apache Tomcat/4.1.27 Cody Wang Programmer / Analyst California Lutheran University -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet *** -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: j2ee.jar - need JMS services from another server
I simply need classes that are in the j2ee jar. It sounds like I'm going to need to extract those into an abridged jar for use. (By the way - the latest J2EE beta has jars (for example: j2ee.jar) that do not show contents in WinZip ... ) Shapira, Yoav [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Howdy, There's no standard: it depends on what you need. Jms.jar and your server's InitialContext implementation jar (e.g. openjms-x.y.z-client.jar for OpenJMS) are typically used for connecting tomcat to a remote JMS server. Yoav Shapira Millennium ChemInformatics -Original Message- From: Marvin D. Toll [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 2:44 PM To: [EMAIL PROTECTED] Subject: j2ee.jar - need JMS services from another server I need to get JMS (J2EE) services from another server - and accordingly need a number of classes in the j2ee.jar. Apparently, one is not able to add this jar to the common/lib directory because of conflicts with some of the Tomcat jars having duplicate classes. Is there a standard (or customary) approach to make J2EE classes available to a Tomcat deployed application? Thx, Marvin Toll -- *** *Email: mailto:[EMAIL PROTECTED] * Cell Phone: 248.866.4897 [USA] * Text Message: mailto:[EMAIL PROTECTED] * Web: http://gtcGroup.com *** This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat on Netware
There are a few possibilities: 1) That JVM version has some weird bug that effects Tomcat uniquely (But, did you say the version number incorrectly; is it really 1.3.1_08, not 1.1.3.8??). Officially we don't support Tomcat on NetWare 5.x, but I've seen it work there before I think. 2) There are some peculiarities that you need to get right for a JVM on NetWare; namely the current working directory needs to be set. (NetWare itself has no notion of this). For this, set -envCWD=sys:/tomcat/4 (for instance) in the startup command line. I've attached the startup scripts we used on NetWare 6.5, where we put Tomcat in sys:/tomcat/4 by default. I've been meaning to get these submitted to jakarta, but have not done so yet. If Tomcat is not in sys:/tomcat/4 (and the scripts in sys:/tomcat/4/bin), then you will have to edit each of these files and adjust the paths appropriately. Also, I hope that the perl scripts work fine on NetWare 5.1, they have not had much testing there. (oh, rename the scripts from the .txt ending; I added that so that they wouldn't be stripped from the mail list). Let me know if you have further questions and/or concerns with getting this working. Jeff Tulley ([EMAIL PROTECTED]) (801)861-5322 Novell, Inc., The Leading Provider of Net Business Solutions http://www.novell.com [EMAIL PROTECTED] 9/30/03 8:19:06 AM Hi There, Sorry I don't, you may have to raise a bug report for this problem. I am positive that it will be an easy fix so it should be solved relatively quickly. Hope this is ok Thanks Pete -Original Message- From: Aziz Yacoub [mailto:[EMAIL PROTECTED] Sent: 30 September 2003 15:08 To: [EMAIL PROTECTED] Subject: RE: Tomcat on Netware Thanks... do you know why tomcat would be doing this on startup?? Peter Guyatt [EMAIL PROTECTED] 30/09/2003 11:04:36 pm Yeah, The fact that you need to have the call to the method synchronized its the same as using the wait() method implemented in the Object class you need to own the lock before you can call this method eg. some method { synchronized (this) { //this is ok wait(); } } where as some method { wait(); } would throw an IllegalMonitorStateException. Hope this helps Pete -Original Message- From: Aziz Yacoub [ mailto:[EMAIL PROTECTED] Sent: 30 September 2003 13:51 To: Subject: Tomcat on Netware I've been successfully running Tomcat 4.0.4 on Novell Netware with the Novell (ie Netscape) Enterprise Server (using nsapi_rd.nlm) for many months, and now I want to upgrade to Tomcat 4.1.27. I installed and configured 4.1.27 just like 4.0.4 (ajp13, workers etc), and now it's giving the following error when I try to start it: Bootstrap: Class loader creation threw exception java.lang.IllegalMonitorStateException: current thread not owner The log file shows: [Tue Sep 30 22:27:31 2003] [jk_worker.c (88)]: Into wc_open [Tue Sep 30 22:27:31 2003] [jk_worker.c (222)]: Into build_worker_map, creating 1 workers [Tue Sep 30 22:27:31 2003] [jk_worker.c (228)]: build_worker_map, creating worker worker1 [Tue Sep 30 22:27:31 2003] [jk_worker.c (148)]: Into wc_create_worker [Tue Sep 30 22:27:31 2003] [jk_worker.c (162)]: wc_create_worker, about to create instance worker1 of ajp13 [Tue Sep 30 22:27:31 2003] [jk_ajp13_worker.c (108)]: Into ajp13_worker_factory [Tue Sep 30 22:27:31 2003] [jk_worker.c (171)]: wc_create_worker, about to validate and init worker1 [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1219)]: Into jk_worker_t::validate [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1239)]: In jk_worker_t::validate for worker worker1 contact is localhost:8009 [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1267)]: Into jk_worker_t::init [Tue Sep 30 22:27:31 2003] [jk_ajp_common.c (1287)]: In jk_worker_t::init, setting socket timeout to 0 [Tue Sep 30 22:27:31 2003] [jk_worker.c (187)]: wc_create_worker, done [Tue Sep 30 22:27:31 2003] [jk_worker.c (238)]: build_worker_map, removing old worker1 worker [Tue Sep 30 22:27:31 2003] [jk_worker.c (250)]: build_worker_map, done [Tue Sep 30 22:27:31 2003] [jk_worker.c (111)]: wc_open, done 1 [Tue Sep 30 22:28:28 2003] [jk_nsapi_plugin.c (298)]: jk_init, a second passed [Tue Sep 30 22:29:22 2003] [jk_worker.c (118)]: Into wc_close [Tue Sep 30 22:29:22 2003] [jk_worker.c (199)]: close_workers got 1 workers to destroy [Tue Sep 30 22:29:22 2003] [jk_worker.c (206)]: close_workers will destroy worker worker1 [Tue Sep 30 22:29:22 2003] [jk_ajp_common.c (1324)]: Into jk_worker_t::destroy [Tue Sep 30 22:29:22 2003] [jk_ajp_common.c (1331)]: Into jk_worker_t::destroy up to 1 endpoint to close [Tue Sep 30 22:29:22 2003] [jk_worker.c (120)]: wc_close, done The server setup is Netware 5.1 sp6, JVM 1.1.3.8, NES 5.1. Does anyone know what would cause an IllegalMonitorStateException ??? TIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: j2ee.jar - need JMS services from another server
Howdy, You are cruising for a bruising with this method, and will have to be very careful not to include classes that are already in tomcat's libraries in your abridged jar. Yoav Shapira Millennium ChemInformatics -Original Message- From: Marvin D. Toll [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 3:02 PM To: [EMAIL PROTECTED] Subject: Re: j2ee.jar - need JMS services from another server I simply need classes that are in the j2ee jar. It sounds like I'm going to need to extract those into an abridged jar for use. (By the way - the latest J2EE beta has jars (for example: j2ee.jar) that do not show contents in WinZip ... ) Shapira, Yoav [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Howdy, There's no standard: it depends on what you need. Jms.jar and your server's InitialContext implementation jar (e.g. openjms-x.y.z-client.jar for OpenJMS) are typically used for connecting tomcat to a remote JMS server. Yoav Shapira Millennium ChemInformatics -Original Message- From: Marvin D. Toll [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 2:44 PM To: [EMAIL PROTECTED] Subject: j2ee.jar - need JMS services from another server I need to get JMS (J2EE) services from another server - and accordingly need a number of classes in the j2ee.jar. Apparently, one is not able to add this jar to the common/lib directory because of conflicts with some of the Tomcat jars having duplicate classes. Is there a standard (or customary) approach to make J2EE classes available to a Tomcat deployed application? Thx, Marvin Toll -- *** *Email: mailto:[EMAIL PROTECTED] * Cell Phone: 248.866.4897 [USA] * Text Message: mailto:[EMAIL PROTECTED] * Web: http://gtcGroup.com *** This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Web App Using JSTL Is Still Failing Under Tomcat 4.0.6
Thanks very much for taking the time - I greatly appreciate it. On Shawn Bayern's sage advice, I put the standard.jar in the CLASSPATH and make the URI identical to the value in the c.tld file inside the jar. I don't put the .tld files under my WEB-INF, and I don't have any reference to them inside my web.xml. I let Tomcat sort them out using the JAR that the developers provided. Shawn Bayern gave this advice on the JSTL list a while back, and I've followed it ever since: http://www.mail-archive.com/[EMAIL PROTECTED]/msg04587.html Both the echo and data source test apps are set up that way, too. I downloaded the JSTL from Jakarta. It's the standard 1.0.3 version. I'm using only the EL tags, not the RT tags. Excellent suggestion. I went into the standard.jar and checked the class name for the c:redirect url tag. The tag class is org.apache.taglibs.standard.tag.el.core.RedirectTag, and I can see it in the JAR. I'll turn on more log messages and see what they tell me. Thanks. Here's a DLL Hell question for you: where should all those JARs go? I put my JDBC JARs in the TOMCAT_HOME/common/lib directory, as the docs instruct. I've got the JSTL JARs in TWO places: TOMCAT_HOME/common/lib AND in the WEB-INF/lib directory in my WAR file. Could that be it? If I put the JSTL JARs in TOMCAT_HOME/common/lib, I get the benefit of all apps seeing updates at the same time and the harm of breaking if only one of them needs an update. Keeping them close to the app and putting them in the WEB-INF/lib of the WAR file should prevent breakage from new versions, but forcing the effort of changing all those JARs when an update occurs. Which do you recommend? Sorry to be stringing these questions together like this. Please stop me the moment I become an annoyance. Thanks - MOD --- Shapira, Yoav [EMAIL PROTECTED] wrote: Howdy, Yoav Shapiro, I hope you're still out there. I'm always out here ;) Sometimes I don't feel like answering but as I mentioned on taglibs-user, this is more interesting than most questions on the list. (1) and (2) deploy and run perfectly. (3) deploys without any error messages to the log, but I still get that exception when I invoke the index.jsp: OK, so we know your JSTL implementation used by apps 1 and 2 is fine, and that your tomcat installation is fine. The problem has to be in how webapp 3, your app, configures JSTL. Are the taglib files in the right place? Do the declarations in webapp 3's web.xml file match the taglib locations? You're also sure you have the distributed version of the core taglib, right? Not some customized version that may not have the redirect tag defined? In any case, it can't hurt to double-check the core .tld file and make sure the redirect tag is defined there. The JSP itself is quite simple: %@ page language=java % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % c:redirect url=api-welcome.jsp/ It complains about the c:redirect tag. Yup, line 4 char 0 from the error messages is that redirect tag. I would also enable more verbose output from the JSP servlet (defined in $CATALINA_HOME/conf/web.xml). Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: NullPointerException during HttpServletRequest.getSession
Howdy, The symptom is a NullPointerException when I call getSession() on an HttpServletRequest object. The HttpServletRequest object had previously been saved as an attribute of the Session that it contained. This seems prone to problems. How can storing the request itself as a session attribute be valid? A session by definition may have many requests in it -- so you override the value of the attribute when a new request comes in? In any case, you could easily end up in a circular case where the session has the request, and the request has a session associated with it in tomcat. I tried looking at the CoyoteRequestFacade code but the directory containing it in the public download site was empty! That was the code that threw the actual exception so I'm sure it could give some insight. It's here: http://cvs.apache.org/viewcvs/jakarta-tomcat-connectors/coyote/src/java/ org/apache/coyote/tomcat4/CoyoteRequestFacade.java?rev=1.3content-type= text/vnd.viewcvs-markup However, it's been modified since the last release so the line number may not be accurate. Anyways, it's likely the request object itself had been nulled out, giving NPE in request.getSession(). Here are the classes in question; again I've tried to only include the original code: I don't particularly feel like reading through them, though maybe someone else does. Without looking at them in detail, I would ask: can you accomplish your requirements without storing the request object as a session attribute? I.e. get what you need from it (param values etc.), store those in the session instead? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: j2ee.jar - need JMS services from another server
I believe if any duplicates are included - the Tomcat server will not boot. (I believe java classloaders will not allow any duplicates that have java as the first four characters in the path.) Shapira, Yoav [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Howdy, You are cruising for a bruising with this method, and will have to be very careful not to include classes that are already in tomcat's libraries in your abridged jar. Yoav Shapira Millennium ChemInformatics -Original Message- From: Marvin D. Toll [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 3:02 PM To: [EMAIL PROTECTED] Subject: Re: j2ee.jar - need JMS services from another server I simply need classes that are in the j2ee jar. It sounds like I'm going to need to extract those into an abridged jar for use. (By the way - the latest J2EE beta has jars (for example: j2ee.jar) that do not show contents in WinZip ... ) Shapira, Yoav [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Howdy, There's no standard: it depends on what you need. Jms.jar and your server's InitialContext implementation jar (e.g. openjms-x.y.z-client.jar for OpenJMS) are typically used for connecting tomcat to a remote JMS server. Yoav Shapira Millennium ChemInformatics -Original Message- From: Marvin D. Toll [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 2:44 PM To: [EMAIL PROTECTED] Subject: j2ee.jar - need JMS services from another server I need to get JMS (J2EE) services from another server - and accordingly need a number of classes in the j2ee.jar. Apparently, one is not able to add this jar to the common/lib directory because of conflicts with some of the Tomcat jars having duplicate classes. Is there a standard (or customary) approach to make J2EE classes available to a Tomcat deployed application? Thx, Marvin Toll -- *** *Email: mailto:[EMAIL PROTECTED] * Cell Phone: 248.866.4897 [USA] * Text Message: mailto:[EMAIL PROTECTED] * Web: http://gtcGroup.com *** This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Web App Using JSTL Is Still Failing Under Tomcat 4.0.6
Howdy, On Shawn Bayern's sage advice, I put the standard.jar in the CLASSPATH and make the URI identical to the As you know, tomcat ignores the CLASSPATH environment variable. Both the echo and data source test apps are set up that way, too. So the difference must be in your own app's setup, right? Here's a DLL Hell question for you: where should all those JARs go? I put my JDBC JARs in the TOMCAT_HOME/common/lib directory, as the docs instruct. I'm a big fan of putting all jars for a webapp in its WEB-INF/lib directory. If a jar is used by N webapp, N copies of it should be around, one for each WEB-INF/lib directory. You should be able to deploy and run your webapp as one packed WAR file. It should be self-contained. I've got the JSTL JARs in TWO places: TOMCAT_HOME/common/lib AND in the WEB-INF/lib directory in my WAR file. Could that be it? Yes, that could be it. Which do you recommend? Definitely NOT using common/lib, shared/lib, and other shared repositories. Disk space is cheap. Your time diagnosing classloader issues related to the common repositories is expensive. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: j2ee.jar - need JMS services from another server
Howdy, I believe if any duplicates are included - the Tomcat server will not boot. That's wrong. The precise behavior depends on what's duplicated. You can easily get such behavior that will make tomcat boot, but throw runtime exceptions. Or boot, but make your servlet or entire webapp unavailable. (I believe java classloaders will not allow any duplicates that have java as the first four characters in the path.) Not just java, also javax and certain special packages like org.w3c.dom. These require endorsed classloaders (e.g. the classloader tomcat uses to load files from $CATALINA_HOME/common/endorsed). Try having an old version of the javax.servlet jars in your abridged jar and see what happens ;) Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests
To deploy the class file, I believe you can create a classes directory under TOMCAT_HOME/lib/server and put your class in a package appropriate directory under there. With your modifications to the modules.xml and server.xml, it should work. Larry -Original Message- From: Lemke, Michael IZ/HZA-IE5 [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 11:35 AM To: 'Tomcat Users List' Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests Thanks, Larry. Not knowing any Java I managed to write (or rather copy) something for postRequest. Seems to work fine. Now my question is, is it possible to compile that module so I get a single .class file that I can copy somewhere in the official binary tree? What works for me is have the .java in share/org/apache/tomcat/modules/loggers, add org... to modules.xml and server.xml and have ant make new jar files. I couldn't find anything in the docs in that regard that I could understand. Thanks, Michael -Original Message- From: Larry Isaacs Sent: Monday, September 29, 2003 7:32 PM To: Tomcat Users List Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests You could implement your own interceptor and use one of the hooks more suitable than beforeCommit(), perhaps postReadRequest(), contextMap(), or postRequest(). I don't know if there is an existing interceptor that with the right debug level would give you want you want without giving you too much log output. Larry -Original Message- From: Lemke, Michael IZ/HZA-IE5 Sent: Monday, September 29, 2003 6:40 AM To: 'Tomcat Users List' Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests A long time ago I sent the attached message. There was no solution to the problem. It has just come up again and I am wondering what options there are to get *everything* logged. Would a combination with Apache solve this? We need to somehow be able to proove that we have or have not received a certain request. Thanks, Michael -Original Message- From: Larry Isaacs Sent: Tuesday, July 02, 2002 2:10 PM To: 'Tomcat Users List' Subject: RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests AcessLogInterceptor writes the log entry using the beforeCommit() hook. If no response is generated by the request, then it appears that no log entry would be created. Cheers, Larry -Original Message- From: Lemke, Michael IZ/HZA-IC1 Sent: Tuesday, July 02, 2002 4:10 AM To: 'Tomcat Users List' Subject: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests We are running Tomcat 3.3.1 in standalone mode (no Apache etc) and log requestes to AccessLog with AccessLogInterceptor. Unless we misconfigured something it seems like PUT requests only show up in the log if they produced an error (404, 500). Is this a configuration problem or is there something wrong with AccessLogInterceptor? Thnaks, Michael -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
virtual hosts tomcat connectors
Hello Is there any documentation that works on the subject of jk, jk2 or mod_webapp? I've had all 3 running using the context as a mount point but I want to have http://www.mydomain.com/Action ..not http://www.mydomain.com/webappname/Action I'm using tc 4.1.27 and apache 2 , jk, jk2 or mod_webapp .. i really dont care which just something that works and not a http://localhost/webappname this seems to be the only thing the connectors do... this looked great until i tried it, http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html Cheers Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Filter for Form Authentication Problem
Thanks for the replies. So this means I have to go with custom realm and authenticator? Actually I first tried with them but got stuck, I guess I was quite close to success though. I posted one article asking for help several days ago but got no response at all. I am reposting it below, hopefully sb. would kindly point me a way out. === Dear all, I wrote my own authenticator (extends FormAuthenticator) realm (extends JDBCRealm). What I need is to check one more field in the database besides password for authentication. Only minor modifications are made on the original codes so I think it should be fine. What I also did include changing the org/apache/catalina/startup/Authenticators.properties file to add the new authenticator; modifying the server.xml and web.xml accordingly. Furthermore, I added the entries for my authenticator and realm in the mbeans-descriptor.xml file. I expected everything to work perfectly but when I tried to access the secured area, I got the following error: HTTP Status 500 - Configuration error: Cannot perform access control without an authenticated principal - type Status report message Configuration error: Cannot perform access control without an authenticated principal description The server encountered an internal error (Configuration error: Cannot perform access control without an authenticated principal) that prevented it from fulfilling this request. This error was triggered instantly. I mean I even did not have a chance to see the login webpage. Now I have several questions: What is the flow of the authentication? Was my authenticator got executed at all? Any suggestions would be greatly appreciated. Bill Barker [EMAIL PROTECTED] wrote: Joerg Heinicke wrote in message news:[EMAIL PROTECTED] Tim Funk wrote: You can't intercept j_security_check with a filter, it violates the spec. -Tim This is at least one answer to my thread started last week: http://www.mail-archive.com/[EMAIL PROTECTED]/msg104931.html. What are the consequences/possibilities to set the request character encoding with servlet standard API mechanisms instead of using the Tomcat proprietary solution of using a Valve? This is a really interesting issue. I would hope that you would send a message to [EMAIL PROTECTED] to hopefully get the expert-team to clarify this before the 2.4 spec goes final. Because the Servlet-2.2 spec lacks the request.setCharacterEncoding method, Tomcat 3.3 jumps through a lot of hoops to try and guess the charset. These were dropped in Tomcat 4+, since the request.setCharacterEncoding method was supposed to solve all of these problems. As you have pointed out, it is not possible to use this in a Filter for the standard Form-auth config (for the simple reason that Auth is called before Filters). Therefore, the j_security_check target is flying blind wrt charset. Joerg Lawence wrote: Dear All, I wrote a filter servlet that does some preprocessing. Basically it intercepts the call of j_secuity_check. The problem is that most of the time it was just bypassed. The only way to trigger it as I found is to first fill the form and got authenticated, then go back and try the authentication again. Anybody knows the solution? Another question is how to sepcify the url pattern of j_security_check. My login page is /secured/login.jsp, I think the url should be /secured/j_security_check, am I right? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? The New Yahoo! Shopping - with improved product search
RE: Objects lost in session
Howdy, Strange indeed. When things like this happen and you can't reproduce them reliably, I tend to think of two always-present possible evils: 1. Thread safety: what happens if you make all the relevant methods synchronized? Shouldn't make much of a difference here since a request is being served by one thread, but still worth trying. 2. GC? If your system is really stressed when these errors happened, this is worth investigating. Perhaps the collector is collection your session prematurely. Again, theoretically unlikely if not impossible, but those are the types of things that tend to happen under high stress. You can use a load-testing tool (e.g. JMeter) to simulate high load on your dev server, or alternatively to just run multiple concurrent tests in order to look for thread-safety-related bugs. Yoav Shapira Millennium ChemInformatics -Original Message- From: Tim Odowd [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 2:12 PM To: '[EMAIL PROTECTED]' Subject: Objects lost in session Sorry for the long email. I am using Tomcat 4.124 for my servlet engine and IIS for my web server. I am monitoring exceptions that occur in my system and this one has me confused. The exception is: java.lang.NullPointerException at ParentClass.getQualificationMessage(ParentClass.java:483) at ChildClass.finishDocumentUpload(ChildClass.java:135) at ... The parent class method is failing when it tries to call a method on the Position object that it retrieved from the session. It looks like the Position object is null in the session: protected static final String getQualificationMessage( HttpServletRequest request){ HttpSession session = request.getSession(); int employerId = ((Integer)session.getAttribute(RC.EMPLOYER_ID)) .intValue(); (483)int positionId = ((Position)session.getAttribute(RC.POSITION)).getPositionId(); ... What I can't explain is that the ChildClass method that has called the above method was able to retrieve the position object from the session and call a method on it. That makes me believe that the position object existed in the session at that time: I have a Position object stored as a session attribute with the attribure name RC.POSITION. protected static final String finishDocumentUpload( HttpServletRequest request, EmployerConfiguration ec){ HttpSession session =request.getSession(); Position position = (Position)session.getAttribute(RC.POSITION); if (position.attachDocumentsOnly()){ return forwardToOriginalPage(request, ec); } else { 135return getQualificationMessage(request); } } I cannot reproduce this error (which is making me crazy), but I see similar things happening every once in a while in my exception log. Any ideas? Thanks for your help, -tim This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Invalid flag error when the tomcat installation path contains blank spaces.
Hi, I' m using the tomcat 4.24 and I detect a problem if install it in a path that contains blank spaces. I always receive the error detailed bellow when I try to compiles a JSP. I see in the Mailing Lists some workaround like install Tomcat in a directory that not contains blank spaces, etc. However, my situation is little different. I have an application that uses Tomcat's API to start a Web Application inside the same Virtual Machine. In this case, none of the suggested workarounds could be applied. I read in the Tomcat Mailing Lists that previous version as 4.18 supports blank spaces in the path. Some person opens the bug (http://issues.apache.org/bugzilla/show_bug.cgi?id=21252) that is similar. However, it was closed like invalid. L In windows, locations like (drive:\Program Files and drive:\Documents and Settings) are very common. I could not prohibit the user install my application in paths that contains spaces. I really appreciate some solution or a workaround that help me to continue working. Thanks in advance for your help. -- org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath Specify where to find user class files [javac] -sourcepath Specify where to find input source files [javac] -bootclasspath Override location of bootstrap class files [javac] -extdirsOverride location of installed extensions [javac] -d Specify where to place generated class files [javac] -encoding Specify character encoding used by source files [javac] -source Provide source compatibility with specified release [javac] -target Generate class files for specific VM version [javac] -help Print a synopsis of standard options - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: StackOverFlowError--Please help
sorri about the code snippet. Heres a complete picture. if(flag) { rd = context.getRequestDispatcher(/servlet1); rd.forward(request,response); } else { rd = context.getRequestDispatcher(/servlet2); rd.forward(request,response); } so when the flag is true it should be forwarded to servlet 1 else servlet 2. - Original Message - From: Jeff Tulley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 2:53 PM Subject: Re: StackOverFlowError--Please help Is it just me, or are both halves of that if statement exactly identical? Based on this snippet of code only, you should get the same results regardless of flag's value. Is there other code that checks this flag, and does the getRequestDispatcher call differently? It sounds like you are forwarding to yourself, and that whatever logic determines the value of flag is based on the forwarded request parameters, so it will always keep determining it to be false and forward once more to itself = infinite recursion. Jeff Tulley ([EMAIL PROTECTED]) (801)861-5322 Novell, Inc., The Leading Provider of Net Business Solutions http://www.novell.com [EMAIL PROTECTED] 9/30/03 12:39:12 PM Hi All, I am having a problem when doing servlet chaining. I have a code snippet like this if(flag) { requestdispatcher.forward(request,response); } else { requestdispatcher.forward(request,response); } The problem is if flag is true the forward and I get the desired result. But in the else case I get a java.lang.StackOverFlowError . The stack trace is java.lang.StackOverflowError at org.apache.catalina.core.ApplicationHttpRequest.removeAttribute(ApplicationH ttpRequest.java:229) And the error is at the forward of the false case. Can somebody help me with this problem. Thanks in advance, shyam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]