Detecting resource usage
Hi, We are using Tomcat 6.0.24 running on two different machines. In our workers.properties file, we have worker.worker1.fail_on_status=500,503 to cause instances to gracefully fail over if there is a problem on one instance. This is great, but if one app server is repeatedly failing over to the second app server (in which case only one is handling all our traffic), how can we pro-actively detect that there is a problem with the first app server? Thanks, - Dave -- View this message in context: http://old.nabble.com/Detecting-resource-usage-tp31030814p31030814.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Choosing the right worker
Hi, We are not observing a failover. Our index page served by our first app server (worker1) was returning a 500 http status code, whereas the same index page served by our second app server (worker2) was returning normally (http status = 200). Yet the 500 error page was getting all the way back to the client. The docs say, The redirect flag on worker1 tells the lb_worker to redirect the requests to worker2 only if worker1 is in error state. In other cases worker2 will not receive any requests, thus acting like a hot standby. But we are still seeing our second app server get an equal number of requests. So could you clarify how to set up so that both nodes get an equal number of requests, but if one returns an error code, all requests will go to the other? Thanks, - Dave Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, On 2/23/2011 3:32 PM, laredotornado wrote: We're using 6.0.24, running on two servers. In our workers.properties file on the web server, we have ... ===Begin workers.properties == worker.lbroute.balance_workers=worker1,worker2 worker.worker1.type=ajp13 worker.worker1.host=ip_addr1 worker.worker1.port=8000 worker.worker1.lbfactor=1 You might want to look into using worker templates: you can set all of this stuff for a single template worker and inherit them in the individual ones. Useful for a consistent configuration for all workers in a lb cluster. worker.worker1.redirect=worker2 This should failover to worker2 if worker1 suffers an error, even though worker2 is set to disabled. The docs say as much: you can use this as a hot standby. You might want to look at the ping_mode, good, bad settings, too. How can I configure my workers.properties file so that if the index page of our sites is throwing a 500 http status code, it will fail over to the other worker? If your index page is being served by Tomcat/worker1, then this configuration should fail-over to worker2. Is that not what you are observing? If not, then please tell us what you are observing. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1lkCsACgkQ9CaO5/Lv0PADywCfewAFL3/W5C7EVSL91NFxbBfA hNsAn34/DRp5KmNHJwb4P/b6co0bTRhq =pmf7 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Choosing-the-right-worker-tp30998571p31004353.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Choosing the right worker
Hi, We're using 6.0.24, running on two servers. In our workers.properties file on the web server, we have ... ===Begin workers.properties == worker.lbroute.balance_workers=worker1,worker2 worker.worker1.type=ajp13 worker.worker1.host=ip_addr1 worker.worker1.port=8000 worker.worker1.lbfactor=1 worker.worker1.redirect=worker2 worker.worker1.socket_keepalive=true worker.worker1.connection_pool_timeout=60 worker.worker2.type=ajp13 worker.worker2.host=ip_addr2 worker.worker2.port=8000 worker.worker2.lbfactor=1 worker.worker2.activation=disabled worker.worker2.socket_keepalive=true worker.worker2.connection_pool_timeout=60 ===End workers.properties == How can I configure my workers.properties file so that if the index page of our sites is throwing a 500 http status code, it will fail over to the other worker? - Dave -- View this message in context: http://old.nabble.com/Choosing-the-right-worker-tp30998571p30998571.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Trouble with connection timeout settings
Hi, We're using Tomcat 6.0.24. We would like Tomcat to kill stuck threads after a certain period of time, but Tomcat doesn't appear to be doing this. Specifically, when the database doesn't return results, the connections just build up. Here are our settings in workers.properties worker.list=lbroute worker.lbroute.type=lb worker.lbroute.balance_workers=worker1,worker2 worker.worker1.type=ajp13 worker.worker1.host=xx.xx.xx.xx worker.worker1.port=8000 worker.worker1.lbfactor=1 worker.worker1.redirect=worker2 worker.worker1.socket_keepalive=true worker.worker1.connection_pool_timeout=60 worker.worker2.type=ajp13 worker.worker2.host=xx.xx.xx.xx worker.worker2.port=8000 worker.worker2.lbfactor=1 worker.worker2.activation=disabled worker.worker2.socket_keepalive=true worker.worker2.connection_pool_timeout=60 Does anyone see anything here that can be optimized or anything we might need to add to get Tomcat to kill stuck connections? - Dave -- View this message in context: http://old.nabble.com/Trouble-with-connection-timeout-settings-tp30826944p30826944.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Trouble with connection timeout settings
You mean set timeouts at the database level? What if the Tomcat thread is hung for some other reason? Is there any setting that will cause Tomcat to kill a thread if that thread is stuck? - Dave Mark Thomas wrote: On 02/02/2011 15:22, laredotornado wrote: Hi, We're using Tomcat 6.0.24. We would like Tomcat to kill stuck threads after a certain period of time, but Tomcat doesn't appear to be doing this. Specifically, when the database doesn't return results, the connections just build up. Here are our settings in workers.properties They won't help with this problem. You need to set timeouts on your database connections. Better still, fix whatever is causing those database queries to take so long. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Trouble-with-connection-timeout-settings-tp30826944p30827517.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Where do files served get logged?
Hi, I'm using Tomcat 6.0.26. Where is it configured, or where do I look to see what files Tomcat has served? I'm trying to make sure Tomcat is not serving static files that Apache can serve more efficiently. Thanks, - Dave -- View this message in context: http://old.nabble.com/Where-do-files-served-get-logged--tp29963979p29963979.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where do files served get logged?
I haven't done any benchmarks, and I'm assuming some of the folks on this thread are the Tomcat developers and can speak first hand to the speed. If so, I would encourage you to update the wiki ... http://wiki.apache.org/tomcat/FAQ/Connectors because it mentions that Apache is faster at serving static content than Tomcat for high-traffic sites. - Dave Jeff Hubbs-2 wrote: On 10/14/10 12:08 PM, Caldarale, Charles R wrote: I'm trying to make sure Tomcat is not serving static files that Apache can serve more efficiently. Why do you think httpd can serve them more efficiently? I recall from reading about Slashdot's architecture some years ago (Perl/MySQL at the time) that they had separate servers running Tux for static content... - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Where-do-files-served-get-logged--tp29963979p29964522.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: NullPointerException when Tomcat calls org.apache.catalina.connector.Request.parseParameters
You are correct. This stack trace came from a server with 6.0.13 installed. We also observed this in our environment with 6.0.24. Right now, it is not an option to upgrade. Is there a work-around? Below is the connector info from our server.xml file and the request from the Net panel of Firebug. Thanks, - Dave Here is our connector info: Connector port=8081 protocol=HTTP/1.1 maxThreads=150 connectionTimeout=2 redirectPort=8443 / !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8001 protocol=AJP/1.3 maxThreads=1500 minSpareThreads=250 maxSpareThreads=750 connectionTimeout=6 emptySessionPath=true / Params: nextsave Response Headers: DateThu, 07 Oct 2010 18:30:35 GMT Server Apache/2.2.4 (Unix) mod_jk/1.2.25 Locationhttp://laughlin-qa.criticalmass.com:8100//meetings/rfp/save.jsp VaryUser-Agent,Accept-Encoding Content-Encodinggzip Keep-Alive timeout=10 Connection Keep-Alive Transfer-Encoding chunked Content-Typetext/html;charset=UTF-8 request headers: Request Headersview source Hostlaughlin-qa.criticalmass.com:8100 User-Agent Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Referer http://laughlin-qa.criticalmass.com:8100/meetings/rfp/step2.jsp Cookie __utma=63169330.1613937882.1286296658.1286471507.1286476849.5; __utmz=63169330.1286296658.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __qca=P0-88964422-1286297860748; s_sq=%5B%5BB%5D%5D; s_cc=true; __utmc=63169330; JSESSIONID=EB602AD147B7DE6FA96E37C51AF3D26C.qa1; dfa_cookie=rrvisitrrvisitlasvegasqa%2Crrvisitlaughlinqa; __utmb=63169330.6.10.1286476849 POst parameters: RFP_PARAM_group_nameasdfads RFP_PARAM_meeting_name sdfsfdfds RFP_PARAM_steps_included_... laughlinFormSubmit true step2 taskinput source: Content-Type: application/x-www-form-urlencoded Content-Length: 143 task=inputstep=2RFP_PARAM_group_name=asdfadsRFP_PARAM_meeting_name=sdfsfdfdsRFP_PARAM_steps_included_in_attachment=laughlinFormSubmit=true Konstantin Kolinko wrote: 2010/10/6 laredotornado laredotorn...@gmail.com: Hi, I'm using Tomcat 6.0.26 with Java 1.6. I'm getting a strange NullPointerException from a Tomcat class. My code is … if (request != null request.getParameter(FORM_SUBMIT_SITE_NAME + FormSubmit) != null) { and the stack trace is below. I have verified I'm not passing a null to request.getParameter. Another thread I found suggests this is an encoding issue, but all the characters I'm using are UTF-8. Any ideas how to troubleshoot this further? Thanks, - Dave java.lang.NullPointerException at org.apache.catalina.connector.Request.parseParameters(Request.java:2426) at org.apache.catalina.connector.Request.getParameter(Request.java:1040) The line numbers in your stack trace do not match the Tomcat 6.0.26 sources, http://svn.apache.org/viewvc/tomcat/tc6.0.x/tags/TOMCAT_6_0_26/java/org/apache/catalina/connector/Request.java?view=markup What is going on? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/NullPointerException-when-Tomcat-calls-org.apache.catalina.connector.Request.parseParameters-tp29898530p29909313.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
NullPointerException when Tomcat calls org.apache.catalina.connector.Request.parseParameters
Hi, I'm using Tomcat 6.0.26 with Java 1.6. I'm getting a strange NullPointerException from a Tomcat class. My code is … if (request != null request.getParameter(FORM_SUBMIT_SITE_NAME + FormSubmit) != null) { and the stack trace is below. I have verified I'm not passing a null to request.getParameter. Another thread I found suggests this is an encoding issue, but all the characters I'm using are UTF-8. Any ideas how to troubleshoot this further? Thanks, - Dave java.lang.NullPointerException at org.apache.catalina.connector.Request.parseParameters(Request.java:2426) at org.apache.catalina.connector.Request.getParameter(Request.java:1040) at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355) at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:158) at com.myco.database.entities.JspAppInterface.isFormSubmitted(JspAppInterface.java:289) at org.apache.jsp.meetings.rfp.save_jsp._jspService(save_jsp.java:171) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.myco.filter.RecordPageFilter.doFilter(RecordPageFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:344) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:110) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:98) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:95) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356) -- View this message in context: http://old.nabble.com/NullPointerException-when-Tomcat-calls-org.apache.catalina.connector.Request.parseParameters-tp29898530p29898530.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Character encoding question
Hi, I'm using Tomcat 6.0.26. I'm noticing that when our JSPs pages are served, we frequently have ?s where apostrophes should be. We think this is because the database-driven content contains the Microsoft style apostrophe. My question is, if I adjust the character encoding on Tomcat, will it serve the MS character instead of a question mark? I read the default encoding is ISO-8859-1, which I thought would include this mystery character, but apparently it doesn't. Do you know what encoding I should use and where I should set it? Thanks, - Dave -- View this message in context: http://old.nabble.com/Character-encoding-question-tp29554957p29554957.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How can i tell how much of allocated heap is being used?
Hi, I'm using Tomcat 6.0.26, Java 1.6 on Linux kernel 2.6.18-164.11.1.el5. I'm trying to figure out if there if we can figure out how much of our allocated heap memory is actually being used. Grateful for any thoughts you might have, - Dave -- View this message in context: http://old.nabble.com/How-can-i-tell-how-much-of-allocated-heap-is-being-used--tp29474695p29474695.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to count number of active threads?
Hi, I'm using Tomcat 6.0.26 on Red Hat Linux. How do I count the number of Tomcat threads currently executing? Thanks, - Dave -- View this message in context: http://old.nabble.com/How-to-count-number-of-active-threads--tp29270494p29270494.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tuning garbage collection
Hi, I'm using Tomcat 6.0.26, Java 1.6 and wondering what tools/strategies you use to tune your garbage collection parameters? Further, does anyone know how to read entries in the garbage collection log? Entries in my log look like Desired survivor size 10944512 bytes, new threshold 1 (max 15) [PSYoungGen: 129311K-3232K(136512K)] 558882K-434085K(585920K), 0.0090900 secs] Thanks, - Dave -- View this message in context: http://old.nabble.com/Tuning-garbage-collection-tp29230790p29230790.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Servlet mapping question -- way to include everythign EXCEPT a directory?
Hi, I'm using Tomcat 6.0.26. I want to map all of my /play/sports/* files to a servlet, except the subdirectory, /play/sports/includes/*. I don't know how to specify not in a mapping, so I only have ... servlet-mapping servlet-nameSportsSearchServlet/servlet-name url-pattern/play/sports/*/url-pattern /servlet-mapping What would I need to add to exclude directories matching /play/sports/includes/*? Thanks, - Dave -- View this message in context: http://old.nabble.com/Servlet-mapping-questionway-to-include-everythign-EXCEPT-a-directory--tp29046779p29046779.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Servlet mapping question -- way to include everythign EXCEPT a directory?
I like your idea about specifying the DefaultServlet, but what do you mean by the DefaultServlet ? - Dave n828cl wrote: From: laredotornado [mailto:laredotorn...@gmail.com] Subject: Servlet mapping question -- way to include everythign EXCEPT a directory? I don't know how to specify not in a mapping That's because you can't specify a not. What you can do is specify what should handle /play/sports/includes/* - such as the DefaultServlet or perhaps some error handler. The servlet spec requires that the container match against the longest pattern first, so the more specific will override the more general. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Servlet-mapping-questionway-to-include-everythign-EXCEPT-a-directory--tp29046779p29047783.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Possible to redeploy a JAR file without restarting Tomcat?
Regarding restarting an application, the JAR file in question is in a common shared directory by all applications and each application has its files deployed in a folder within the CATALINA_HOME/webapps directory. So would restarting one of my applicaitons pick up the new shared JAR and all the other apps would continue to use the old version? - Dave Pid * wrote: On 27/06/2010 20:04, laredotornado wrote: Hi, I'm using Tomcat 6.0.26. There is one JAR file I repeatedly rebuild and deploy and I was wondering if there is any way, obscure or otherwise, to deploy this JAR file without having to restart Tomcat. Thanks for any insights, - Dave You can restart an individual application, but you can't dynamically replace a jar. See the Context element description for the reloadable attribute in the config docs and the WatchedResource element in the default Context definition (in tomcat/conf/context.xml) p -- View this message in context: http://old.nabble.com/Possible-to-redeploy-a-JAR-file-without-restarting-Tomcat--tp29007357p29024617.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Possible to redeploy a JAR file without restarting Tomcat?
Hi, I'm using Tomcat 6.0.26. There is one JAR file I repeatedly rebuild and deploy and I was wondering if there is any way, obscure or otherwise, to deploy this JAR file without having to restart Tomcat. Thanks for any insights, - Dave -- View this message in context: http://old.nabble.com/Possible-to-redeploy-a-JAR-file-without-restarting-Tomcat--tp29007357p29007357.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Servlet mapping issue
Did you mean to say, call it WITHOUT the params at the end? If so, when I did that, everything mapped fine. However, I do need the query params to process the page correctly. Sadly, this url-pattern didn't work servlet-mapping servlet-nameMusicVenueServlet/servlet-name url-pattern/play/music/venues/*/url-pattern url-pattern/play/music/includes/venue-listing*/url-pattern /servlet-mapping Note the * after venue-listing in an attempt to capture any query params. Any ideas how to write the url-pattern so that I can catch additional query params? Thanks, - Dave Pid * wrote: On 24/06/2010 19:24, laredotornado wrote: I tried this too and still got the 404. servlet-mapping servlet-nameMusicVenueServlet/servlet-name url-pattern/play/music/venues/*/url-pattern url-pattern/play/music/includes/venue-listing.jsp/url-pattern /servlet-mapping I also tried escaping the period in the file extension (\.jsp), but no luck. Any ideas how to troubleshoot the problem further? - Dave Does the JSP have any includes from the same directory, that might work when you're using the /* ending, but not when you're using the single JSP? If you put the mapping back to: /play/music/includes/venue-listing and call it with the params on the end, does it work then? p n828cl wrote: From: laredotornado [mailto:laredotorn...@gmail.com] Subject: Servlet mapping issue url-pattern/play/music/includes/venue-listing/url-pattern You left the .jsp off the end of venue-listing. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Servlet-mapping-issue-tp28984816p28994244.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Servlet mapping issue
Hi, I'm using Tomcat 6.0.26. I'm having an issue mapping a url-pattern to a servlet and was wondering if you can see what I'm doing wrong. In my WEB-INF/web.xml I have servlet-mapping servlet-nameMusicVenueServlet/servlet-name url-pattern/play/music/venues/*/url-pattern url-pattern/play/music/includes/venue-listing/url-pattern /servlet-mapping But visiting the URL http://mydomain.com/context-path/play/music/includes/venue-listing.jsp?id=3type=venues gives a 404. Oddly, if I change the above to servlet-mapping servlet-nameMusicVenueServlet/servlet-name url-pattern/play/music/venues/*/url-pattern url-pattern/play/music/includes/*/url-pattern /servlet-mapping everything maps fine. But I don't want to map everything in that directory, only a single file. Any ideas? Thanks - Dave -- View this message in context: http://old.nabble.com/Servlet-mapping-issue-tp28984816p28984816.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Servlet mapping issue
I tried this too and still got the 404. servlet-mapping servlet-nameMusicVenueServlet/servlet-name url-pattern/play/music/venues/*/url-pattern url-pattern/play/music/includes/venue-listing.jsp/url-pattern /servlet-mapping I also tried escaping the period in the file extension (\.jsp), but no luck. Any ideas how to troubleshoot the problem further? - Dave n828cl wrote: From: laredotornado [mailto:laredotorn...@gmail.com] Subject: Servlet mapping issue url-pattern/play/music/includes/venue-listing/url-pattern You left the .jsp off the end of venue-listing. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Servlet-mapping-issue-tp28984816p28985292.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Writing errors to localhost log
Hi, I'm using Tomcat 6.0.26. I notice that when I define an error page for my JSPs %@ page errorPage=/error-pages/500.jsp % The error page gets called properly, but the stack trace of the error is no longer written to my localhost log file, where it used to be output before I inserted the directive. Do you know how I can continue to have the stack trace show up in this file and continue to define an error page for my JSP? Thanks, - Dave -- View this message in context: http://old.nabble.com/Writing-errors-to-localhost-log-tp28960361p28960361.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Why does errorPage work but WEB-INF/web.xml error-page does not?
Perhaps I'm in the denial phase of my grief here, but the only way to redirect to a 500 page when an error occurs in JSP processing is to increase the page buffer size? What if the response is already committed? - Dave Kris Schneider-2 wrote: Dave - looks like I just posted something for you to try in your JavaRanch forum thread... Basically, it looks like having a committed response (you've said that your original JSP was partially rendered) can interfere with the error page mechanism. For testing purposes, try increasing the page buffer to see what happens. You may want to consider changing your approach to incorporate filters/servlets for some of your processing... On Wed, May 26, 2010 at 1:26 PM, laredotornado laredotorn...@gmail.com wrote: I tried your suggestion, and sadly it didn't work. What is the difference between what the errorPage directive does and what the web.xml error-page clause does? - Dave dcherk wrote: Dave: I believe you need a fully-qualified class name for the exception, eg: error-page exception-typejava.lang.Exception/exception-type location/error-pages/500.jsp/location /error-page Good luck, -- Dave Cherkassky VP of Software Development DJiNN Software Inc. On 26/05/2010 10:34 AM, laredotornado wrote: Hi, I'm running Tomcat 6.0.26 on Mac 10.6.3. I have this in my WEB-INF/web.xml file ... error-page exception-typeException/exception-type location/error-pages/500.jsp/location /error-page but when I create a JSP page with %= Integer.parseInt(aaa) %, halfway down the page, I don't get redirected to my error page. I just get an incomplete rendered page. But when I add this directive to the top .. %@ page errorPage=/error-pages/500.jsp % then I can see the error page rendered after the normal content is rendered. I have included the localhost stack trace in hopes that someone can tell me where Tomcat is supposed to be catching the exception, acting appropriately, and why it is not. Thanks, - Dave =Stack trace === May 26, 2010 9:28:04 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet MusicVenueServlet threw exception java.lang.NumberFormatException: For input string: aaa at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at org.apache.jsp.WEB_002dINF.views.play.music.venues.index_jsp._jspService(index_jsp.java:750) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at com.myco.servlet.generic.GenericHttpServlet.callView(GenericHttpServlet.java:570) at com.myco.servlet.music.MusicVenueServlet.index(MusicVenueServlet.java:175) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.myco.servlet.generic.GenericHttpServlet.doGet(GenericHttpServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke
Re: Why does errorPage work but WEB-INF/web.xml error-page does not?
Actually that is directly related and I'm seeing the same exception in my logs. Thanks so much for this -- I would have been spending a lot of time trying to find a work-around for this issue. I just missed the new version! I'm running 6.0.26 and the fix is included in 6.0.27. - Dave Dan Armbrust wrote: On Wed, May 26, 2010 at 12:26 PM, laredotornado laredotorn...@gmail.com wrote: I tried your suggestion, and sadly it didn't work. What is the difference between what the errorPage directive does and what the web.xml error-page clause does? - Dave I don't think this is directly related, but see https://issues.apache.org/bugzilla/show_bug.cgi?id=48661 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Why-does-errorPage-work-but-WEB-INF-web.xml-error-page-does-not--tp28681659p28696355.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Why does errorPage work but WEB-INF/web.xml error-page does not?
You mean for me to put this at the top of my error page (500.jsp), correct? If so, I tried that, but still got the partially rendered page outlined in the Tomcat bug mentioned earlier. Anyone know when 6.0.27 will be released? - Dave ramzi khlil wrote: Try putting this at the top of the page %@ page contentType=text/html; charset=UTF-8 isErrorPage=true On Thu, May 27, 2010 at 12:06 PM, laredotornado laredotorn...@gmail.comwrote: Actually that is directly related and I'm seeing the same exception in my logs. Thanks so much for this -- I would have been spending a lot of time trying to find a work-around for this issue. I just missed the new version! I'm running 6.0.26 and the fix is included in 6.0.27. - Dave Dan Armbrust wrote: On Wed, May 26, 2010 at 12:26 PM, laredotornado laredotorn...@gmail.com wrote: I tried your suggestion, and sadly it didn't work. What is the difference between what the errorPage directive does and what the web.xml error-page clause does? - Dave I don't think this is directly related, but see https://issues.apache.org/bugzilla/show_bug.cgi?id=48661 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Why-does-errorPage-work-but-WEB-INF-web.xml-error-page-does-not--tp28681659p28696355.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Why-does-errorPage-work-but-WEB-INF-web.xml-error-page-does-not--tp28681659p28697708.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Why does errorPage work but WEB-INF/web.xml error-page does not?
Hi, I'm running Tomcat 6.0.26 on Mac 10.6.3. I have this in my WEB-INF/web.xml file ... error-page exception-typeException/exception-type location/error-pages/500.jsp/location /error-page but when I create a JSP page with %= Integer.parseInt(aaa) %, halfway down the page, I don't get redirected to my error page. I just get an incomplete rendered page. But when I add this directive to the top .. %@ page errorPage=/error-pages/500.jsp % then I can see the error page rendered after the normal content is rendered. I have included the localhost stack trace in hopes that someone can tell me where Tomcat is supposed to be catching the exception, acting appropriately, and why it is not. Thanks, - Dave =Stack trace === May 26, 2010 9:28:04 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet MusicVenueServlet threw exception java.lang.NumberFormatException: For input string: aaa at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at org.apache.jsp.WEB_002dINF.views.play.music.venues.index_jsp._jspService(index_jsp.java:750) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at com.myco.servlet.generic.GenericHttpServlet.callView(GenericHttpServlet.java:570) at com.myco.servlet.music.MusicVenueServlet.index(MusicVenueServlet.java:175) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.myco.servlet.generic.GenericHttpServlet.doGet(GenericHttpServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:637) -- View this message in context: http://old.nabble.com/Why-does-errorPage-work-but-WEB-INF-web.xml-error-page-does-not--tp28681659p28681659.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Why does errorPage work but WEB-INF/web.xml error-page does not?
I tried your suggestion, and sadly it didn't work. What is the difference between what the errorPage directive does and what the web.xml error-page clause does? - Dave dcherk wrote: Dave: I believe you need a fully-qualified class name for the exception, eg: error-page exception-typejava.lang.Exception/exception-type location/error-pages/500.jsp/location /error-page Good luck, -- Dave Cherkassky VP of Software Development DJiNN Software Inc. On 26/05/2010 10:34 AM, laredotornado wrote: Hi, I'm running Tomcat 6.0.26 on Mac 10.6.3. I have this in my WEB-INF/web.xml file ... error-page exception-typeException/exception-type location/error-pages/500.jsp/location /error-page but when I create a JSP page with %= Integer.parseInt(aaa) %, halfway down the page, I don't get redirected to my error page. I just get an incomplete rendered page. But when I add this directive to the top .. %@ page errorPage=/error-pages/500.jsp % then I can see the error page rendered after the normal content is rendered. I have included the localhost stack trace in hopes that someone can tell me where Tomcat is supposed to be catching the exception, acting appropriately, and why it is not. Thanks, - Dave =Stack trace === May 26, 2010 9:28:04 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet MusicVenueServlet threw exception java.lang.NumberFormatException: For input string: aaa at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:449) at java.lang.Integer.parseInt(Integer.java:499) at org.apache.jsp.WEB_002dINF.views.play.music.venues.index_jsp._jspService(index_jsp.java:750) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at com.myco.servlet.generic.GenericHttpServlet.callView(GenericHttpServlet.java:570) at com.myco.servlet.music.MusicVenueServlet.index(MusicVenueServlet.java:175) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.myco.servlet.generic.GenericHttpServlet.doGet(GenericHttpServlet.java:549) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:637) - To unsubscribe, e-mail: users-unsubscr
Re: Way to record what URL an error originated from in my localhost file?
My needs are in my Tomcat/localhost log file, I would like as much information as possible to appear accompanying exceptions that get generated in there. At the least, I would like to have the request URI precede the error in the localhost log. Even though I have defined error pages in my web.xml file, that doesn't interact with the localhost log, right? So what options are available to me to put request URIs (and other info) into the localhost log? Thanks, - Dave Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, On 5/21/2010 4:41 PM, laredotornado wrote: Thanks for this suggestion. Just to be sure I'm understanding correctly, the procedure would be 1. Add an error-page element to my xml doc that will be visited whenever an exception is generated from my JSP or servlet. 2. Configure valve to output a stack trace and the original request URI that generated the error. Is that right? I would choose one or the other: AccessLogValve /might/ be able to meet your needs, depending on what they are. If not, implement your own error page that logs whatever information you want to wherever you want it to go. Also is valve smart enough to understand that I don't want to see 500.jsp in my log file but rather something like search_results.jsp?category=1 ? I think the AccessLogValve only logs original requests -- that is, it won't log included or forwarded files like error pages. I must admit, though, that I don't really use the AccessLogValve -- I have Apache httpd doing my logging for me. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv3zjAACgkQ9CaO5/Lv0PAotACgwgcboVKDnFhtN6N/QRCxOKFR yAcAoJFQ+ARwsJ43xGbJfvS3xVlnF5sw =BNo0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Way-to-record-what-URL-an-error-originated-from-in-my-localhost-file--tp28626297p28659165.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Way to record what URL an error originated from in my localhost file?
Hi Chris, Thanks for this suggestion. Just to be sure I'm understanding correctly, the procedure would be 1. Add an error-page element to my xml doc that will be visited whenever an exception is generated from my JSP or servlet. 2. Configure valve to output a stack trace and the original request URI that generated the error. Is that right? Also is valve smart enough to understand that I don't want to see 500.jsp in my log file but rather something like search_results.jsp?category=1 ? Thanks again, - Dave Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, On 5/20/2010 5:30 PM, laredotornado wrote: Is there a way to configure Tomcat to record what the URL was in the browser when this error occurred? Do you have any error-page elements in your web.xml? Do you have custom error pages? If you do, the best place to put this kind of stuff is in your custom error pages - if they are either JSPs or some other dynamic resource. See section 9.9 of the servlet spec, and you'll find that you can obtain the original URL and other interesting information using request attributes: javax.servlet.error.status_code javax.servlet.error.exception_type javax.servlet.error.message javax.servlet.error.exception javax.servlet.error.request_uri javax.servlet.error.servlet_name While I'm at it, is there a way to also link in all session and request data at the time of the error (since the request may have been submitted via HTTP POST)? The best thing for you to do is manually dump that information when an error occurs. I suppose there's the possibility that you could set up an AccessLogValve that only logs when an error occurs: Valve className=org.apache.catalina.valves.AccessLogValve ... [file and path parameters] ... condition=javax.servlet.error.request_uri pattern=[%t] %a %{javax.servlet.error.request_uri}r (no CRLF) %{my.session.attribute}s (no CRLF here, either) %{my.other.session.attribute}s / See the documentation for AccessLogValve to see what all those setting mean. This can't dump the /entire/ session, but it can dump pre-defined session attributes. It also can't dump the non-GET request parameters. If you want to look at ExtendedAccessLogValve, it can do some more exciting things, though I think you have to know the parameter names beforehand: it can't simply dump the entire set of request parameters. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkv1uOoACgkQ9CaO5/Lv0PD3UQCfS3J7W0kcs+UVKkl4+5nqIfCS RcEAn0G+pD9BgeOIkITbZmz/0fJk9n4D =shmH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Way-to-record-what-URL-an-error-originated-from-in-my-localhost-file--tp28626297p28638705.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Way to record what URL an error originated from in my localhost file?
Hi, I'm using Tomcat 6.0.26 on Mac 10.3.6. In our localhost file, we often get exceptions that resemble ... SEVERE: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.jsp.play.music.news.details_jsp._jspService(details_jsp.java:456) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) Is there a way to configure Tomcat to record what the URL was in the browser when this error occurred? While I'm at it, is there a way to also link in all session and request data at the time of the error (since the request may have been submitted via HTTP POST)? I can't tell you how helpful something like that would be. Thanks for any advice, - Dave -- View this message in context: http://old.nabble.com/Way-to-record-what-URL-an-error-originated-from-in-my-localhost-file--tp28626297p28626297.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Any way to get Tomcat to complain if an EL var is undefined?
Hi, I'm using Tomcat 6.0.26. I wanted to know if there was any setting that would cause the compiler to complain if an EL variable was never defined. For example if I have p${resul}/p the result will be p/p because I haven't defined resul in any scope. I was hoping an exception could be raised instead of a blank. Thanks, - Dave -- View this message in context: http://old.nabble.com/Any-way-to-get-Tomcat-to-complain-if-an-EL-var-is-undefined--tp28537533p28537533.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Recommendation for log analyzer?
Hi, We are using Tomcat 6.0.26. We want to be able to get some kind of report of the errors that are being spit out to our localhost file (and catalina.out as well, but localhost is the priority). Do you know of any tool that can produce a report saying, This error occurred X number of times yesterday, etc? Thanks, - Dave -- View this message in context: http://old.nabble.com/Recommendation-for-log-analyzer--tp28488656p28488656.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Where do compiled JSP - java files go?
Hi, I'm using Tomcat 6.0.26 on Mac 10.6.3. I'm troubleshooting a NullPointerException occurring in one of my JSPs and all I'm told from the stack trace is what line of the compiled Java file it occurred in. However, I can't find this file anywhere on my file system. Where do they usually get kept and how can I tell Tomcat to keep them around, assuming it is deleting them after a certain point. Thanks, - Dave java.lang.NullPointerException at org.apache.jsp.WEB_002dINF.views.meetings.results_jsp._jspService(results_jsp.java:866) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) -- View this message in context: http://old.nabble.com/Where-do-compiled-JSP--%3E-java-files-go--tp28387967p28387967.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Where is this class?
Hi, Im running Tomcat 6.0.26. In my app, I'm getting a java.lang.ClassNotFoundException: javax.validation.ValidatorFactory exception. Does anyone know where to find the ValidatorFactory class? More generally, is there a web site taht will tell me what JAR a particular class belongs to? Thanks, - Dave -- View this message in context: http://old.nabble.com/Where-is-this-class--tp28332023p28332023.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Where is this class?
Is this just the documentation ? I'm not able to find the JAR file to download from this page. Thanks, - Dave Joseph Morgan-2 wrote: http://jcp.org/en/jsr/detail?id=303 -Original Message- From: laredotornado [mailto:laredotorn...@gmail.com] Sent: Thursday, April 22, 2010 12:22 PM To: users@tomcat.apache.org Subject: Where is this class? Hi, Im running Tomcat 6.0.26. In my app, I'm getting a java.lang.ClassNotFoundException: javax.validation.ValidatorFactory exception. Does anyone know where to find the ValidatorFactory class? More generally, is there a web site taht will tell me what JAR a particular class belongs to? Thanks, - Dave -- View this message in context: http://old.nabble.com/Where-is-this-class--tp28332023p28332023.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Where-is-this-class--tp28332023p28332333.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Way to generate a localhost.log instead of localhost-4-20-2010.log?
Hi, I'm using Tomcat 6.0.26 on Mac 10.6.3. Currently, in my $CATALINA_HOME/logs directory, Tomcat produces a localhost*log file with the date in the file name for each day, for example -- localhost.2010-04-19. Is there a way to get Tomcat to generate simply localhost.log for whatever day today is? If not, does anyone know a shell short cut where I can just type in something like vim ~/localhost.log and see the most current log without having to specify today's date? Thanks, - Dave -- View this message in context: http://old.nabble.com/Way-to-generate-a-%22localhost.log%22-instead-of-%22localhost-4-20-2010.log%22--tp28287685p28287685.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Trouble accessing content in webapps/ROOT
Hi, I'm using Tomcat 6.0.26 with Apache 2.2 on Mac 10.6.3. I want to use http://localhost/ to access content in my $CATALINA_HOME/webapps/ROOT/ directory. However, when I visit http://localhost/index.jsp, I just get the raw page with all the uncompiled, JSP code. Below is the directive I'm using in my httpd.conf file. Any thoughts? VirtualHost *:80 ServerName lvcva DocumentRoot /Library/Tomcat/Home/webapps/ROOT Directory /Library/Tomcat/Home/webapps/ROOT Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all /Directory JkMount /* ajp13_worker JkMount /leadtracker ajp13_worker JkMount /campaigns ajp13_worker JkMount /tracking/leads ajp13_worker JkUnMount /myco/* ajp13_worker JkUnMount /ltourism/* ajp13_worker JkUnMount /mtourism/* ajp13_worker JkUnMount /images/* ajp13_worker JkUnMount /error-pages/*.html ajp13_worker JkUnMount /*.swf ajp13_worker # Administer mount implied my wildcard mount above JkMount /administer/* ajp13_worker JkMount /search/* ajp13_worker JkMount /contentSyndication ajp13_worker ErrorDocument 404 /error-pages/404.html ErrorDocument 500 /error-pages/500.html ErrorDocument 503 /error-pages/503.html /VirtualHost I am successfully able to access JSP content in other webapps directories other than ROOT. Thanks, - Dave -- View this message in context: http://old.nabble.com/Trouble-accessing-content-in-webapps-ROOT-tp28256603p28256603.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Trouble accessing content in webapps/ROOT
What specifically is wrong? Why are the pages being served without being compiled? Thanks, - Dave Konstantin Kolinko wrote: 2010/4/15 laredotornado laredotorn...@gmail.com: Hi, I'm using Tomcat 6.0.26 with Apache 2.2 on Mac 10.6.3. I want to use http://localhost/ to access content in my $CATALINA_HOME/webapps/ROOT/ directory. However, when I visit http://localhost/index.jsp, I just get the raw page with all the uncompiled, JSP code. Below is the directive I'm using in my httpd.conf file. Any thoughts? Yes, your configuration is wrong. Have you read the manuals, I mean the proper ones at http://tomcat.apache.org/ ? There should be a warning somewhere, that you must not point Apache to your Tomcat appbase. (Pointing it to your ROOT application is a lesser crime, but still similar to the original one). DocumentRoot /Library/Tomcat/Home/webapps/ROOT Directory /Library/Tomcat/Home/webapps/ROOT Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all /Directory JkMount (...) I am successfully able to access JSP content in other webapps directories other than ROOT. Thanks, - Dave Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Trouble-accessing-content-in-webapps-ROOT-tp28256603p28258290.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Where do CATALINA_OPTS get defined?
Hi, I'm using Tomcat 6.0.26 on a Mac 10.6.3. Where is the best place to store the CATALINA_OPTS environment variable? I'm running Tomcat as a daemon on my system. Thanks, - Dave -- View this message in context: http://old.nabble.com/Where-do-CATALINA_OPTS-get-defined--tp28243278p28243278.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where do CATALINA_OPTS get defined?
Yes, what is the best place to set it. I have created a script under /Library/LaunchDaemons/. Thanks, - Dave Pid * wrote: On 14/04/2010 15:20, laredotornado wrote: Hi, I'm using Tomcat 6.0.26 on a Mac 10.6.3. Where is the best place to store the CATALINA_OPTS environment variable? I'm running Tomcat as a daemon on my system. Thanks, - Dave Do you mean where is the best place to set it? Which method are you using to run it as a daemon? p -- View this message in context: http://old.nabble.com/Where-do-CATALINA_OPTS-get-defined--tp28243278p28243739.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Installing Tomcat as daeon on Mac 10.6 (Snow Leopard)
Hi, I've installed Tomcat 6.0.26 on my Mac 10.6.3 system. I'm trying to run it as a daemon on system startup and I was following the instructions here -- http://www.malisphoto.com/tips/tomcatonosx.html#Anchor-JSVC. But the site says to untar the ~/Downloads/tomcat-plist.tar.gz file and I can't find that anywhere. Does anyone know where I can find it or what file I can install in my /Library/LaunchDaemons/ to get Tomcat to launch on system startup? Thanks, - Dave -- View this message in context: http://old.nabble.com/Installing-Tomcat-as-daeon-on-Mac-10.6-%28Snow-Leopard%29-tp28235524p28235524.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org