Re: AJP with HTTPD - Buffer Size on long URLs
Using ProxyIOBufferSize as 32192 totally worked even though the documentation suggests otherwise. I am using httpd 2.2.14 with Tomcat 6.0.16. Thank you for the tip, now I can again use my long urls. thanks, Nilesh On Fri, Nov 27, 2009 at 11:32 PM, Caldarale, Charles R < chuck.caldar...@unisys.com> wrote: > > From: Nilesh Bansal [mailto:nileshban...@gmail.com] > > Subject: Re: AJP with HTTPD - Buffer Size on long URLs > > > > I am using mod_proxy_ajp (and not mod_jk) > > There's the ProxyIOBufferSize parameter; the 2.2 doc says the max value is > 8192, but the 2.3 doc says the minimum is 512 with no mention of a maximum. > Perhaps there's a change in trunk that allows the larger values - or you > might just try it and see what happens. > > Or switch to mod_jk... > > - 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. > >
Re: AJP with HTTPD - Buffer Size on long URLs
I am using mod_proxy_ajp (and not mod_jk) and I was not able to find any suitable way of specifying the worker.properties file with this parameter on max_packet_size with mod_proxy. Any pointers will be most appreciated. I am still not sure where in httpd.conf to set the AJP specific parameters. thanks, Nilesh On Fri, Nov 27, 2009 at 10:44 PM, Caldarale, Charles R < chuck.caldar...@unisys.com> wrote: > > From: Nilesh Bansal [mailto:nileshban...@gmail.com] > > Subject: AJP with HTTPD - Buffer Size on long URLs > > > > Is there a way the buffer size can be increased? > > As usual, it's in the docs: > > http://tomcat.apache.org/connectors-doc/reference/workers.html#Advanced%20Worker%20Directives > > Look at the max_packet_size attribute. Note that a corresponding setting > must be made in the AJP element in Tomcat's conf/server.xml > file. > > - 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. > >
AJP with HTTPD - Buffer Size on long URLs
Hi, I have recently configured the apache httpd to use AJP for connecting to backend Tomcat servers over AJP (ajp://tomcat.server/8009). When I try to query the frontend httpd server with a long url (over 8000 characters), the request fails. The following is printed in error_log of httpd [Fri Nov 27 18:30:13 2009] [error] ajp_msg_append_cvt_string(): BufferOverflowException 4 6117 [Fri Nov 27 18:30:13 2009] [error] ajp_marshal_into_msgb: Error appending the query string [Fri Nov 27 18:30:13 2009] [error] ajp_send_header: ajp_marshal_into_msgb failed [Fri Nov 27 18:30:13 2009] [error] (120001)APR does not understand this error code: proxy: AJP: request failed to (null) (tomcat.server) Is there a way the buffer size can be increased? thanks, Nilesh
Re: static method to get servlet context
Thanks. ThreadLocal is exactly what I am looking for. -Nilesh On Sun, May 11, 2008 at 9:37 PM, Bill Barker <[EMAIL PROTECTED]> wrote: > > "Nilesh Bansal" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > hi all, > > > > I want to know if Tomcat (servlet api) provides some way by which a > > Java method can get session information or page context associated > > with the current executing thread? > > > The short answer is no: Tomcat out-of-the-box doesn't provide this type of > functionality > > > > Inside a JSP or a class implementing HttpServlet, one can easily get > > the page context and session information. But is there some static > > helper function which can return the same information for the current > > executing thread? I don't want to pass the pageContext as an > > additional variable to all method calls in JSP. > > > Long answer: There is nothing to prevent you from creating you a static > ThreadLocal and storing whatever information you need in that. If you don't > actually need the pageContext, then a simple Filter could be used to set > this information up. > > > > DWR for example provides the following for all DWR requests: > > WebContext webContext = WebContextFactory.get(); // get() is a static > > function > > HttpSession session = webContext.getHttpServletRequest().getSession(); > > > > thanks > > Nilesh > > > > -- > > Nilesh Bansal > > > > - > > 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] > > -- Nilesh Bansal - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
static method to get servlet context
hi all, I want to know if Tomcat (servlet api) provides some way by which a Java method can get session information or page context associated with the current executing thread? Inside a JSP or a class implementing HttpServlet, one can easily get the page context and session information. But is there some static helper function which can return the same information for the current executing thread? I don't want to pass the pageContext as an additional variable to all method calls in JSP. DWR for example provides the following for all DWR requests: WebContext webContext = WebContextFactory.get(); // get() is a static function HttpSession session = webContext.getHttpServletRequest().getSession(); thanks Nilesh -- Nilesh Bansal - 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: Partial context reload
thanks. are there other app servers, other than tomcat, which may have similar functionality? thanks Nilesh On Tue, Apr 29, 2008 at 4:41 AM, Peter Crowther <[EMAIL PROTECTED]> wrote: > > From: Nilesh Bansal [mailto:[EMAIL PROTECTED] > > > > I have a question regarding context reloading in tomcat. Our app > > consists of two type of Java class files (1) core modules consisting > > of many singletons which are initialized once by reading large files > > from filesystem at the start of application (2) helper classes mostly > > for formatting, e.g., a servlet that serves a PNG graph, formatting of > > time in different formats, and classic JSP tags extending TagSupport. > > > > Tomcat allows users to set "reloadable=true", but that reloads the > > whole context (even if a single class has changed). This means, our > > application has to initialize itself all over again which is time > > consuming (it reads lot of stuff from files in memory). Is there a way > > to set partial reload?? Which means, if one of the helper classes has > > changed (and core classes are intact), just replace that changed code > > in the context. > > > > Any help on this issue will be of great use to us. > > There's a hack, but it's pretty gross. If this is the only webapp on the > server, you might be able to put the jars for the core classes in common/lib. > They would be initialised once, and context reloads wouldn't reinitialise > them. However, you'd then need to restart Tomcat to force a reload of the > core classes - this is clearly not a solution that's appropriate for a Tomcat > with several webapps on it! > > A second approach would be to have two webapps - one with your core and one > with your helper classes. Change the communication between the two to use > some appropriate mechanism that works between webapps. You could then reload > one webapp independently of the other. > > I'm not aware of any facility for a partial reload other than this. > > - Peter > > --------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Nilesh Bansal - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Partial context reload
Hi all, I have a question regarding context reloading in tomcat. Our app consists of two type of Java class files (1) core modules consisting of many singletons which are initialized once by reading large files from filesystem at the start of application (2) helper classes mostly for formatting, e.g., a servlet that serves a PNG graph, formatting of time in different formats, and classic JSP tags extending TagSupport. Tomcat allows users to set "reloadable=true", but that reloads the whole context (even if a single class has changed). This means, our application has to initialize itself all over again which is time consuming (it reads lot of stuff from files in memory). Is there a way to set partial reload?? Which means, if one of the helper classes has changed (and core classes are intact), just replace that changed code in the context. Any help on this issue will be of great use to us. thanks Nilesh - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]