Add parameters into tomcat service ......
Tomcat (5.0.28) runs on Windows 2003 Server. Web application needs some information from tomcat starup. So I add following statement in startup.bat batch file set JAVA_OPTS=-Xms512m -Xmx512m - Daos.configuration=%CATALINA_HOME%/conf/aos.config Application runs well When I start Tomcat by startup.bat But now I need to install Tomcat as windows service, how to add aforementioned statement into this tomcat service? Following is what I have done for it, but it failed. 1: Modify service.bat file, add --JvmOptions -Xms512m;-Xmx512m;- Daos.configuration=%CATALINA_HOME%/conf/aos.config behind %EXECUTABLE% //IS//%SERVICE_NAME% 2: Make Tomcat as Windows Service run :service install tomcat5 3: Start service 'tomcat5' But application runs not well because it can not get information from startup parameters. My question is: how to add statement set JAVA_OPTS=-Xms512m -Xmx512m - Daos.configuration=%CATALINA_HOME%/conf/aos.config into tomcat5 service? Thanks
RE: Add parameters into tomcat service ......
From: Tony Lu [mailto:[EMAIL PROTECTED] Subject: Add parameters into tomcat service .. My question is: how to add statement set JAVA_OPTS=-Xms512m -Xmx512m - Daos.configuration=%CATALINA_HOME%/conf/aos.config into tomcat5 service? Use tomcat5w.exe from the bin directory. Add the options you want under the Java tab. - 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]
Problem Parsing Request Parameters
Certain users of my website are having issues with respect to submitting a form on a page. Not all users are experiencing this problem, and I've yet to replicate it myself so it makes the situation even more complex. I have an icking suspicion that its related to the user's browser, but I've tested on the same browser version/subversion without a glitch. Here's the scenario: 1) User goes to page. 2) User fills out form. 3) User clicks submit. 4) JSP page then performs sanity checks against submitted data. In the event of a failure on the sanity checks, page is redirected back to previous page. Simple enough. Well, users are filling out the form and clicking submit with valid infromation, yet when I parse the parameters out of the request, I'm finding none of the form values from the previous page. I then decided to investigate further and log out all request information in the event that these sanity checks fail. The following is what I logged out: - Attributes: javax.servlet.request.cipher_suite = [SSL_RSA_WITH_RC4_128_MD5] javax.servlet.request.key_size = [128] javax.servlet.request.ssl_session = [433162398579970fee9289baa9ac832b8558dcc409382f62cb67a3499b80] Parameters: Cookies: JSESSIONID = [FCB31837FFBD2C0D9F986C42B698BADE] contact_value = [ABC] duplicate_type = [None] duplicate_time = [] mortgage = [] lender_id_label = [] title_alternative = [] can_place_orders = [Y] flood_default = [126] can_cancel_lol = [N] contact_label = [] lender_id_value = [ABC] census = [] loan_no_label = [] delivery_method = [Online] apprasail = [] delivery_address = [] title = [] Headers: accept = [image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, application/x-shockwave-flash, */*] referer = [https://WEBSITE_URL/CreateOrder.jsp?applicant2HomePhone=streetName=Ma in+Stapplicant2WorkPhone=applicantOtherPhone=ownerEstimate=applicant 2WorkPhone2=revisionOf=applicantWorkPhoneExtension=unitType=preFixDi r=Eapplicant2OtherPhoneAreaCode=applicantOtherPhone2=applicantMname=L skipstep=nonezip4=applicant2HomePhoneAreaCode=applicant2OtherPhone= applicantLname=DoestreetNum=applicantHomePhoneAreaCode=zip=40845pass code=HomeorderHeaderGeneralNotes=applicantHomePhone2=propertyLoanNumb er=productTitle=applicantFname=Johnapplicant2WorkPhoneExtension=appl icant2WorkPhoneAreaCode=applicant2Mname=JunitNumber=applicantWorkPhon eAreaCode=postFixDir=productAppraisal=propertyParcelNumber=applicant WorkPhone2=applicantOtherPhoneAreaCode=city=HulenapplicantHomePhone= applicantWorkPhone=applicant2Lname=Janeapplicant2OtherPhone2=applican t2HomePhone2=streetType=state=KYcontactId=10productMortgagePrep=pro ductFlood=Yesapplicant2Fname=Doe] accept-language = [en-us] content-type = [application/x-www-form-urlencoded] accept-encoding = [gzip, deflate] user-agent = [Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)] host = [WEBSITE_DOMAIN] connection = [Keep-Alive] cache-control = [no-cache] cookie = [JSESSIONID=FCB31837FFBD2C0D9F986C42B698BADE; contact_value=ABC; duplicate_type=None; duplicate_time=; mortgage=; lender_id_label=; title_alternative=; can_place_orders=Y; flood_default=126; can_cancel_lol=N; contact_label=; lender_id_value=ABC; census=; can_view_insurance_tracking=N; loan_no_label=; delivery_method=Online; apprasail=; delivery_address=; title=] content-length = [0] - There are many interesting things about this request. First, the content-length is 0. Not sure how this could happen...error in browser?? Second, and the most intriguing...Notice the referer entry. The referer entry actually contains all relevant information that I needed in order to process this request, yet if you look at what parameters I was actually able to parse off this request you will see...NONE. I'm stumped. Anybody else seen this before? Environment: JDK 1.4.2_08 Tomcat 5.5.9 ___ Jeremy Nix Senior Application Developer Southwest Financial Services, LTD. (513) 621-6699 x1158 www.sfsltd.com
RE: Tomcat 3.3.2: Not able to retrieve parameters
A simple test works for me. Are you accessing Tomcat 3.3.2 directly or through another web server? Larry -Original Message- From: Code Rebel [mailto:[EMAIL PROTECTED] Sent: Monday, August 22, 2005 8:39 PM To: tomcat-user@jakarta.apache.org Subject: Tomcat 3.3.2: Not able to retrieve parameters Hi all, For some reason I'm not able to retrieve the parameters from a URL. I have a simple test JSP file that attempts to print out the names and values of parameters passed via the URL. The JSP loads, executes and provides a response just fine, but the call to HttpServletRequest.getParameterNames() always returns an empty Enumeration, even when there are parameters on the URL. So, for example, if the following URL is given: http://localhost/examples/jsp/test.jsp?first=1second=2 ...I would expect getParameterNames() to return an Enumeration containing two strings: first and second But no such luck. My hunch is that there is something wrong in the configuration, probably in the server.xml file, but so far I haven't been able to figure out what the problem might be. Thanks in advance for your help. Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - 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]
Tomcat 3.3.2: Not able to retrieve parameters
Hi all, For some reason I'm not able to retrieve the parameters from a URL. I have a simple test JSP file that attempts to print out the names and values of parameters passed via the URL. The JSP loads, executes and provides a response just fine, but the call to HttpServletRequest.getParameterNames() always returns an empty Enumeration, even when there are parameters on the URL. So, for example, if the following URL is given: http://localhost/examples/jsp/test.jsp?first=1second=2 ...I would expect getParameterNames() to return an Enumeration containing two strings: first and second But no such luck. My hunch is that there is something wrong in the configuration, probably in the server.xml file, but so far I haven't been able to figure out what the problem might be. Thanks in advance for your help. Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: startup parameters in tomcat on windows 2000 server
Tomcat uses commons daemon to run as a service. tomcat5w.exe is really prunmgr.exe and tomcat5.exe is prunsrv.exe Instructions for configuring prunmgr.exe and prunsrv.exe are here: http://jakarta.apache.org/commons/daemon/procrun.html Robert The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
passing additional java parameters to tomcat
Hi if i am running tomcat as service on windows 2000 server, and if i need to pass additional java parameters like -Dsun.io.useCanonCaches=false, what is the best way to do, i have already these parameters in catalina.bat file, but it seems that when tomcat runs as a service it does not use that file, do i need to uninstall and reinstall tomcat service , or can i put it some bat file which tomcat uses when starting Ashish __ Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: passing additional java parameters to tomcat
Use the tomcat5w.exe to set the appropriate parameters. If it gives you an alert saying The specified service does not exist as an installed service, just execute service install and tomcat5w will work properly. Regards, Marius -Original Message- From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] Sent: Friday, August 19, 2005 7:21 PM To: tomcat-user@jakarta.apache.org Subject: passing additional java parameters to tomcat Hi if i am running tomcat as service on windows 2000 server, and if i need to pass additional java parameters like -Dsun.io.useCanonCaches=false, what is the best way to do, i have already these parameters in catalina.bat file, but it seems that when tomcat runs as a service it does not use that file, do i need to uninstall and reinstall tomcat service , or can i put it some bat file which tomcat uses when starting Ashish __ Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: passing additional java parameters to tomcat
Have look at these two links: http://web.bvu.edu/staff/david/index.jsp?section=softwaresubsection=tcservc fgpage=overview http://web.bvu.edu/staff/david/index.jsp?section=softwaresubsection=jsmpag e=overview Thanks... Arup -Original Message- From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] Sent: 19 August 2005 17:21 To: tomcat-user@jakarta.apache.org Subject: passing additional java parameters to tomcat Hi if i am running tomcat as service on windows 2000 server, and if i need to pass additional java parameters like -Dsun.io.useCanonCaches=false, what is the best way to do, i have already these parameters in catalina.bat file, but it seems that when tomcat runs as a service it does not use that file, do i need to uninstall and reinstall tomcat service , or can i put it some bat file which tomcat uses when starting Ashish __ Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
startup parameters in tomcat on windows 2000 server
Hi how do i pass startup parameters when starting tomcat as service in windows 2000 server, what i have to pass is as below -Dsun.io.useCanonCaches=false -Djava.security.auth.login.config=%CATALINA_HOME%\conf\login.conf When i add this to catalina.bat file and start as c:\tomcat5.0.28\bin\catalina start from command line it works fine, but when i start it from windows services it does not read those parameters, Where do i put these parameters so they get picked when tomcat starts from windows services Ashish __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
multiple parameters and Laszlo
Hello ! This is not directly Tomcat related, but more of a general servlet API question. I am developping an application with laszlo (www.openlaszlo.org) as the front end and a servlet backend. Laszlo is a rich-client framework based on flash. My problem is that when using a multiple select list, laszlo sends the parameters as : url?list=1,2,3,... instead of url?list=1list=2list=3 That means that I cannot use request.getParameterValues(). Do you know if there is an easy work around ? Or should I parse manually the , in the param string ? Thanks for your help ! Guillaume - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple parameters and Laszlo
Use String.split(,) if you are on JDK1.4 or later to make it a String[]. If you are pre JDK1.4, you can use a java.util.StringTokenizer to accomplish a similar thing. Larry On 4/13/05, Guillaume Lederrey [EMAIL PROTECTED] wrote: Hello ! This is not directly Tomcat related, but more of a general servlet API question. I am developping an application with laszlo (www.openlaszlo.orghttp://www.openlaszlo.org) as the front end and a servlet backend. Laszlo is a rich-client framework based on flash. My problem is that when using a multiple select list, laszlo sends the parameters as : url?list=1,2,3,... instead of url?list=1list=2list=3 That means that I cannot use request.getParameterValues(). Do you know if there is an easy work around ? Or should I parse manually the , in the param string ? Thanks for your help ! Guillaume - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Server.xml parameters unavailable after reload
I am unable to read init parameters in my server.xml file when my webapp is reloaded. This issue was documented in the following bug http://issues.apache.org/bugzilla/show_bug.cgi?id=19852 It said the bug was fixed but I am using Tomcat 5.0.28 and I have this issue. Was this bug re-introduced in tomcat 5 or are there new rules about reading these parameters more than once? Tony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Losing Request Parameters between Browser and Tomcat
i have the following system configuration. Apache Mod_JK Tomcat 4.1.18 which is running on Solaris 8. The problem now is when a user fills an HTML form and submits it, the request parameters are getting lost (meaning the 'service()' method is being called in a servlet but the 'request'-object is empty). Has anyone any idea how/why this can happen? Thanks!
Tomcat's Java parameters
Hi, I am running Tomcat 4.1.X with Java 1.4 as a service on a Win2K box. A software provider has instructed us to change an environment variable in the system tab, which is to add the JAVA_OPTS variable with 3 parameters. However, another document provided by the same company instructs us to make changes to the HKLM\system\currentControlSet\Service\Apache TomCat 4.1\ registry keys (i.e. JVM OPTION COUNT and JVM OPTION Number 1, etc.), which has a total of 7 command line parameters for Java. My questions: 1. Do the system environment variables get called if the app is running as a service? 2. If they are called, do the registry changes trump the $JAVA_OPTS variable, or is it vice versa? We are having performance related problems, and need the proper java settings running under the tomcat service. Not only that, but I would like to know where we should make these settings. Jared * PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat's Java parameters
No takers? Should I take this question to the Dev list? jared -Original Message- From: Jared Ingersoll [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 11:19 AM To: 'tomcat-user@jakarta.apache.org' Subject: Tomcat's Java parameters Hi, I am running Tomcat 4.1.X with Java 1.4 as a service on a Win2K box. A software provider has instructed us to change an environment variable in the system tab, which is to add the JAVA_OPTS variable with 3 parameters. However, another document provided by the same company instructs us to make changes to the HKLM\system\currentControlSet\Service\Apache TomCat 4.1\ registry keys (i.e. JVM OPTION COUNT and JVM OPTION Number 1, etc.), which has a total of 7 command line parameters for Java. My questions: 1. Do the system environment variables get called if the app is running as a service? 2. If they are called, do the registry changes trump the $JAVA_OPTS variable, or is it vice versa? We are having performance related problems, and need the proper java settings running under the tomcat service. Not only that, but I would like to know where we should make these settings. Jared * PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat's Java parameters
The $JAVA_OPTS variable is ignored by the service, you have to add them in the registry. On Tue, 1 Feb 2005 16:45:15 -0500, Jared Ingersoll [EMAIL PROTECTED] wrote: No takers? Should I take this question to the Dev list? jared -Original Message- From: Jared Ingersoll [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 11:19 AM To: 'tomcat-user@jakarta.apache.org' Subject: Tomcat's Java parameters Hi, I am running Tomcat 4.1.X with Java 1.4 as a service on a Win2K box. A software provider has instructed us to change an environment variable in the system tab, which is to add the JAVA_OPTS variable with 3 parameters. However, another document provided by the same company instructs us to make changes to the HKLM\system\currentControlSet\Service\Apache TomCat 4.1\ registry keys (i.e. JVM OPTION COUNT and JVM OPTION Number 1, etc.), which has a total of 7 command line parameters for Java. My questions: 1. Do the system environment variables get called if the app is running as a service? 2. If they are called, do the registry changes trump the $JAVA_OPTS variable, or is it vice versa? We are having performance related problems, and need the proper java settings running under the tomcat service. Not only that, but I would like to know where we should make these settings. Jared * PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat's Java parameters
Jerry Jalenak Senior Programmer / Analyst, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 4:10 PM To: Tomcat Users List Subject: Re: Tomcat's Java parameters The $JAVA_OPTS variable is ignored by the service, you have to add them in the registry. On Tue, 1 Feb 2005 16:45:15 -0500, Jared Ingersoll [EMAIL PROTECTED] wrote: No takers? Should I take this question to the Dev list? jared -Original Message- From: Jared Ingersoll [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 11:19 AM To: 'tomcat-user@jakarta.apache.org' Subject: Tomcat's Java parameters Hi, I am running Tomcat 4.1.X with Java 1.4 as a service on a Win2K box. A software provider has instructed us to change an environment variable in the system tab, which is to add the JAVA_OPTS variable with 3 parameters. However, another document provided by the same company instructs us to make changes to the HKLM\system\currentControlSet\Service\Apache TomCat 4.1\ registry keys (i.e. JVM OPTION COUNT and JVM OPTION Number 1, etc.), which has a total of 7 command line parameters for Java. My questions: 1. Do the system environment variables get called if the app is running as a service? 2. If they are called, do the registry changes trump the $JAVA_OPTS variable, or is it vice versa? We are having performance related problems, and need the proper java settings running under the tomcat service. Not only that, but I would like to know where we should make these settings. Jared * PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Context parameters in server.xml
I have a web-application configured in the server.xml of a Tomcat 4.1.30 server. In the Context element I have a nested Parameter that can be accessed in my application code with: ctx.getInitParameter(...) This works fine, as long as I do not redeploy the web-application. When the webapp is redeployed the configured parameter is lost. Reloading the webapp with the Tomcat manager does not cause this problem. Is this normal behaviour or is it a Tomcat bug? _ MSN Webmessenger overal en altijd beschikbaar http://webmessenger.msn.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat lost request parameters
Hi, Thanks for replying. I was looking through the code trying to find multi-threading problems (like Bob said). So, I decided to post some code fragments in order to show to you how stupid these errors are... jsp:useBean id = ticket class = com.mycompany.Ticket/ % ticket.setAttribute(code, request.getParameter(ticketCode)); ticket.loadElement(); ... % The exception rises in the line ticket.loadElement(). What we are doing is a simple db select to retrieve some data, and then we are using it in order to set the object fields. The exception (a custom one) tells that the code has not been properly setted, so the loadElement() method could not be executed... It's insane, because as I shown, I'm setting it one line before (like the problem that Frank had), and again, this code works well under light pressure. This is the reason that I told that tomcat was losing request parameters. By default, the jsp isThreadSafe=true. So I think that it could not be changed by another request... Looking through the copiled jsp, I found that my bean becomes this: com.mycompany.Ticket ticket = null; synchronized (pageContext) { ticket = (com.mycompany.Ticket) pageContext.getAttribute(ticket, PageContext.PAGE_SCOPE); if (ticket == null){ try { ticket = (com.mycompany.Ticket) java.beans.Beans.instantiate(this.getClass().getClassLoader(), com.mycompany.Ticket); } catch (ClassNotFoundException exc) { throw new InstantiationException(exc.getMessage()); } catch (Exception exc) { throw new ServletException(Cannot create bean of class + com.mycompany.Ticket, exc); } pageContext.setAttribute(ticket, ticket, PageContext.PAGE_SCOPE); } } I am trying to avoid changes, but I think that I will explicit call isThreadSafe on the top of the page and also change the scope for REQUEST_SCOPE... Just to let you know... TIA, Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat lost request parameters
Hi, I know that my subject sounds crazy, but I'm going nuts... I have an application, 100% java (jsp 1.2 and servlet 2.3). This application has more or less 1,5 years. So it is stable. I always used tomcat as my web server (without apache because I don't have static html to be served) with no problem. We are using TC 4.1.31, with J2SDK1.4.2_03 on a W2K/SP4 box (Xeon 3.0Ghz with 2GB mem). At this time we had more or less 25 concurrent users. We were happy... Recently, another department in company started to use the application. So now we have more or less 100 concurrent users. Since then the problems began raising. Most of then when we try to insert/update data in database. Generally we receive errors telling that we tried to insert null values into a not null field (BTW we are using oracle 8.1.7 with JDBC - classes12.jar). My point is that application was working. Nothing changed (except the number of users). So, I'm sure that the fields are being properly filled. What I would like to ask you, is if someone has experienced this kind of problem. I was wondering if tomcat could lost request parameters under heavy traffic... I don't have any prove that it actually lost something. As I said, I'm just wondering. Maybe the JDBC... Searching into the mailing list archive, I found a thread about performance. I have changed the connector maxProcessors to 150 and also add maxKeepAliveRequests=1 to it after reading it. Nothing change. Does someone has some advice? I know that my posting is vague, but I don't where to look anymore... I was thinking about to do a tomcat upgrade (to 5.0.X). TIA, Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat lost request parameters
I once worked on a portal site that experienced very odd behaviour under load. When in development, everyone got what they were expecting. Under load testing, pages where missing items, some items were duplicated, etc, etc. The problem was the usage of variables in a JSP page declared in: %! % or the corresponding type of variable (instance variables) in servlets. It doesn't show up under normal load, because individual users can get in and out without anyone being the wiser. Once the container starts getting loaded though, you can have person A's request not being completed before person B's request is begun processing. Mike Curwen Product Manager Globally Boundless www.globallyboundless.com 204.885.7733 ext 227 -Original Message- From: Roberto Rios [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 2:51 PM To: [EMAIL PROTECTED] Subject: Tomcat lost request parameters Hi, I know that my subject sounds crazy, but I'm going nuts... I have an application, 100% java (jsp 1.2 and servlet 2.3). This application has more or less 1,5 years. So it is stable. I always used tomcat as my web server (without apache because I don't have static html to be served) with no problem. We are using TC 4.1.31, with J2SDK1.4.2_03 on a W2K/SP4 box (Xeon 3.0Ghz with 2GB mem). At this time we had more or less 25 concurrent users. We were happy... Recently, another department in company started to use the application. So now we have more or less 100 concurrent users. Since then the problems began raising. Most of then when we try to insert/update data in database. Generally we receive errors telling that we tried to insert null values into a not null field (BTW we are using oracle 8.1.7 with JDBC - classes12.jar). My point is that application was working. Nothing changed (except the number of users). So, I'm sure that the fields are being properly filled. What I would like to ask you, is if someone has experienced this kind of problem. I was wondering if tomcat could lost request parameters under heavy traffic... I don't have any prove that it actually lost something. As I said, I'm just wondering. Maybe the JDBC... Searching into the mailing list archive, I found a thread about performance. I have changed the connector maxProcessors to 150 and also add maxKeepAliveRequests=1 to it after reading it. Nothing change. Does someone has some advice? I know that my posting is vague, but I don't where to look anymore... I was thinking about to do a tomcat upgrade (to 5.0.X). TIA, Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat lost request parameters
I don't think your going crazy, I have been seeing the same thing too... I have an app that has been in production for about a year. Yes, there have been changes along the way, but it's been more or less rock-solid stable... except that the past few months I've seen occassional NPE's caused by incoming request parameters being null. I have never been able to replicate this in test or development. It's not frequent, maybe 5-10 times per 50,000 requests, which is 5-10 times too many, but not too bad (I haven't been yelled at, let's put it that way :) ). But, it's been bugging me. I see it in similar places as you... Doing a database query, where the SQL is constructed based on incoming parameters, and they wind up being null, causing SQL exceptions. Because of the way the front-end works, it should be entirely impossible for a user to ever not submit these requests (you'll have to trust me on this... if it's not impossible, they'd have to go out of their way and try to do this). So, yes, I'm seeing the same thing. Also, it's been a number of Tomcat versions now, all in the 5.0.x branch. We're at 5.0.29 now. I've also seen some bizarre exceptions caused by session problems... Trying to set an attribute and it's telling me the session is invalid (IllegalStateException), except that the line of code DIRECTLY BEFORE THAT ONE verified that the session is valid! We are moving to WebSphere in the next few weeks, so I'll know pretty quickly if this is a Tomcat issue or not, but I strongly suspect it is (not meant as a knock, I absolutely adore Tomcat). -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Wed, December 22, 2004 3:51 pm, Roberto Rios said: Hi, I know that my subject sounds crazy, but I'm going nuts... I have an application, 100% java (jsp 1.2 and servlet 2.3). This application has more or less 1,5 years. So it is stable. I always used tomcat as my web server (without apache because I don't have static html to be served) with no problem. We are using TC 4.1.31, with J2SDK1.4.2_03 on a W2K/SP4 box (Xeon 3.0Ghz with 2GB mem). At this time we had more or less 25 concurrent users. We were happy... Recently, another department in company started to use the application. So now we have more or less 100 concurrent users. Since then the problems began raising. Most of then when we try to insert/update data in database. Generally we receive errors telling that we tried to insert null values into a not null field (BTW we are using oracle 8.1.7 with JDBC - classes12.jar). My point is that application was working. Nothing changed (except the number of users). So, I'm sure that the fields are being properly filled. What I would like to ask you, is if someone has experienced this kind of problem. I was wondering if tomcat could lost request parameters under heavy traffic... I don't have any prove that it actually lost something. As I said, I'm just wondering. Maybe the JDBC... Searching into the mailing list archive, I found a thread about performance. I have changed the connector maxProcessors to 150 and also add maxKeepAliveRequests=1 to it after reading it. Nothing change. Does someone has some advice? I know that my posting is vague, but I don't where to look anymore... I was thinking about to do a tomcat upgrade (to 5.0.X). TIA, Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat lost request parameters
I don't think that this will help much, but your problem seems like a multi-threading problem rather than a lost request parameter problem. Have you tried inserting in some debug code to write request parameters to the log from the first servlet that receives them? Regards, Bob Feretich Original message - Subject: Tomcat lost request parameters From: Roberto Rios [EMAIL PROTECTED] Date: Wed, 22 Dec 2004 18:51:16 -0200 To: [EMAIL PROTECTED] Hi, I know that my subject sounds crazy, but I'm going nuts... I have an application, 100% java (jsp 1.2 and servlet 2.3). This application has more or less 1,5 years. So it is stable. I always used tomcat as my web server (without apache because I don't have static html to be served) with no problem. We are using TC 4.1.31, with J2SDK1.4.2_03 on a W2K/SP4 box (Xeon 3.0Ghz with 2GB mem). At this time we had more or less 25 concurrent users. We were happy... Recently, another department in company started to use the application. So now we have more or less 100 concurrent users. Since then the problems began raising. Most of then when we try to insert/update data in database. Generally we receive errors telling that we tried to insert null values into a not null field (BTW we are using oracle 8.1.7 with JDBC - classes12.jar). My point is that application was working. Nothing changed (except the number of users). So, I'm sure that the fields are being properly filled. What I would like to ask you, is if someone has experienced this kind of problem. I was wondering if tomcat could lost request parameters under heavy traffic... I don't have any prove that it actually lost something. As I said, I'm just wondering. Maybe the JDBC... Searching into the mailing list archive, I found a thread about performance. I have changed the connector maxProcessors to 150 and also add maxKeepAliveRequests=1 to it after reading it. Nothing change. Does someone has some advice? I know that my posting is vague, but I don't where to look anymore... I was thinking about to do a tomcat upgrade (to 5.0.X). TIA, Bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : Manually Populate Request Object Name/Value Parameters?
why don't you protect the form ? -Message d'origine- De : Joe Reger, Jr. [mailto:[EMAIL PROTECTED] Envoyé : lundi 13 décembre 2004 17:15 À : [EMAIL PROTECTED] Objet : Manually Populate Request Object Name/Value Parameters? The scenario is a timed-out login session: The user writes a wonderful something in a web page form. They finally submit it but I have to redirect to the login page to collect credentials because the session has timed out. Question: Is there any way to restore that original request (with the user's hard work in it) and throw it back at the page the user was trying to hit after I collect credentials? If not then prior to redirecting for login I'd like to store the name/value pairs from the request in the session, collect login credentials and then rebuild the request manually by setting the URL and name/value request parameters? I'm using a homebrew login scheme. Would switching to form-based authentication automatically restore the original request once the user is logged-in? Thanks, Joe - 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]
Manually Populate Request Object Name/Value Parameters?
The scenario is a timed-out login session: The user writes a wonderful something in a web page form. They finally submit it but I have to redirect to the login page to collect credentials because the session has timed out. Question: Is there any way to restore that original request (with the user's hard work in it) and throw it back at the page the user was trying to hit after I collect credentials? If not then prior to redirecting for login I'd like to store the name/value pairs from the request in the session, collect login credentials and then rebuild the request manually by setting the URL and name/value request parameters? I'm using a homebrew login scheme. Would switching to form-based authentication automatically restore the original request once the user is logged-in? Thanks, Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Configuring session parameters
In other app servers I have used, you can configure things about the HTTP session. In our case, we had configured a time for all inactive sessions to timeout. So, a user would make a page request with a session that the server had timed-out and our code would know to take them to another page instead. Now what happens is that the session seems to time-out at some arbitrary time that we cannot control. While we can see how to configure the persisted session details, I cannot find any reference as to how you configure the HTTP session parameters in Tomcat 4.1.30. Any ideas? AL G - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuring session parameters
Hi, One idea would be to read the Servlet Specification, specifically the chapter about the Deployment Descriptor. In Servlet Spec v2.4, section SRV.13.1, page 128, the session-timeout configuration parameter is described. Tomcat 4.x implements Servlet Spec v2.3, not v2.4, but that particular parameter was not changed in the Spec between versions 2.3 and 2.4. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Al Gidden [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 1:54 PM To: Tomcat Users List Subject: Configuring session parameters In other app servers I have used, you can configure things about the HTTP session. In our case, we had configured a time for all inactive sessions to timeout. So, a user would make a page request with a session that the server had timed-out and our code would know to take them to another page instead. Now what happens is that the session seems to time-out at some arbitrary time that we cannot control. While we can see how to configure the persisted session details, I cannot find any reference as to how you configure the HTTP session parameters in Tomcat 4.1.30. Any ideas? AL G - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Set resource parameters in 5.5 not the same as 5.0
On Thu, 11 Nov 2004 23:25:05 -0500, V D [EMAIL PROTECTED] wrote: Using Embedded Tomcat, in 5.0, one would add a resource as: StandardContext context = (StandardContext)embeddedTomcat.createContext(context, path); ContextResource res = new ContextResource(); res.setName( jdbc/ name); res.setType( javax.sql.DataSource ); res.setAuth( Container ); context.addResource(res); ResourceParams params = new ResourceParams(); params.setName( jdbc/ name); params.addParameter( factory , org.apache.commons.dbcp.BasicDataSourceFactory ); ... context.addResourceParams(params); With Tomcat 5.5, someone said using res.setProperty() instead of using params. So does it look like this: res.setProperty( factory , org.apache.commons.dbcp.BasicDataSourceFactory ); etc. If you're using DBCP, I recommend using the default factory (Tomcat still includes DBCP, but with renamed packages to avoid conflict issues). If this is the case, then how do I set the resource name (params.setName( jdbc/ name);*)*? You set the name on the resource, and the params object doesn't exist anymore. So there's no problem. Also, if I have more than one resource, how do I take care of this? You have multiple ContextResource objects. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Set resource parameters in 5.5 not the same as 5.0
Using Embedded Tomcat, in 5.0, one would add a resource as: StandardContext context = (StandardContext)embeddedTomcat.createContext(context, path); ContextResource res = new ContextResource(); res.setName( jdbc/ name); res.setType( javax.sql.DataSource ); res.setAuth( Container ); context.addResource(res); ResourceParams params = new ResourceParams(); params.setName( jdbc/ name); params.addParameter( factory , org.apache.commons.dbcp.BasicDataSourceFactory ); ... context.addResourceParams(params); With Tomcat 5.5, someone said using res.setProperty() instead of using params. So does it look like this: res.setProperty( factory , org.apache.commons.dbcp.BasicDataSourceFactory ); etc. If this is the case, then how do I set the resource name (params.setName( jdbc/ name);*)*? Also, if I have more than one resource, how do I take care of this? Thank you in advance, vh. * * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Set resource parameters in 5.5 not the same as 5.0
Probably answer myself here, but is it true that to have more than one resource parameter, just create more than one ContextResource? V D wrote: Using Embedded Tomcat, in 5.0, one would add a resource as: StandardContext context = (StandardContext)embeddedTomcat.createContext(context, path); ContextResource res = new ContextResource(); res.setName( jdbc/ name); res.setType( javax.sql.DataSource ); res.setAuth( Container ); context.addResource(res); ResourceParams params = new ResourceParams(); params.setName( jdbc/ name); params.addParameter( factory , org.apache.commons.dbcp.BasicDataSourceFactory ); ... context.addResourceParams(params); With Tomcat 5.5, someone said using res.setProperty() instead of using params. So does it look like this: res.setProperty( factory , org.apache.commons.dbcp.BasicDataSourceFactory ); etc. If this is the case, then how do I set the resource name (params.setName( jdbc/ name);*)*? Also, if I have more than one resource, how do I take care of this? Thank you in advance, vh. * * - 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]
DBCP Parameters
Hi everyone. I've just made my application work with an SQL Server Datasource, wich is written below. It's working fine, but there's one problem (or not), so I want to ask you folks. As you can see I put at the parameter maxConnections a value of 3. Then I made a test, getting a Connection from the pool within a for loop. I was able to get over 1 connections, and I stoped the test. With dind't I get a Connection Pool exasusted error at the fourth iteration??? Thanks in advance. Resource name=jdbc/sql2000 auth=Container type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource/ ResourceParams name=jdbc/sql2000 parameter namefactory/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSource/value /parameter parameter namedriverName/name valueSQLServer/value /parameter parameter namedescription/name valueSQL Server DataSource/value /parameter parameter nameserverName/name valueJK008/value /parameter parameter nameportNumber/name value1433/value /parameter parameter nameselectMethod/name valuecursor/value /parameter parameter namedatabaseName/name valueseguridad/value /parameter parameter nameuser/name valuepuma/value /parameter parameter namepassword/name valuepuma/value /parameter parameter namemaxConnections/name value3/value /parameter parameter nameminConnections/name value1/value /parameter parameter nameloginTimeout/name value3000/value /parameter parameter namecheckEvery/name value6/value /parameter parameter nameidleTimeout/name value50/value /parameter /ResourceParams Leonardo Lopez Larraquy Jakarta Ingenieria de Software www.jakartasrl.com.ar
RES: DBCP Parameters
That´s because DBCP when reach its limit it create a new connection to suplay the demand, after all connection without use are released your current connections come back to 3 connection in pool as you setted to 3 max connection alive in the pool. Regards, Edson -Mensagem original- De: Leonardo Larraquy [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 5 de outubro de 2004 16:15 Para: Tomcat Users List Assunto: DBCP Parameters Hi everyone. I've just made my application work with an SQL Server Datasource, wich is written below. It's working fine, but there's one problem (or not), so I want to ask you folks. As you can see I put at the parameter maxConnections a value of 3. Then I made a test, getting a Connection from the pool within a for loop. I was able to get over 1 connections, and I stoped the test. With dind't I get a Connection Pool exasusted error at the fourth iteration??? Thanks in advance. Resource name=jdbc/sql2000 auth=Container type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource/ ResourceParams name=jdbc/sql2000 parameter namefactory/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSource/value /parameter parameter namedriverName/name valueSQLServer/value /parameter parameter namedescription/name valueSQL Server DataSource/value /parameter parameter nameserverName/name valueJK008/value /parameter parameter nameportNumber/name value1433/value /parameter parameter nameselectMethod/name valuecursor/value /parameter parameter namedatabaseName/name valueseguridad/value /parameter parameter nameuser/name valuepuma/value /parameter parameter namepassword/name valuepuma/value /parameter parameter namemaxConnections/name value3/value /parameter parameter nameminConnections/name value1/value /parameter parameter nameloginTimeout/name value3000/value /parameter parameter namecheckEvery/name value6/value /parameter parameter nameidleTimeout/name value50/value /parameter /ResourceParams Leonardo Lopez Larraquy Jakarta Ingenieria de Software www.jakartasrl.com.ar
Re: DBCP Parameters
Thanks, you 've been very clear. - Original Message - From: Edson Alves Pereira [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, October 05, 2004 4:25 PM Subject: RES: DBCP Parameters That´s because DBCP when reach its limit it create a new connection to suplay the demand, after all connection without use are released your current connections come back to 3 connection in pool as you setted to 3 max connection alive in the pool. Regards, Edson -Mensagem original- De: Leonardo Larraquy [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 5 de outubro de 2004 16:15 Para: Tomcat Users List Assunto: DBCP Parameters Hi everyone. I've just made my application work with an SQL Server Datasource, wich is written below. It's working fine, but there's one problem (or not), so I want to ask you folks. As you can see I put at the parameter maxConnections a value of 3. Then I made a test, getting a Connection from the pool within a for loop. I was able to get over 1 connections, and I stoped the test. With dind't I get a Connection Pool exasusted error at the fourth iteration??? Thanks in advance. Resource name=jdbc/sql2000 auth=Container type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource/ ResourceParams name=jdbc/sql2000 parameter namefactory/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSource/value /parameter parameter namedriverName/name valueSQLServer/value /parameter parameter namedescription/name valueSQL Server DataSource/value /parameter parameter nameserverName/name valueJK008/value /parameter parameter nameportNumber/name value1433/value /parameter parameter nameselectMethod/name valuecursor/value /parameter parameter namedatabaseName/name valueseguridad/value /parameter parameter nameuser/name valuepuma/value /parameter parameter namepassword/name valuepuma/value /parameter parameter namemaxConnections/name value3/value /parameter parameter nameminConnections/name value1/value /parameter parameter nameloginTimeout/name value3000/value /parameter parameter namecheckEvery/name value6/value /parameter parameter nameidleTimeout/name value50/value /parameter /ResourceParams Leonardo Lopez Larraquy Jakarta Ingenieria de Software www.jakartasrl.com.ar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Request parameters in catalina.out
I wouldn't say mis-configured. When I changed from a similar configuration to a logger for all the jk stuff (e.g. log4j.category.org.apache.jk=WARN,filer), the request dumps went away. I think the issue was that the commons logging wrapper for a non-existent logger had a level of 0, which registered as trace enabled, which meant some classes in the jk package dumped the whole request. For me, it was file uploads, so catalina.out was very large indeed. I also had a clue in that the catalina.out entry was prefixed by some debugging information from the jk classes. Is there anything preceding the dump of the request body in your logs? Like Data: ...? Benjamin J. Armintor Operations Systems Specialist ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 7:18 PM To: 'Tomcat Users List' Subject: RE: Request parameters in catalina.out Just a me too. Slackware 9.1 Apache 2 (sorry, can't find minor version) Tomcat 4.1.30 JK 1.2 I get the same sort of thing in my catalina.out, and only on POST submissions. If I switch my form temporarily to GET, the dump goes away. Here's my server.xml (which has been trimed from the 'out of the box' one): Server port=11005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / !-- Define a Coyote/JK2 AJP 1.3 Connector on port 11009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=11009 minProcessors=5 maxProcessors=150 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=localhost debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=hosts_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true / Context path= docBase=ROOT debug=0 / /Host Host name=devstar.globallyboundless.com debug=0 Context path= docBase=/home/data3/me20/ defaultSessionTimeOut=60 reloadable=true Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuemail.globallyboundless.com/value /parameter /ResourceParams /Context /Host /Engine /Service /Server Where's my dumper? As for log4j, I've got a log4j file at $CATALINA_HOME/common/classes that contains: log4j.category.org.apache.jk.common.ChannelSocket=WARN, filer log4j.additivity.org.apache.jk.common.ChannelSocket=false log4j.category.org.apache.jk.server.JkCoyoteHandler=WARN, filer log4j.additivity.org.apache.jk.server.JkCoyoteHandler=false log4j.appender.filer=org.apache.log4j.RollingFileAppender log4j.appender.filer.layout=org.apache.log4j.PatternLayout log4j.appender.filer.layout.ConversionPattern=%-5p %c - [%m] %d{ISO8601}%n log4j.appender.filer.File=/usr/local/applications/tomcat-4.1.30-1/logs/d ebug .catalina log4j.appender.filer.MaxFileSize=100KB log4j.appender.filer.MaxBackupIndex=4 This was an attempt (so far successful) to shut off messages like: [Thread-14] INFO common.ChannelSocket - connection timeout reached and [Thread-121] INFO server.JkCoyoteHandler - RESET Is it mis-configured? Thanks, MC
RE: Request parameters in catalina.out
Thanks Benjamin! There was no debug info proceeding the dump, but by changing my log4j config to: log4j.category.org.apache.jk=WARN, filer log4j.additivity.org.apache.jk=false , it has shut off the request dumping. -Original Message- From: Benjamin Armintor [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 25, 2004 3:16 PM To: Tomcat Users List Subject: RE: Request parameters in catalina.out I wouldn't say mis-configured. When I changed from a similar configuration to a logger for all the jk stuff (e.g. log4j.category.org.apache.jk=WARN,filer), the request dumps went away. I think the issue was that the commons logging wrapper for a non-existent logger had a level of 0, which registered as trace enabled, which meant some classes in the jk package dumped the whole request. For me, it was file uploads, so catalina.out was very large indeed. I also had a clue in that the catalina.out entry was prefixed by some debugging information from the jk classes. Is there anything preceding the dump of the request body in your logs? Like Data: ...? Benjamin J. Armintor Operations Systems Specialist ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 7:18 PM To: 'Tomcat Users List' Subject: RE: Request parameters in catalina.out Just a me too. Slackware 9.1 Apache 2 (sorry, can't find minor version) Tomcat 4.1.30 JK 1.2 I get the same sort of thing in my catalina.out, and only on POST submissions. If I switch my form temporarily to GET, the dump goes away. Here's my server.xml (which has been trimed from the 'out of the box' one): Server port=11005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycle Listener debug=0/ !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / !-- Define a Coyote/JK2 AJP 1.3 Connector on port 11009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=11009 minProcessors=5 maxProcessors=150 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=localhost debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=hosts_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true / Context path= docBase=ROOT debug=0 / /Host Host name=devstar.globallyboundless.com debug=0 Context path= docBase=/home/data3/me20/ defaultSessionTimeOut=60 reloadable=true Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuemail.globallyboundless.com/value /parameter /ResourceParams /Context /Host /Engine /Service /Server Where's my dumper? As for log4j, I've got a log4j file at $CATALINA_HOME/common/classes that contains: log4j.category.org.apache.jk.common.ChannelSocket=WARN, filer log4j.additivity.org.apache.jk.common.ChannelSocket=false log4j.category.org.apache.jk.server.JkCoyoteHandler=WARN, filer log4j.additivity.org.apache.jk.server.JkCoyoteHandler=false log4j.appender.filer
RE: Request parameters in catalina.out
On Aug 10, 2004, at 9:19 AM, [EMAIL PROTECTED] wrote: From: Benjamin Armintor [EMAIL PROTECTED] Date: August 10, 2004 9:19:07 AM PDT To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Request parameters in catalina.out Are you using log4j to handle the Tomcat internal logs? I had a similar problem a while back when a misconfigured log4j was having the Connector effectively log at the trace level. It's a stock tomcat setup -- I won't rule out the possibility of a misconfigured log4j file somewhere though. I haven't seen a place to configure the global logs, though. Where would I look for that? In the log4j.properties of the individual apps? Or is there a global file somewhere that I just haven't seen. (sorry for long response time, I've been on vacation for a while.) Thanks, Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Request parameters in catalina.out
Just a me too. Slackware 9.1 Apache 2 (sorry, can't find minor version) Tomcat 4.1.30 JK 1.2 I get the same sort of thing in my catalina.out, and only on POST submissions. If I switch my form temporarily to GET, the dump goes away. Here's my server.xml (which has been trimed from the 'out of the box' one): Server port=11005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8080 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / !-- Define a Coyote/JK2 AJP 1.3 Connector on port 11009 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=11009 minProcessors=5 maxProcessors=150 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / !-- Define the top level container in our container hierarchy -- Engine name=Standalone defaultHost=localhost debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=hosts_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true / Context path= docBase=ROOT debug=0 / /Host Host name=devstar.globallyboundless.com debug=0 Context path= docBase=/home/data3/me20/ defaultSessionTimeOut=60 reloadable=true Resource name=mail/Session auth=Container type=javax.mail.Session/ ResourceParams name=mail/Session parameter namemail.smtp.host/name valuemail.globallyboundless.com/value /parameter /ResourceParams /Context /Host /Engine /Service /Server Where's my dumper? As for log4j, I've got a log4j file at $CATALINA_HOME/common/classes that contains: log4j.category.org.apache.jk.common.ChannelSocket=WARN, filer log4j.additivity.org.apache.jk.common.ChannelSocket=false log4j.category.org.apache.jk.server.JkCoyoteHandler=WARN, filer log4j.additivity.org.apache.jk.server.JkCoyoteHandler=false log4j.appender.filer=org.apache.log4j.RollingFileAppender log4j.appender.filer.layout=org.apache.log4j.PatternLayout log4j.appender.filer.layout.ConversionPattern=%-5p %c - [%m] %d{ISO8601}%n log4j.appender.filer.File=/usr/local/applications/tomcat-4.1.30-1/logs/debug .catalina log4j.appender.filer.MaxFileSize=100KB log4j.appender.filer.MaxBackupIndex=4 This was an attempt (so far successful) to shut off messages like: [Thread-14] INFO common.ChannelSocket - connection timeout reached and [Thread-121] INFO server.JkCoyoteHandler - RESET Is it mis-configured? Thanks, MC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I configure Tomcat to translate UTF-8 encoded parameters
Hi, I am using Tomcat 5.0.26. I configured the HTTP connector to decode URI with setting URIEncoding=UTF-8 Connector port=8080 address=${jboss.bind.address} maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 URIEncoding=UTF-8 connectionTimeout=2 disableUploadTimeout=true/ This works for my pages that accept HTTP GET request. Unicode input parameter values that are UTF-8 encoded are properly decoded when calling request.getParameter(). However, if the request is HTTP POST, the input parameter values are mangled. Am I missing some configuration settings? I have the following simple JSP page to illustrate the problem. %@ page contentType=text/html;charset=UTF-8 % html head titleTesting UTF-8/title meta http-equiv=Content-Type content=text/html; charset=UTF-8 /head body Type in UNICODE characters in input field and click the Submit button. h1Testing UTF-8 using GET/h1 form action=%=request.getRequestURI()% method=GET input type=text name=data value='%=request.getParameter(data)%'/ input type=submit name=submit value=submit/ /form h1Testing UTF-8 using POST/h1 form action=%=request.getRequestURI()% method=POST input type=text name=data value='%=request.getParameter(data)%'/ input type=submit name=submit value=submit/ /form /body /html -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do I configure Tomcat to translate UTF-8 encoded parameters
doesn't URIEncoding suggest that the URI is encoded, in a POST, the parameters are passed in the body, not in the URI? -Original Message- From: Rick Wong [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 8:08 PM To: Tomcat Users List Subject: How do I configure Tomcat to translate UTF-8 encoded parameters Hi, I am using Tomcat 5.0.26. I configured the HTTP connector to decode URI with setting URIEncoding=UTF-8 Connector port=8080 address=${jboss.bind.address} maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 URIEncoding=UTF-8 connectionTimeout=2 disableUploadTimeout=true/ This works for my pages that accept HTTP GET request. Unicode input parameter values that are UTF-8 encoded are properly decoded when calling request.getParameter(). However, if the request is HTTP POST, the input parameter values are mangled. Am I missing some configuration settings? I have the following simple JSP page to illustrate the problem. %@ page contentType=text/html;charset=UTF-8 % html head titleTesting UTF-8/title meta http-equiv=Content-Type content=text/html; charset=UTF-8 /head body Type in UNICODE characters in input field and click the Submit button. h1Testing UTF-8 using GET/h1 form action=%=request.getRequestURI()% method=GET input type=text name=data value='%=request.getParameter(data)%'/ input type=submit name=submit value=submit/ /form h1Testing UTF-8 using POST/h1 form action=%=request.getRequestURI()% method=POST input type=text name=data value='%=request.getParameter(data)%'/ input type=submit name=submit value=submit/ /form /body /html -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I configure Tomcat to translate UTF-8 encoded parameters
Filip Hanik (lists) wrote: doesn't URIEncoding suggest that the URI is encoded, in a POST, the parameters are passed in the body, not in the URI? Yes it does, and hence the second part of my question. Do you know how one can configure Tomcat to decode input parameters with UTF-8 encoding? -- Rick -Original Message- From: Rick Wong [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 8:08 PM To: Tomcat Users List Subject: How do I configure Tomcat to translate UTF-8 encoded parameters Hi, I am using Tomcat 5.0.26. I configured the HTTP connector to decode URI with setting URIEncoding=UTF-8 Connector port=8080 address=${jboss.bind.address} maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 URIEncoding=UTF-8 connectionTimeout=2 disableUploadTimeout=true/ This works for my pages that accept HTTP GET request. Unicode input parameter values that are UTF-8 encoded are properly decoded when calling request.getParameter(). However, if the request is HTTP POST, the input parameter values are mangled. Am I missing some configuration settings? I have the following simple JSP page to illustrate the problem. %@ page contentType=text/html;charset=UTF-8 % html head titleTesting UTF-8/title meta http-equiv=Content-Type content=text/html; charset=UTF-8 /head body Type in UNICODE characters in input field and click the Submit button. h1Testing UTF-8 using GET/h1 form action=%=request.getRequestURI()% method=GET input type=text name=data value='%=request.getParameter(data)%'/ input type=submit name=submit value=submit/ /form h1Testing UTF-8 using POST/h1 form action=%=request.getRequestURI()% method=POST input type=text name=data value='%=request.getParameter(data)%'/ input type=submit name=submit value=submit/ /form /body /html -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.740 / Virus Database: 494 - Release Date: 8/16/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I configure Tomcat to translate UTF-8 encoded parameters
At 08:34 PM 8/23/2004 -0700, you wrote: Filip Hanik (lists) wrote: doesn't URIEncoding suggest that the URI is encoded, in a POST, the parameters are passed in the body, not in the URI? Yes it does, and hence the second part of my question. Do you know how one can configure Tomcat to decode input parameters with UTF-8 encoding? form name=myform action=/someplace accept-charset=UTF-8 . /form And then make sure to set the request's encoding to UTF-8 as well. Jake - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Request parameters in catalina.out
Hello, I am getting output like this in my catalina.out file: 12 34 00 3c 00 3a 61 63 74 69 6f 6e 3d 43 68 61 | .4..:action=Cha 6e 67 65 2b 50 61 73 73 77 6f 72 64 26 6d 75 6d | nge+Passwordmum [snip] Nothing I have coded should be printing anything like this, and it happens for (apparently) any app running in the instance, whenever a form is submitted. The input fields and their values (the POST or GET data) are printed into catalina.out. This is a security problem, obviously. Can anyone tell me what is going on? I have been over every line of my server.xml file and cannot find anything that is turned on that would seem to be responsible for this behavior. Thanks, Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Request parameters in catalina.out
Are you using log4j to handle the Tomcat internal logs? I had a similar problem a while back when a misconfigured log4j was having the Connector effectively log at the trace level. Benjamin J. Armintor Operations Systems Specialist ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -Original Message- From: Tim McLaughlin [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 11:15 AM To: Tomcat Users List Subject: Request parameters in catalina.out Hello, I am getting output like this in my catalina.out file: 12 34 00 3c 00 3a 61 63 74 69 6f 6e 3d 43 68 61 | .4..:action=Cha 6e 67 65 2b 50 61 73 73 77 6f 72 64 26 6d 75 6d | nge+Passwordmum [snip] Nothing I have coded should be printing anything like this, and it happens for (apparently) any app running in the instance, whenever a form is submitted. The input fields and their values (the POST or GET data) are printed into catalina.out. This is a security problem, obviously. Can anyone tell me what is going on? I have been over every line of my server.xml file and cannot find anything that is turned on that would seem to be responsible for this behavior. Thanks, Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Request parameters in catalina.out
looks like you have a request dumper valve installed somewhere. try removing that. -Original Message- From: Tim McLaughlin [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:15 PM To: Tomcat Users List Subject: Request parameters in catalina.out Hello, I am getting output like this in my catalina.out file: 12 34 00 3c 00 3a 61 63 74 69 6f 6e 3d 43 68 61 | .4..:action=Cha 6e 67 65 2b 50 61 73 73 77 6f 72 64 26 6d 75 6d | nge+Passwordmum [snip] Nothing I have coded should be printing anything like this, and it happens for (apparently) any app running in the instance, whenever a form is submitted. The input fields and their values (the POST or GET data) are printed into catalina.out. This is a security problem, obviously. Can anyone tell me what is going on? I have been over every line of my server.xml file and cannot find anything that is turned on that would seem to be responsible for this behavior. Thanks, Tim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Recommended DBCP configuration parameters
IMHO this depends on quite a lot of thinks. Type of rdbms you use, complexity of your usual query and so forth. I would start with the following question though: How many queries a minute does a typical user trigger when s/he is using your app? Taking it from there, you can make some (hopefully good) guesses. Lets say you have 1 query a minute per user and expect a maximum of 7000 users at any given time. It would be devils work, if all of them trigger at exactly the same time so I would assume for now that they all log on within one minute. 7000 users divided by 60 secs would be approx. 117 concurrent (in terms of db-access) users at high time. I would therefore start with a maxActive of 150, set maxIdle to a much lower value (around 40) because you have such a hight fluctuation in user-numbers... But as has been suggested before, it basically is a try and error process ;) HTH, Jan -Original Message- From: Frank Burns [mailto:[EMAIL PROTECTED] Sent: Thursday, July 22, 2004 11:50 PM To: Tomcat Users List Subject: Recommended DBCP configuration parameters Hi, Can anyone tell me where I can find recommendations/guidelines for choosing values for the DBCP parameters -- such as maxActive, maxIdle, maxWait, etc. -- in the ResourceParams element of server.xml? For example, I am about to launch a system that has a user base of approx 7000 users, which I expect will be thrashed hard at launch time and then settle down to an average of 10 to 100 users at any given time. What values should I specify for my database pooling parameters? Thanks, Frank. - 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]
Recommended DBCP configuration parameters
Hi, Can anyone tell me where I can find recommendations/guidelines for choosing values for the DBCP parameters -- such as maxActive, maxIdle, maxWait, etc. -- in the ResourceParams element of server.xml? For example, I am about to launch a system that has a user base of approx 7000 users, which I expect will be thrashed hard at launch time and then settle down to an average of 10 to 100 users at any given time. What values should I specify for my database pooling parameters? Thanks, Frank. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recommended DBCP configuration parameters
Maybe you should device a way to test and bench mark this for your own app. If not, you could face disaster. With test and trial and error, you can easily set a some very good parameters for this. Frank Burns wrote: Hi, Can anyone tell me where I can find recommendations/guidelines for choosing values for the DBCP parameters -- such as maxActive, maxIdle, maxWait, etc. -- in the ResourceParams element of server.xml? For example, I am about to launch a system that has a user base of approx 7000 users, which I expect will be thrashed hard at launch time and then settle down to an average of 10 to 100 users at any given time. What values should I specify for my database pooling parameters? Thanks, Frank. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parameters and where is log
hello, this is reply to your second query. U have to use Logger tag in server.xml and in code ServletContext context; context.log(); Asim Ghosh Gabi [EMAIL PROTECTED] wrote: Trying to pass from resin to apache, in resin Coonection='jdbc:bla bla...'/ I've put the equivalent in /WEB-INF/web-xml as: Connection jdbc:bla bla... But the servlet response is a NullPointer, I think it's not taking the value from the session (HttpSession object). What am I doing wrong? The second question is that in the servlet I put a System.err.println(), I've the same server.xml like the default /examples but using my webapp in change of /examples, so I've search in catalina.out and all the localhost_admin... local_host_examples, I think I've search in all the defined logs files but I don't find the line I've print with System.err, do I've to put something more specific in web.xml or something similar? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself
RE: Parameters and where is log
I've put the context with his own Logger, I can see all the info of this host here, and in the JavaBean code I've put ServletContext context; context=session.getServletContext(); context.log(test message!!!); But I don't see this message in the log. And, there is a global way I can define that all the System.err. output has to be printed in a text file? How? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Parameters and where is log
http://jakarta.apache.org/tomcat/faq/misc.html#catalina.out Where does System.out go? How do I rotate catalina.out? Gabi [EMAIL PROTECTED] wrote:I've put the context with his own Logger, I can see all the info of this host here, and in the JavaBean code I've put ServletContext context; context=session.getServletContext(); context.log(test message!!!); But I don't see this message in the log. And, there is a global way I can define that all the System.err. output has to be printed in a text file? How? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself
RE: Parameters and where is log
That's what I've done, I've created a Context path=... docBase=... Logger className=org.apache.catalina.logger.FileLogger prefix=web_log. suffix=.txt timestamp=true/ I see all the webapp output in web_log file, but not the message from the applicacion, where I use the lines: ServletContext context; context=session.getServletContext(); context.log(test message!!!); Perhaps the application does not have the correct HttpSession? (It works on Resin, I've make the .war and deploy in tomcat, configure the Context in server.xml and put all the resin.conf values of context-param inside web.xml in the tomcat context-param format. Am I missing something? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Parameters and where is log
Hi, If you can't see System.out/System.err output anywhere, something serious is wrong, such as the server not starting properly: kill it, clean out your logs, start it again and watch the logs carefully. BTW, you don't have to quote anything in web.xml and we generally recommend that you don't. (Your original post that started this thread had some JNDI configuration parameters quoted, like Connection). Yoav Shapira Millennium Research Informatics -Original Message- From: Gabi [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 7:51 AM To: Tomcat Users List Subject: RE: Parameters and where is log That's what I've done, I've created a Context path=... docBase=... Logger className=org.apache.catalina.logger.FileLogger prefix=web_log. suffix=.txt timestamp=true/ I see all the webapp output in web_log file, but not the message from the applicacion, where I use the lines: ServletContext context; context=session.getServletContext(); context.log(test message!!!); Perhaps the application does not have the correct HttpSession? (It works on Resin, I've make the .war and deploy in tomcat, configure the Context in server.xml and put all the resin.conf values of context-param inside web.xml in the tomcat context-param format. Am I missing something? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Parameters and where is log
Don't know if this will be of any use to you, but if you are using Tomcat 5.0.24, you can define where System.out and System.err are redirected by Configuring Tomcat under the Logging tab. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Parameters and where is log
With the first solution commented: ServletContext context; context=session.getServletContext(); context.log(test message!!!); I can`t read anything but it's solved, because if i try the original System.out and .err it outputs in catalina.out. Thanks to everubody. Now I've to configure parameters correctly, (the first part of my email), in resin where context-param tags and I'm translating it to context-param param-name.../param-name param-value.../param-value /context-param I suppose it's the correct way, but my servlet does not work, but it could be another thing so (now) with the logs help I'll try to solve. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with request parameters getting mixed with requests from minutes before
We have a really difficult problem that surfaces only once every week or so in which request parameters for requests from a particular mapping get mixed randomly with request parameters from the same mapping that occurred minutes before. It sounds unbelievable, but that seems to be what is happening. We are using Tomcat 4.1.27 and connector mod_jk 1.2 with Apache 2. Our DB is Postgres in a Linux server. Our web application has a fair amount of load such that synchronization issues are a big deal. Has anyone come across this before or know why it might be happening? How we might avoid it? Ian Wark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with request parameters getting mixed with requests from minutes before
On Thu, Jun 03, 2004 at 07:41:30PM +0900, [EMAIL PROTECTED] wrote: : We have a really difficult problem that surfaces only once every week or so : in which request parameters : for requests from a particular mapping get mixed randomly with request : parameters from the same mapping : that occurred minutes before. : : Has anyone come across this before or know why it might be happening? How : we might avoid it? duplicate info for different people usually means instance variable where there should be a method-local variable How are these request params being set? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with request parameters getting mixed with requests from minutes before (PartII)
On Thu, Jun 03, 2004 at 07:41:30PM +0900, ian.wark wrote: : We have a really difficult problem that surfaces only once every week or so : in which request parameters : for requests from a particular mapping get mixed randomly with request : parameters from the same mapping : that occurred minutes before. : : Has anyone come across this before or know why it might be happening? How : we might avoid it? duplicate info for different people usually means instance variable where there should be a method-local variable --There is a request instance variable in the bean, however the action creates a bean for each request inside the control method, so --I can't see there being multiple threads accessing the same instance variable. How are these request params being set? -QM --The short answer is: the application uses the struts framework and on this jsp, submitting is done via JavaScript form submits. Here are some more details. We can tell that is is the same session from the log. So it is the same user. The user does a search and comes up with a list of items. Each item in the list has a link that submits to a details screen that has the details of that particular item. On that screen various information is displayed and there are three buttons below. One called 'check', one called 'back' (ie back to the search list) and another one that is something like 'finished with'. After clicking the 'check' the 'finished with' button becomes pressable. All submitting is done via JavaScript form submits. The problem seems to occur after a sequence similar to the following: 1. User clicks the link to get to the detail screen 2. User clicks the 'check' button which submits the request to itself and updates the check status. 3. The user clicks another button. Which button is not clear because the parameter reads something equivalent to 'check eck' (Japanese equivalent) which does not exist. The button name is taken via JavaScript. The other strange parameter is alarmNo which picks up randomish information after the = sign. Normally there is just one number. Here is an excerpt of one mishappen request from our log. [POST]/AlarmDetail.do?finishUserId=changeConfirmFlg=0addDatet=2004/05/29 09:13:58A13:58confirmExecUpdFlg=0errfilepath =alarmNo=39372=38932dFlg=039583 alarmDetail=etc etc.. We thought at first that the reason might be because the button doesn't have a multiple press lock via Javascript, so that you don't accicentally submit twice. It does have a 'Do you really want to do this' style dialog box. But even if the user managed to submit twice, you don't get two requests getting bunged together. Another very outside chance might be memory leaks. We have closed all the statements in our SQL explicitely, but not the ResultSets. Does that make things little a bit clearer? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with request parameters getting mixed with requests from minutes before (PartII)
I had a similar problem a few weeks ago... not exactly the same, but maybe something to consider... The issue I had is that a user would log on to a particular app, and on the bottom of the screen we have a Hello, ! message, where is the user's name. Problem was, people were sometimes getting someone else' name. To make a long story short, what had a proxy server on the network that was improperly caching certain pages of the app, so a request would go through and rather than actually make it to the app server, the proxy would return the cached copy. This was also resulting in sporadic NullPointerExceptions in places in the code that they could never theoretically happen, making it look like request parameters were getting lost. They weren't, it's just that if one request was supposed to set something in session, but that request was fulfilled by the proxy, then naturally another subsequent request would throw an exception because the first never executed to set thing up for it. Like I said, not exactly what you describe, but maybe it's one possibility you can eliminate quickly... could be a network thing, not your app, server or anything related. Frank From: [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Problem with request parameters getting mixed with requests from minutes before (PartII) Date: Fri, 4 Jun 2004 12:53:42 +0900 On Thu, Jun 03, 2004 at 07:41:30PM +0900, ian.wark wrote: : We have a really difficult problem that surfaces only once every week or so : in which request parameters : for requests from a particular mapping get mixed randomly with request : parameters from the same mapping : that occurred minutes before. : : Has anyone come across this before or know why it might be happening? How : we might avoid it? duplicate info for different people usually means instance variable where there should be a method-local variable --There is a request instance variable in the bean, however the action creates a bean for each request inside the control method, so --I can't see there being multiple threads accessing the same instance variable. How are these request params being set? -QM --The short answer is: the application uses the struts framework and on this jsp, submitting is done via JavaScript form submits. Here are some more details. We can tell that is is the same session from the log. So it is the same user. The user does a search and comes up with a list of items. Each item in the list has a link that submits to a details screen that has the details of that particular item. On that screen various information is displayed and there are three buttons below. One called 'check', one called 'back' (ie back to the search list) and another one that is something like 'finished with'. After clicking the 'check' the 'finished with' button becomes pressable. All submitting is done via JavaScript form submits. The problem seems to occur after a sequence similar to the following: 1. User clicks the link to get to the detail screen 2. User clicks the 'check' button which submits the request to itself and updates the check status. 3. The user clicks another button. Which button is not clear because the parameter reads something equivalent to 'check eck' (Japanese equivalent) which does not exist. The button name is taken via JavaScript. The other strange parameter is alarmNo which picks up randomish information after the = sign. Normally there is just one number. Here is an excerpt of one mishappen request from our log. [POST]/AlarmDetail.do?finishUserId=changeConfirmFlg=0addDatet=2004/05/29 09:13:58A13:58confirmExecUpdFlg=0errfilepath =alarmNo=39372=38932dFlg=039583 alarmDetail=etc etc.. We thought at first that the reason might be because the button doesn't have a multiple press lock via Javascript, so that you don't accicentally submit twice. It does have a 'Do you really want to do this' style dialog box. But even if the user managed to submit twice, you don't get two requests getting bunged together. Another very outside chance might be memory leaks. We have closed all the statements in our SQL explicitely, but not the ResultSets. Does that make things little a bit clearer? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Check out the coupons and bargains on MSN Offers! http://youroffers.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing init parameters to event listener
Thanks a lot Yoav. I actually meant ServletContext init parameters (found that out after pressing the send button) ... :p So you mean I should also implement ServletContextListener in my (session event) listener so I can get the ServletContext (thus the init parameters) when context initialized, right? Hmm, actually I think that's pretty good way to get init parameters for other event listener(s) ... Thanks again, Dennis On 5/7/2004 5:55 AM, Shapira, Yoav wrote: Hi, Use ServletContext init parameters (as opposed to attributes). Those are bound for your contextInitialized event and anything after it. Yoav Shapira Millennium Research Informatics -Original Message- From: Dennis Dai [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 4:13 AM To: Tomcat Users List Subject: Passing init parameters to event listener Hi all, I'd like to pass init parameters to event listener (in my case, it's session listener) instead of hard coding those parameters. But event listeners do not support init parameters like filters do. I know that I can get SetvletContext from events (thus getting the ServletContext attributes for the context), but that'll be at time when event happens, not listener init time. Any better way? Thanks, Dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Passing init parameters to event listener
Hola, You got it... Yoav Shapira Millennium Research Informatics -Original Message- From: Dennis Dai [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 11, 2004 1:20 PM To: Tomcat Users List Subject: Re: Passing init parameters to event listener Thanks a lot Yoav. I actually meant ServletContext init parameters (found that out after pressing the send button) ... :p So you mean I should also implement ServletContextListener in my (session event) listener so I can get the ServletContext (thus the init parameters) when context initialized, right? Hmm, actually I think that's pretty good way to get init parameters for other event listener(s) ... Thanks again, Dennis On 5/7/2004 5:55 AM, Shapira, Yoav wrote: Hi, Use ServletContext init parameters (as opposed to attributes). Those are bound for your contextInitialized event and anything after it. Yoav Shapira Millennium Research Informatics -Original Message- From: Dennis Dai [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 4:13 AM To: Tomcat Users List Subject: Passing init parameters to event listener Hi all, I'd like to pass init parameters to event listener (in my case, it's session listener) instead of hard coding those parameters. But event listeners do not support init parameters like filters do. I know that I can get SetvletContext from events (thus getting the ServletContext attributes for the context), but that'll be at time when event happens, not listener init time. Any better way? Thanks, Dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Passing init parameters to event listener
Hi all, I'd like to pass init parameters to event listener (in my case, it's session listener) instead of hard coding those parameters. But event listeners do not support init parameters like filters do. I know that I can get SetvletContext from events (thus getting the ServletContext attributes for the context), but that'll be at time when event happens, not listener init time. Any better way? Thanks, Dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Passing init parameters to event listener
Hi, Use ServletContext init parameters (as opposed to attributes). Those are bound for your contextInitialized event and anything after it. Yoav Shapira Millennium Research Informatics -Original Message- From: Dennis Dai [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 4:13 AM To: Tomcat Users List Subject: Passing init parameters to event listener Hi all, I'd like to pass init parameters to event listener (in my case, it's session listener) instead of hard coding those parameters. But event listeners do not support init parameters like filters do. I know that I can get SetvletContext from events (thus getting the ServletContext attributes for the context), but that'll be at time when event happens, not listener init time. Any better way? Thanks, Dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Read of HTTP Request POST parameters failed
I've got an intermittent error that's giving me a real headache. It happens at the first line of my servlet's doPost method (request.getParameter) and returns a java.lang.RuntimeException: Read of HTTP Request POST parameters failed: read content length I've seen this mentioned several times in the archive, but I haven't seen any solutions. I'm thinking that the content length is getting bashed somehow. I'd like to be able to diagnose the problem, but I'm not sure where to look. Any thoughts about how to diagnose or deal with this gracefully would be most appreciated! Cindy Here's the basic info about my system... Tomcat 4.1.24 Apache 1.3.29 mod_jk RedHat Linux All of the errors have occured with IE 6.0, but that may just be a coincidence. Here is the stacktrace... java.lang.RuntimeException: Read of HTTP Request POST parameters failed: read content length at org.apache.catalina.connector.HttpRequestBase.parseParameters(HttpRequestBase.java:685) at org.apache.catalina.connector.HttpRequestBase.getParameter(HttpRequestBase.java:718) at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:171) at com.ca.balcy01.mpi.servlets.AppControllerServlet.doPost(AppControllerServlet.java:216) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.ca.balcy01.mpi.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:466) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:585) at java.lang.Thread.run(Thread.java:534) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Read of HTTP Request POST parameters failed
Hi, Does it happen with the latest stable tomcat 4.1 (4.1.30)? Please try that first, as there have been bug fixes in the connector. Yoav Shapira Millennium Research Informatics -Original Message- From: Cindy Ballreich [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 04, 2004 5:09 PM To: Tomcat Users List Subject: Read of HTTP Request POST parameters failed I've got an intermittent error that's giving me a real headache. It happens at the first line of my servlet's doPost method (request.getParameter) and returns a java.lang.RuntimeException: Read of HTTP Request POST parameters failed: read content length I've seen this mentioned several times in the archive, but I haven't seen any solutions. I'm thinking that the content length is getting bashed somehow. I'd like to be able to diagnose the problem, but I'm not sure where to look. Any thoughts about how to diagnose or deal with this gracefully would be most appreciated! Cindy Here's the basic info about my system... Tomcat 4.1.24 Apache 1.3.29 mod_jk RedHat Linux All of the errors have occured with IE 6.0, but that may just be a coincidence. Here is the stacktrace... java.lang.RuntimeException: Read of HTTP Request POST parameters failed: read content length at org.apache.catalina.connector.HttpRequestBase.parseParameters(HttpReque stBa se.java:685) at org.apache.catalina.connector.HttpRequestBase.getParameter(HttpRequestB ase. java:718) at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade. java :171) at com.ca.balcy01.mpi.servlets.AppControllerServlet.doPost(AppControllerSe rvle t.java:216) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio nFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC hain.java:193) at com.ca.balcy01.mpi.filters.SetCharacterEncodingFilter.doFilter(SetChara cter EncodingFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio nFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC hain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.j ava:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.j ava:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:643) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:50 9) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:24 15) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:18 0) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV alve .java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:17 2) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:50 9) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .jav a:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:466) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:585) at java.lang.Thread.run(Thread.java:534
Re: Read of HTTP Request POST parameters failed
Except that she is using the old, deprecated Connector, which (of course) hasn't had work done to it. She should try with the Coyote Connector, which is better at handling browsers that lie about the content-length :). Shapira, Yoav [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Does it happen with the latest stable tomcat 4.1 (4.1.30)? Please try that first, as there have been bug fixes in the connector. Yoav Shapira Millennium Research Informatics -Original Message- From: Cindy Ballreich [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 04, 2004 5:09 PM To: Tomcat Users List Subject: Read of HTTP Request POST parameters failed I've got an intermittent error that's giving me a real headache. It happens at the first line of my servlet's doPost method (request.getParameter) and returns a java.lang.RuntimeException: Read of HTTP Request POST parameters failed: read content length I've seen this mentioned several times in the archive, but I haven't seen any solutions. I'm thinking that the content length is getting bashed somehow. I'd like to be able to diagnose the problem, but I'm not sure where to look. Any thoughts about how to diagnose or deal with this gracefully would be most appreciated! Cindy Here's the basic info about my system... Tomcat 4.1.24 Apache 1.3.29 mod_jk RedHat Linux All of the errors have occured with IE 6.0, but that may just be a coincidence. Here is the stacktrace... java.lang.RuntimeException: Read of HTTP Request POST parameters failed: read content length at org.apache.catalina.connector.HttpRequestBase.parseParameters(HttpReque stBa se.java:685) at org.apache.catalina.connector.HttpRequestBase.getParameter(HttpRequestB ase. java:718) at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade. java :171) at com.ca.balcy01.mpi.servlets.AppControllerServlet.doPost(AppControllerSe rvle t.java:216) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio nFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC hain.java:193) at com.ca.balcy01.mpi.filters.SetCharacterEncodingFilter.doFilter(SetChara cter EncodingFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio nFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC hain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.j ava:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.j ava:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:643) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:50 9) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:24 15) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:18 0) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV alve .java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:17 2) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:50 9) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .jav a:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo keNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:466) at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:585
Init parameters in default context
I am trying to specify init context parameters in the default context in server.xml as follows: Context path= docBase=ROOT debug=0 Parameter name=configDir value=C:\config override=false/ /Context This is the only context I have listed in server.xml. Then I have my Servlet class as follows: public abstract class JdbcServlet extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); String configDir = getServletContext().getInitParameter(configDir); System.out.println(configDir = + configDir); } ... } This prints out: configDir = null rather than configDir = C:\config as I would expect. It only works if I specify the parameter in a more specific context as follows: Context path=/mycontext docBase=/mycontext debug=0 Parameter name=configDir value=C:\config override=false/ /Context I have tried this with Tomcat 4.1.30 and 5.0.19 with the same results.
RE: Init parameters in default context
-Original Message- From: Keith Hankin [mailto:[EMAIL PROTECTED] I am trying to specify init context parameters in the default context in server.xml as follows: Context path= docBase=ROOT debug=0 Parameter name=configDir value=C:\config override=false/ /Context This is the ROOT context, not the default context. Hence your parameter will only be available in the root context. This prints out: configDir = null rather than configDir = C:\config as I would expect. It only works if I specify the parameter in a more specific context as follows: Context path=/mycontext docBase=/mycontext debug=0 Parameter name=configDir value=C:\config override=false/ /Context I have tried this with Tomcat 4.1.30 and 5.0.19 with the same results. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using init parameters
I have the following in my web.xml: context-param param-nameapplicationName/param-name param-valuetestApp/param-value /context-param My servlet class extends HttpServlet and has the following method: public void init(ServletConfig config) throws ServletException { super.init(config); configDir = getInitParameter(configDir); applicationName = getInitParameter(applicationName); System.out.println(configDir = + configDir); System.out.println(applicationName = + applicationName); jdbcAccess = new AddrJdbcAccess(configDir, applicationName); } Both calls to getInitParameter() return null. What's wrong here? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using init parameters
On Wed, Apr 21, 2004 at 15:28 +0530, Keith Hankin wrote: I have the following in my web.xml: context-param param-nameapplicationName/param-name param-valuetestApp/param-value /context-param My servlet class extends HttpServlet and has the following method: public void init(ServletConfig config) throws ServletException { super.init(config); configDir = getInitParameter(configDir); applicationName = getInitParameter(applicationName); System.out.println(configDir = + configDir); System.out.println(applicationName = + applicationName); jdbcAccess = new AddrJdbcAccess(configDir, applicationName); } Both calls to getInitParameter() return null. What's wrong here? You are asking for the servlet init parameter, use getServletContext().getInitParameter() to retrieve the init paramaters for a context. I found that confusing as well. -- Jens-Uwe Mager pgp-mailto:F476EBC2 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using init parameters
Guess you are looking to access the context param init paramaters (as specified in context-param blocks). The servelt config's getInitParameter corresponds to the *servlet's* init parameters So guess you need to use getServletContext().getInitParameter(applicationName) rather than getInitParameter(applicationName) -Original Message- From: Keith Hankin [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 3:29 PM To: [EMAIL PROTECTED] Subject: Using init parameters I have the following in my web.xml: context-param param-nameapplicationName/param-name param-valuetestApp/param-value /context-param My servlet class extends HttpServlet and has the following method: public void init(ServletConfig config) throws ServletException { super.init(config); configDir = getInitParameter(configDir); applicationName = getInitParameter(applicationName); System.out.println(configDir = + configDir); System.out.println(applicationName = + applicationName); jdbcAccess = new AddrJdbcAccess(configDir, applicationName); } Both calls to getInitParameter() return null. What's wrong here? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using init parameters
That sort of works. The applicationName parameter is found now. However the configDir parameter is not found. This parameter is specified in server.xml as follows: Context path= docBase=ROOT debug=0 Parameter name=configDir value=C:\config override=false/ /Context I am sure that this context (the default context) should be used. - Original Message - From: Keith Hankin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 3:28 PM Subject: Using init parameters I have the following in my web.xml: context-param param-nameapplicationName/param-name param-valuetestApp/param-value /context-param My servlet class extends HttpServlet and has the following method: public void init(ServletConfig config) throws ServletException { super.init(config); configDir = getInitParameter(configDir); applicationName = getInitParameter(applicationName); System.out.println(configDir = + configDir); System.out.println(applicationName = + applicationName); jdbcAccess = new AddrJdbcAccess(configDir, applicationName); } Both calls to getInitParameter() return null. What's wrong here? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Request parameters getting lost
Frank W. Zammetti wrote, On 4/12/2004 4:50 PM: So, my question is twofold... One, has anyone ever seen such an issue as missing parameters before, and if so, what information can you share with me about it? Two, am I off my rocker to think that connector config is way out of wack, and assuming it is, what suggestions would you guys have to fix it, given the approximate load I've stated here? Let me guess, you're using SSL, have keep-alive enabled, and are using MSIE with all the latest patches. Right? Turns out a patch released by MS around Feb 4 (KB832894) which causes MSIE to lose request parameters if the KeepAlive session expires, in other words, when the server drops the connection. The fix is to either tell your users to use a different browser (like Mozilla) or to disable KeepAlive under SSL for all MSIE browsers. See http://www.icdevgroup.org/pipermail/interchange-users/2004-February/037840.html -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Request parameters getting lost
Hi, Whatever the root cause of this issue is, your servlets should be tolerant of these parameters not being specified, i.e. being null. You should never NPE in your own code due to improper input parameter checking. Yoav Shapira Millennium Research Informatics -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 7:51 PM To: [EMAIL PROTECTED] Subject: Request parameters getting lost I have a very odd situation... I have an app running on Tomcat 5.0.1.8. We're using it as both a web server and servlet container. What's happening is I'm getting NullPointerExceptions in both JSP's and servlets that is a result of request parameters seemingly being lost somewhere along the way. In other words, if I submit a form to a servlet with a couple of fields, the parameters are not showing up in the request object, hence I get NullPointerExceptions trying to access them. This is an intermittent problem, in fact it's fairly rare (which has saved my a** at work thus far!), but I still have not been able to explain it. It is happening at various points in my app, no consistent pattern that I've been able to discern, all of which should theoretically be impossible to have no parameters because the user is forced to enter things via JavaScript, or clicking a button submits a hidden form, things like that. I've tried the best I can to get it to happen on my development installation, but of course I've been unable to replicate it, but I have seen it on the production server so I know it's not just a stupid user trick (although I can't rule out them doing something stupid that I just haven't imagined). I have a sneaking suspicion that it's a server tuning issue, and in fact I just did some reading and it looks like my predecessor in charge of tuning Tomcat really screwed up some things. Here's his connector configuration: Connector allowTrace=true enableLookups=false redirectPort=8443 secure=false acceptCount=100 bufferSize=4096 compression=off connectionLinger=-1 connectionTimeout=6 debug=0 disableUploadTimeout=true maxHttpHeaderSize=8192 maxKeepAliveRequests=200 maxSpareThreads=175 maxThreads=300 minSpareThreads=100 port=8181 socketBuffer=12000 tcpNoDelay=true / That looks incredibly wrong to me in terms of tuning. The app has a TOTAL of 87 users, and not all of them are using the app at the same time, and the requests are certainly not coming all at the same time. I'm guessing we're talking about an average of maybe 20 concurrent requests at any given time, not a huge load by any stretch. So, my question is twofold... One, has anyone ever seen such an issue as missing parameters before, and if so, what information can you share with me about it? Two, am I off my rocker to think that connector config is way out of wack, and assuming it is, what suggestions would you guys have to fix it, given the approximate load I've stated here? Thanks in advance everyone! Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Request parameters getting lost
the only time i lost request parameters was because the form was multipart/form-data. In that case you need to use a form upload processer like commons FileUploader. ADC -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: 13 April 2004 13:49 To: Tomcat Users List Subject: RE: Request parameters getting lost Hi, Whatever the root cause of this issue is, your servlets should be tolerant of these parameters not being specified, i.e. being null. You should never NPE in your own code due to improper input parameter checking. Yoav Shapira Millennium Research Informatics -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 7:51 PM To: [EMAIL PROTECTED] Subject: Request parameters getting lost I have a very odd situation... I have an app running on Tomcat 5.0.1.8. We're using it as both a web server and servlet container. What's happening is I'm getting NullPointerExceptions in both JSP's and servlets that is a result of request parameters seemingly being lost somewhere along the way. In other words, if I submit a form to a servlet with a couple of fields, the parameters are not showing up in the request object, hence I get NullPointerExceptions trying to access them. This is an intermittent problem, in fact it's fairly rare (which has saved my a** at work thus far!), but I still have not been able to explain it. It is happening at various points in my app, no consistent pattern that I've been able to discern, all of which should theoretically be impossible to have no parameters because the user is forced to enter things via JavaScript, or clicking a button submits a hidden form, things like that. I've tried the best I can to get it to happen on my development installation, but of course I've been unable to replicate it, but I have seen it on the production server so I know it's not just a stupid user trick (although I can't rule out them doing something stupid that I just haven't imagined). I have a sneaking suspicion that it's a server tuning issue, and in fact I just did some reading and it looks like my predecessor in charge of tuning Tomcat really screwed up some things. Here's his connector configuration: Connector allowTrace=true enableLookups=false redirectPort=8443 secure=false acceptCount=100 bufferSize=4096 compression=off connectionLinger=-1 connectionTimeout=6 debug=0 disableUploadTimeout=true maxHttpHeaderSize=8192 maxKeepAliveRequests=200 maxSpareThreads=175 maxThreads=300 minSpareThreads=100 port=8181 socketBuffer=12000 tcpNoDelay=true / That looks incredibly wrong to me in terms of tuning. The app has a TOTAL of 87 users, and not all of them are using the app at the same time, and the requests are certainly not coming all at the same time. I'm guessing we're talking about an average of maybe 20 concurrent requests at any given time, not a huge load by any stretch. So, my question is twofold... One, has anyone ever seen such an issue as missing parameters before, and if so, what information can you share with me about it? Two, am I off my rocker to think that connector config is way out of wack, and assuming it is, what suggestions would you guys have to fix it, given the approximate load I've stated here? Thanks in advance everyone! Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: location of workers2.properties parameters
The only way I could get rid of these was to comment out the logger lines. Charlie -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 1:23 AM To: [EMAIL PROTECTED] Subject: location of workers2.properties parameters I can not find the doc that describes the descriptors in workers2.properties I am sorry if it is obvious , but I can not find it I have tried http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk2.html And http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/workershowto.html In my error.log for my web server it is full of [Mon Apr 12 23:35:28 2004] [notice] channelApr.receive(): Received len=147 type=4 Lots and lots of these I was kindof thinking it was a setting in my workers2.properties I changed [logger.apache2] to level=INFO As a guess, but I am still getting these. Like every 10th of a second Thanks Randy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: location of workers2.properties parameters
So was that in one place it the code or through-out? Thanks -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 8:27 AM To: 'Tomcat Users List' Subject: RE: location of workers2.properties parameters The only way I could get rid of these was to comment out the logger lines. Charlie -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 1:23 AM To: [EMAIL PROTECTED] Subject: location of workers2.properties parameters I can not find the doc that describes the descriptors in workers2.properties I am sorry if it is obvious , but I can not find it I have tried http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk2.html And http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/workershowto.ht ml In my error.log for my web server it is full of [Mon Apr 12 23:35:28 2004] [notice] channelApr.receive(): Received len=147 type=4 Lots and lots of these I was kindof thinking it was a setting in my workers2.properties I changed [logger.apache2] to level=INFO As a guess, but I am still getting these. Like every 10th of a second Thanks Randy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: location of workers2.properties parameters
Sorry, I meant comment out the [logger.apache2] lines in the workers2.properties. Even after doing this you will still get your errors in the logs, but the info's seem to stop. (this doesn't turn off all logging for jk2) Chalrie -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 11:39 AM To: 'Tomcat Users List' Subject: RE: location of workers2.properties parameters So was that in one place it the code or through-out? Thanks -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 8:27 AM To: 'Tomcat Users List' Subject: RE: location of workers2.properties parameters The only way I could get rid of these was to comment out the logger lines. Charlie -Original Message- From: Randy [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 1:23 AM To: [EMAIL PROTECTED] Subject: location of workers2.properties parameters I can not find the doc that describes the descriptors in workers2.properties I am sorry if it is obvious , but I can not find it I have tried http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk2.html And http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/workershowto.ht ml In my error.log for my web server it is full of [Mon Apr 12 23:35:28 2004] [notice] channelApr.receive(): Received len=147 type=4 Lots and lots of these I was kindof thinking it was a setting in my workers2.properties I changed [logger.apache2] to level=INFO As a guess, but I am still getting these. Like every 10th of a second Thanks Randy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Request parameters getting lost
David Rees wrote: Let me guess, you're using SSL, have keep-alive enabled, and are using MSIE with all the latest patches. Right? Turns out a patch released by MS around Feb 4 (KB832894) which causes MSIE to lose request parameters if the KeepAlive session expires, in other words, when the server drops the connection. The fix is to either tell your users to use a different browser (like Mozilla) or to disable KeepAlive under SSL for all MSIE browsers. Looks like Microsoft released a patch today to fix the above bug. See: http://support.microsoft.com/default.aspx?kbid=831167 -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Request parameters getting lost
I have a very odd situation... I have an app running on Tomcat 5.0.1.8. We're using it as both a web server and servlet container. What's happening is I'm getting NullPointerExceptions in both JSP's and servlets that is a result of request parameters seemingly being lost somewhere along the way. In other words, if I submit a form to a servlet with a couple of fields, the parameters are not showing up in the request object, hence I get NullPointerExceptions trying to access them. This is an intermittent problem, in fact it's fairly rare (which has saved my a** at work thus far!), but I still have not been able to explain it. It is happening at various points in my app, no consistent pattern that I've been able to discern, all of which should theoretically be impossible to have no parameters because the user is forced to enter things via JavaScript, or clicking a button submits a hidden form, things like that. I've tried the best I can to get it to happen on my development installation, but of course I've been unable to replicate it, but I have seen it on the production server so I know it's not just a stupid user trick (although I can't rule out them doing something stupid that I just haven't imagined). I have a sneaking suspicion that it's a server tuning issue, and in fact I just did some reading and it looks like my predecessor in charge of tuning Tomcat really screwed up some things. Here's his connector configuration: Connector allowTrace=true enableLookups=false redirectPort=8443 secure=false acceptCount=100 bufferSize=4096 compression=off connectionLinger=-1 connectionTimeout=6 debug=0 disableUploadTimeout=true maxHttpHeaderSize=8192 maxKeepAliveRequests=200 maxSpareThreads=175 maxThreads=300 minSpareThreads=100 port=8181 socketBuffer=12000 tcpNoDelay=true / That looks incredibly wrong to me in terms of tuning. The app has a TOTAL of 87 users, and not all of them are using the app at the same time, and the requests are certainly not coming all at the same time. I'm guessing we're talking about an average of maybe 20 concurrent requests at any given time, not a huge load by any stretch. So, my question is twofold... One, has anyone ever seen such an issue as missing parameters before, and if so, what information can you share with me about it? Two, am I off my rocker to think that connector config is way out of wack, and assuming it is, what suggestions would you guys have to fix it, given the approximate load I've stated here? Thanks in advance everyone! Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Request parameters getting lost
You mentioned you have javascript to enforce user to enter values. Have you considered the possibility that user has disabled javascript from browser? That way they will be able to submit a null value to the server. Regards, Daniel -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 4:51 PM To: [EMAIL PROTECTED] Subject: Request parameters getting lost I have a very odd situation... I have an app running on Tomcat 5.0.1.8. We're using it as both a web server and servlet container. What's happening is I'm getting NullPointerExceptions in both JSP's and servlets that is a result of request parameters seemingly being lost somewhere along the way. In other words, if I submit a form to a servlet with a couple of fields, the parameters are not showing up in the request object, hence I get NullPointerExceptions trying to access them. This is an intermittent problem, in fact it's fairly rare (which has saved my a** at work thus far!), but I still have not been able to explain it. It is happening at various points in my app, no consistent pattern that I've been able to discern, all of which should theoretically be impossible to have no parameters because the user is forced to enter things via JavaScript, or clicking a button submits a hidden form, things like that. I've tried the best I can to get it to happen on my development installation, but of course I've been unable to replicate it, but I have seen it on the production server so I know it's not just a stupid user trick (although I can't rule out them doing something stupid that I just haven't imagined). I have a sneaking suspicion that it's a server tuning issue, and in fact I just did some reading and it looks like my predecessor in charge of tuning Tomcat really screwed up some things. Here's his connector configuration: Connector allowTrace=true enableLookups=false redirectPort=8443 secure=false acceptCount=100 bufferSize=4096 compression=off connectionLinger=-1 connectionTimeout=6 debug=0 disableUploadTimeout=true maxHttpHeaderSize=8192 maxKeepAliveRequests=200 maxSpareThreads=175 maxThreads=300 minSpareThreads=100 port=8181 socketBuffer=12000 tcpNoDelay=true / That looks incredibly wrong to me in terms of tuning. The app has a TOTAL of 87 users, and not all of them are using the app at the same time, and the requests are certainly not coming all at the same time. I'm guessing we're talking about an average of maybe 20 concurrent requests at any given time, not a huge load by any stretch. So, my question is twofold... One, has anyone ever seen such an issue as missing parameters before, and if so, what information can you share with me about it? Two, am I off my rocker to think that connector config is way out of wack, and assuming it is, what suggestions would you guys have to fix it, given the approximate load I've stated here? Thanks in advance everyone! Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Request parameters getting lost
On Mon, Apr 12, 2004 at 07:50:55PM -0400, Frank W. Zammetti wrote: : So, my question is twofold... One, has anyone ever seen such an issue as : missing parameters before, and if so, what information can you share with me : about it? Two, am I off my rocker to think that connector config is way out : of wack, and assuming it is, what suggestions would you guys have to fix it, : given the approximate load I've stated here? The params may never reach Tomcat: - do your end-users use a different browser than you? - does the app rely on javascript to set any params? See what I mean? Maybe you could use a servlet filter, to track params as they enter the container? You mentioned this is an intermittent problem, though, so you could burn a lot of log space in the hopes of tracking down the bug... -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE:location of workers2.properties parameters
I can not find the doc that describes the descriptors in workers2.properties I am sorry if it is obvious , but I can not find it I have tried http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk2.html And http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/workershowto.html In my error.log for my web server it is full of [Mon Apr 12 23:35:28 2004] [notice] channelApr.receive(): Received len=147 type=4 Lots and lots of these I was kindof thinking it was a setting in my workers2.properties I changed [logger.apache2] to level=INFO As a guess, but I am still getting these. Like every 10th of a second Thanks Randy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
location of workers2.properties parameters
I can not find the doc that describes the descriptors in workers2.properties I am sorry if it is obvious , but I can not find it I have tried http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk2.html And http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/workershowto.html In my error.log for my web server it is full of [Mon Apr 12 23:35:28 2004] [notice] channelApr.receive(): Received len=147 type=4 Lots and lots of these I was kindof thinking it was a setting in my workers2.properties I changed [logger.apache2] to level=INFO As a guess, but I am still getting these. Like every 10th of a second Thanks Randy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting Context Parameters from server.xml
If you had String name = config.getInitParameter(companyName); it might work ;) HTH, Jon Michael Jones wrote: Hello- I'm trying to store some values in my server.xml and then get them with my Servlet. I followed the instructions at: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/context.html under the Context Parameters section. In my servlet I got all init params and iterated over the enumeration. The parameter I defined in server.xml did not show up. Has anyone gotten this feature to work? Am I missing something? Here are a few code snippets: server.xml in the Context tag for my webapp Parameter name=companyName value=MyCompany override=false/ from my servlet ServletConfig config = getServletConfig(); String name = getInitParameter(companyName); System.err.println(CompanyName = ' + name + '); Enumeration enum = config.getInitParameterNames(); while(enum.hasMoreElements()) { System.err.println(enum.nextElement()); } Thanks- Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Getting Context Parameters from server.xml
Why not set your context param in your webapps web.xml? Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.com This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. :: -Original Message- :: From: Jon Wingfield [mailto:[EMAIL PROTECTED] :: Sent: Thursday, March 25, 2004 12:22 PM :: To: Tomcat Users List :: Subject: Re: Getting Context Parameters from server.xml :: :: If you had :: String name = config.getInitParameter(companyName); :: it might work ;) :: :: HTH, :: :: Jon :: :: Michael Jones wrote: :: Hello- :: :: I'm trying to store some values in my server.xml and then get them with my :: Servlet. :: :: I followed the instructions at: :: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/context.html :: under the Context Parameters section. :: :: In my servlet I got all init params and iterated over the enumeration. The :: parameter I defined in server.xml did not show up. :: :: Has anyone gotten this feature to work? Am I missing something? Here :: are a few code snippets: :: :: server.xml in the Context tag for my webapp :: Parameter name=companyName value=MyCompany override=false/ :: :: from my servlet :: ServletConfig config = getServletConfig(); :: String name = getInitParameter(companyName); :: System.err.println(CompanyName = ' + name + '); :: :: Enumeration enum = config.getInitParameterNames(); :: while(enum.hasMoreElements()) :: { :: System.err.println(enum.nextElement()); :: } :: :: :: Thanks- :: Michael :: :: :: - :: To unsubscribe, e-mail: [EMAIL PROTECTED] :: For additional commands, e-mail: [EMAIL PROTECTED] :: :: :: :: :: - :: To unsubscribe, e-mail: [EMAIL PROTECTED] :: For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting Context Parameters from server.xml
Oops. Sent too soon. That code would only work if your parameters were set up in you web.xml not server.xml ie context-param param-namecompanyName/param-name param-valueMyCompany/param-value /context-param The original code was looking up the servlet's init parameter, which should be defined: servlet servlet-nameparam-servlet/servlet-name servlet-classcom.MyCompany.ParamServlet/servlet-class init-param param-namecompanyName/param-name param-valueMyCompany/param-value /init-param /servlet These are portable ways (servlet spec compliant) to pass parameters to webapps. The Parameter tags within server.xml are related to Resources (Data Sources etc) and probably not what you want. Jon Jon Wingfield wrote: If you had String name = config.getInitParameter(companyName); it might work ;) HTH, Jon Michael Jones wrote: Hello- I'm trying to store some values in my server.xml and then get them with my Servlet. I followed the instructions at: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/context.html under the Context Parameters section. In my servlet I got all init params and iterated over the enumeration. The parameter I defined in server.xml did not show up. Has anyone gotten this feature to work? Am I missing something? Here are a few code snippets: server.xml in the Context tag for my webapp Parameter name=companyName value=MyCompany override=false/ from my servlet ServletConfig config = getServletConfig(); String name = getInitParameter(companyName); System.err.println(CompanyName = ' + name + '); Enumeration enum = config.getInitParameterNames(); while(enum.hasMoreElements()) { System.err.println(enum.nextElement()); } Thanks- Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Getting Context Parameters from server.xml
I think you want to use getServletContext().getInitParameter(companyName); There is a difference between a servlet init parameter (defined in web.xml) and a servlet context init parameter (defined in the context.xml or server.xml file) -Original Message- From: Jon Wingfield To: Tomcat Users List Sent: 25/03/2004 10:22 Subject: Re: Getting Context Parameters from server.xml If you had String name = config.getInitParameter(companyName); it might work ;) HTH, Jon Michael Jones wrote: Hello- I'm trying to store some values in my server.xml and then get them with my Servlet. I followed the instructions at: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/context.html under the Context Parameters section. In my servlet I got all init params and iterated over the enumeration. The parameter I defined in server.xml did not show up. Has anyone gotten this feature to work? Am I missing something? Here are a few code snippets: server.xml in the Context tag for my webapp Parameter name=companyName value=MyCompany override=false/ from my servlet ServletConfig config = getServletConfig(); String name = getInitParameter(companyName); System.err.println(CompanyName = ' + name + '); Enumeration enum = config.getInitParameterNames(); while(enum.hasMoreElements()) { System.err.println(enum.nextElement()); } Thanks- Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Getting Context Parameters from server.xml
Sweet that was the trick. Thanks alot for all of the responses. -Michael On Thu, 25 Mar 2004, Bodycombe, Andrew wrote: I think you want to use getServletContext().getInitParameter(companyName); There is a difference between a servlet init parameter (defined in web.xml) and a servlet context init parameter (defined in the context.xml or server.xml file) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting Context Parameters from server.xml
Hello- I'm trying to store some values in my server.xml and then get them with my Servlet. I followed the instructions at: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/context.html under the Context Parameters section. In my servlet I got all init params and iterated over the enumeration. The parameter I defined in server.xml did not show up. Has anyone gotten this feature to work? Am I missing something? Here are a few code snippets: server.xml in the Context tag for my webapp Parameter name=companyName value=MyCompany override=false/ from my servlet ServletConfig config = getServletConfig(); String name = getInitParameter(companyName); System.err.println(CompanyName = ' + name + '); Enumeration enum = config.getInitParameterNames(); while(enum.hasMoreElements()) { System.err.println(enum.nextElement()); } Thanks- Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Login by parameters (no prompts)
Hi Jonathan, Did you solve your problem? Earlier you asked if you could send two requests, one to log in and another to download the stuff. You absolutely can as this is how browsers work. You just need to keep the session id that tomcat sends back in the header once you log in and resend it in the header with your new request to download. Tomcat can't tell and doesn't care what kind of client you are using. I have done this before to make a mass upload desktop tool for a webapp that only let users upload photos one-at-a-time. I've never used wget so the next question is can you use wget with custom headers? Googling real quick I found you can tell wget to save the cookies like this: wget --keep-session-cookies --save-cookies login.txt PAGE-URL Since it lets you save the cookies, I'm sure there's a way to use the cookies again... If you don't want to do that and you are still having problems you could do your own authentication rather than container-based. I mean let all requests come through as far as Tomcat is concerned but then validate against a session var in your webapp. Then you can set up your app to check for GET vars as well as POST vars (ie. check with request.getParameter(...) too). Try JPetStore 3 by Clinton Begin (www.ibatis.com) as a reference if you've never done this before. I haven't tried version 4 yet so don't know if it uses container-based authentication or not. hth, Adrian Lanning - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, March 22, 2004 7:21 PM Subject: Re: Login by parameters (no prompts) I don't think so. The server doesn't care what is requesting the file (wget, curl, lynx, Mozilla, Netscape, IE, etc, ...) -- just as long as it's a valid request. Your options are still open there. This is true. Although the means of getting the username and password into the request is the crux of the problem. That is where I need a solution. If you are saying that every client will have its own method of achieving this, then I agree. Except that we still haven't established that Tomcat will handle it properly using FORM authentication. What you might actually be looking at is designing an app to take a couple of authentication methods (basic form) depending on the client and just send back the file. Are you suggesting a second web container that will only handle programmatic downloads? I don't think that the company will go for that solution. If this is not your suggestion, then I assume we are talking about configuring Tomcat to handle both types (FORM and BASIC) at the same time. I haven't figured out how to do that. Thanks for all the time you're putting into this. I appreciate it. Jonathan. David Smith [EMAIL PROTECTED] 03/22/2004 04:19 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Login by parameters (no prompts) I don't think so. The server doesn't care what is requesting the file (wget, curl, lynx, Mozilla, Netscape, IE, etc, ...) -- just as long as it's a valid request. Your options are still open there. What you might actually be looking at is designing an app to take a couple of authentication methods (basic form) depending on the client and just send back the file. As far as wget is concerned, take a look at the man pages for it or even curl. Corporate policy shouldn't prohibit it given it does the same thing your Netscape or IE is doing, but then again all my work experience is at a university. I have no idea what a corporate environment would be like. I'm not a student - those lucky dogs are on Spring Break now :-(. --David [EMAIL PROTECTED] wrote: Yeah, that might work (we'd have to test it). However, this implies that we tie ourselves to WGET as a client app, which we cannot do. The customer controls his own infrastructure and may not have WGET (he might be on one of the many Windows platforms out there) or may have a corporate policy that prohibits the use of WGET. The same is true of any possible client app. They may even have written their own solution for polling the downloadable data (as I've seen done in the past). *sigh* The best solution would be to authenticate and download in a single request. But how? Thanks. Jonathan. David Smith [EMAIL PROTECTED] 03/22/2004 03:04 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Login by parameters (no prompts) I was just looking through the man page for wget. It looks like you have the option of using --http-user=... and --http-passwd=... on the command line. Wget will use BASIC or Digest depending on what the server wants. Is that anything you might be able to use? --David [EMAIL PROTECTED] wrote: Generally, David, I would agree with you about
Login by parameters (no prompts)
The application we are building allows file downloads from our UI. However, we also want users to be able to download these files using WGET from a command-line (perhaps as part of a script), like this: WGET 192.168.1.1/do/download?id=1 However, these file downloads are subject to authentication and should be restricted to certain user roles. We have already implemented a JDBCRealm and everything works very well within the UI. The problem is that we can't figure out how to get Tomcat to invoke authentication without a prompt. At first, we thought that adding j_username and j_password as part of the URL might do the trick. No such luck. We looked through the documentation and couldn't find any suggestions (unless we missed something along the way). What we want to be able to do is have the user provide the username and password as part of the URL, like this: WGET 192.168.1.1/do/download?id=1username=bobpassword=secret I know that we could always extend Tomcat with our own code, but I'd really like to avoid having to do that. I haven't been allowing any platform-specific code into the product and I don't want to start now. The use of a JDBCRealm was a compromise that was supposed to reduce the coding effort. Please tell me that there is a way around this issue that doesn't require coding Tomcat extensions. Thanks for any help you guys might be able to give me. Jonathan.
Re: Login by parameters (no prompts)
Well, if it were BASIC Auth, then you'd just do this (over SSL, of course, to hide the clear text username/password)... https://myusername:[EMAIL PROTECTED] If the username and password are valid, there will be no prompt for username or password. You'll get right to the resource. Jake Quoting [EMAIL PROTECTED]: The application we are building allows file downloads from our UI. However, we also want users to be able to download these files using WGET from a command-line (perhaps as part of a script), like this: WGET 192.168.1.1/do/download?id=1 However, these file downloads are subject to authentication and should be restricted to certain user roles. We have already implemented a JDBCRealm and everything works very well within the UI. The problem is that we can't figure out how to get Tomcat to invoke authentication without a prompt. At first, we thought that adding j_username and j_password as part of the URL might do the trick. No such luck. We looked through the documentation and couldn't find any suggestions (unless we missed something along the way). What we want to be able to do is have the user provide the username and password as part of the URL, like this: WGET 192.168.1.1/do/download?id=1username=bobpassword=secret I know that we could always extend Tomcat with our own code, but I'd really like to avoid having to do that. I haven't been allowing any platform-specific code into the product and I don't want to start now. The use of a JDBCRealm was a compromise that was supposed to reduce the coding effort. Please tell me that there is a way around this issue that doesn't require coding Tomcat extensions. Thanks for any help you guys might be able to give me. Jonathan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Login by parameters (no prompts)
Hi. Time to go from lurker to contributer: Ummm that's not conformant to RFC spec and it's being discontinued in IE (90+% of your clients right there). I wouldn't recommend putting username/password info in the URL anyway. -David Jacob Kjome wrote: Well, if it were BASIC Auth, then you'd just do this (over SSL, of course, to hide the clear text username/password)... https://myusername:[EMAIL PROTECTED] If the username and password are valid, there will be no prompt for username or password. You'll get right to the resource. Jake Quoting [EMAIL PROTECTED]: The application we are building allows file downloads from our UI. However, we also want users to be able to download these files using WGET from a command-line (perhaps as part of a script), like this: WGET 192.168.1.1/do/download?id=1 However, these file downloads are subject to authentication and should be restricted to certain user roles. We have already implemented a JDBCRealm and everything works very well within the UI. The problem is that we can't figure out how to get Tomcat to invoke authentication without a prompt. At first, we thought that adding j_username and j_password as part of the URL might do the trick. No such luck. We looked through the documentation and couldn't find any suggestions (unless we missed something along the way). What we want to be able to do is have the user provide the username and password as part of the URL, like this: WGET 192.168.1.1/do/download?id=1username=bobpassword=secret I know that we could always extend Tomcat with our own code, but I'd really like to avoid having to do that. I haven't been allowing any platform-specific code into the product and I don't want to start now. The use of a JDBCRealm was a compromise that was supposed to reduce the coding effort. Please tell me that there is a way around this issue that doesn't require coding Tomcat extensions. Thanks for any help you guys might be able to give me. Jonathan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Login by parameters (no prompts)
Thanks for the quick reply. Although this might work for BASIC authentication, we need to use FORM authentication so that the UI (which is 90% of our user access) can be validated properly (i.e., with nice forms, etc). Is it possible that your suggestion might work even though we are set for FORM authentication? Or can we configure Tomcat to use different authentication types for different URLs? Thanks. Jonathan. Jacob Kjome [EMAIL PROTECTED] 03/22/2004 02:17 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Login by parameters (no prompts) Well, if it were BASIC Auth, then you'd just do this (over SSL, of course, to hide the clear text username/password)... https://myusername:[EMAIL PROTECTED] If the username and password are valid, there will be no prompt for username or password. You'll get right to the resource. Jake Quoting [EMAIL PROTECTED]: The application we are building allows file downloads from our UI. However, we also want users to be able to download these files using WGET from a command-line (perhaps as part of a script), like this: WGET 192.168.1.1/do/download?id=1 However, these file downloads are subject to authentication and should be restricted to certain user roles. We have already implemented a JDBCRealm and everything works very well within the UI. The problem is that we can't figure out how to get Tomcat to invoke authentication without a prompt. At first, we thought that adding j_username and j_password as part of the URL might do the trick. No such luck. We looked through the documentation and couldn't find any suggestions (unless we missed something along the way). What we want to be able to do is have the user provide the username and password as part of the URL, like this: WGET 192.168.1.1/do/download?id=1username=bobpassword=secret I know that we could always extend Tomcat with our own code, but I'd really like to avoid having to do that. I haven't been allowing any platform-specific code into the product and I don't want to start now. The use of a JDBCRealm was a compromise that was supposed to reduce the coding effort. Please tell me that there is a way around this issue that doesn't require coding Tomcat extensions. Thanks for any help you guys might be able to give me. Jonathan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Login by parameters (no prompts)
Generally, David, I would agree with you about the presence of passwords in URLs. However, our product is an appliance that sits within a customer's trusted network and uses HTTPS for most of its sensitive communications (and this would certainly qualify as one of those cases). Another point to throw into this discussion: would it be possible to send two requests - one to login (direct to j_security_check) and the other to perform the intended action (i.e, downloading files)? If we can't find a way around this issue, then we may have to change our spec. Thanks for all the feedback. Jonathan. David Smith [EMAIL PROTECTED] 03/22/2004 02:36 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Login by parameters (no prompts) Hi. Time to go from lurker to contributer: Ummm that's not conformant to RFC spec and it's being discontinued in IE (90+% of your clients right there). I wouldn't recommend putting username/password info in the URL anyway. -David Jacob Kjome wrote: Well, if it were BASIC Auth, then you'd just do this (over SSL, of course, to hide the clear text username/password)... https://myusername:[EMAIL PROTECTED] If the username and password are valid, there will be no prompt for username or password. You'll get right to the resource. Jake Quoting [EMAIL PROTECTED]: The application we are building allows file downloads from our UI. However, we also want users to be able to download these files using WGET from a command-line (perhaps as part of a script), like this: WGET 192.168.1.1/do/download?id=1 However, these file downloads are subject to authentication and should be restricted to certain user roles. We have already implemented a JDBCRealm and everything works very well within the UI. The problem is that we can't figure out how to get Tomcat to invoke authentication without a prompt. At first, we thought that adding j_username and j_password as part of the URL might do the trick. No such luck. We looked through the documentation and couldn't find any suggestions (unless we missed something along the way). What we want to be able to do is have the user provide the username and password as part of the URL, like this: WGET 192.168.1.1/do/download?id=1username=bobpassword=secret I know that we could always extend Tomcat with our own code, but I'd really like to avoid having to do that. I haven't been allowing any platform-specific code into the product and I don't want to start now. The use of a JDBCRealm was a compromise that was supposed to reduce the coding effort. Please tell me that there is a way around this issue that doesn't require coding Tomcat extensions. Thanks for any help you guys might be able to give me. Jonathan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Login by parameters (no prompts)
I was just looking through the man page for wget. It looks like you have the option of using --http-user=... and --http-passwd=... on the command line. Wget will use BASIC or Digest depending on what the server wants. Is that anything you might be able to use? --David [EMAIL PROTECTED] wrote: Generally, David, I would agree with you about the presence of passwords in URLs. However, our product is an appliance that sits within a customer's trusted network and uses HTTPS for most of its sensitive communications (and this would certainly qualify as one of those cases). Another point to throw into this discussion: would it be possible to send two requests - one to login (direct to j_security_check) and the other to perform the intended action (i.e, downloading files)? If we can't find a way around this issue, then we may have to change our spec. Thanks for all the feedback. Jonathan. David Smith [EMAIL PROTECTED] 03/22/2004 02:36 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Login by parameters (no prompts) Hi. Time to go from lurker to contributer: Ummm that's not conformant to RFC spec and it's being discontinued in IE (90+% of your clients right there). I wouldn't recommend putting username/password info in the URL anyway. -David Jacob Kjome wrote: Well, if it were BASIC Auth, then you'd just do this (over SSL, of course, to hide the clear text username/password)... https://myusername:[EMAIL PROTECTED] If the username and password are valid, there will be no prompt for username or password. You'll get right to the resource. Jake Quoting [EMAIL PROTECTED]: The application we are building allows file downloads from our UI. However, we also want users to be able to download these files using WGET from a command-line (perhaps as part of a script), like this: WGET 192.168.1.1/do/download?id=1 However, these file downloads are subject to authentication and should be restricted to certain user roles. We have already implemented a JDBCRealm and everything works very well within the UI. The problem is that we can't figure out how to get Tomcat to invoke authentication without a prompt. At first, we thought that adding j_username and j_password as part of the URL might do the trick. No such luck. We looked through the documentation and couldn't find any suggestions (unless we missed something along the way). What we want to be able to do is have the user provide the username and password as part of the URL, like this: WGET 192.168.1.1/do/download?id=1username=bobpassword=secret I know that we could always extend Tomcat with our own code, but I'd really like to avoid having to do that. I haven't been allowing any platform-specific code into the product and I don't want to start now. The use of a JDBCRealm was a compromise that was supposed to reduce the coding effort. Please tell me that there is a way around this issue that doesn't require coding Tomcat extensions. Thanks for any help you guys might be able to give me. Jonathan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Login by parameters (no prompts)
Yeah, that might work (we'd have to test it). However, this implies that we tie ourselves to WGET as a client app, which we cannot do. The customer controls his own infrastructure and may not have WGET (he might be on one of the many Windows platforms out there) or may have a corporate policy that prohibits the use of WGET. The same is true of any possible client app. They may even have written their own solution for polling the downloadable data (as I've seen done in the past). *sigh* The best solution would be to authenticate and download in a single request. But how? Thanks. Jonathan. David Smith [EMAIL PROTECTED] 03/22/2004 03:04 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Login by parameters (no prompts) I was just looking through the man page for wget. It looks like you have the option of using --http-user=... and --http-passwd=... on the command line. Wget will use BASIC or Digest depending on what the server wants. Is that anything you might be able to use? --David [EMAIL PROTECTED] wrote: Generally, David, I would agree with you about the presence of passwords in URLs. However, our product is an appliance that sits within a customer's trusted network and uses HTTPS for most of its sensitive communications (and this would certainly qualify as one of those cases). Another point to throw into this discussion: would it be possible to send two requests - one to login (direct to j_security_check) and the other to perform the intended action (i.e, downloading files)? If we can't find a way around this issue, then we may have to change our spec. Thanks for all the feedback. Jonathan. David Smith [EMAIL PROTECTED] 03/22/2004 02:36 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Login by parameters (no prompts) Hi. Time to go from lurker to contributer: Ummm that's not conformant to RFC spec and it's being discontinued in IE (90+% of your clients right there). I wouldn't recommend putting username/password info in the URL anyway. -David Jacob Kjome wrote: Well, if it were BASIC Auth, then you'd just do this (over SSL, of course, to hide the clear text username/password)... https://myusername:[EMAIL PROTECTED] If the username and password are valid, there will be no prompt for username or password. You'll get right to the resource. Jake Quoting [EMAIL PROTECTED]: The application we are building allows file downloads from our UI. However, we also want users to be able to download these files using WGET from a command-line (perhaps as part of a script), like this: WGET 192.168.1.1/do/download?id=1 However, these file downloads are subject to authentication and should be restricted to certain user roles. We have already implemented a JDBCRealm and everything works very well within the UI. The problem is that we can't figure out how to get Tomcat to invoke authentication without a prompt. At first, we thought that adding j_username and j_password as part of the URL might do the trick. No such luck. We looked through the documentation and couldn't find any suggestions (unless we missed something along the way). What we want to be able to do is have the user provide the username and password as part of the URL, like this: WGET 192.168.1.1/do/download?id=1username=bobpassword=secret I know that we could always extend Tomcat with our own code, but I'd really like to avoid having to do that. I haven't been allowing any platform-specific code into the product and I don't want to start now. The use of a JDBCRealm was a compromise that was supposed to reduce the coding effort. Please tell me that there is a way around this issue that doesn't require coding Tomcat extensions. Thanks for any help you guys might be able to give me. Jonathan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Login by parameters (no prompts)
I don't think so. The server doesn't care what is requesting the file (wget, curl, lynx, Mozilla, Netscape, IE, etc, ...) -- just as long as it's a valid request. Your options are still open there. What you might actually be looking at is designing an app to take a couple of authentication methods (basic form) depending on the client and just send back the file. As far as wget is concerned, take a look at the man pages for it or even curl. Corporate policy shouldn't prohibit it given it does the same thing your Netscape or IE is doing, but then again all my work experience is at a university. I have no idea what a corporate environment would be like. I'm not a student - those lucky dogs are on Spring Break now :-(. --David [EMAIL PROTECTED] wrote: Yeah, that might work (we'd have to test it). However, this implies that we tie ourselves to WGET as a client app, which we cannot do. The customer controls his own infrastructure and may not have WGET (he might be on one of the many Windows platforms out there) or may have a corporate policy that prohibits the use of WGET. The same is true of any possible client app. They may even have written their own solution for polling the downloadable data (as I've seen done in the past). *sigh* The best solution would be to authenticate and download in a single request. But how? Thanks. Jonathan. David Smith [EMAIL PROTECTED] 03/22/2004 03:04 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Login by parameters (no prompts) I was just looking through the man page for wget. It looks like you have the option of using --http-user=... and --http-passwd=... on the command line. Wget will use BASIC or Digest depending on what the server wants. Is that anything you might be able to use? --David [EMAIL PROTECTED] wrote: Generally, David, I would agree with you about the presence of passwords in URLs. However, our product is an appliance that sits within a customer's trusted network and uses HTTPS for most of its sensitive communications (and this would certainly qualify as one of those cases). Another point to throw into this discussion: would it be possible to send two requests - one to login (direct to j_security_check) and the other to perform the intended action (i.e, downloading files)? If we can't find a way around this issue, then we may have to change our spec. Thanks for all the feedback. Jonathan. David Smith [EMAIL PROTECTED] 03/22/2004 02:36 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Login by parameters (no prompts) Hi. Time to go from lurker to contributer: Ummm that's not conformant to RFC spec and it's being discontinued in IE (90+% of your clients right there). I wouldn't recommend putting username/password info in the URL anyway. -David Jacob Kjome wrote: Well, if it were BASIC Auth, then you'd just do this (over SSL, of course, to hide the clear text username/password)... https://myusername:[EMAIL PROTECTED] If the username and password are valid, there will be no prompt for username or password. You'll get right to the resource. Jake Quoting [EMAIL PROTECTED]: The application we are building allows file downloads from our UI. However, we also want users to be able to download these files using WGET from a command-line (perhaps as part of a script), like this: WGET 192.168.1.1/do/download?id=1 However, these file downloads are subject to authentication and should be restricted to certain user roles. We have already implemented a JDBCRealm and everything works very well within the UI. The problem is that we can't figure out how to get Tomcat to invoke authentication without a prompt. At first, we thought that adding j_username and j_password as part of the URL might do the trick. No such luck. We looked through the documentation and couldn't find any suggestions (unless we missed something along the way). What we want to be able to do is have the user provide the username and password as part of the URL, like this: WGET 192.168.1.1/do/download?id=1username=bobpassword=secret I know that we could always extend Tomcat with our own code, but I'd really like to avoid having to do that. I haven't been allowing any platform-specific code into the product and I don't want to start now. The use of a JDBCRealm was a compromise that was supposed to reduce the coding effort. Please tell me that there is a way around this issue that doesn't require coding Tomcat extensions. Thanks for any help you guys might be able to give me. Jonathan. - To unsubscribe, e
Re: Login by parameters (no prompts)
I don't think so. The server doesn't care what is requesting the file (wget, curl, lynx, Mozilla, Netscape, IE, etc, ...) -- just as long as it's a valid request. Your options are still open there. This is true. Although the means of getting the username and password into the request is the crux of the problem. That is where I need a solution. If you are saying that every client will have its own method of achieving this, then I agree. Except that we still haven't established that Tomcat will handle it properly using FORM authentication. What you might actually be looking at is designing an app to take a couple of authentication methods (basic form) depending on the client and just send back the file. Are you suggesting a second web container that will only handle programmatic downloads? I don't think that the company will go for that solution. If this is not your suggestion, then I assume we are talking about configuring Tomcat to handle both types (FORM and BASIC) at the same time. I haven't figured out how to do that. Thanks for all the time you're putting into this. I appreciate it. Jonathan. David Smith [EMAIL PROTECTED] 03/22/2004 04:19 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Login by parameters (no prompts) I don't think so. The server doesn't care what is requesting the file (wget, curl, lynx, Mozilla, Netscape, IE, etc, ...) -- just as long as it's a valid request. Your options are still open there. What you might actually be looking at is designing an app to take a couple of authentication methods (basic form) depending on the client and just send back the file. As far as wget is concerned, take a look at the man pages for it or even curl. Corporate policy shouldn't prohibit it given it does the same thing your Netscape or IE is doing, but then again all my work experience is at a university. I have no idea what a corporate environment would be like. I'm not a student - those lucky dogs are on Spring Break now :-(. --David [EMAIL PROTECTED] wrote: Yeah, that might work (we'd have to test it). However, this implies that we tie ourselves to WGET as a client app, which we cannot do. The customer controls his own infrastructure and may not have WGET (he might be on one of the many Windows platforms out there) or may have a corporate policy that prohibits the use of WGET. The same is true of any possible client app. They may even have written their own solution for polling the downloadable data (as I've seen done in the past). *sigh* The best solution would be to authenticate and download in a single request. But how? Thanks. Jonathan. David Smith [EMAIL PROTECTED] 03/22/2004 03:04 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Login by parameters (no prompts) I was just looking through the man page for wget. It looks like you have the option of using --http-user=... and --http-passwd=... on the command line. Wget will use BASIC or Digest depending on what the server wants. Is that anything you might be able to use? --David [EMAIL PROTECTED] wrote: Generally, David, I would agree with you about the presence of passwords in URLs. However, our product is an appliance that sits within a customer's trusted network and uses HTTPS for most of its sensitive communications (and this would certainly qualify as one of those cases). Another point to throw into this discussion: would it be possible to send two requests - one to login (direct to j_security_check) and the other to perform the intended action (i.e, downloading files)? If we can't find a way around this issue, then we may have to change our spec. Thanks for all the feedback. Jonathan. David Smith [EMAIL PROTECTED] 03/22/2004 02:36 PM Please respond to Tomcat Users List To: Tomcat Users List [EMAIL PROTECTED] cc: Subject:Re: Login by parameters (no prompts) Hi. Time to go from lurker to contributer: Ummm that's not conformant to RFC spec and it's being discontinued in IE (90+% of your clients right there). I wouldn't recommend putting username/password info in the URL anyway. -David Jacob Kjome wrote: Well, if it were BASIC Auth, then you'd just do this (over SSL, of course, to hide the clear text username/password)... https://myusername:[EMAIL PROTECTED] If the username and password are valid, there will be no prompt for username or password. You'll get right to the resource. Jake Quoting [EMAIL PROTECTED]: The application we are building allows file downloads from our UI. However, we also want users to be able to download these files using WGET from a command-line (perhaps as part of a script), like this: WGET 192.168.1.1/do