RE: org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request fai
Sorry about the formatting. It's hotmail cr*p! So, I run Apache2 that fronts a Tomcat in mod_jk and I have this multi-upload screen(ajax+java) that works great from my intranet but when testing it from outside is not. I'm sure it's a setting thing either on mod_jk, tomcat or apacheI observed the following:1. when I initiate an upload, it seems that the whole upload happens as a result of the form post instead of being progressively. I test from a place that has a proxy and my tomcat instance is fronted by an apache that handles the static content (coupled with mod_jk). What's really happening? Shouldn't the upload happen progressively via the proxy ? Is the file firstly uploaded to the proxy and from there to my site as one chunk ? Why this is not happening from my local box. I had other people complaining about this as well so it's not only my location. From my intranet works as it should - flawless.2.If I initiate two concurrent uploads only the last one prevails and I get always an exception on the first one... This also works just fine from my local intranet. I assume both are related with each other.2007-07-23 11:53:27,358 [TP-Processor11]: ERROR org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:253) - Servlet.service() fororg.apache.commons.fileupload.FileUploadBase$IOFileUploadException:Processing of multipart/form-data request failed. Stream ended unexpectedly atorg.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:359) atorg.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:302) atorg.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:185) atorg.apache.struts.util.RequestUtils.populate(RequestUtils.java:405) atorg.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:818) atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:194) atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) atorg.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) atcom.goodmedia.framework.core.servlet.FrameworkActionServlet.doGet(FrameworkActionServlet.java:119) atcom.goodmedia.framework.core.servlet.FrameworkActionServlet.doPost(FrameworkActionServlet.java:131) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) atcom.goodmedia.framework.core.servlet.FrameworkActionServlet.service(FrameworkActionServlet.java:91) atcom.gsi.core.servlet.GSIActionServlet.service(GSIActionServlet.java:128) atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46) atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.goodmedia.trim.TrimFilter.doFilter(TrimFilter.java:72) atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) atcom.goodmedia.framework.core.servlet.UserManagerUtilsFilter.doFilter(UserManagerUtilsFilter.java:105) atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292) atorg.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:108) atorg.acegisecurity.intercept.web.SecurityEnforcementFilter.doFilter(SecurityEnforcementFilter.java:197) atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) atorg.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:143) atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) atorg.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:246) atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) atorg.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220) atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) atorg.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173) atorg.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
RE: org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request fai
Anyone, any ideas ?From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed.Date: Sat, 21 Jul 2007 11:02:30 -0500 Hello,I having this strange problem and unexpected issue.I do have an upload page and I allow multiple uploads. Each upload is targeting same iframe so give user a better experience.However the problem I'm facing is that some uploads stop right away after initiate. Another fact is that this is never happening on my intranet and always happens when one does it from internet. I assume is a timing issue somewhere but I cannot figure it out for now... I will look up server.xml. Btw. I'm using Tomcat 5.5.12 with the common-fileupload with the following manifestManifest-Version: 1.0Ant-Version: Apache Ant 1.5.3 Created-By: Apache MavenBuilt-By: henPackage: org.apache.commons.fileuploadBuild-Jdk: 1.4.2_09Extension-Name: commons-fileuploadSpecification-Title: Commons FileUploadSpecification-Vendor: Apache Software FoundationImplementation-Title: Commons FileUploadImplementation-Vendor: Apache Software FoundationImplementation-Version: 1.1.1Specification-Version: 1.1.1X-Compile-Source-JDK: 1.3X-Compile-Target-JDK: 1.3Implementation-Vendor-Id: org.apacheHere the full stack trace, any ideea even if you think is just hint will do, thanks!2007-07-21 00:58:40,697 [TP-Processor1]: ERROR org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:253) - Servlet.service() for servlet action threw exceptionorg.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedlyat org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:384) at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268) at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:185) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:405) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:818) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:194) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)at com.gdmedia.framework.core.servlet.FrameworkActionServlet.doGet(FrameworkActionServlet.java:119) at com.gdmedia.framework.core.servlet.FrameworkActionServlet.doPost(FrameworkActionServlet.java:131) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)at com.gdmedia.framework.core.servlet.FrameworkActionServlet.service(FrameworkActionServlet.java:91) at com.gsi.core.servlet.GSIActionServlet.service(GSIActionServlet.java:128) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.gdmedia.framework.core.servlet.SiteDownCheckFilter.doFilter(SiteDownCheckFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.gdmedia.framework.core.servlet.BypassSiteDownCheckFilter.doFilter(BypassSiteDownCheckFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.gdmedia.trim.TrimFilter.doFilter(TrimFilter.java:72)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.gdmedia.framework.core.servlet.UserManagerUtilsFilter.doFilter(UserManagerUtilsFilter.java:105) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:108) at org.acegisecurity.intercept.web.SecurityEnforcementFilter.doFilter(SecurityEnforcementFilter.java:197) at
How To: Postgresql XA Datasource
Hi, I'm trying to create a XA datasource as resource in my context.xml file. Can one of you tell me how can I do that, I don't find any documentation on the matter. I use Postgresql 8.1.4 with the latest production driver. This version supports XA Data Source and they have a class for that PGXADataSource. Any idea will be highly appreciated! MC - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Context and web.xml
Any tips on the matter ? From: Mark Thomas [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: Tomcat Users List users@tomcat.apache.org Subject: Re: Context and web.xml Date: Mon, 21 Aug 2006 07:27:32 -0400 MC Moisei wrote: Hi, I'm using tomcat for dev. My question is for a dev environment. I have context defined in conf %TOMCAT_HOME%\conf\Catalina\localhost. Is there a way to specify what's the web.xml tomcat should use ? I use tomcat for dev but I target Weblogic for production and such feature would be quite useful. Thanks in advance, MC When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Context and web.xml
I'm looking to be able to tell context where is the web.xml. I have two web.xmls one for tomcat and one for weblogic. web_tc.xml web_wls.xml I want to tell tomcat to look into web_tc.xml From: Martin Gainty [EMAIL PROTECTED] Reply-To: Martin Gainty [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Subject: Re: Context and web.xml Date: Mon, 21 Aug 2006 16:29:04 -0400 so if you to start off in context.xml with a path specification Context path=/urlPath ... later on in web.xml you have defined the servlet-mapping as servlet-mapping servlet-nameurlPath/servlet-name url-pattern/servlet/urlPath/url-pattern /servlet-mapping you would access the servlet with http://MachineName:Port/WebApp/servlet/UrlPath HTH, M- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: MC Moisei [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Monday, August 21, 2006 4:03 PM Subject: Re: Context and web.xml Any tips on the matter ? From: Mark Thomas [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: Tomcat Users List users@tomcat.apache.org Subject: Re: Context and web.xml Date: Mon, 21 Aug 2006 07:27:32 -0400 MC Moisei wrote: Hi, I'm using tomcat for dev. My question is for a dev environment. I have context defined in conf %TOMCAT_HOME%\conf\Catalina\localhost. Is there a way to specify what's the web.xml tomcat should use ? I use tomcat for dev but I target Weblogic for production and such feature would be quite useful. Thanks in advance, MC When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. Mark tomcat-user-owner - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Context and web.xml
Hi, I'm using tomcat for dev. My question is for a dev environment. I have context defined in conf %TOMCAT_HOME%\conf\Catalina\localhost. Is there a way to specify what's the web.xml tomcat should use ? I use tomcat for dev but I target Weblogic for production and such feature would be quite useful. Thanks in advance, MC - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I direct all http requests to Https
Is there a why to set you my context to use a different web.xml file ? I use tomcat to speedup my Weblogic developement and that would require to have two web.xml files. Is there a way to set the context to user for example web_tomcat.xml file instead ? I work in exploded format. Thanks, MC From: Filip Hanik - Dev Lists [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: Tomcat Users List users@tomcat.apache.org Subject: Re: How do I direct all http requests to Https Date: Fri, 04 Aug 2006 13:22:57 -0500 I just responded to this yesterday, web.xml for your web-application http://e-docs.bea.com/wls/docs61/webapp/web_xml.html#1019727 user-data-constraint CONFIDENTIAL Filip William Chu wrote: How do I direct a user to the https url when they use the http url? i.e. http://url is directed to https://url - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Handling 404 thru web.xml
Hi, Do you know of any issue involving error handling in tomcat (5.5.9) ? Here's the deal. I defined in my web.xml the following entry error-page error-code404/error-code location/portal.do/location /error-page When I call, say portal1.do, a page that doesn't exists I get a forward to the portal.do the thing with the forward is seems that it doesn't go thru the application filters again. And why this is not a redirect ? The browser address stays portal1.do instead of portal.do... Here how the stack trace looks when the portal1.do is called ( this is normal, check the second trace) Thread [http-8585-Processor24] (Suspended) CustomServlet.service(ServletRequest, ServletResponse) line: 104 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 252 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 FilterSecurityInterceptor.invoke(FilterInvocation) line: 84 SecurityEnforcementFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 182 FilterToBeanProxy.doFilter(ServletRequest, ServletResponse, FilterChain) line: 125 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 CustomAuthenticationProcessingFilter(AbstractProcessingFilter).doFilter(ServletRequest, ServletResponse, FilterChain) line: 305 FilterToBeanProxy.doFilter(ServletRequest, ServletResponse, FilterChain) line: 125 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 HttpSessionContextIntegrationFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 225 FilterToBeanProxy.doFilter(ServletRequest, ServletResponse, FilterChain) line: 125 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 ContentReaderFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 171 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 RequestUtilsFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 114 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 StandardWrapperValve.invoke(Request, Response) line: 213 StandardContextValve.invoke(Request, Response) line: 178 StandardHostValve.invoke(Request, Response) line: 126 ErrorReportValve.invoke(Request, Response) line: 105 StandardEngineValve.invoke(Request, Response) line: 107 CoyoteAdapter.service(Request, Response) line: 148 Http11Processor.process(InputStream, OutputStream) line: 856 Http11Protocol$Http11ConnectionHandler.processConnection(TcpConnection, Object[]) line: 744 PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line: 527 LeaderFollowerWorkerThread.runIt(Object[]) line: 80 ThreadPool$ControlRunnable.run() line: 684 ThreadWithAttributes(Thread).run() line: 595 Here how the stack trace looks on the forward to /portal.do after 404 was intercepted Thread [http-8585-Processor24] (Suspended (breakpoint at line 74 in CustomServlet)) CustomServlet.service(ServletRequest, ServletResponse) line: 74 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 252 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 ApplicationDispatcher.invoke(ServletRequest, ServletResponse) line: 672 ApplicationDispatcher.processRequest(ServletRequest, ServletResponse) line: 465 ApplicationDispatcher.doForward(ServletRequest, ServletResponse) line: 398 ApplicationDispatcher.forward(ServletRequest, ServletResponse) line: 301 StandardHostValve.custom(Request, Response, ErrorPage) line: 362 StandardHostValve.status(Request, Response) line: 283 StandardHostValve.invoke(Request, Response) line: 136 ErrorReportValve.invoke(Request, Response) line: 105 StandardEngineValve.invoke(Request, Response) line: 107 CoyoteAdapter.service(Request, Response) line: 148 Http11Processor.process(InputStream, OutputStream) line: 856 Http11Protocol$Http11ConnectionHandler.processConnection(TcpConnection, Object[]) line: 744 PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line: 527 LeaderFollowerWorkerThread.runIt(Object[]) line: 80 ThreadPool$ControlRunnable.run() line: 684 ThreadWithAttributes(Thread).run() line: 595 Any idea will be greatly appreciated. MC Ps. On weblogic the error handling triggers a redirect and
RE: Handling 404 thru web.xml
Thanks Tim! Yeah, that's pretty much what I figured out but is there a workaround for that ? MC From: Tim Lucia [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: 'Tomcat Users List' users@tomcat.apache.org Subject: RE: Handling 404 thru web.xml Date: Wed, 10 May 2006 12:12:17 -0400 A redirect would change the status code returned to the user agent. It does not go through the filters because it is forwarded, and as such is part of the same request, not a new request. Tim -Original Message- From: MC Moisei [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 11:59 AM To: users@tomcat.apache.org Subject: Handling 404 thru web.xml Hi, Do you know of any issue involving error handling in tomcat (5.5.9) ? Here's the deal. I defined in my web.xml the following entry error-page error-code404/error-code location/portal.do/location /error-page When I call, say portal1.do, a page that doesn't exists I get a forward to the portal.do the thing with the forward is seems that it doesn't go thru the application filters again. And why this is not a redirect ? The browser address stays portal1.do instead of portal.do... Here how the stack trace looks when the portal1.do is called ( this is normal, check the second trace) Thread [http-8585-Processor24] (Suspended) CustomServlet.service(ServletRequest, ServletResponse) line: 104 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 252 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 FilterSecurityInterceptor.invoke(FilterInvocation) line: 84 SecurityEnforcementFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 182 FilterToBeanProxy.doFilter(ServletRequest, ServletResponse, FilterChain) line: 125 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 CustomAuthenticationProcessingFilter(AbstractProcessingFilter).doFilter(Serv letRequest, ServletResponse, FilterChain) line: 305 FilterToBeanProxy.doFilter(ServletRequest, ServletResponse, FilterChain) line: 125 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 HttpSessionContextIntegrationFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 225 FilterToBeanProxy.doFilter(ServletRequest, ServletResponse, FilterChain) line: 125 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 ContentReaderFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 171 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 RequestUtilsFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 114 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 StandardWrapperValve.invoke(Request, Response) line: 213 StandardContextValve.invoke(Request, Response) line: 178 StandardHostValve.invoke(Request, Response) line: 126 ErrorReportValve.invoke(Request, Response) line: 105 StandardEngineValve.invoke(Request, Response) line: 107 CoyoteAdapter.service(Request, Response) line: 148 Http11Processor.process(InputStream, OutputStream) line: 856 Http11Protocol$Http11ConnectionHandler.processConnection(TcpConnection, Object[]) line: 744 PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line: 527 LeaderFollowerWorkerThread.runIt(Object[]) line: 80 ThreadPool$ControlRunnable.run() line: 684 ThreadWithAttributes(Thread).run() line: 595 Here how the stack trace looks on the forward to /portal.do after 404 was intercepted Thread [http-8585-Processor24] (Suspended (breakpoint at line 74 in CustomServlet)) CustomServlet.service(ServletRequest, ServletResponse) line: 74 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 252 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 ApplicationDispatcher.invoke(ServletRequest, ServletResponse) line: 672 ApplicationDispatcher.processRequest(ServletRequest, ServletResponse) line: 465 ApplicationDispatcher.doForward(ServletRequest, ServletResponse) line: 398 ApplicationDispatcher.forward(ServletRequest, ServletResponse) line: 301 StandardHostValve.custom(Request, Response, ErrorPage) line: 362 StandardHostValve.status(Request, Response) line: 283
RE: Handling 404 thru web.xml
Tim I appreciate you're so prompt on this isssue. If you look to the second stack trace I sent you'd see that none of my filters are executed when the forward is happening. I'm not keen at all for a redirect what I'd need is to have the filters executed since the put some stuff in the request, stuff that is very important for the struts actions/controllers. What I don't understand is why on the forward case even thought the ApplicationFilterChain.doFilter () is called none of the filters are called. After all shouldn't error interception be on same thread as the original thread ? Your solution will definetely work and that's going to be the way out. I am puzzled a bit by the fact that Weblogic 8.1 implements it differently and that's a certain thing I can tell you for sure, Weblogic does a redirect and that solves my problems on that environment. MC From: Tim Lucia [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: 'Tomcat Users List' users@tomcat.apache.org Subject: RE: Handling 404 thru web.xml Date: Wed, 10 May 2006 13:20:44 -0400 Workaround? You speak as if it is broken, when it is behaving as it should. If you look at the stack while inside the error page, you will see your chain of filters on the stack. They've already done the request side and are now waiting for chain.doFilter(request, response) to return. If you are looking to redirect all 404/not found pages to your default page, then you can do that (using Struts) by marking portal.do as the default mapping. And, you can have a home/default action with a forward name=home path=/portal.do redirect=true/. This action can be as simple as action path=/NotFound type=org.apache.struts.actions.ForwardAction parameter=home/ And then, in your web.xml, use /NotFound as the target of your error page. At any rate, setting the 'redirect=true' attribute on the forward will cause the struts controller to sendRedirect() instead of forward(). Tim -Original Message- From: MC Moisei [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 12:27 PM To: users@tomcat.apache.org Subject: RE: Handling 404 thru web.xml Thanks Tim! Yeah, that's pretty much what I figured out but is there a workaround for that ? MC From: Tim Lucia [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: 'Tomcat Users List' users@tomcat.apache.org Subject: RE: Handling 404 thru web.xml Date: Wed, 10 May 2006 12:12:17 -0400 A redirect would change the status code returned to the user agent. It does not go through the filters because it is forwarded, and as such is part of the same request, not a new request. Tim -Original Message- From: MC Moisei [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 11:59 AM To: users@tomcat.apache.org Subject: Handling 404 thru web.xml Hi, Do you know of any issue involving error handling in tomcat (5.5.9) ? Here's the deal. I defined in my web.xml the following entry error-page error-code404/error-code location/portal.do/location /error-page When I call, say portal1.do, a page that doesn't exists I get a forward to the portal.do the thing with the forward is seems that it doesn't go thru the application filters again. And why this is not a redirect ? The browser address stays portal1.do instead of portal.do... Here how the stack trace looks when the portal1.do is called ( this is normal, check the second trace) Thread [http-8585-Processor24] (Suspended) CustomServlet.service(ServletRequest, ServletResponse) line: 104 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 252 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 FilterSecurityInterceptor.invoke(FilterInvocation) line: 84 SecurityEnforcementFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 182 FilterToBeanProxy.doFilter(ServletRequest, ServletResponse, FilterChain) line: 125 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 CustomAuthenticationProcessingFilter(AbstractProcessingFilter).doFilter(Ser v letRequest, ServletResponse, FilterChain) line: 305 FilterToBeanProxy.doFilter(ServletRequest, ServletResponse, FilterChain) line: 125 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 HttpSessionContextIntegrationFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 225 FilterToBeanProxy.doFilter(ServletRequest, ServletResponse, FilterChain) line: 125 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 ContentReaderFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 171
RE: Handling 404 thru web.xml
Please read I am puzzled a bit by the fact that Weblogic 8.1 implements it differently and that's a certain thing I can tell you for sure, Weblogic does a redirect and that solves my problems on that environment. as I am puzzled a bit by the fact that Weblogic 8.1 implements it differently.It seams that Weblogic does a forward too but it looks that's in the very same thread as the original request handling and the filters are called twice... C From: MC Moisei [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: users@tomcat.apache.org Subject: RE: Handling 404 thru web.xml Date: Wed, 10 May 2006 12:50:58 -0500 Tim I appreciate you're so prompt on this isssue. If you look to the second stack trace I sent you'd see that none of my filters are executed when the forward is happening. I'm not keen at all for a redirect what I'd need is to have the filters executed since the put some stuff in the request, stuff that is very important for the struts actions/controllers. What I don't understand is why on the forward case even thought the ApplicationFilterChain.doFilter () is called none of the filters are called. After all shouldn't error interception be on same thread as the original thread ? Your solution will definetely work and that's going to be the way out. I am puzzled a bit by the fact that Weblogic 8.1 implements it differently and that's a certain thing I can tell you for sure, Weblogic does a redirect and that solves my problems on that environment. MC From: Tim Lucia [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: 'Tomcat Users List' users@tomcat.apache.org Subject: RE: Handling 404 thru web.xml Date: Wed, 10 May 2006 13:20:44 -0400 Workaround? You speak as if it is broken, when it is behaving as it should. If you look at the stack while inside the error page, you will see your chain of filters on the stack. They've already done the request side and are now waiting for chain.doFilter(request, response) to return. If you are looking to redirect all 404/not found pages to your default page, then you can do that (using Struts) by marking portal.do as the default mapping. And, you can have a home/default action with a forward name=home path=/portal.do redirect=true/. This action can be as simple as action path=/NotFound type=org.apache.struts.actions.ForwardAction parameter=home/ And then, in your web.xml, use /NotFound as the target of your error page. At any rate, setting the 'redirect=true' attribute on the forward will cause the struts controller to sendRedirect() instead of forward(). Tim -Original Message- From: MC Moisei [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 12:27 PM To: users@tomcat.apache.org Subject: RE: Handling 404 thru web.xml Thanks Tim! Yeah, that's pretty much what I figured out but is there a workaround for that ? MC From: Tim Lucia [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: 'Tomcat Users List' users@tomcat.apache.org Subject: RE: Handling 404 thru web.xml Date: Wed, 10 May 2006 12:12:17 -0400 A redirect would change the status code returned to the user agent. It does not go through the filters because it is forwarded, and as such is part of the same request, not a new request. Tim -Original Message- From: MC Moisei [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 11:59 AM To: users@tomcat.apache.org Subject: Handling 404 thru web.xml Hi, Do you know of any issue involving error handling in tomcat (5.5.9) ? Here's the deal. I defined in my web.xml the following entry error-page error-code404/error-code location/portal.do/location /error-page When I call, say portal1.do, a page that doesn't exists I get a forward to the portal.do the thing with the forward is seems that it doesn't go thru the application filters again. And why this is not a redirect ? The browser address stays portal1.do instead of portal.do... Here how the stack trace looks when the portal1.do is called ( this is normal, check the second trace) Thread [http-8585-Processor24] (Suspended) CustomServlet.service(ServletRequest, ServletResponse) line: 104 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 252 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 FilterSecurityInterceptor.invoke(FilterInvocation) line: 84 SecurityEnforcementFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 182 FilterToBeanProxy.doFilter(ServletRequest, ServletResponse, FilterChain) line: 125 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 CustomAuthenticationProcessingFilter(AbstractProcessingFilter).doFilter(Ser v letRequest, ServletResponse, FilterChain) line: 305 FilterToBeanProxy.doFilter(ServletRequest, ServletResponse
Re: Tomcat 5.0 : howto make a webapp the ROOT webapp the proper way
That implies that I can have more than one application in ROOT folder...that would require some URL filtering in each app. Also if I look under webapps/ROOT folder there is a WEB-INF in there... Are you basically saying that instead of naming my application someapp I'd have to name it ROOT ? TIA! MC http://www.goodstockimages.com From: David Smith [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: Tomcat Users List users@tomcat.apache.org Subject: Re: Tomcat 5.0 : howto make a webapp the ROOT webapp the proper way Date: Tue, 08 Nov 2005 10:45:16 -0500 To answer the question, yes. Any webapp in the webapps folder named ROOT will become the root app. --David Caldarale, Charles R wrote: From: Francis Galiegue [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat 5.0 : howto make a webapp the ROOT webapp the proper way Will renaming the directory to ROOT have the same effect? Don't know, haven't tried it. Should only take you a few minutes to test. - 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: [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]
ajp13.service() Error
Anyone can tell why I get errors like this in apache2's error log ? I have tomcat in tandam with apache2 and I use the mod_jk for that purpose. The errors seems not critical but nonetheless they are errors. [Thu Oct 20 09:11:50 2005] [error] ajp13.service() ajpGetReply recoverable error 3 [Thu Oct 20 09:11:50 2005] [error] ajp13.service() Error forwarding ajp13:localhost:8009 1 0 [Thu Oct 20 09:11:50 2005] [error] mod_jk2.handler() Error connecting to tomcat 3, status 200 [Thu Oct 20 09:37:32 2005] [error] ajp13.service() ajpGetReply recoverable error 3 [Thu Oct 20 09:37:32 2005] [error] ajp13.service() ajpGetReply recoverable error 3 [Thu Oct 20 09:37:32 2005] [error] ajp13.service() Error forwarding ajp13:localhost:8009 1 0 [Thu Oct 20 09:37:32 2005] [error] mod_jk2.handler() Error connecting to tomcat 3, status 200 Constantin http://www.goodstockimages.com From: Jukka Uusisalo [EMAIL PROTECTED] Reply-To: Tomcat Users List users@tomcat.apache.org To: Tomcat Users List users@tomcat.apache.org Subject: Re: JAASRealm, Tomcat 5.5 getting HTTP error page 403 Access denied Date: Thu, 20 Oct 2005 18:37:31 +0300 Carsten Schiller wrote: Hello! We are trying to implement a login/security environment using Tomcat 5.5's JAASRealm and Struts as a MVC-Framework. After Login ,which fails with error HTTP Status 403 - Access to the requested ressource has been denied, we can navigate manually to our output.jsp and use ... %= request.getUserPrincipal % , ... %= request.isUserInRole(administrator) % ... logic:present role=administrator Admin present! /logic:present These return correct username, (true) for isUserInRole, and the logic tag also works... BUT Our problem is: We protected *.do in our web.xml to be only accessible by users in role administrator, which fails as described above. Why does the login fail, but we still get a valid Subject with Principals, and can access the roles on the output.jsp? We are stuck now for over a week, reading tutorials, asking google, but with no success... Any Ideas would be appreciated! Hi, I think resources that does not require authentication, like your output.jsp, should return null from request.getUserPrincipal(). But what kind of JAAS loginmodule you have? Does that login module work correctly? - Jukka - - 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]