RE: https in Tomcat 5.5 via basic JKS keytool keystore..not doing what it should !
I've worked around the java.io.IOException: Keystore was tampered with, or password was incorrect problem now and that was the cause of it all. I can clear the problem by using the password changeit as I generate my key, and by not using the keystorePass attribute on the connector in the server.xml. On Tomcat 4 I could override that password (I could change it) in that way and the documentation on 5.5 says I can do it the same way, but I'm not seeing it work on Tomcat 5.5. Is this keystore password supposed to be changed as I have presumed (ensuring the same is used in the server.xml connector's keystorePass attribute as is used in generation) or is using anything other than changeit not typically done ? -Original Message- From: Ben Iggulden [mailto:[EMAIL PROTECTED] Sent: 06 July 2007 13:28 To: users@tomcat.apache.org Subject: https in Tomcat 5.5 via basic JKS keytool keystore..not doing what it should ! Bit of a maddening problem this one. I'm setting up https on Tomcat 5.5. Following the how-to closely I've generated a keystore using keytool and uncommented/modified the port 8443 connector in the server.xml. But the https connector just fails to work, the logs report these errors: 1. org.apache.tomcat.util.net.SSLImplementation - Error loading SSL Implementation org.apache.tomcat.util.net.puretls.PureTLSImplementation java.lang.ClassNotFoundException: org.apache.tomcat.util.net.puretls.PureTLSImplementation 2. DEBUG main org.apache.tomcat.util.net.jsse.JSSEImplementation - Error getting factory: org.apache.tomcat.util.net.jsse.JSSE15Factory java.lang.ClassNotFoundException: org.apache.tomcat.util.net.jsse.JSSE15Factory 3. ERROR main org.apache.coyote.http11.Http11BaseProtocol - Error initializing endpoint java.io.IOException: Keystore was tampered with, or password was incorrect 4. ERROR main org.apache.catalina.startup.Catalina - Catalina.start LifecycleException: Protocol handler initialization failed: java.io.IOException: Keystore was tampered with, or password was incorrect Now from reading I think the first is unimportant because it should be using a JSSE and not PureTLS implementation. The second would look worrying then, and could mean I'm running with the wrong JSSE version (I'm using the one that shipped with Tomcat 5.5 and a Java 5 JRE). The 3rd 4th are the same and are the ones really messing with me. As you can see below..the keystore password used in generation and in the server.xml are the same so that one has got me. Does this look like a JSSE version issue or have I missed something much more simple ? --- Log of console session in which I generated the keystore: C:\Program Files\Apache Software Foundation\Tomcat 5.5\confC:\Program Files\Java\j2re1.4.2_14\bin\keytool -genkey -alias tomcat -keyalg RSA -keystore .keystore Enter keystore password: t0mcat What is your first and last name? [Unknown]: localhost What is the name of your organizational unit? [Unknown]: Dev Env What is the name of your organization? [Unknown]: Codefarm What is the name of your City or Locality? [Unknown]: Repton What is the name of your State or Province? [Unknown]: NSW What is the two-letter country code for this unit? [Unknown]: AU Is CN=localhost, OU=Dev Env, O=Codefarm, L=Repton, ST=NSW, C=AU correct? [no]: y Enter key password for tomcat (RETURN if same as keystore password): C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf --- The server.xml connector: Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS keystoreFile=C:/Program Files/Apache Software Foundation/Tomcat 5.5/conf/.keystore keytorePass=t0mcat / - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hide 501 error message
Hi all, I'm configuring Tomcat 6.0.10 behind Apache 2.0 using mod_jk 1.2.3. Everything is working beautifully but I want to hide 501 error when malicious user try to access the server. For example: # telnet localhost 80 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. alsfjalsfjsdf htmlheadtitleApache Tomcat/6.0.10 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--/style /headbodyh1HTTP Status 501 - Method alsfjalsfjsdf is not defined in RFC 2068 and is not supported by the Servlet API /h1HR size=1 noshade=noshadeptype Status report/ppmessage uMethod alsfjalsfjsdf is not defined in RFC 2068 and is not supported by the Servlet API /u/ppdescription uThe server does not support the functionality needed to fulfill this request (Method alsfjalsfjsdf is not defined in RFC 2068 and is not supported by the Servlet API )./u/pHR size=1 noshade=noshadeh3Apache Tomcat/6.0.10/h3/body/htmlConnection closed by foreign host. I don't want to show the message because it contains Tomcat information as well as revealing the technology I'm using on my website. Any ideas? Thanks. -- View this message in context: http://www.nabble.com/Hide-501-error-message-tf4047399.html#a11496600 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
request timeout over https
I'm configuring a Tomcat 5.5 instance to use HTTPS. It's a fresh install, with a Sun Java 5 JVM. To config HTTPS I've followed the server.xml/how-to by generating a .keystore using the password changeit and uncommenting the SSL/HTTP1.1 connector on port 8443. I've also thrown fast common access log valve on by uncommenting that. At this point, the server starts with no errors logged and everything works fine over HTTP:8080. But any URL that I hit via HTTPS:8443 gets no response and nothing is logged in the access log, and nothing is reported in any log (level = warn). If I leave the connection timeout to 20 seconds, Firefox reports The connection was interrupted and IE7 says that I don't appear to be connected to the internet. If I set that to 0 then the browser just sits and waits patiently for that response over HTTPS that's definitely not coming ! I've ruled my firewall being funny with port 8443 out as a problem, because if I run Tomcat through Eclipse WST (which picks up a marginally different server.xml which loads the same app out of my development environment instead of /webapps) I can hit it fine.
Re: Any way to check the client abruptly close the connection?
Johnny Kewl wrote: This is an interesting question, and I'm going to guess... If you in a JSP page, I dont think the error can be trapped. If you in a servlet, yes I think a try catch will detect it, but only if you actually write something. Which I can't do. The WMS is an international standard, I cannot bend it to my will, since the point of the application is to be fully conformant to it. This is a pity, I mean, the webapp container should have a way to check the socket is gone bye bye without writing on it, no? Cheers Andrea -- View this message in context: http://www.nabble.com/Any-way-to-check-the-client-abruptly-close-the-connection--tf4043946.html#a11496790 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to remove port number from https adress and redirect http to https
Thanks :) Now for some questions.. Didn't you have to configure any filters for this? I tried using the * but no luck. Rene Guenther-2 wrote: Not sure wether this could help: security-constraint web-resource-collection web-resource-nameall-except-attachments/web-resource-name url-pattern*.js/url-pattern url-pattern*.jsp/url-pattern url-pattern*.jspa/url-pattern url-pattern*.css/url-pattern url-pattern/browse/*/url-pattern /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint I needed those to configure JIRA to do everything via SSL - http://confluence.atlassian.com/display/JIRA/Running+JIRA+over+SSL+or+HTTPS So maybe you miss the *? René On Fri, 6 Jul 2007 03:40:50 -0700 (PDT) christianhau [EMAIL PROTECTED] wrote: Thanks man! I have tried a similar approach with the web.xml but no luck. This is what I wrote in web.xml security-constraint web-resource-collection web-resource-nameEntire Application/web-resource-name url-pattern/cas/WEB-INF/view/jsp/simple/ui/url-pattern /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint Now I am not 100% sure if the pattern is correct, how would I check that? And another thing, you mentioned a suitable servlet filter? How would you go about making a servlet filter for this purpose and where would you put it? As you can tell from my question I have little experience with servlet filters.. Thanks again :) Lyallex wrote: Hi This is my first contribution to this list and I expect others will have better ways of doing it but ... The way I managed to get his working is to set the ssl connector port to the default ssl port (443) and my non-ssl connector port to the default http port (80) Obviously there are issues starting Tomcat on these ports on *NIX systems but judging by the following entry in your ssl connector (keystoreFile=/root/.keystore) you appear to have access to root. That should do it Also in my etc/hosts file I have set 127.0.0.1 www.mywebapp.co.uk and my app is the root web app so now, combined with the following in web.xml security-constraint ... user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint ... /security-constraint and a suitable servlet filter I can switch between http and https almost at will with no messing about with ports just by asking for http://www.mywebapp.co.uk Hope this helps Cheers Duncan On 7/6/07, christianhau [EMAIL PROTECTED] wrote: Hi! I have set up a tomcat server with ssl that works fine as long as I go to the adress https://adress:8443 I want to get rid of the port number, is there any easy way to do this so that tomcat understands the https request that comes in? Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true maxThreads=150 scheme=https secure=true clientAuth=false keystorePass=changeit sslProtocol=TLS keystoreFile=/root/.keystore truststoreFile=/usr/lib/jvm/java-1.5.0-sun/jre/lib/security/cacerts / This is my ssl connector in my server.xml. I tried getting a redirct from http to https going but couldn't do that in tomcat alone, any tips on that aswell? I have done this: Connector port=8080 protocol=HTTP/1.1 redirectPort=8443 / With no luck... Thanks for any help!! -- View this message in context: http://www.nabble.com/How-to-remove-port-number-from-https-adress-and-redirect-http-to-https-tf4034030.html#a11459871 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-remove-port-number-from-https-adress-and-redirect-http-to-https-tf4034030.html#a11462081 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context:
Re: How to remove port number from https adress and redirect http to https
Thanks man :) About the filters, where do you implement them? I see they are in Java but still don't know where to put them :) And where do you put the filter mapping? Thanks! Lyallex wrote: Hi Ah, yes, well I'm not really an 'expert' myself but I have been through this recently. The first thing I would say is that the following looks different to my own config url-pattern/cas/WEB-INF/view/jsp/simple/ui/url-pattern here is one of my constraints security-constraint display-nameStandard user constraint used for checkout and account modification/display-name web-resource-collection web-resource-namemy super new site/web-resource-name url-pattern/user/LoginPreCheck/url-pattern url-pattern/user/loggedin/*/url-pattern /web-resource-collection auth-constraint role-namewpcustomer/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint the url-pattern should be a relative path from the root of your application or some mapped path to a resource (experts correct me if I am wrong please). If you want everything protected then just use * (or /* I think actually). Now when a user tries this URL http://www.mywebapp.co.uk/user/loggedin/editAccount.jsp Tomcat automatically ''redirects' to https. As for the filter, well I'm a bit new to them as well. At the moment I have decided that as long as a user is logged in then I'd like the session to be secure. When they hit the logout button then I don't need secure I just need straight http. Here is my filter public class HttpsRedirectFilter implements Filter{ ... public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if((request instanceof HttpServletRequest) (response instanceof HttpServletResponse)){ String redirectTarget = ((HttpServletRequest)request).getRequestURL().toString().replaceFirst(https, http); if(request.isSecure()){ ((HttpServletResponse)response).sendRedirect(redirectTarget); } else{ chain.doFilter(request, response); } } } ... Very basic and primitive I'm sure but it does the job The filter is mapped to the /logout url thus filter filter-nameredirectFilter/filter-name filter-classcom.foo.bar.baz.HttpsRedirectFilter/filter-class /filter filter-mapping filter-nameredirectFilter/filter-name url-pattern/logout/url-pattern /filter-mapping Anytime anyone logs out this filter fires and redirects to 'standard' http. Now of course the filter could be a lot more sophisticated but it proved the concept to me, now all I need is that little bit of 'majik' Hope all this helps. All criticism welcome Cheers Duncan On 7/6/07, christianhau [EMAIL PROTECTED] wrote: Thanks man! I have tried a similar approach with the web.xml but no luck. This is what I wrote in web.xml security-constraint web-resource-collection web-resource-nameEntire Application/web-resource-name url-pattern/cas/WEB-INF/view/jsp/simple/ui/url-pattern /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint Now I am not 100% sure if the pattern is correct, how would I check that? And another thing, you mentioned a suitable servlet filter? How would you go about making a servlet filter for this purpose and where would you put it? As you can tell from my question I have little experience with servlet filters.. Thanks again :) Lyallex wrote: Hi This is my first contribution to this list and I expect others will have better ways of doing it but ... The way I managed to get his working is to set the ssl connector port to the default ssl port (443) and my non-ssl connector port to the default http port (80) Obviously there are issues starting Tomcat on these ports on *NIX systems but judging by the following entry in your ssl connector (keystoreFile=/root/.keystore) you appear to have access to root. That should do it Also in my etc/hosts file I have set 127.0.0.1 www.mywebapp.co.uk and my app is the root web app so now, combined with the following in web.xml security-constraint ... user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint ... /security-constraint and a suitable servlet filter I can switch between http and https almost at will with no messing about with ports just by asking for http://www.mywebapp.co.uk Hope this helps Cheers Duncan On 7/6/07, christianhau [EMAIL
how to set chunk size?
Hi, i am trying to find out where and which attribute i can use to do transfer data as chunk and determined the chunk size of a response. i saw it is supported, i read it in the Apache Tomcat Configuration Reference - The HTTP Connector, but where can i find more details? thanks Lior
Paging
Hi All I want to ask about ResultSet paging. I mean, displaying your records on multiple of pages instead of dumping them all in one page. In ASP using ADO 2, there is a property called page size, when you set the property, your recordset will determine how many page your recordset will be displayed. My questiion is, how could i implement paging using JDBC, is there such property in JDBC? Thank You
Re: error in isapi.log: Failed to obtain an endpoint to service...
If this is hapnne during times of increased load, then check connection_pool_size in http://tomcat.apache.org/connectors-doc/reference/workers.html Regards, Rainer Rasmus - Next Stay A/S wrote: Hi I am seeing this error in my isapi.log, I am running IIS 6.0, tomcat 4.1 and jk 1.2.23 ...[5228:6988] [error] jk_isapi_plugin.c (1507): Failed to obtain an endpoint to service request - your connection_pool_size is probably less than the threads in your web server! Does anyone know what this means, and what the cure is? Thanks, Rasmus - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error in isapi.log: Failed to obtain an endpoint to service...
hapnne - happening Rainer Jung wrote: If this is hapnne during times of increased load, then check connection_pool_size in ... - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
when I deploy my war file
Hi I am getting the following error when I deploy my war file. Please see the error messages. Thanks in advance Manaa Jul 9, 2007 7:42:08 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive campaign.war Jul 9, 2007 7:42:12 AM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\campaign\WEB-INF\lib\servlet-api-2.4.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Jul 9, 2007 7:42:12 AM org.apache.catalina.core.StandardContext processTlds SEVERE: Error reading tld listeners javax.servlet.ServletException: Exception processing TLD at resource path /WEB-INF/tlds/pager-taglib.tld in context /campaign javax.servlet.ServletException: Exception processing TLD at resource path /WEB-INF/tlds/pager-taglib.tld in context /campaign at org.apache.catalina.startup.TldConfig.tldScanTld(TldConfig.java:557) at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:295) at org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4425) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4232) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source) at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1458) at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:237) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at org.apache.xerces.impl.dtd.models.DFAContentModel.buildDFA(DFAContentModel.java:538) at org.apache.xerces.impl.dtd.models.DFAContentModel.init(DFAContentModel.java:253) at org.apache.xerces.impl.dtd.DTDGrammar.createChildModel(DTDGrammar.java:2279) at org.apache.xerces.impl.dtd.DTDGrammar.getElementContentModelValidator(DTDGrammar.java:1735) at org.apache.xerces.impl.dtd.DTDGrammar.getElementDecl(DTDGrammar.java:1279) at org.apache.xerces.impl.dtd.XMLDTDValidator.getContentSpecType(XMLDTDValidator.java:1672) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1866) at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:752) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:752) at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(XMLDocumentScannerImpl.java:942) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1520) at
Re: Configure customized deny page for tomcat JDBCRealm authorization
Hi I'm using Tomcat 5.5.17 To configure Tomcat to serve up a non default http 403 status code page which is what I think you are talking about you need to add something like the following to your web.xml error-page error-code403/error-code location/errorcodes/ec403.jsp/location /error-page You can override all Tomcats default error pages in this way I think see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for all the error codes you might want to consider (if you have nothing better to do with your time that is ;-) Rgds Duncan On 7/8/07, EricKnight [EMAIL PROTECTED] wrote: Hi, Tow users, user1 and user2, are setup for tomcat. User1 can visit page1 and page2, but user2 can see only page2. Using the form based authentication and authorization, how to configure the denied page? It is not the error page. If the user types in wrong username/password, tomcat will display the error page. But if the user types in a valid username/password but without the permission to visit a page, tomcat will display a not-nice page for the denied page. Does anyone know how to configure a customized denied page? Thanks, Eric. -- View this message in context: http://www.nabble.com/Configure-customized-deny-page-for-tomcat-JDBCRealm-authorization-tf4042164.html#a11483101 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: iPlanet / SunONE web server tomcat connector connection re-use disabled
Hi Rainer, Many thanks for the feedback. To answer your question on stability, without the connection pooling being un disabled the connector appears stable until placed under load at which point it starts to flag all tomcat instances as down, which they are not. (I don't believe this is a result of over busy back-end tomcat servers though based on some preliminary observations of number of connections, tomcat logs, tomcat server performance etc). Unfortunately I couldn't give you any figures on how much load is required (we have a system under light load and a system under heavy load and nothing to test the middle ground). However, with the connection pooling un disabled it appears to work much better having run for most of the day on our heavy load system without issue before being rolled out for operational reasons not related to stability. To answer your question about ongoing support for the iPlanet / SunONE connector, from an ongoing support point of view I think that's really a matter of how many people use iPlanet and how hard it is to maintain. That said, I for one appreciate the fact there is a connector. The only other option I can see is to configure one of the proxy forwarding modules of iPlanet available for Sun, but I suspect that wouldn't facilitate connection pooling and would thus provide lower performance and I had trouble trying to download it anyway. As to bugzilla and patches, I will do my best (I have signed up for a bugzilla account today so I can open a bug to track this). However I feel I should point out that I'm not a developer. My last proper C experience was a university (and that was C++) over 10 years ago. So I know enough to read some code and was able to find this possible bug but I fear I might do more damage than good if let loose on source code for real. I work at the infrastructure level (more an end use of the connector). So apologies in advance if I don't contribute to further updates and fixes but I will try to provide the specifics of the update I made in suitable format in the bugzilla report when I raise it. Dale Roberts Sony Computer Entertainment Europe http://www.scee.com Rainer Jung [EMAIL PROTECTED] 07/07/2007 13:33 Please respond to Tomcat Users List users@tomcat.apache.org To Tomcat Users List users@tomcat.apache.org cc Subject Re: iPlanet / SunONE web server tomcat connector connection re-use disabled Hi Dale, thanks for digging into this. In fact the Netscape/Sun connector is not in very good shape at the moment. The amount of work that will go into it, to bring it into a better shape depends on people like you, that are going to help us. The Netscape/Sun community seemed to almost non-existant for many months and only recently a few people showed up and asked questions about the connector. Would you please open a bugzilla for your observation and add your changes as a patch to it? This way it is more likely, that we will remember this as an open point. You might also like to check out jk from subversion and build the Netscape connector from this version. I added some enhancements/bug fixes which will be released with version 1.2.24. What is your general impression about the Netscape connector? Is it working stable for you? Do you think it is worthwhile supporting it in the future? Concerning your question: I think the missing connection reuse is just a historic oversight. Enabling it needs some testing though in order to ensure it runs well. Regards, Rainer [EMAIL PROTECTED] wrote: Hi, BACKGROUND: I have been using the tomcat connector for Netscape / SunONE web server from the tomcat-connectors-1.2.23-src bundle available from the main tomcat site. I have found that connections are not being re-used by the connector. i.e. the connector opens a separate connection to tomcat for each and every request it's configured to pass to tomcat and then closes that connection after receiving it's response. When I enable debug logging for the connector I see messages telling me that connection re-use is disabled. I found reference to an option for apache to disable re-use but nothing for Netscape. Looking at the source code I find that all but the Netscape connector appear to have a s-disable_reuse = JK_FALSE; statement in the init_ws_service function in the connector source code file (jk_nsapi_plugin.c for Netscape). As a test I have added this to the Netscape connector and re-compiled and it now re-uses connections which is an obvious performance gain (I'm assuming here as I haven't benchmarked anything). The implication is that someone either explicitly set re-use to be disabled for Netscape, presumably due to problems not immediately obvious if re-use is enabled,, or someone changed the common code to make re-use optional but forgot to enable it by default in the Netscape connector. I only suggest the latter as there is no immediately
Re: How to remove port number from https adress and redirect http to https
Hello You 'put' them somewhere in you package hierarchy, so for example if you have the package structure com.barking.mad with servlets in com.barking.mad.servlets then you could put them in com.barking.mad.servlets.filters or wherever and package them up in your jar or war or whatever it is you are doing when you deploy your application. The filter mapping goes in web.xml Rgds Duncan On 7/9/07, christianhau [EMAIL PROTECTED] wrote: Thanks man :) About the filters, where do you implement them? I see they are in Java but still don't know where to put them :) And where do you put the filter mapping? Thanks! Lyallex wrote: Hi Ah, yes, well I'm not really an 'expert' myself but I have been through this recently. The first thing I would say is that the following looks different to my own config url-pattern/cas/WEB-INF/view/jsp/simple/ui/url-pattern here is one of my constraints security-constraint display-nameStandard user constraint used for checkout and account modification/display-name web-resource-collection web-resource-namemy super new site/web-resource-name url-pattern/user/LoginPreCheck/url-pattern url-pattern/user/loggedin/*/url-pattern /web-resource-collection auth-constraint role-namewpcustomer/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint the url-pattern should be a relative path from the root of your application or some mapped path to a resource (experts correct me if I am wrong please). If you want everything protected then just use * (or /* I think actually). Now when a user tries this URL http://www.mywebapp.co.uk/user/loggedin/editAccount.jsp Tomcat automatically ''redirects' to https. As for the filter, well I'm a bit new to them as well. At the moment I have decided that as long as a user is logged in then I'd like the session to be secure. When they hit the logout button then I don't need secure I just need straight http. Here is my filter public class HttpsRedirectFilter implements Filter{ ... public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if((request instanceof HttpServletRequest) (response instanceof HttpServletResponse)){ String redirectTarget = ((HttpServletRequest)request).getRequestURL().toString().replaceFirst(https, http); if(request.isSecure()){ ((HttpServletResponse)response).sendRedirect(redirectTarget); } else{ chain.doFilter(request, response); } } } ... Very basic and primitive I'm sure but it does the job The filter is mapped to the /logout url thus filter filter-nameredirectFilter/filter-name filter-classcom.foo.bar.baz.HttpsRedirectFilter/filter-class /filter filter-mapping filter-nameredirectFilter/filter-name url-pattern/logout/url-pattern /filter-mapping Anytime anyone logs out this filter fires and redirects to 'standard' http. Now of course the filter could be a lot more sophisticated but it proved the concept to me, now all I need is that little bit of 'majik' Hope all this helps. All criticism welcome Cheers Duncan On 7/6/07, christianhau [EMAIL PROTECTED] wrote: Thanks man! I have tried a similar approach with the web.xml but no luck. This is what I wrote in web.xml security-constraint web-resource-collection web-resource-nameEntire Application/web-resource-name url-pattern/cas/WEB-INF/view/jsp/simple/ui/url-pattern /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint Now I am not 100% sure if the pattern is correct, how would I check that? And another thing, you mentioned a suitable servlet filter? How would you go about making a servlet filter for this purpose and where would you put it? As you can tell from my question I have little experience with servlet filters.. Thanks again :) Lyallex wrote: Hi This is my first contribution to this list and I expect others will have better ways of doing it but ... The way I managed to get his working is to set the ssl connector port to the default ssl port (443) and my non-ssl connector port to the default http port (80) Obviously there are issues starting Tomcat on these ports on *NIX systems but judging by the following entry in your ssl connector (keystoreFile=/root/.keystore) you appear to have access to root. That should do it Also in my etc/hosts file I have set 127.0.0.1 www.mywebapp.co.uk and my app is the root web app so now, combined with the following in web.xml
Re: How to remove port number from https adress and redirect http to https
I forgot to mention http://java.sun.com/j2ee/dtds/web-app_2_2.dtd will tell you wherabouts to put the filter mapping in web.xml Rgds Duncan On 7/9/07, Lyallex [EMAIL PROTECTED] wrote: Hello You 'put' them somewhere in you package hierarchy, so for example if you have the package structure com.barking.mad with servlets in com.barking.mad.servlets then you could put them in com.barking.mad.servlets.filters or wherever and package them up in your jar or war or whatever it is you are doing when you deploy your application. The filter mapping goes in web.xml Rgds Duncan On 7/9/07, christianhau [EMAIL PROTECTED] wrote: Thanks man :) About the filters, where do you implement them? I see they are in Java but still don't know where to put them :) And where do you put the filter mapping? Thanks! Lyallex wrote: Hi Ah, yes, well I'm not really an 'expert' myself but I have been through this recently. The first thing I would say is that the following looks different to my own config url-pattern/cas/WEB-INF/view/jsp/simple/ui/url-pattern here is one of my constraints security-constraint display-nameStandard user constraint used for checkout and account modification/display-name web-resource-collection web-resource-namemy super new site/web-resource-name url-pattern/user/LoginPreCheck/url-pattern url-pattern/user/loggedin/*/url-pattern /web-resource-collection auth-constraint role-namewpcustomer/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint the url-pattern should be a relative path from the root of your application or some mapped path to a resource (experts correct me if I am wrong please). If you want everything protected then just use * (or /* I think actually). Now when a user tries this URL http://www.mywebapp.co.uk/user/loggedin/editAccount.jsp Tomcat automatically ''redirects' to https. As for the filter, well I'm a bit new to them as well. At the moment I have decided that as long as a user is logged in then I'd like the session to be secure. When they hit the logout button then I don't need secure I just need straight http. Here is my filter public class HttpsRedirectFilter implements Filter{ ... public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if((request instanceof HttpServletRequest) (response instanceof HttpServletResponse)){ String redirectTarget = ((HttpServletRequest)request).getRequestURL().toString().replaceFirst(https, http); if(request.isSecure()){ ((HttpServletResponse)response).sendRedirect(redirectTarget); } else{ chain.doFilter(request, response); } } } ... Very basic and primitive I'm sure but it does the job The filter is mapped to the /logout url thus filter filter-nameredirectFilter/filter-name filter-classcom.foo.bar.baz.HttpsRedirectFilter/filter-class /filter filter-mapping filter-nameredirectFilter/filter-name url-pattern/logout/url-pattern /filter-mapping Anytime anyone logs out this filter fires and redirects to 'standard' http. Now of course the filter could be a lot more sophisticated but it proved the concept to me, now all I need is that little bit of 'majik' Hope all this helps. All criticism welcome Cheers Duncan On 7/6/07, christianhau [EMAIL PROTECTED] wrote: Thanks man! I have tried a similar approach with the web.xml but no luck. This is what I wrote in web.xml security-constraint web-resource-collection web-resource-nameEntire Application/web-resource-name url-pattern/cas/WEB-INF/view/jsp/simple/ui/url-pattern /web-resource-collection user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint Now I am not 100% sure if the pattern is correct, how would I check that? And another thing, you mentioned a suitable servlet filter? How would you go about making a servlet filter for this purpose and where would you put it? As you can tell from my question I have little experience with servlet filters.. Thanks again :) Lyallex wrote: Hi This is my first contribution to this list and I expect others will have better ways of doing it but ... The way I managed to get his working is to set the ssl connector port to the default ssl port (443) and my non-ssl connector port to the default http port (80) Obviously there are issues starting Tomcat
Re: Paging
There's no JDBC setting. I'd recommend you take a close look at the SELECT statement for your database for syntax to support paging. --David Mohammed Zabin wrote: Hi All I want to ask about ResultSet paging. I mean, displaying your records on multiple of pages instead of dumping them all in one page. In ASP using ADO 2, there is a property called page size, when you set the property, your recordset will determine how many page your recordset will be displayed. My questiion is, how could i implement paging using JDBC, is there such property in JDBC? Thank You - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: about tomcat
Tomcat can act as a client to another tomcat. See http://jakarta.apache.org/commons/httpclient/ for a library supporting this. --David Johnny Kewl wrote: No, I dont think so, a web server is not a client, and unless you really have to work on port 80, it would be much easier to just to use JDBC to exchange records. ie open 2 database connections, read from one and write to the other, this way you can also use tranactions and ensure the integrity. If you talking about a real time replication system, ie the databases must stay aligned, its alot more complex than simply writing a few records. If its something like updating the status say once a week, then a web server may do. For example you make a cache or disconnected recordset in the servlet, this gets sent to a client, and it updates the dB on the other side. A cache is serializable, so that would work. If you use PostgreSQL, I may be able to help you, I have a replication system for that, but its not on port 80. Its not enough to just say I got two dB's you need to explain the desired system. Using a WEB server to send a cached recorset to a client, that then sticks it in a local embedded dB and uses the data, is one thing. Replication is another story. - Original Message - From: randeelwrw [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Monday, July 09, 2007 6:49 AM Subject: Re: about tomcat thank you for the reply. what i really need to do is transfer records from one database to another database.so in the middle there would be two web servers. is this a good idea? Stephen.Morris wrote: Yes, it is possible to run two servers as a cluster and exchange information between them. I have seen an article on the internet recently on doing exactly this. The easiest way of finding out how to do this is to use Googles advanced search and to type 'tomcat clustering' into the exact phrase textbox, which should return about 19,700 hits. It is then a matter of just selecting the article that is most relevant to what you are trying to do. regards, Steve Morris IT Security Access Management Technology Risk and Security Technology Australia National Australia Bank Phone: +61-3-8634 1755 (x31755) Mobile: +0438 537 569 email: [EMAIL PROTECTED] randeelwrw [EMAIL PROTECTED] .com To users@tomcat.apache.org 09/07/2007 14:05 cc Subject Please respond to about tomcat Tomcat Users List [EMAIL PROTECTED] che.org hi everyone, can i use two tomcat webservers to exchange information between them? how can i do that? thank you, rana. -- View this message in context: http://www.nabble.com/about-tomcat-tf4047066.html#a11495638 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] National Australia Bank Ltd - ABN 12 004 044 937 This email may contain confidential information. If you are not the intended recipient, please immediately notify us at [EMAIL PROTECTED] or by replying to the sender, and then destroy all copies of this email. Except where this email indicates otherwise, views expressed in this email are those of the sender and not of National Australia Bank Ltd. Advice in this email does not take account of your objectives, financial situation, or needs. It is important for you to consider these matters and, if the e-mail refers to a product(s), you should read the relevant Product Disclosure Statement(s)/other disclosure document(s) before making any decisions. If you do not want email marketing from us in future, forward this email with unsubscribe in the subject line to [EMAIL PROTECTED] in order to stop marketing emails from this sender. National Australia Bank Ltd does not represent that this email is free of errors, viruses or interference. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/about-tomcat-tf4047066.html#a11495951 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use connection pool with tomcat 1.2.9
Not knowing how this code is working: DataSource ds = this.getDataSource(request,jdbc/TestDB); if(ds == null) throw new InternalException(datasource is null); I'm not sure what to tell you. The method getDataSource( request, jdbc/TestDB ) is not a part of tomcat or the servlet spec. Is it part of Struts? --David Nhut Thai Le wrote: You are definitely right, i was sleepy while posting the question. The 1.2.9 is the struts version. The bundles tomcat is 5.5.17. But is it the cause of my problem? David Smith [EMAIL PROTECTED] wrote: Tomcat 1.2.9??? I doubt that's the real version number. Typical version numbers are 4.x, 5.0.x, 5.5.x, or 6.0.x. I think Netbeans bundles started with 5.0.x later upgraded to 5.5.x with Netbeans 5.5. Could you take another look? --David Nhut Thai Le wrote: Hi guys, I 'm developing a simple web app with netbeans with bundle tomcat 1.2.9. I want to use connection pooling fir my web app. Thus, i config as follow: Here is my server.xml: And here is my WEB-INF/web.xml AccessControl com.core1.filter.AccessControl loginPage /WEB-INF/authentication/login.jsp AccessControl /protected/* com.core1.listener.ResourceManagerListener action org.apache.struts.action.ActionServlet config /WEB-INF/struts-config.xml debug 2 detail 2 2 action *.do 30 index.jsp Exception /WEB-INF/error/error.jsp DB connection jdbc/TestDB javax.sql.DataSource Container I assume that by referencing the DataSource in WEB-INF/web.xml to the DataSource initialized in server.xml, I can access the Datasource from anywhere. However, in one of my Action Class(i'm using Struts framework) I have the following code DataSource ds = this.getDataSource(request,jdbc/TestDB); if(ds == null) throw new InternalException(datasource is null); Supprisingly, the exception is thrown! The DataSource is null after all.Is there anything else i have to do? It's been 2 weeks i have stuck with this problem. Hope anyone can give a suggestion Thai - Where there's will, there's a way - We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Where there's will, there's a way - Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Context.xml error
On 7/8/07, Mark Thomas [EMAIL PROTECTED] wrote: Because each context.xml file can oly define a single context. So, if an app has additional context for some directory listing, where it should be defined? Artur - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Spring+hibernate business logic accross multiple webapps
Hello, I am wondering which is the best way to deploy within Tomcat multiple web apps (portlets-web services) that have access to the same business logic (developed with Spring+Hibernate). I`ve seen something here http://springtips.blogspot.com/2007/06/using-shared-parent-application-context.html but I can`t handle ears I am looking to JNDI, but it is still not clear to me how and what to do it..and if it is worth. should I use just a JNDI connection to the JDBC datasource or it would be better to have all the spring+hibernate service beans loaded in JNDI? I`ve splitted the webapps applicationContext-name.xml files. Crated a jar with all the business beans and the applicationContext-service.xml and copied it in the common/lib, together with all the hibernate and spring libs.It works but I wouldn`t load this stuff in each web.xml for each web-app using the spring listner. I don`t think it`s a good way to achive my target..is it? Any experience about it? Thnx -- View this message in context: http://www.nabble.com/Spring%2Bhibernate-business-logic-accross-multiple-webapps-tf4048280.html#a11498981 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Spring+hibernate business logic accross multiple webapps
i think its better if you use web services for that purpose, or rmi, whichever right to your taste On 7/9/07, axelspin [EMAIL PROTECTED] wrote: Hello, I am wondering which is the best way to deploy within Tomcat multiple web apps (portlets-web services) that have access to the same business logic (developed with Spring+Hibernate). I`ve seen something here http://springtips.blogspot.com/2007/06/using-shared-parent-application-context.html but I can`t handle ears I am looking to JNDI, but it is still not clear to me how and what to do it..and if it is worth. should I use just a JNDI connection to the JDBC datasource or it would be better to have all the spring+hibernate service beans loaded in JNDI? I`ve splitted the webapps applicationContext-name.xml files. Crated a jar with all the business beans and the applicationContext-service.xml and copied it in the common/lib, together with all the hibernate and spring libs.It works but I wouldn`t load this stuff in each web.xml for each web-app using the spring listner. I don`t think it`s a good way to achive my target..is it? Any experience about it? Thnx -- View this message in context: http://www.nabble.com/Spring%2Bhibernate-business-logic-accross-multiple-webapps-tf4048280.html#a11498981 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Andre- When the hammer is the only tool that you have, every problem seems like a nail
Re: Spring+hibernate business logic accross multiple webapps
Hi, case you are going to use stateful session mechanism, be aware that tomcat opens for each webapp context new httpsession. axelspin [EMAIL PROTECTED] 09.07.2007 12:22 Please respond to Tomcat Users List users@tomcat.apache.org To users@tomcat.apache.org cc Subject Spring+hibernate business logic accross multiple webapps Hello, I am wondering which is the best way to deploy within Tomcat multiple web apps (portlets-web services) that have access to the same business logic (developed with Spring+Hibernate). I`ve seen something here http://springtips.blogspot.com/2007/06/using-shared-parent-application-context.html but I can`t handle ears I am looking to JNDI, but it is still not clear to me how and what to do it..and if it is worth. should I use just a JNDI connection to the JDBC datasource or it would be better to have all the spring+hibernate service beans loaded in JNDI? I`ve splitted the webapps applicationContext-name.xml files. Crated a jar with all the business beans and the applicationContext-service.xml and copied it in the common/lib, together with all the hibernate and spring libs.It works but I wouldn`t load this stuff in each web.xml for each web-app using the spring listner. I don`t think it`s a good way to achive my target..is it? Any experience about it? Thnx -- View this message in context: http://www.nabble.com/Spring%2Bhibernate-business-logic-accross-multiple-webapps-tf4048280.html#a11498981 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Spring+hibernate business logic accross multiple webapps
Hi Axel, just out of curiosity, had a look at what you waffling on about, coz I've never done portlets. It's interesting but it actually looks like a nightmare I did find a link that I think will help... http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?pageId=3089 Frames for me they can have portlets ;) Good luck - Original Message - From: axelspin [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Monday, July 09, 2007 12:22 PM Subject: Spring+hibernate business logic accross multiple webapps Hello, I am wondering which is the best way to deploy within Tomcat multiple web apps (portlets-web services) that have access to the same business logic (developed with Spring+Hibernate). I`ve seen something here http://springtips.blogspot.com/2007/06/using-shared-parent-application-context.html but I can`t handle ears I am looking to JNDI, but it is still not clear to me how and what to do it..and if it is worth. should I use just a JNDI connection to the JDBC datasource or it would be better to have all the spring+hibernate service beans loaded in JNDI? I`ve splitted the webapps applicationContext-name.xml files. Crated a jar with all the business beans and the applicationContext-service.xml and copied it in the common/lib, together with all the hibernate and spring libs.It works but I wouldn`t load this stuff in each web.xml for each web-app using the spring listner. I don`t think it`s a good way to achive my target..is it? Any experience about it? Thnx -- View this message in context: http://www.nabble.com/Spring%2Bhibernate-business-logic-accross-multiple-webapps-tf4048280.html#a11498981 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use connection pool with tomcat 1.2.9
Servlet decument says: getDatasource(HTTPServletRequest) is used to get the default datasource, getDataSource(HttpServletRequest, String) get the selected datasource. However, since I am using struts. following instruction in tomcat documentation on connection pooling and using getDatasource within a struts action class give a null resource because although action class has getDatasource(HttpServletRequest) as the httpServlet class, it only return resource which is managed by strut not the from container as the httpServlet object does. I'm now letting struts manages the resource. My problem is partly solved for now. Thanks for your suggestion Thai David Smith [EMAIL PROTECTED] wrote: Not knowing how this code is working: DataSource ds = this.getDataSource(request,jdbc/TestDB); if(ds == null) throw new InternalException(datasource is null); I'm not sure what to tell you. The method getDataSource( request, jdbc/TestDB ) is not a part of tomcat or the servlet spec. Is it part of Struts? --David Nhut Thai Le wrote: You are definitely right, i was sleepy while posting the question. The 1.2.9 is the struts version. The bundles tomcat is 5.5.17. But is it the cause of my problem? David Smith wrote: Tomcat 1.2.9??? I doubt that's the real version number. Typical version numbers are 4.x, 5.0.x, 5.5.x, or 6.0.x. I think Netbeans bundles started with 5.0.x later upgraded to 5.5.x with Netbeans 5.5. Could you take another look? --David Nhut Thai Le wrote: Hi guys, I 'm developing a simple web app with netbeans with bundle tomcat 1.2.9. I want to use connection pooling fir my web app. Thus, i config as follow: Here is my server.xml: And here is my WEB-INF/web.xml AccessControl com.core1.filter.AccessControl loginPage /WEB-INF/authentication/login.jsp AccessControl /protected/* com.core1.listener.ResourceManagerListener action org.apache.struts.action.ActionServlet config /WEB-INF/struts-config.xml debug 2 detail 2 2 action *.do 30 index.jsp Exception /WEB-INF/error/error.jsp DB connection jdbc/TestDB javax.sql.DataSource Container I assume that by referencing the DataSource in WEB-INF/web.xml to the DataSource initialized in server.xml, I can access the Datasource from anywhere. However, in one of my Action Class(i'm using Struts framework) I have the following code DataSource ds = this.getDataSource(request,jdbc/TestDB); if(ds == null) throw new InternalException(datasource is null); Supprisingly, the exception is thrown! The DataSource is null after all.Is there anything else i have to do? It's been 2 weeks i have stuck with this problem. Hope anyone can give a suggestion Thai - Where there's will, there's a way - We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Where there's will, there's a way - Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Where there's will, there's a way - Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
Re: Spring+hibernate business logic accross multiple webapps
So guys.. Do you think that this discussion thread is hopeless within Tomcat? http://forum.springframework.org/archive/index.php/t-9962.html axelspin wrote: Hello, I am wondering which is the best way to deploy within Tomcat multiple web apps (portlets-web services) that have access to the same business logic (developed with Spring+Hibernate). I`ve seen something here http://springtips.blogspot.com/2007/06/using-shared-parent-application-context.html but I can`t handle ears I am looking to JNDI, but it is still not clear to me how and what to do it..and if it is worth. should I use just a JNDI connection to the JDBC datasource or it would be better to have all the spring+hibernate service beans loaded in JNDI? I`ve splitted the webapps applicationContext-name.xml files. Crated a jar with all the business beans and the applicationContext-service.xml and copied it in the common/lib, together with all the hibernate and spring libs.It works but I wouldn`t load this stuff in each web.xml for each web-app using the spring listner. I don`t think it`s a good way to achive my target..is it? Any experience about it? Thnx -- View this message in context: http://www.nabble.com/Spring%2Bhibernate-business-logic-accross-multiple-webapps-tf4048280.html#a11500640 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Advice about Tomcat on x86_64 architecture..
Hi to all, I have Dell PE 2950 with tow Intel xeon dual core 5130 processors. I use this server to run website. I have three tomcat work in balance in mod_jk, and one Apache in front on port 80. The JVM and the tomcat that i have on the server are 32 bit architecture. My question is, Is it good to do so or will be better to install 64 bit architecture JVM and compile tomcat on the server ? Thank you all for help and sorry about my English. -- View this message in context: http://www.nabble.com/Advice-about-Tomcat-on-x86_64-architecture..-tf4048957.html#a11500727 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: https in Tomcat 5.5 via basic JKS keytool keystore..not doing what it should !
On 7/8/07, Ben Iggulden [EMAIL PROTECTED] wrote: Is this keystore password supposed to be changed as I have presumed (ensuring the same is used in the server.xml connector's keystorePass attribute as is used in generation) Yes, using a different password works for me per the docs on my existing 5.5.x installation... -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
core_output_filter error for apache/tomcat JK connector
we have upgraded our environment to following software specs. on Redhat AS 3.0 (update 8), tomcat 5.5.23, apache 2.0.46 and JK 1.2.23 plugin. intermittently we see the following error in the error log of tomcat and then the whole site just gets hung. and no users will be to procede with any operation. this is suppose to go to Staging, could help us getting this resolved. [Mon Jul 09 11:27:19 2007] [info] (104)Connection reset by peer: core_output_filter: writing data to the network [Mon Jul 09 11:27:19 2007] [info] (32)Broken pipe: core_output_filter: writing data to the network [Mon Jul 09 11:27:23 2007] [info] (104)Connection reset by peer: core_output_filter: writing data to the network [Mon Jul 09 11:27:23 2007] [info] (32)Broken pipe: core_output_filter: writing data to the network let us know if any further information required, i will upload it immediately. -- View this message in context: http://www.nabble.com/core_output_filter-error-for-apache-tomcat-JK-connector-tf4048993.html#a11500807 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Porblems in deployment
On 7/9/07, Fatima [EMAIL PROTECTED] wrote: I am new to web services. I have installed tomcat version 6.0.13 and Axis2.war file on Fedora Core 5, they both have passed the validation test, also, i am using firefox as my web browser. When i run the version service of Axis2 or any other service, it gives me the following error This XML file does not appear to have any style information associated with it. The document tree is shown below. This is not a Tomcat issue. The above is also not an error, it's an informational message *from Firefox* regarding the XML file it's displaying. Try fetching your service with wget or telnet or an actual web service client and look at the result. -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connection-Pools, MySQL and 8 hours
Hi list, we're running Tomcat 5.5 here on Debian Edge, MySQL 5 and we've set up a connectionpool. Example of context.xml: ?xml version=1.0 encoding=UTF-8? Context Resource auth=Container description=DB Connection for SSO name=jdbc/SSODS type=javax.sql.DataSource factory=org.apache.commons.dbcp.BasicDataSourceFactory driverClassName=com.mysql.jdbc.Driver username=xxx password=xxx url=jdbc:mysql://db:3306/apacheSSO maxIdle=5 maxWait=1 maxActive=10 validationQuery=SELECT 1 testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=1 minEvictableIdleTimeMillis=28800 poolPreparedStatements=true removeAbandoned=true removeAbandonedTimeout=300 logAbandoned=false/ /Context Unfortunately, we always get an exception after 8 hours of inactivity like 2007-07-09 02:10:16,739 ERROR [TP-Processor7]: Exception performing authentication com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Communications link failure during commit(). Transaction resolution unknown. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888) at com.mysql.jdbc.Connection.commit(Connection.java:2259) at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:568) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:399) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:347) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:257) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) That means, the session has timed out, Tomcat tries to re-authenticate via a JDBC-Realm, but the connection to the database is gone. It works on the 2nd try, however, I'd like to get rid of that exception in our logs. In an article on MySQL-dev it is said, that, to avoid such a scenario, one shoudl either use connection-pooling, use exception-handling or shoudl use the MySQL-autoconnect-feature: http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-troubleshooting.html#qandaitem-24-4-5-3-4 On the other hand they've issued a warning not to use the autoreconnect-feature since this might be a secirity-issue. Now my question to you: How do you handle this when using a connection-pool? Just live with those exceptions occuring once or twice a day? Catch the exception and do nothing (not even propagate them to your logs (something I really dislike))? Or is their a trick so that I can convince Tomcat *not* to throw this Exception? Looking forward to your valued comments! Gregor -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: core_output_filter error for apache/tomcat JK connector
- Which version of Java? - What does a thread dump of Tomcat give (kill -QUIT, result goes to catalina.out) - Does direct connect to Tomcat http connector still work? - Can you still connect from the Apache server to the Tomcat jk connector via telnet? - What's the config of your jk conector (tomcat side) and of mod_jk? - What are the contents of the mod_jk log file and the Apache error log? - If it happens, will restarting only Apache fix the hang? nageshsrao wrote: we have upgraded our environment to following software specs. on Redhat AS 3.0 (update 8), tomcat 5.5.23, apache 2.0.46 and JK 1.2.23 plugin. intermittently we see the following error in the error log of tomcat and then the whole site just gets hung. and no users will be to procede with any operation. this is suppose to go to Staging, could help us getting this resolved. [Mon Jul 09 11:27:19 2007] [info] (104)Connection reset by peer: core_output_filter: writing data to the network [Mon Jul 09 11:27:19 2007] [info] (32)Broken pipe: core_output_filter: writing data to the network [Mon Jul 09 11:27:23 2007] [info] (104)Connection reset by peer: core_output_filter: writing data to the network [Mon Jul 09 11:27:23 2007] [info] (32)Broken pipe: core_output_filter: writing data to the network let us know if any further information required, i will upload it immediately. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP precompilation
hi there, currently, the project I work on, we deploy our application simply using tar file, now testing tomcat, we would use war file... that's ok for that in a meantime on our current production platform (iplanet) we precompile JSP and create an other tar file... what is then the best practise using tomcat ? should we create a war file including precompiled jsp or should we deploy the Webapp using Tomcat and then precompile JSP ? what is the most efficient way ? any help or advice would be really appreciated, Phi-Long - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP precompilation
You can either precompile (eg using specific tomcat ant target) and include the precompiled files in your .war, add with it the mappings in web.xml for each jsp. (Long and not so easy) Or, you can install in tomcat something like lambda-probe, that has an interface to compile JSP, interface you could use after deployement to compile all JSPS Or, you can simple not precompile... En l'instant précis du 09/07/07 15:50, Phi-Long LE s'exprimait en ces termes: hi there, currently, the project I work on, we deploy our application simply using tar file, now testing tomcat, we would use war file... that's ok for that in a meantime on our current production platform (iplanet) we precompile JSP and create an other tar file... what is then the best practise using tomcat ? should we create a war file including precompiled jsp or should we deploy the Webapp using Tomcat and then precompile JSP ? what is the most efficient way ? any help or advice would be really appreciated, Phi-Long - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Context.xml error
From: Artur Rataj [mailto:[EMAIL PROTECTED] Subject: Re: Context.xml error So, if an app has additional context for some directory listing, where it should be defined? Your use of the terminology is in error. An app is a context, and vice versa; the phrase app has additional context is meaningless. What are you actually trying to accomplish? - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 Clustering issues
Is the multicast heartbeat picked up over the multicast IP or the Receiver address that is broadcasted? I assume it is the multicast IP as the Receiver is supposedly used for replication only. Andrew R Feller, Analyst Subversion Administrator University Information Systems Louisiana State University [EMAIL PROTECTED] (office) 225.578.3737 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 03, 2007 9:55 AM To: Tomcat Users List Subject: Re: Tomcat 5.5 Clustering issues the disappeared message appears 3seconds after the member added message. 3 seconds is the timeout you have set, ie, if no multicast heartbeat is received after 3 seconds, consider the member dead. so it seems like multicasting is not working properly on your system. Filip Andrew R Feller wrote: Good morning everyone, I have been trying to get Tomcat clustering between two Tomcat instances set up, but I have run into some issues. After opening the necessary ports in the firewall, routing the broadcast messages to the correct network interface (eth0), and setting up server.xml with the necessary membership information, I get the following from my Tomcat logs: 2007-07-03 09:16:37,247 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.184.173 :4001,catalina,130.39.184.173,4001, alive=30318] 2007-07-03 09:16:37,256 DEBUG [org.apache.catalina.cluster.tcp.DataSender] - Create sender [/130.39.184.173:4,001] 2007-07-03 09:16:40,724 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.1 84.173:4001,catalina,130.39.184.173,4001, alive=30318] What could be the cause of cluster members disappearing immediately after being added? Am I missing anything necessary for setting up clustering / session replication? Relative information about the server is below. Thank you, Andrew Tomcat: 5.5.23 Server: RHEL 5 Server.xml: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=239.39.184.173 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000 / Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6 / Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=synchronous / Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt; / ClusterListener className=org.apache.catalina.cluster.session.ClusterSessionListener / /Cluster IP table rules: -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4001 -j ACCEPT -A RH-Firewall-1-INPUT -p udp --dport 45564 -d 239.39.184.173 -j ACCEPT No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.9.14/884 - Release Date: 7/2/2007 3:35 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: https in Tomcat 5.5 via basic JKS keytool keystore..not doing what it should !
From: Ben Iggulden [mailto:[EMAIL PROTECTED] Subject: RE: https in Tomcat 5.5 via basic JKS keytool keystore..not doing what it should ! Is this keystore password supposed to be changed as I have presumed (ensuring the same is used in the server.xml connector's keystorePass attribute as is used in generation) or is using anything other than changeit not typically done ? Did you note the following from the doc? Finally, you will be prompted for the key password, which is the password specifically for this Certificate (as opposed to any other Certificates stored in the same keystore file). You MUST use the same password here as was used for the keystore password itself. (Currently, the keytool prompt will tell you that pressing the ENTER key does this for you automatically.) Using a password other than changeit works properly in both 5.5 and 6.0. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PORTLET live site examples?
Where I work, we run a fairly simple Oracle based portal, there are a large number of people who do this, mainly universities: https://ceai1.campuseai.org/portal/page?_pageid=933,5339000_dad=portal_schema=PORTAL -jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: JSP precompilation
OR you could use a small JSP page which goes through all JSP files of your webapp and include them, which in turn leads to a compilation of the JSP pages... call this precomp.jsp after deployment of your webapp, which could be automated using a deployment script ... hth, Chris -UrsprĂ¼ngliche Nachricht- Von: David Delbecq [mailto:[EMAIL PROTECTED] Gesendet: Montag, 9. Juli 2007 15:54 An: Tomcat Users List Betreff: Re: JSP precompilation You can either precompile (eg using specific tomcat ant target) and include the precompiled files in your .war, add with it the mappings in web.xml for each jsp. (Long and not so easy) Or, you can install in tomcat something like lambda-probe, that has an interface to compile JSP, interface you could use after deployement to compile all JSPS Or, you can simple not precompile... En l'instant prĂ©cis du 09/07/07 15:50, Phi-Long LE s'exprimait en ces termes: hi there, currently, the project I work on, we deploy our application simply using tar file, now testing tomcat, we would use war file... that's ok for that in a meantime on our current production platform (iplanet) we precompile JSP and create an other tar file... what is then the best practise using tomcat ? should we create a war file including precompiled jsp or should we deploy the Webapp using Tomcat and then precompile JSP ? what is the most efficient way ? any help or advice would be really appreciated, Phi-Long - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP precompilation
Well... I don't gonna keep in mind the third option... obviously obvious isn't it ? ;-) Probably we gonna keep our previous method to precompile JSPs unless I find out an efficient and quick method to set it up. Le 09/07/2007 15:54, David Delbecq a écrit : You can either precompile (eg using specific tomcat ant target) and include the precompiled files in your .war, add with it the mappings in web.xml for each jsp. (Long and not so easy) Or, you can install in tomcat something like lambda-probe, that has an interface to compile JSP, interface you could use after deployement to compile all JSPS Or, you can simple not precompile... En l'instant précis du 09/07/07 15:50, Phi-Long LE s'exprimait en ces termes: hi there, currently, the project I work on, we deploy our application simply using tar file, now testing tomcat, we would use war file... that's ok for that in a meantime on our current production platform (iplanet) we precompile JSP and create an other tar file... what is then the best practise using tomcat ? should we create a war file including precompiled jsp or should we deploy the Webapp using Tomcat and then precompile JSP ? what is the most efficient way ? any help or advice would be really appreciated, Phi-Long - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5 Clustering issues
correct, on the multicast IP Filip Andrew R Feller wrote: Is the multicast heartbeat picked up over the multicast IP or the Receiver address that is broadcasted? I assume it is the multicast IP as the Receiver is supposedly used for replication only. Andrew R Feller, Analyst Subversion Administrator University Information Systems Louisiana State University [EMAIL PROTECTED] (office) 225.578.3737 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 03, 2007 9:55 AM To: Tomcat Users List Subject: Re: Tomcat 5.5 Clustering issues the disappeared message appears 3seconds after the member added message. 3 seconds is the timeout you have set, ie, if no multicast heartbeat is received after 3 seconds, consider the member dead. so it seems like multicasting is not working properly on your system. Filip Andrew R Feller wrote: Good morning everyone, I have been trying to get Tomcat clustering between two Tomcat instances set up, but I have run into some issues. After opening the necessary ports in the firewall, routing the broadcast messages to the correct network interface (eth0), and setting up server.xml with the necessary membership information, I get the following from my Tomcat logs: 2007-07-03 09:16:37,247 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.184.173 :4001,catalina,130.39.184.173,4001, alive=30318] 2007-07-03 09:16:37,256 DEBUG [org.apache.catalina.cluster.tcp.DataSender] - Create sender [/130.39.184.173:4,001] 2007-07-03 09:16:40,724 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.1 84.173:4001,catalina,130.39.184.173,4001, alive=30318] What could be the cause of cluster members disappearing immediately after being added? Am I missing anything necessary for setting up clustering / session replication? Relative information about the server is below. Thank you, Andrew Tomcat: 5.5.23 Server: RHEL 5 Server.xml: Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=239.39.184.173 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000 / Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6 / Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=synchronous / Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt; / ClusterListener className=org.apache.catalina.cluster.session.ClusterSessionListener / /Cluster IP table rules: -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4001 -j ACCEPT -A RH-Firewall-1-INPUT -p udp --dport 45564 -d 239.39.184.173 -j ACCEPT No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.9.14/884 - Release Date: 7/2/2007 3:35 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection-Pools, MySQL and 8 hours
The JDBC realm doesn't use the connection pool you've specified below, The JDBC realm uses a single connection, never closes it unless an exception happens. The connection is defined in the Realm section of server.xml Filip Gregor Schneider wrote: Hi list, we're running Tomcat 5.5 here on Debian Edge, MySQL 5 and we've set up a connectionpool. Example of context.xml: ?xml version=1.0 encoding=UTF-8? Context Resource auth=Container description=DB Connection for SSO name=jdbc/SSODS type=javax.sql.DataSource factory=org.apache.commons.dbcp.BasicDataSourceFactory driverClassName=com.mysql.jdbc.Driver username=xxx password=xxx url=jdbc:mysql://db:3306/apacheSSO maxIdle=5 maxWait=1 maxActive=10 validationQuery=SELECT 1 testOnBorrow=true testWhileIdle=true timeBetweenEvictionRunsMillis=1 minEvictableIdleTimeMillis=28800 poolPreparedStatements=true removeAbandoned=true removeAbandonedTimeout=300 logAbandoned=false/ /Context Unfortunately, we always get an exception after 8 hours of inactivity like 2007-07-09 02:10:16,739 ERROR [TP-Processor7]: Exception performing authentication com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Communications link failure during commit(). Transaction resolution unknown. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888) at com.mysql.jdbc.Connection.commit(Connection.java:2259) at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:568) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:399) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:347) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:257) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:392) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) That means, the session has timed out, Tomcat tries to re-authenticate via a JDBC-Realm, but the connection to the database is gone. It works on the 2nd try, however, I'd like to get rid of that exception in our logs. In an article on MySQL-dev it is said, that, to avoid such a scenario, one shoudl either use connection-pooling, use exception-handling or shoudl use the MySQL-autoconnect-feature: http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-troubleshooting.html#qandaitem-24-4-5-3-4 On the other hand they've issued a warning not to use the autoreconnect-feature since this might be a secirity-issue. Now my question to you: How do you handle this when using a connection-pool? Just live with those exceptions occuring once or twice a day? Catch the exception and do nothing (not even propagate them to your logs (something I really dislike))? Or is their a trick so that I can convince Tomcat *not* to throw this Exception? Looking forward to your valued comments! Gregor - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5 Clustering issues
Filip, Perhaps you can explain why each of these log messages are happening every 10 minutes? If this isn't controlled behavior, which I doubt, then something is going on here. =P Thanks for the help, Andy 2007-07-09 09:30:09,497 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.186.177 :9001,catalina,130.39.186.177,9001, alive=248399] 2007-07-09 09:30:09,509 DEBUG [org.apache.catalina.cluster.tcp.DataSender] - Create sender [/130.39.186.177:9,001] 2007-07-09 09:30:14,646 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.1 86.177:9001,catalina,130.39.186.177,9001, alive=248399] 2007-07-09 09:40:09,733 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.186.177 :9001,catalina,130.39.186.177,9001, alive=848625] 2007-07-09 09:40:09,733 DEBUG [org.apache.catalina.cluster.tcp.DataSender] - Create sender [/130.39.186.177:9,001] 2007-07-09 09:40:15,064 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.1 86.177:9001,catalina,130.39.186.177,9001, alive=848625] 2007-07-09 09:50:09,935 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.186.177 :9001,catalina,130.39.186.177,9001, alive=150900] 2007-07-09 09:50:09,939 DEBUG [org.apache.catalina.cluster.tcp.DataSender] - Create sender [/130.39.186.177:9,001] 2007-07-09 09:50:15,362 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.1 86.177:9001,catalina,130.39.186.177,9001, alive=150900] 2007-07-09 10:10:10,800 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.186.177 :9001,catalina,130.39.186.177,9001, alive=1351729] 2007-07-09 10:10:10,800 DEBUG [org.apache.catalina.cluster.tcp.DataSender] - Create sender [/130.39.186.177:9,001] 2007-07-09 10:10:15,840 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.1 86.177:9001,catalina,130.39.186.177,9001, alive=1351729] 2007-07-09 10:20:10,832 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.186.177 :9001,catalina,130.39.186.177,9001, alive=1951799] 2007-07-09 10:20:10,833 DEBUG [org.apache.catalina.cluster.tcp.DataSender] - Create sender [/130.39.186.177:9,001] 2007-07-09 10:20:16,061 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.1 86.177:9001,catalina,130.39.186.177,9001, alive=1951799] Andrew R Feller, Analyst Subversion Administrator University Information Systems Louisiana State University [EMAIL PROTECTED] (office) 225.578.3737 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Monday, July 09, 2007 9:34 AM To: Tomcat Users List Subject: Re: Tomcat 5.5 Clustering issues correct, on the multicast IP Filip Andrew R Feller wrote: Is the multicast heartbeat picked up over the multicast IP or the Receiver address that is broadcasted? I assume it is the multicast IP as the Receiver is supposedly used for replication only. Andrew R Feller, Analyst Subversion Administrator University Information Systems Louisiana State University [EMAIL PROTECTED] (office) 225.578.3737 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 03, 2007 9:55 AM To: Tomcat Users List Subject: Re: Tomcat 5.5 Clustering issues the disappeared message appears 3seconds after the member added message. 3 seconds is the timeout you have set, ie, if no multicast heartbeat is received after 3 seconds, consider the member dead. so it seems like multicasting is not working properly on your system. Filip Andrew R Feller wrote: Good morning everyone, I have been trying to get Tomcat clustering between two Tomcat instances set up, but I have run into some issues. After opening the necessary ports in the firewall, routing the broadcast messages to the correct network interface (eth0), and setting up server.xml with the necessary membership information, I get the following from my Tomcat logs: 2007-07-03 09:16:37,247 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.184.173 :4001,catalina,130.39.184.173,4001, alive=30318] 2007-07-03 09:16:37,256 DEBUG
RE: Redirection
just do another query -- either in a second servlet to pull back to a JSP page or (not recommended, but I've done it) put the query in the JSP page itself. Just write the results right there on the fly to the JSP. -Original Message- From: Mohammed Zabin [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 04, 2007 6:47 AM To: Tomcat Users List Subject: Re: Redirection No, it's not what i wanted :) I have a servlet page with the following address http://localhost:8080/Exam/servlets/results in this servlet page, results, i have a hyperlink: *Click Here To view your Results* This link is designated to navigate to a jsp page with the following address: http://localhost:80808/Exam/jsp/results.jsp my question is, how could this hyperlink go correctly from within the servlet page (results) to a jsp page (results.jsp) Thank you On 7/4/07, David Delbecq [EMAIL PROTECTED] wrote: Sorry, it's not spanish but french, totally unrelated languages as for how to create an hyperlink, just open an html book and look for tag a href=../a En l'instant précis du 04/07/07 11:58, Mohammed Zabin s'exprimait en ces termes: Thanks, seems spanish ;), I live Spain, am learning spanish language now, Gratias, EL java es Aburrido On 7/4/07, David Delbecq [EMAIL PROTECTED] wrote: String url = response.encodeURL (/path/to/jsp.jsp?paramX=someValueparamY=someOtherValue); En l'instant précis du 04/07/07 09:20, Mohammed Zabin s'exprimait en ces termes: Hi Everybody I have a servlet that renders some database related values, at the botton of the page, i want to add a hyberlink to a jsp page, and i want pass to this jsp page, and i want to pass some values from servlet to jsp??? How could i do this, any help please? Jotnarta - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use connection pool with tomcat 1.2.9
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thai, Nhut Thai Le wrote: Servlet decument says: getDatasource(HTTPServletRequest) is used to get the default datasource, getDataSource(HttpServletRequest, String) get the selected datasource. This appears to be a Struts method, not anything from the servlet specification. You need to be very specific when you quote things like this. http://struts.apache.org/1.2.9/api/org/apache/struts/action/Action.html#getDataSource(javax.servlet.http.HttpServletRequest) However, since I am using struts. following instruction in tomcat documentation on connection pooling and using getDatasource within a struts action class give a null resource because although action class has getDatasource(HttpServletRequest) as the httpServlet class, it only return resource which is managed by strut not the from container as the httpServlet object does. Exactly. If you are using Tomcat-managed DataSources, you cannot use Struts's Action.getDataSource method. You will have to write your own. If you have a base action from which all your existing actions extend, you can simply override getDataSource and implement it correctly for a JNDI-based DataSource. Better yet, separate your database queries from your Struts actions, and forget Action.getDataSource ever existed. I'm now letting struts manages the resource. My problem is partly solved for now. You should NOT do this. Struts has abandoned DataSource management as of version 1.3 in favor of container-managed DataSources (as it should have been all along). You should get Tomcat-based DataSource management working. We will help you, though I'm guessing that this thread is over and nobody will read this follow-up. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGklYb9CaO5/Lv0PARAmWpAJ9TJ+97VfAs5PrE0C240355BixskQCgrdmY kZK5rfPcUHqyi8bzgjTMrDg= =Vjnk -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Character encoding
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 lightbulb, lightbulb432 wrote: POST requests always use the request's body encoding, which is specified in the HTTP header (and can be overridden by using request.setCharacterEncoding). Some broken clients don't provide the character encoding of the request, which makes things difficult sometimes. What determines what's specified in the HTTP header for the value of the encoding? Well... it's a bit of a chicken-in-an-egg scenario, since the encoding specified in the header must match the encoding actually used in the request. So, you could either decide that the header should match the content or the content should match the header. Is it purely up to the user agent, or can Tomcat provide hints based on previous requests how to encode it - or is it something up to the end user to set in their browser (in IE, View - Encoding)? Typically, the default encoding used by the user-agent will be locale-specific. For instance, most browsers in the US will use ISO-8859-1 as the default locale, or maybe WINDOWS-1252 if you're unlucky. Ideally, the server should be able to accept all reasonable encodings. The Accept-Charset header sent by the user-agent to the server indicates the acceptable encodings that should be returned, rated by acceptability. For instance, my en_US Mozilla Firefox on Windows sends this Accept-Charset string to servers: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 This indicates that the browser would prefer ISO-8859-1 encoding, but will also accept UTF-8 as a second choice, but that anything will do ('*') if those two are unavailable. On HTML form elements, you may override the encoding used to send the data: form accept-charset=UTF-8 The HTML 4 specification says this about the accept-charset attribute: The default value for this attribute is the reserved string UNKNOWN. User agents may interpret this value as the character encoding that was used to transmit the document containing this FORM element. (http://www.w3.org/TR/html4/interact/forms.html#h-17.3) So, if the server sends a document using UTF-8, it is polite for the user-agent to use that same encoding to respond to the server if the server hasn't indicated any preference by using the accept-charset form attribute. In what cases would you call request.setCharacterEncoding to override the value specified by the user agent? You should only do this when the user-agent does not declare the charset being used in the body of the request through the Content-Type request header. You should also only do this when you are relatively confident that the user-agent is sending the data in the overridden character set. For instance, if you suspect that most browsers adhere to the W3C's recommendation above that an UNKNOWN accept-charset implies that the browser should respond to the server with the same charset as used in the previous server response (got all that?), and you always use the same charset to send pages (say, UTF-8), they it is reasonable to override any unspecified Content-Type encoding with the charset you use to send pages (UTF-8, in this case). The HTTP specification has this to say about missing charsets (in Content-Type headers): The charset parameter is used with some media types to define the character set (section 3.4) of the data. When no explicit charset parameter is provided by the sender, media subtypes of the text type are defined to have a default charset value of ISO-8859-1 when received via HTTP. Data in character sets other than ISO-8859-1 or its subsets MUST be labeled with an appropriate charset value. See section 3.4.1 for compatibility problems. (http://www.ietf.org/rfc/rfc2616.txt Section 3.7.1) Basically, this says that a missing charset within a Content-Type header means that the request should be interpreted as being encoded using ISO-8859-1 encoding. Pretty simple. Shouldn't you trust the user agent rather than trying to guess? (Or is this only used in cases where the user agent is broken, like you said - but then how would you know you're dealing with a broken client to begin with...aah, complicated!) You should /always/ respect the charset sent by the client. In fact, the HTTP spec says so: HTTP/1.1 recipients MUST respect the charset label provided by the sender; (http://www.ietf.org/rfc/rfc2616.txt Section 3.4.1) If the client sends the wrong charset, it's their fault that their data will get all screwed up. But, if there's no charset, then you should provide your own. The default charset should be ISO-8859-1. I think Tomcat uses the default encoding of the JVM if no charset is provided, which is a problem for folks who set the JVM encoding to UTF-8 for i18n purposes... because then the default becomes UTF-8 which is incorrect. Fortunately, UTF-8 and ISO-8859-1 are compatible for most common lower ASCII characters. This has lead to a lot of folks thinking that they have their servers configured
RE: Help required setting up smtp server
could it be your provider or network is blocking port 25 connections through apps other than the standard email app used? i.e. your company might block port 25 if not being accessed by LotusMail or Outlook. -Original Message- From: Mike Peremsky [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 04, 2007 11:28 AM To: users@tomcat.apache.org Subject: Help required setting up smtp server I followed the example in the Tomcat JNDI docs on setting up and sending an email (C:\apache-tomcat-5.5.23\webapps\tomcat-docs\jndi-resources-howto.html) but am still receiving a javax.mail.MessagingException: Could not connect to SMTPhost: localhost, port: 25 The strange thing is that I set the mail.smtp.host=mailhost in the resource definition. - Food fight? Enjoy some healthy debate in the Yahoo! Answers Food Drink QA. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Changing tomcat version
Hi all, I was using tomcat's version of 4.1 for a long time and it was working fine. But then I decided to move to version 6. I kept getting these errors -- javax.servlet.ServletException: Cannot allocate servlet instance for path /mystuff/servlet/RelatedQuestions org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:389) org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet When I tried to move back to version 4 -- even the main page i.e. localhost:8080/ doesn't show anything. How can I fix this problem? Please help. Thanks much in advance, Deepa - Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta.
Re: Hide 501 error message
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 climbingrose, climbingrose wrote: I'm configuring Tomcat 6.0.10 behind Apache 2.0 using mod_jk 1.2.3. Everything is working beautifully but I want to hide 501 error when malicious user try to access the server. I assume you always want to hide these messages, since it's difficult to determine whether a user is malicious or not. # telnet localhost 80 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. alsfjalsfjsdf htmlheadtitleApache Tomcat/6.0.10 - Error report/titlestyle!--H1 [snip] I don't want to show the message because it contains Tomcat information as well as revealing the technology I'm using on my website. Any ideas? Apache httpd is capable of sending an error document based upon any response code, and it can override that sent by Tomcat. For instance, you can have Apache httpd intercept 501 from Tomcat and display a page that contains no server information at all. Don't forget that your HTTP headers might leak information, too. Check the ServerTokens Apache httpd directive to make sure you aren't announcing your server version from Apache httpd. I'm sure you can turn off this version disclosure within Tomcat, too, but I can't remember how to do it. Check the archives, 'cause I'm sure this has been asked in the past. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkmDR9CaO5/Lv0PARAm1nAJ4005uxITWo45E8WkYNUFOP/2TvJgCeN9To bgiqRYZtKcLyIef/hJRmZNg= =a7uu -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Changing tomcat version
I believe it may be the JVM in question causing this error. A while back, I tried to bump up my JDK from 1.4.2 to 1.5 and it caused all kinds of complilation errors, and errors like this as well. And I'm still on the TC 4.1.x series. I had to uninstall that JDK's JVm to get everything to compile again. -Original Message- From: Deepa Paranjpe [mailto:[EMAIL PROTECTED] Sent: Monday, July 09, 2007 11:21 AM To: users@tomcat.apache.org Subject: Changing tomcat version Hi all, I was using tomcat's version of 4.1 for a long time and it was working fine. But then I decided to move to version 6. I kept getting these errors -- javax.servlet.ServletException: Cannot allocate servlet instance for path /mystuff/servlet/RelatedQuestions org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:389) org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet When I tried to move back to version 4 -- even the main page i.e. localhost:8080/ doesn't show anything. How can I fix this problem? Please help. Thanks much in advance, Deepa - Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Paging
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, David Smith wrote: There's no JDBC setting. Sure there is: Statement.setFetchSize(int size) Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. The number of rows specified affects only result sets created using this statement. If the value specified is zero, then the hint is ignored. The default value is zero. http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Statement.html#setFetchSize(int) Mohammed, While JDBC supports sending results in certain-sized chunks, you should evaluate how you actually want to do your paging. If you leave a connection open between requests to allow the JDBC-based paging to (maybe) help out, then you will be putting a resource strain on your server since you'll have to leave connections open for a long time, bound to a certain user or session. I'd recommend you take a close look at the SELECT statement for your database for syntax to support paging. This is a better idea. Instead of issuing a single SELECT and then paging through the results, issue the same SELECT multiple times (once per page) and then instruct the server to return only results X through Y. Most RDBMSs support requests for subsets or results (for instance, in MySQL, you use the LIMIT keyword). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkmJT9CaO5/Lv0PARAkeEAJ4zXuYF+86uI9jRs3Gquu5P+yshkACfaBpV eD6YGnFK87y96eyoltJdIIA= =lplq -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advice about Tomcat on x86_64 architecture..
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Prt, Please do not post more than once. We forgive spelling and grammar mistakes. There is no reason to re-post your question with trivial changes. prt wrote: I have Dell PE 2950 with tow Intel xeon dual core 5130 processors. I have three tomcat work in balance in mod_jk, and one Apache in front on port 80. Three instances on the same piece of hardware? Why not just run a single instance? Load balancing doesn't get you anything when it's all on the same hardware. The JVM and the tomcat that i have on the server are 32 bit architecture. :( Note that Tomcat is architecture-less. Tomcat is neither 32-bit nor 64-bit. Only the JVM makes these distinctions. Is it good to do so or will be better to install 64 bit architecture JVM and compile tomcat on the server ? You should definitely use a 64-bit JVM on your server. You will have access to much more memory and overall performance should improve significantly. You do not have to recompile anything. Tomcat should work exactly as it does today. Thank you all for help and sorry about my English. No problem. My Hebrew would probably be horrible. ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkmQU9CaO5/Lv0PARAn5hAKCt5+aOHDnHF64o5Ft1V8bEt2ZNxwCfbJr0 rR3sVgqhGYbIVgUJOmkTF98= =V1oW -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection-Pools, MySQL and 8 hours
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gregor, Filip Hanik - Dev Lists wrote: The JDBC realm doesn't use the connection pool you've specified below, The JDBC realm uses a single connection, never closes it unless an exception happens. Might I suggest using a JNDI Realm so you can share your configuration between your Realm authenticator and your application? MySQL or a piece of network hardware might be shutting-down your connection after 8 hours. By using the JNDI pool you have configured, DBCP ought to get you a good connection even after that 8 hours has elapsed. Definitely don't use MySQL's auto-reconnect feature. I'm not sure why that even still exists in the 5.x version of the driver. They have been declaring it unfit for use for years. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkmUI9CaO5/Lv0PARAomJAJwPsoTiS74oRaANdRVs4sK1wJygaQCfQKIP x2BJiJA2i3XQUoNSxI2SL9s= =avI4 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Hide 501 error message
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Hide 501 error message I'm sure you can turn off this version disclosure within Tomcat, too, but I can't remember how to do it. Check the archives, 'cause I'm sure this has been asked in the past. From the doc for the server attribute of the HTTP connector: The Server header for the http response. Unless your [sic] paranoid, you won't need this feature. http://tomcat.apache.org/tomcat-6.0-doc/config/http.html Of course, Just because you're paranoid doesn't mean they're not out to get you. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP precompilation
-Original Message- From: Phi-Long LE [mailto:[EMAIL PROTECTED] Subject: Re: JSP precompilation Probably we gonna keep our previous method to precompile JSPs unless I find out an efficient and quick method to set it up. Have you looked at the Tomcat doc on the subject? http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html#Web%20Applicat ion%20Compilation - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advice about Tomcat on x86_64 architecture..
Hi Christopher, Sorry about the double post. Thank you very much for your help, you very kind. I installed JVM 64-bit Server, so now the tomcat's work with the JVM. Are you sure about that is no need to compile the Tomcat on 64 Bit ? What about the all application, I can develop and compile on 32 bit and then transfer class files to the server ? Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Prt, Please do not post more than once. We forgive spelling and grammar mistakes. There is no reason to re-post your question with trivial changes. prt wrote: I have Dell PE 2950 with tow Intel xeon dual core 5130 processors. I have three tomcat work in balance in mod_jk, and one Apache in front on port 80. Three instances on the same piece of hardware? Why not just run a single instance? Load balancing doesn't get you anything when it's all on the same hardware. The JVM and the tomcat that i have on the server are 32 bit architecture. :( Note that Tomcat is architecture-less. Tomcat is neither 32-bit nor 64-bit. Only the JVM makes these distinctions. Is it good to do so or will be better to install 64 bit architecture JVM and compile tomcat on the server ? You should definitely use a 64-bit JVM on your server. You will have access to much more memory and overall performance should improve significantly. You do not have to recompile anything. Tomcat should work exactly as it does today. Thank you all for help and sorry about my English. No problem. My Hebrew would probably be horrible. ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkmQU9CaO5/Lv0PARAn5hAKCt5+aOHDnHF64o5Ft1V8bEt2ZNxwCfbJr0 rR3sVgqhGYbIVgUJOmkTF98= =V1oW -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Advice-about-Tomcat-on-x86_64-architecture..-tf4048957.html#a11506856 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Spring+hibernate business logic accross multiple webapps
But how about performance.. is it better to have multiple instances of hibernate sessionFactory Objects (one each web app) or to use an http call for each db query? Maybe transactions are handled better with a centralized datasource access throug ws.. what do you think? Andre Prasetya-2 wrote: i think its better if you use web services for that purpose, or rmi, whichever right to your taste On 7/9/07, axelspin [EMAIL PROTECTED] wrote: Hello, I am wondering which is the best way to deploy within Tomcat multiple web apps (portlets-web services) that have access to the same business logic (developed with Spring+Hibernate). I`ve seen something here http://springtips.blogspot.com/2007/06/using-shared-parent-application-context.html but I can`t handle ears I am looking to JNDI, but it is still not clear to me how and what to do it..and if it is worth. should I use just a JNDI connection to the JDBC datasource or it would be better to have all the spring+hibernate service beans loaded in JNDI? I`ve splitted the webapps applicationContext-name.xml files. Crated a jar with all the business beans and the applicationContext-service.xml and copied it in the common/lib, together with all the hibernate and spring libs.It works but I wouldn`t load this stuff in each web.xml for each web-app using the spring listner. I don`t think it`s a good way to achive my target..is it? Any experience about it? Thnx -- View this message in context: http://www.nabble.com/Spring%2Bhibernate-business-logic-accross-multiple-webapps-tf4048280.html#a11498981 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Andre- When the hammer is the only tool that you have, every problem seems like a nail -- View this message in context: http://www.nabble.com/Spring%2Bhibernate-business-logic-accross-multiple-webapps-tf4048280.html#a11506870 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PORTLET live site examples?
Hi Jacob. thanks There is tons of literature on it, but boy its like looking for a needle in a hay stack actually finding one that clearly uses all this technology For the interested. I found one http://www.claudehussenet.com/portal/Welcome.do I read the complex spec and look at portlet development environments, then I look at that site, and think AJAX and a few div statements whats the big deal? At worst an HTML parser, Ajax and a few div statements, then there is Iframes, or normal frames as well and for intercommunication, an application server or simply a session object if its all in the same web-app. Standards are good, but I just dont like the heavy weight infrastructure that comes with these things Anyway, my feeling. try find one, before you use this technology. thats a message all by itself. Thing that really bothers me is that the portlet tutorials, dont use portlets ;) - Original Message - From: Jacob Rhoden [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, July 09, 2007 4:07 PM Subject: Re: PORTLET live site examples? Where I work, we run a fairly simple Oracle based portal, there are a large number of people who do this, mainly universities: https://ceai1.campuseai.org/portal/page?_pageid=933,5339000_dad=portal_schema=PORTAL -jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Advice about Tomcat on x86_64 architecture..
From: prt [mailto:[EMAIL PROTECTED] Subject: Re: Advice about Tomcat on x86_64 architecture.. Are you sure about that is no need to compile the Tomcat on 64 Bit ? Definitely. What about the all application, I can develop and compile on 32 bit and then transfer class files to the server ? Correct. One of the key attributes of Java is platform independence. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PORTLET live site examples?
johny, as far as i informed this site uses portal server along with a classical cms solution: http://www.omv.at OMV is one of the big players on the european oil market having gas stations in at least 5 countries (probably more). However, the project itself was a mess (i've heard :-)) regards Leon On 7/9/07, Johnny Kewl [EMAIL PROTECTED] wrote: Hi Jacob. thanks There is tons of literature on it, but boy its like looking for a needle in a hay stack actually finding one that clearly uses all this technology For the interested. I found one http://www.claudehussenet.com/portal/Welcome.do I read the complex spec and look at portlet development environments, then I look at that site, and think AJAX and a few div statements whats the big deal? At worst an HTML parser, Ajax and a few div statements, then there is Iframes, or normal frames as well and for intercommunication, an application server or simply a session object if its all in the same web-app. Standards are good, but I just dont like the heavy weight infrastructure that comes with these things Anyway, my feeling. try find one, before you use this technology. thats a message all by itself. Thing that really bothers me is that the portlet tutorials, dont use portlets ;) - Original Message - From: Jacob Rhoden [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, July 09, 2007 4:07 PM Subject: Re: PORTLET live site examples? Where I work, we run a fairly simple Oracle based portal, there are a large number of people who do this, mainly universities: https://ceai1.campuseai.org/portal/page?_pageid=933,5339000_dad=portal_schema=PORTAL -jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Advice about Tomcat on x86_64 architecture..
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Subject: RE: Advice about Tomcat on x86_64 architecture.. From: prt [mailto:[EMAIL PROTECTED] Subject: Re: Advice about Tomcat on x86_64 architecture.. Are you sure about that is no need to compile the Tomcat on 64 Bit ? Definitely. One caveat: there is an optional connector (APR) that does use native code, and it does have to be compiled for each target platform. Unless you're worried about ultimate performance, it's not needed. The rest of Tomcat is pure Java, including all the standard connectors. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 6
Does tomcat 6 only need a jre but not a jdk? If so, what should you point your JAVA_HOME to? - Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
Re: Tomcat 5.5 Clustering issues
not really, try to lower your mcastFrequency value, and increase your mcastDropTime value Filip Andrew R Feller wrote: Filip, Perhaps you can explain why each of these log messages are happening every 10 minutes? If this isn't controlled behavior, which I doubt, then something is going on here. =P Thanks for the help, Andy 2007-07-09 09:30:09,497 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.186.177 :9001,catalina,130.39.186.177,9001, alive=248399] 2007-07-09 09:30:09,509 DEBUG [org.apache.catalina.cluster.tcp.DataSender] - Create sender [/130.39.186.177:9,001] 2007-07-09 09:30:14,646 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.1 86.177:9001,catalina,130.39.186.177,9001, alive=248399] 2007-07-09 09:40:09,733 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.186.177 :9001,catalina,130.39.186.177,9001, alive=848625] 2007-07-09 09:40:09,733 DEBUG [org.apache.catalina.cluster.tcp.DataSender] - Create sender [/130.39.186.177:9,001] 2007-07-09 09:40:15,064 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.1 86.177:9001,catalina,130.39.186.177,9001, alive=848625] 2007-07-09 09:50:09,935 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.186.177 :9001,catalina,130.39.186.177,9001, alive=150900] 2007-07-09 09:50:09,939 DEBUG [org.apache.catalina.cluster.tcp.DataSender] - Create sender [/130.39.186.177:9,001] 2007-07-09 09:50:15,362 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.1 86.177:9001,catalina,130.39.186.177,9001, alive=150900] 2007-07-09 10:10:10,800 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.186.177 :9001,catalina,130.39.186.177,9001, alive=1351729] 2007-07-09 10:10:10,800 DEBUG [org.apache.catalina.cluster.tcp.DataSender] - Create sender [/130.39.186.177:9,001] 2007-07-09 10:10:15,840 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.1 86.177:9001,catalina,130.39.186.177,9001, alive=1351729] 2007-07-09 10:20:10,832 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.186.177 :9001,catalina,130.39.186.177,9001, alive=1951799] 2007-07-09 10:20:10,833 DEBUG [org.apache.catalina.cluster.tcp.DataSender] - Create sender [/130.39.186.177:9,001] 2007-07-09 10:20:16,061 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://130.39.1 86.177:9001,catalina,130.39.186.177,9001, alive=1951799] Andrew R Feller, Analyst Subversion Administrator University Information Systems Louisiana State University [EMAIL PROTECTED] (office) 225.578.3737 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Monday, July 09, 2007 9:34 AM To: Tomcat Users List Subject: Re: Tomcat 5.5 Clustering issues correct, on the multicast IP Filip Andrew R Feller wrote: Is the multicast heartbeat picked up over the multicast IP or the Receiver address that is broadcasted? I assume it is the multicast IP as the Receiver is supposedly used for replication only. Andrew R Feller, Analyst Subversion Administrator University Information Systems Louisiana State University [EMAIL PROTECTED] (office) 225.578.3737 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 03, 2007 9:55 AM To: Tomcat Users List Subject: Re: Tomcat 5.5 Clustering issues the disappeared message appears 3seconds after the member added message. 3 seconds is the timeout you have set, ie, if no multicast heartbeat is received after 3 seconds, consider the member dead. so it seems like multicasting is not working properly on your system. Filip Andrew R Feller wrote: Good morning everyone, I have been trying to get Tomcat clustering between two Tomcat instances set up, but I have run into some issues. After opening the necessary ports in the firewall, routing the broadcast messages to the correct network interface (eth0), and setting up server.xml with the necessary membership information, I get the following from my Tomcat logs: 2007-07-03 09:16:37,247 INFO [org.apache.catalina.cluster.tcp.SimpleTcpCluster] - Replication member
Re: tomcat 6
you can point JRE_HOME instead of JAVA_HOME to use a jre, Filip Deepa Paranjpe wrote: Does tomcat 6 only need a jre but not a jdk? If so, what should you point your JAVA_HOME to? - Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.10.2/891 - Release Date: 7/8/2007 6:32 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
APR/HP-UX startup problems
I am having issues using APR in an HP-UX environment; Ive successful built/installed APR in multiple Linux environments so am I bit lost what is happening in HP-UX... I get the following error while trying to start Tomcat: SEVERE: Error initializing endpoint java.lang.Exception: Socket listen failed: [14] Bad address at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576) at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.jav a:115) at org.apache.catalina.connector.Connector.initialize(Connector.java:101 6) I am running Tomcat 5.5 and using Java 1.5 on HP-UX (9000/PA-RISC) Any ideas? Thanks - John -- View this message in context: http://www.nabble.com/APR-HP-UX-startup-problems-tf4051903.html#a11509442 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: APR/HP-UX startup problems
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John, John Pederzolli wrote: I am having issues using APR in an HP-UX environment; Ive successful built/installed APR in multiple Linux environments so am I bit lost what is happening in HP-UX... I don't have any HP-UX experience, but this error usually turns out to be an IPV4 vs. IPV6 issue. Can you provide some more information on your network configuration? You could also check the archives for APR and IPV6. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkqQA9CaO5/Lv0PARAoRQAKC4j8GqGHB1bWYa0cYcICnX5Yj1kACfR0vD CYnWRihue3paG2bzIWHHDtI= =itgl -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: APR/HP-UX startup problems
can you explicitly try to define the bind address in the Connector element? could it be that the default 0.0.0.0 or whatever it's IPv6 counterpart is, is not accepted? Filip John Pederzolli wrote: I am having issues using APR in an HP-UX environment; Ive successful built/installed APR in multiple Linux environments so am I bit lost what is happening in HP-UX... I get the following error while trying to start Tomcat: SEVERE: Error initializing endpoint java.lang.Exception: Socket listen failed: [14] Bad address at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576) at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.jav a:115) at org.apache.catalina.connector.Connector.initialize(Connector.java:101 6) I am running Tomcat 5.5 and using Java 1.5 on HP-UX (9000/PA-RISC) Any ideas? Thanks - John - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: APR/HP-UX startup problems
Thanks for the reply Filip - I gave your suggestion a try and still no luck... Filip Hanik - Dev Lists wrote: can you explicitly try to define the bind address in the Connector element? could it be that the default 0.0.0.0 or whatever it's IPv6 counterpart is, is not accepted? Filip John Pederzolli wrote: I am having issues using APR in an HP-UX environment; Ive successful built/installed APR in multiple Linux environments so am I bit lost what is happening in HP-UX... I get the following error while trying to start Tomcat: SEVERE: Error initializing endpoint java.lang.Exception: Socket listen failed: [14] Bad address at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576) at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.jav a:115) at org.apache.catalina.connector.Connector.initialize(Connector.java:101 6) I am running Tomcat 5.5 and using Java 1.5 on HP-UX (9000/PA-RISC) Any ideas? Thanks - John - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/APR-HP-UX-startup-problems-tf4051903.html#a11511225 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PORTLET live site examples?
Johnny Kewl wrote: Hi Jacob. thanks There is tons of literature on it, but boy its like looking for a needle in a hay stack actually finding one that clearly uses all this technology Portal Architecture is heavily used by teaching institutions to solve a number of speciffic problems (not always successfully i might add). When a company has 10 different web sites all with different styles and layouts for various legacy reasons and they cant be change, a portal can bring all sites into it, one site per tab, with a consistent corporate image. When workflow of your staff involves interacting with multiple different systems, (ie logging in and out of different systems). A portal can wrap the systems, provide single sign on (using a number of different mechanisms) and present each step of the workflow on a single page, or over a series of pages. In a big company, When workflow of your staff crosses software/websites from different departments (who do their own programming and want to do things their way and dont work together for political reasons) you can make them simply write portlets, and let the portal team control how the departments applications look and feel and work. I could go on for quite some time but I don't have time to write an essay, these are probably some of the most important benefits. If you are a small company the concept of a portlet is still helpful but not as useful as to a big company with a large number of sites. -jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PORTLET live site examples?
I just thought of a very speciffic example that might make what i was saying clearer. Using the educational field again: Just say you have a central student enrollment online system. Faculty A just wants the student to fill out all forms, say Form 1, form 2 and form 3. However Faculty B says, we want Form 1, Form 2, Our funny form not in your system, form 3. And Faculty C says We just want Form 1, and form 3. Simply make all the forms Portlets, and put them in a portal. That way depending on the student they can be shown different portlets. This way no matter what strange and wacky way each of the clients in the company want the students to enroll, we can accommodate it by having everything turned into Portlets. (Sorry I cant give you a live example, ours is very secure) Best Regards, Jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to replace jar which was already loaded?
Hi I have a worker.jar in my webapp. User could upload a new worker.jar replacing it. And I don't want to restart the tomcat. How can I implement this? Thanks.
How do I develop a Valve?
1) What jar files do I need to include in my classpath to compile a Valve? 2) Where do I put the class file so Tomcat can load it? Under CATALINA_BASE/common? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: https in Tomcat 5.5 via basic JKS keytool keystore..not doing what it should !
Thanks for your responses Chuck Hassan. I did have a good look into my use of the keystoreFile attribute and made sure there was no .keystore sitting in the default location in my home dir that might be confusing things. I was thinking .keystore on the default path with changeit as the password might have been overriding things perhaps. But that wasn't it. I believe my use of Tomcat through Eclipse 3.2 the Web Standard Tools (WST) plugin might be the source of my issues. That method is definitely failing with anything other than a changeit password. Doesn't matter if I hit return to use the same key password for tomcat as the keystore one I first enter (or if I type same). I'm trying to verify this as the problem by closing Eclipse and running Tomcat directly, but in doing that I'm hitting a different problem: requests via https are getting no response at all that way. The same requests over http work fine. The https requests don't even generate an access log entry ! Hitting https://localhost:8443/ fails to get a response. Hitting http://localhost:8080/ works fine. Hitting http://localhost:8443/ causes the Tomcat5.exe process to consume vast quantities of CPU, though the root index.jsp file is served quickly - and the CPU continues to be consumed. The server.xml is: Server port=8005 shutdown=SHUTDOWN GlobalNamingResources Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=3 disableUploadTimeout=true / !-- Define a SSL HTTP/1.1 Connector on port 8443 -- Connector port=8443 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 connectionTimeout=0 scheme=https secure=true clientAuth=false sslProtocol=TLS keystorePass=changeit / !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Valve className=org.apache.catalina.valves.FastCommonAccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common resolveHosts=false/ /Host /Engine /Service /Server -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: 10 July 2007 00:04 To: Tomcat Users List Subject: RE: https in Tomcat 5.5 via basic JKS keytool keystore..not doing what it should ! From: Ben Iggulden [mailto:[EMAIL PROTECTED] Subject: RE: https in Tomcat 5.5 via basic JKS keytool keystore..not doing what it should ! Is this keystore password supposed to be changed as I have presumed (ensuring the same is used in the server.xml connector's keystorePass attribute as is used in generation) or is using anything other than changeit not typically done ? Did you note the following from the doc? Finally, you will be prompted for the key password, which is the password specifically for this Certificate (as opposed to any other Certificates stored in the same keystore file). You MUST use the same password here as was used for the keystore password itself. (Currently, the keytool prompt will tell you that pressing the ENTER key does this for you automatically.) Using a password other than changeit works properly in both 5.5 and 6.0. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advice about Tomcat on x86_64 architecture..
we have 3 instances on the same hardware we did this due to a memory/thread constraint correct me if i'm mistaken, but i've read that the more memory you allocate for you Heap, the less thread you have, we want a lot of memory and a lot of threads so we opted to do 3 instances on the same hardware On 7/10/07, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Prt, Please do not post more than once. We forgive spelling and grammar mistakes. There is no reason to re-post your question with trivial changes. prt wrote: I have Dell PE 2950 with tow Intel xeon dual core 5130 processors. I have three tomcat work in balance in mod_jk, and one Apache in front on port 80. Three instances on the same piece of hardware? Why not just run a single instance? Load balancing doesn't get you anything when it's all on the same hardware. The JVM and the tomcat that i have on the server are 32 bit architecture. :( Note that Tomcat is architecture-less. Tomcat is neither 32-bit nor 64-bit. Only the JVM makes these distinctions. Is it good to do so or will be better to install 64 bit architecture JVM and compile tomcat on the server ? You should definitely use a 64-bit JVM on your server. You will have access to much more memory and overall performance should improve significantly. You do not have to recompile anything. Tomcat should work exactly as it does today. Thank you all for help and sorry about my English. No problem. My Hebrew would probably be horrible. ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkmQU9CaO5/Lv0PARAn5hAKCt5+aOHDnHF64o5Ft1V8bEt2ZNxwCfbJr0 rR3sVgqhGYbIVgUJOmkTF98= =V1oW -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I develop a Valve?
Joseph S [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 1) What jar files do I need to include in my classpath to compile a Valve? I'm assuming that this is for 5.5. Usually you just need catalina.jar, but in some cases you might need tomcat-utils.jar and tomcat-coyote.jar (if you want to interact with the Connector). 2) Where do I put the class file so Tomcat can load it? Under CATALINA_BASE/common? You put it under CATALINA_HOME/server/classes, or CATALINA_HOME/server/lib (if it is in a .jar file, which is recommended, if only so you have the class and the mbeans-descriptors.xml file in the same place). - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to set chunk size?
lior grinfeld [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, i am trying to find out where and which attribute i can use to do transfer data as chunk and determined the chunk size of a response. i saw it is supported, i read it in the Apache Tomcat Configuration Reference - The HTTP Connector, but where can i find more details? Section 5.1 of the Servlet spec might be a start :). Setting the bufferSize on the response (assuming that this is a Servlet, not a JSP) should make it close to the chunk size (assuming you don't set it too small, like under 8Kb). There isn't really a practical way to guarantee the chunk size. You would have to count bytes sent, and call response.flushBuffer at the magic number to have any chance of controlling the chunk size. However, this should be a waste of time, since any working HTTP/1.1 client would know how to parse the chunk size sent in the response body. thanks Lior - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PORTLET live site examples?
Thanks for explaining how you use it Think you absolutely right, having a standard in a large institution is probably the governing concern. Now that I know what a portlet is, the next time I stick a hidden field in a form to control the backend logic and flow control, or include one JSP page in another, its always going to get me thinking about portlets. Its certainly interesting, in many ways I think programmers without even thinking about it, are using subliminal portlets already take that to the extremes of UI and biz logic separation, and you have portlets. the frameworks built on top of tomcat seem to be endless, just when I think I've seen it all, something else pops up, its no wonder this mailing list is so good. - Original Message - From: Jacob Rhoden [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, July 10, 2007 12:53 AM Subject: Re: PORTLET live site examples? I just thought of a very speciffic example that might make what i was saying clearer. Using the educational field again: Just say you have a central student enrollment online system. Faculty A just wants the student to fill out all forms, say Form 1, form 2 and form 3. However Faculty B says, we want Form 1, Form 2, Our funny form not in your system, form 3. And Faculty C says We just want Form 1, and form 3. Simply make all the forms Portlets, and put them in a portal. That way depending on the student they can be shown different portlets. This way no matter what strange and wacky way each of the clients in the company want the students to enroll, we can accommodate it by having everything turned into Portlets. (Sorry I cant give you a live example, ours is very secure) Best Regards, Jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Any way to check the client abruptly close the connection?
aaime74 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Johnny Kewl wrote: This is an interesting question, and I'm going to guess... If you in a JSP page, I dont think the error can be trapped. If you in a servlet, yes I think a try catch will detect it, but only if you actually write something. Which I can't do. The WMS is an international standard, I cannot bend it to my will, since the point of the application is to be fully conformant to it. This is a pity, I mean, the webapp container should have a way to check the socket is gone bye bye without writing on it, no? No, the Servlet-API doesn't have a mechanism to asynchronously notify a Servlet about much of anything (since all communication is required to take place on one thread). As Johnny mentioned before, you might be able to do this in Tomcat 6 by using the AIO (aka Comet) features. With the standard Servlet interface, Tomcat won't even look at the Socket until you decide to do a read/write, so will have no idea that the Socket is dead until then. Google on things like Comet and Ajax, and ask your doctor if it might be right for you ;-). Cheers Andrea -- View this message in context: http://www.nabble.com/Any-way-to-check-the-client-abruptly-close-the-connection--tf4043946.html#a11496790 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hide 501 error message
I tried to configure Apache with ErrorDocument 501 error.html howewer, it doesn't seem to take affect. That error message still appears when I try to connect via telnet and enter some characters. So I suspect that Tomcat doesn't return 501 error code but return normal html signaling the error. That's why Apache doesn't know about the error and render the appropriate error page. Any idea? Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 climbingrose, climbingrose wrote: I'm configuring Tomcat 6.0.10 behind Apache 2.0 using mod_jk 1.2.3. Everything is working beautifully but I want to hide 501 error when malicious user try to access the server. I assume you always want to hide these messages, since it's difficult to determine whether a user is malicious or not. # telnet localhost 80 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. alsfjalsfjsdf htmlheadtitleApache Tomcat/6.0.10 - Error report/titlestyle!--H1 [snip] I don't want to show the message because it contains Tomcat information as well as revealing the technology I'm using on my website. Any ideas? Apache httpd is capable of sending an error document based upon any response code, and it can override that sent by Tomcat. For instance, you can have Apache httpd intercept 501 from Tomcat and display a page that contains no server information at all. Don't forget that your HTTP headers might leak information, too. Check the ServerTokens Apache httpd directive to make sure you aren't announcing your server version from Apache httpd. I'm sure you can turn off this version disclosure within Tomcat, too, but I can't remember how to do it. Check the archives, 'cause I'm sure this has been asked in the past. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkmDR9CaO5/Lv0PARAm1nAJ4005uxITWo45E8WkYNUFOP/2TvJgCeN9To bgiqRYZtKcLyIef/hJRmZNg= =a7uu -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Hide-501-error-message-tf4047399.html#a11514195 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: https in Tomcat 5.5 via basic JKS keytool keystore..not doing what it should !
From: Ben Iggulden [mailto:[EMAIL PROTECTED] Sent: 2007 July 09, Monday 20:12 keystore..not doing what it should ! I'm trying to verify this as the problem by closing Eclipse and running Tomcat directly Try running it from a command prompt rather than as a service. There may be some messages going to stdout that don't make it into the log. requests via https are getting no response at all that way. Can't reproduce your symptoms, and your config looks o.k. - IF you're not using the APR connector. If there's a tcnative-1.dll in Tomcat's bin directory, you're using APR, and the SSL config is completely different. If that's the case, either get rid of the .dll, or look here for the APR SSL configuration: http://tomcat.apache.org/tomcat-5.5-doc/apr.html - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Advice about Tomcat on x86_64 architecture..
From: Titi Wangsa [mailto:[EMAIL PROTECTED] Subject: Re: Advice about Tomcat on x86_64 architecture.. correct me if i'm mistaken, but i've read that the more memory you allocate for you Heap, the less thread you have, That's somewhat true with a 32-bit OS, but even then you can still get hundreds of threads with the maximum heap (~ 1.5 - 1.8 GB). On 64-bit systems, each process space is so large that there's no significant interaction. How many threads are you talking about and why do you think you need so many? - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: https in Tomcat 5.5 via basic JKS keytool keystore..not doing what it should !
That's done it ! Thanks indeed for sharing your knowledge here Chuck. Here on dev I've done the simple thing of removing the APR .dll but when I try this on a live-like build next week I can see myself spending some quality time with that APR section of the manual you've pointed me towards. Now I look again at the large bold warning atop the SSL how-to I see just what I'd managed to miss... -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: 10 July 2007 13:42 To: Tomcat Users List Subject: RE: https in Tomcat 5.5 via basic JKS keytool keystore..not doing what it should ! From: Ben Iggulden [mailto:[EMAIL PROTECTED] Sent: 2007 July 09, Monday 20:12 keystore..not doing what it should ! I'm trying to verify this as the problem by closing Eclipse and running Tomcat directly Try running it from a command prompt rather than as a service. There may be some messages going to stdout that don't make it into the log. requests via https are getting no response at all that way. Can't reproduce your symptoms, and your config looks o.k. - IF you're not using the APR connector. If there's a tcnative-1.dll in Tomcat's bin directory, you're using APR, and the SSL config is completely different. If that's the case, either get rid of the .dll, or look here for the APR SSL configuration: http://tomcat.apache.org/tomcat-5.5-doc/apr.html - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
My web application gets hanged.
Hi all, I have problem with my web application which hanges after 2 to 3 transations. I am using JSF for GUI, managed beans, Hibernate and using Tomcat 6.0.10. I thought it would be session problem so i have changed my session settings in web.xml, but it didn't work. Later i thought it would be memory problem so i have changed the heap size using the JVM parameters. I have set JAVA_OPTS in catalina.bat to -Xms100m -Xmx400m -server, but i didn't find any change. Please help me out with an appropriate solution. I would be very thank full to you. regards Ram =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
Re: core_output_filter error for apache/tomcat JK connector
Hi, here are further information about the environment and answers to the below question -Tomcat and apache are on two different servers ( separated by a firewall) -Tomcat 5.5.23 is running on Sun JDK 1.5.0_12 -Direct connection to tomcat http connector ( 8080 ) works fine. -Yes, we are able to connect from Apache server to Tomcat server over JK connector port 8009 -i haven't done any configuration on the tomcat side. and as for the webserver, i have attached the workers.properties file - Thread dump of the tomcat ( during the hung condition ) does not show anything unusual. there are few normal requests. -There is no error on mod_jk.log file, ( log level is set to error mode), on the apache error log we see the following error. [Mon Jul 09 11:27:19 2007] [info] (104)Connection reset by peer: core_output_filter: writing data to the network [Mon Jul 09 11:27:19 2007] [info] (32)Broken pipe: core_output_filter: writing data to the network [Mon Jul 09 11:27:23 2007] [info] (104)Connection reset by peer: core_output_filter: writing data to the network [Mon Jul 09 11:27:23 2007] [info] (32)Broken pipe: core_output_filter: writing data to the network - YES, restarting the apache server is the only option fix this behaviour. This setup is suppose to go to Staging, so for now, we are using JK2 connector and it is running fine, but we want to back to JK 1.2 as JK2 is not supported any more. with the jk2 connector the system is fine for almost 18 hours now. http://www.nabble.com/file/p11515063/workers.properties workers.properties Rainer Jung-3 wrote: - Which version of Java? - What does a thread dump of Tomcat give (kill -QUIT, result goes to catalina.out) - Does direct connect to Tomcat http connector still work? - Can you still connect from the Apache server to the Tomcat jk connector via telnet? - What's the config of your jk conector (tomcat side) and of mod_jk? - What are the contents of the mod_jk log file and the Apache error log? - If it happens, will restarting only Apache fix the hang? nageshsrao wrote: we have upgraded our environment to following software specs. on Redhat AS 3.0 (update 8), tomcat 5.5.23, apache 2.0.46 and JK 1.2.23 plugin. intermittently we see the following error in the error log of tomcat and then the whole site just gets hung. and no users will be to procede with any operation. this is suppose to go to Staging, could help us getting this resolved. [Mon Jul 09 11:27:19 2007] [info] (104)Connection reset by peer: core_output_filter: writing data to the network [Mon Jul 09 11:27:19 2007] [info] (32)Broken pipe: core_output_filter: writing data to the network [Mon Jul 09 11:27:23 2007] [info] (104)Connection reset by peer: core_output_filter: writing data to the network [Mon Jul 09 11:27:23 2007] [info] (32)Broken pipe: core_output_filter: writing data to the network let us know if any further information required, i will upload it immediately. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/core_output_filter-error-for-apache-tomcat-JK-connector-tf4048993.html#a11515063 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: request timeout over https
Turns out this was related to an unintended use of APR via the tcnative-1.dll file. Fixes include: - removal of the tcnative-1.dll file from the Tomcat bin dir - using an APR friendly SSL configuration as described under http://tomcat.apache.org/tomcat-5.5-doc/apr.html All credit to Chuck Caldarale for setting me to rights on this one. -Original Message- From: Ben Iggulden [mailto:[EMAIL PROTECTED] Sent: 09 July 2007 16:38 To: users@tomcat.apache.org Subject: request timeout over https I'm configuring a Tomcat 5.5 instance to use HTTPS. It's a fresh install, with a Sun Java 5 JVM. To config HTTPS I've followed the server.xml/how-to by generating a .keystore using the password changeit and uncommenting the SSL/HTTP1.1 connector on port 8443. I've also thrown fast common access log valve on by uncommenting that. At this point, the server starts with no errors logged and everything works fine over HTTP:8080. But any URL that I hit via HTTPS:8443 gets no response and nothing is logged in the access log, and nothing is reported in any log (level = warn). If I leave the connection timeout to 20 seconds, Firefox reports The connection was interrupted and IE7 says that I don't appear to be connected to the internet. If I set that to 0 then the browser just sits and waits patiently for that response over HTTPS that's definitely not coming ! I've ruled my firewall being funny with port 8443 out as a problem, because if I run Tomcat through Eclipse WST (which picks up a marginally different server.xml which loads the same app out of my development environment instead of /webapps) I can hit it fine. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]