Re: Tomcat6 - Context - aliases
Christopher Schultz-2 wrote Do you really need crossContext=true here? I guess not since - as I just tested - removing it doesn't change anything... Thank you. So I removed the crossContext attribute (and the path attribute) and the new contents of an_alias_1.xml are: -- Context docBase=/home/d1 / -- Christopher Schultz-2 wrote This is the first time you mentioned webapp w. Is that the main webapp? Yes. Christopher Schultz-2 wrote Why is that a problem? Actually I realized that even with the previous mechanism I used (using the aliases attribute of the Context element of the w/WEB-INF/context.xml file), I could directly retrieve a resource by typing its exact URL in a browser and without having to identify in any way prior to the retrieval... Christopher Schultz-2 wrote If you want /w/an_alias_1, then re-name your context deployment descriptor: $ mv an_alias_1.xml w\#an_alias_1.xml ... Actually, this is what I did but I didn't want to complicate my answer. Thank you. Christopher Schultz-2 wrote Maybe you just want to make it look like the resource belongs to the webapp. To the Webapp w, yes. Thank you for your comments and your interest. Best regards. -- View this message in context: http://tomcat.10.n6.nabble.com/Tomcat6-Context-aliases-tp4678430p4692232.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Accessing USB drive content from pages served from tomcat6 server
Hello Souvik, BTW, it's not Konstantin who had a problem but me. Try this: 1) Create a usb_1.xml file in /etc/tomcat6/Catalina/localhost/ (the OS being Debian Squeeze) with the following contents: Context docBase=/media/WCF/usb_1 / (Think about removing the extra spaces I added above). 2) (Optional) Restart Tomcat. usb_1.xml should normally be deployed. 3) Then try accessing a resource in /media/WCF/usb_1/ by typing in your browser a URL starting with: http://hostname[:8080]/usb_1/a_resource_in_/media/WCF/usb_1 Best regards. Léa -- View this message in context: http://tomcat.10.n6.nabble.com/Accessing-USB-drive-content-from-pages-served-from-tomcat6-server-tp4684002p4692256.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem tomcat
Fairouz, On 4.4.2012 17:25, Fairouz Fakhfakh wrote: I use Tomcat 6 and java 5. Good to know. Send us exact versions for both. OS type and version could also be informative. I have a problem by clicking on a button to access a JSP page. Which button? If the button is on the HTML/JSP page, please send us that page so we can understand what is going on. java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer.init(Lorg/eclipse/jdt/internal/compiler/env/IBinaryType;)V Smells like a classpath issue. -Ognjen - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SEVERE: Unable to start cluster.
* Yes we have distributable/ in web.xml* * Below is the full server.xml for all the tomcats.* ?xml version='1.0' encoding='utf-8'? Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / 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 / Resource name=xyz auth=Container type=javax.sql.DataSource driverClassName=xyz.Driver url=jdbc url username=xyz password=xyz maxActive=150 maxIdle=10 maxWait=3 removeAbandoned=true removeAbandonedTimeout=120 logAbandoned=true / /GlobalNamingResources Service name=Catalina Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true maxThreads=150 scheme=https secure=true clientAuth=false sslProtocol=TLS / Connector port=8009 protocol=AJP/1.3 redirectPort=8443 backlog=100 maxThreads=4 / Engine name=Catalina defaultHost=localhost jvmRoute=t5 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster channelSendOptions=6 Manager className=org.apache.catalina.ha.session.BackupManager expireSessionsOnShutdown=false notifyListenersOnReplication=true mapSendOptions=6/ Channel className=org.apache.catalina.tribes.group.GroupChannel Membership className=org.apache.catalina.tribes.membership.McastService address=228.0.0.4 port=45564 frequency=500 dropTime=3/ Receiver className=org.apache.catalina.tribes.transport.nio.NioReceiver address=auto port=4000 selectorTimeout=5000 timeout=6 maxThreads=6/ Sender className=org.apache.catalina.tribes.transport.ReplicationTransmitter Transport className=org.apache.catalina.tribes.transport.nio.PooledParallelSender timeout=6 keepAliveCount=0/ /Sender Interceptor className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/ Interceptor className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/ /Channel Valve className=org.apache.catalina.ha.tcp.ReplicationValve filter=.*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt/ Valve className=org.apache.catalina.ha.session.JvmRouteBinderValve/ ClusterListener className=org.apache.catalina.ha.session.ClusterSessionListener/ ClusterListener className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/ /Cluster Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server * Below is the context.xml* ?xml version='1.0' encoding='utf-8'? Context WatchedResourceWEB-INF/web.xml/WatchedResource ResourceLink name=xyz global=xyz type=javax.sql.DataSource/ /Context still it is throwing error while deploying apps. WARNING: Unable to send map start message. Apr 5, 2012 1:37:12 PM org.apache.catalina.ha.session.BackupManager start SEVERE: Unable to start BackupManager java.lang.RuntimeException: Unable to start replicated map. at org.apache.catalina.tribes.tipis.AbstractReplicatedMap.init(AbstractReplicatedMap.java:230) Failed to start BackupManager: java.lang.IllegalArgumentException: Listener already exists:{}[org.apache.catalina.tribes.tipis.LazyReplicatedMap] On Fri, Apr 6, 2012 at 2:31 AM, Mark Eggers its_toas...@yahoo.com wrote: Response at the bottom: /mde/ From: Dhaval Jaiswal dhaval.jais...@via.com To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, April 5, 2012 10:28 AM Subject: Re: SEVERE: Unable to start cluster. pfa server.xml The same i am using for all the 10 tomcats. On Thu, Apr 5, 2012 at 9:55 PM, Pid p...@pidster.com wrote: On 05/04/2012 15:13, Dhaval Jaiswal wrote: I have tested the below cluster manager; as per the instruction i have changed. However, when we try to deploy the apps on tomcat it was throwing error that
Prevent cleartext keystore/truststore passwords via JMX
Hi, I've been upgrading from Tomcat 6 to Tomcat 7 (7.27) and I've noticed that the keystore and truststore passwords are exposed via JMX in cleartext (in the bean JIoEndpoint). This was not the case in Tomcat 6, for example JIoEndpoint bean which was exposed had much fewer attributes. I have specified the passwords as attributes in the HTTPS connector tag in server.xml. Here an example with an otherwise unmodified Tomcat 7: http://postimage.org/image/400y2pqsr/ How can I prevent that data to be exposed (as cleartext), as well as the keystore and truststore path? Thanks - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Where can I find slow query log produced by tomcat-jdbc?
Pool works nice, but I get empty logs/pool.2012-04-06.log No debug messages, no slow query's. Configuration below --- datasource.xml: bean id=dataSourceOnline class=org.apache.tomcat.jdbc.pool.DataSource destroy-method=close p:driverClassName=oracle.jdbc.driver.OracleDriver p:url=${jdbcPortalUrl} p:username=${jdbcUser} p:password=${jdbcPass} p:connectionProperties=oracle.jdbc.defaultNChar=true;oracle.jdbc.convertNcharLiterals=true;oracle.jdbc.ReadTimeout=${jdbcTimeOut}; p:jdbcInterceptors=SlowQueryReport(threshold=10);ConnectionState;StatementFinalizer p:initialSize=10 p:minIdle=10 p:maxIdle=100 p:maxActive=5000 p:maxWait=6000 p:jmxEnabled=true p:removeAbandoned=true p:removeAbandonedTimeout=130 p:logAbandoned=true p:testOnBorrow=false p:testOnReturn=false p:testWhileIdle=false p:useEquals=false p:fairQueue=false p:timeBetweenEvictionRunsMillis=3 p:minEvictableIdleTimeMillis=3 p:validationInterval=180 p:validationQuery=SELECT 1 FROM DUAL / --- ${catalina.home}/conf/logging.properties: handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, 5pool.org.apache.juli.FileHandler,, java.util.logging.ConsoleHandler 5pool.org.apache.juli.FileHandler.level = ALL 5pool.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 5pool.org.apache.juli.FileHandler.prefix = pool. org.apache.tomcat.jdbc.level = ALL org.apache.tomcat.jdbc.handlers = 5pool.org.apache.juli.FileHandler --- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat6 - Context - aliases
Léa, Léa Massiot wrote: ... Actually I realized that even with the previous mechanism I used (using the aliases attribute of the Context element of the w/WEB-INF/context.xml file), I could directly retrieve a resource by typing its exact URL in a browser and without having to identify in any way prior to the retrieval... I think that what we are missing here, is what exactly you are trying to achieve. And personally (no offense intended) I have the feeling that what you are trying to do is fairly simple and classic, but that the way you are going about it makes it complicated and probably unsafe. Let me try to summarise. 1) upload of documents/files : - Users are able to access the webserver and to upload files/documents to it. You have not told us how that works, if there are several users or just one, if all users are uploading to the same location, if this capability is restricted (login) and so on.. - when a user uploads a file/document, this file/document gets written somewhere on the webserver. Where ? are there several upload locations ? and how is it decided what gets written where ? if 2 users upload a file/document with the same filename, does the second one overwrite the first ? 2) download of files/documents : - Users can (should) login to the webserver, and after that they are able to download files/documents. Do all users have access to all uploaded documents ? should it be so that each user (or group of users) only gets access to his own documents ? When a gicen user logs in, does he get a list of all the documents ? or a list of only his documents ? Does your application (/w ?) build a list of the files, as a html page with links, on which the user can just click to download a file/document ? and if so, what does bother you about the exact look of that link ? the user does not see the URL, he sees only what you choose to display, right ? iow in the link : a href=/an_alias_1/file_1.txtfile_1.txt/a the user only see the file_1.txt part, right ? And if the link was : a href=/w/something-else-altogether/12345file_1.txt/a the user would still only see file_1.txt, right ? So, if I summarise, the only part which is somewhat iffy, is that in your mechanism via Context, you are providing a URL which allows any user to just use that URL to retrieve a document (his or someone else's), without even having to login. But this is a logical consequence of building a context from scratch, outside of you /w context, and having Tomcat serve it, without any kind of security protecting that location. In other words, why not store the documents in a directory below your /w context (which would be protected by the web.xml of the /w context, and provide the user with a link like : a href=/w/files/userx/file_1.txtfile_1.txt/a I guess that I don't see why you would have to go through the bother of creating another Context on-the-fly (and then one without any access-control whatsovever). Of course, you /could/ store the files somewhere else, but then if that is a separate Tomcat context, you would need a separate authentication - or a cross-context authentication. And if that location is not a Tomcat context, then you would need your webapp to also retrieve and deliver the files to the clients (which is quite simple, and is the way I would have looked at it in the first place; and this would allow you to control who can access what). By the way, have you looked at the DAV application available for Tomcat ? See : http://wiki.apache.org/tomcat/Tomcat/WebDav - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where can I find slow query log produced by tomcat-jdbc?
- Original Message - Pool works nice, but I get empty logs/pool.2012-04-06.log No debug messages, no slow query's. Configuration below Maybe you have really fast queries? I believe if you set threshold=-1, it should log all queries. Not something you'd want to do in production, but it might help to further troubleshoot the issue. Dan --- datasource.xml: bean id=dataSourceOnline class=org.apache.tomcat.jdbc.pool.DataSource destroy-method=close p:driverClassName=oracle.jdbc.driver.OracleDriver p:url=${jdbcPortalUrl} p:username=${jdbcUser} p:password=${jdbcPass} p:connectionProperties=oracle.jdbc.defaultNChar=true;oracle.jdbc.convertNcharLiterals=true;oracle.jdbc.ReadTimeout=${jdbcTimeOut}; p:jdbcInterceptors=SlowQueryReport(threshold=10);ConnectionState;StatementFinalizer p:initialSize=10 p:minIdle=10 p:maxIdle=100 p:maxActive=5000 p:maxWait=6000 p:jmxEnabled=true p:removeAbandoned=true p:removeAbandonedTimeout=130 p:logAbandoned=true p:testOnBorrow=false p:testOnReturn=false p:testWhileIdle=false p:useEquals=false p:fairQueue=false p:timeBetweenEvictionRunsMillis=3 p:minEvictableIdleTimeMillis=3 p:validationInterval=180 p:validationQuery=SELECT 1 FROM DUAL / --- ${catalina.home}/conf/logging.properties: handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, 5pool.org.apache.juli.FileHandler,, java.util.logging.ConsoleHandler 5pool.org.apache.juli.FileHandler.level = ALL 5pool.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 5pool.org.apache.juli.FileHandler.prefix = pool. org.apache.tomcat.jdbc.level = ALL org.apache.tomcat.jdbc.handlers = 5pool.org.apache.juli.FileHandler --- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where can I find slow query log produced by tomcat-jdbc?
Just saw this too. https://issues.apache.org/bugzilla/show_bug.cgi?id=51237 You might want to check what version you are using. Dan - Original Message - Pool works nice, but I get empty logs/pool.2012-04-06.log No debug messages, no slow query's. Configuration below --- datasource.xml: bean id=dataSourceOnline class=org.apache.tomcat.jdbc.pool.DataSource destroy-method=close p:driverClassName=oracle.jdbc.driver.OracleDriver p:url=${jdbcPortalUrl} p:username=${jdbcUser} p:password=${jdbcPass} p:connectionProperties=oracle.jdbc.defaultNChar=true;oracle.jdbc.convertNcharLiterals=true;oracle.jdbc.ReadTimeout=${jdbcTimeOut}; p:jdbcInterceptors=SlowQueryReport(threshold=10);ConnectionState;StatementFinalizer p:initialSize=10 p:minIdle=10 p:maxIdle=100 p:maxActive=5000 p:maxWait=6000 p:jmxEnabled=true p:removeAbandoned=true p:removeAbandonedTimeout=130 p:logAbandoned=true p:testOnBorrow=false p:testOnReturn=false p:testWhileIdle=false p:useEquals=false p:fairQueue=false p:timeBetweenEvictionRunsMillis=3 p:minEvictableIdleTimeMillis=3 p:validationInterval=180 p:validationQuery=SELECT 1 FROM DUAL / --- ${catalina.home}/conf/logging.properties: handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, 5pool.org.apache.juli.FileHandler,, java.util.logging.ConsoleHandler 5pool.org.apache.juli.FileHandler.level = ALL 5pool.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 5pool.org.apache.juli.FileHandler.prefix = pool. org.apache.tomcat.jdbc.level = ALL org.apache.tomcat.jdbc.handlers = 5pool.org.apache.juli.FileHandler --- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: request.login() not persistent
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jerry, On 4/5/12 6:11 PM, Jerry Malcolm wrote: Konstantin, I was using: META HTTP-EQUIV=Refresh CONTENT=0; URL=/userhome I changed it per your comment to: % response.sendRedirect( response.encodeRedirectURL( /userhome )); % A more minimal change would have been this: META HTTP-EQUIV=Refresh CONTENT=0; URL=%= response.encodeURL(/userhome) % I always use request.getContextPath() + ... when building URLs, too: that makes them relocatable. So the entire incantation would be: META HTTP-EQUIV=Refresh CONTENT=0; URL=%= response.encodeURL(request.getContextPath() + /userhome) % / (I used meta / as an XHTML tag instead of meta, there. I dunno what your content-type actually is, though). You'll also want to make sure that your login form encodes any session id information into the action attribute, in case a session already exists. Otherwise, your webapp won't work unless cookies are enabled. It's working now, but I have no clue what's going on. Read the javadoc for HttpServletResponse.encodeURL and HttpServletResponse.encodeRedirectURL. But I am apparently missing something major here, and I want to understand this. So please educate me a bit... Your client probably does not have the session id after you call login(). The javadoc for login() doesn't say anything about communicating a session id to the client, and I couldn't find in the spec document itself any mention of cookies and the login() method (though I didn't look terribly hard). I suspect that login() does not automatically set a Set-Cookie header on the response: you may have to do that yourself. You can tell easily by rolling-back your changes and looking at the HTTP traffic between your client and server during the login/login-again conversation. I completely understand the session philosophy and how the logon state is maintained in the session. When it was failing the session id did not change between the logon page and the redirect target page. As measured by what? So I'm assuming the session wasn't dropped. It's like the logged on state was not saved in the session object. According to the servlet spec, having a session and being logged-in are equivalent, as long as authentication has occurred once for form authentication. 1) The meta... html tag simply tells the browser when it reads the page to 'try again' at the new URL. In my mind that is no different from the user responding to something on a page and submitting a request for a new page. Why is the session logged-on state information somehow lost in that interaction when it is maintained if the user just hits a button and goes to another page? Possibly because you are not properly encoding the session id in the URL, coupled with loss or absence of the session cookie being sent in the response. 2) I assume the response.sendRedirect( ) with the encoded URL sends one of the 301 or 303 or something response codes back, right? In either case, meta... or 30x response code, why is the session info lost in one and not the other? See above. 3) The biggest concern I have is that it worked for several months on one machine with the meta... tag coding. If it worked, then it stopped, now it works again, and I don't know why, my assumption is that it's going to stop working again for me sometime in the future. What could I have done that made it work at one time on one machine and then stop? There could be several reasons, but the easiest thing that could have happened, as Chuck suggests, is that cookies were disabled on the client. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9/DMsACgkQ9CaO5/Lv0PDQrgCgttz9YAJh0E/Irq0cupx/kO1o ElAAn1mfiiQr90SU3pw9LMf95l41rzl+ =HMeM -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Accessing USB drive content from pages served from tomcat6 server
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Souvik, On 4/4/12 12:23 AM, souvik.da...@wipro.com wrote: I have a NPAPI plugin which gets a notification from my middleware whenever a USB MSD device is connected to the system. The HTML page which loads the plug-in then plays the Media (audio/video/pictures) that are present in the USB drive. This html page is served from a local tomcat server (the same PC to which the USB MSD device has been connected). To enable access to USB Device from the HTML page (served from tomcat6 server), I have added following lines in /etc/tomcat6/server.xml (in Ubuntu 10.10): Context path=/usb_0 docBase=/media/WCF/usb_0// So, first, you shouldn't put Context in server.xml. Search the archives and read the Tomcat User Guide for many reasons why not. Léa has the proper prescription for how to deploy a context outside of your appBase. When I am pluggin in the first USB device (which is mounted at /media/WCF/usb_0), I am able to access the device content from my HTML page (served from my tomcat6 server ) but when I am connecting the second USB device which is mounted at /media/WCF/usb_1, I am not able to access its content. What do you mean not able to access its content? Do you get 404s? 500s? Does the thread hang? Does the JVM crash? Tomcat caches certain information about the contexts it deploys. I suspect that by removing the webapp's docBase (or suddenly having it appear out of nowhere when a USB device is connected) is surprising to say the least. In the browser when I am trying to check the content of http://localhost:8080/usb_1/ by typing the URL in the address bar, I am getting error resource not available. For usb_0, I am able to see the resources. Does usb_0 always work and usb_1 never works? What happens when both devices are connected *before* you start Tomcat? What about when neither of them are connected beforehand? What about starting Tomcat with no USB devices, then trying to access the resources, then attaching the devices and trying again? All of those things would be good to know in order to help you out. Honestly, I'm not sure why you'd want to run a web server off a device which isn't guaranteed to be available. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9/DoMACgkQ9CaO5/Lv0PBfAACfVXlHAj4e5uNvBdXCZr2tkb+W WhgAn29GaUK25ShtOA4J0nvpGMgMPhRU =MQjC -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ognjen, On 4/6/12 7:15 AM, Ognjen Blagojevic wrote: Fairouz, On 4.4.2012 17:25, Fairouz Fakhfakh wrote: I use Tomcat 6 and java 5. Good to know. Send us exact versions for both. OS type and version could also be informative. I have a problem by clicking on a button to access a JSP page. Which button? If the button is on the HTML/JSP page, please send us that page so we can understand what is going on. java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer.init(Lorg/eclipse/jdt/internal/compiler/env/IBinaryType;)V Smells like a classpath issue. Or using class files compiled for another version of either JDT or Tomcat. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9/DvIACgkQ9CaO5/Lv0PDdhACffqrPzgqNp62aT0PUiDihzkGK yUkAoIZWW7ik33Jg1HPKSnvMITXJghcv =OOWv -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Prevent cleartext keystore/truststore passwords via JMX
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Randy, On 4/6/12 7:41 AM, Randy Gray wrote: Hi, I've been upgrading from Tomcat 6 to Tomcat 7 (7.27) and I've noticed that the keystore and truststore passwords are exposed via JMX in cleartext (in the bean JIoEndpoint). This was not the case in Tomcat 6, for example JIoEndpoint bean which was exposed had much fewer attributes. I have specified the passwords as attributes in the HTTPS connector tag in server.xml. Here an example with an otherwise unmodified Tomcat 7: http://postimage.org/image/400y2pqsr/ How can I prevent that data to be exposed (as cleartext), as well as the keystore and truststore path? I can think of a couple of options: 1. Modify org/apache/catalina/connector/mbeans-descriptors.xml and suppress access to these fields (though they aren't specifically in there, and MbeansDescriptorsIntrospectionSource.java doesn't seem to consult the mbeans-descrioptors.xml files). I've never done this, so I can't say whether or not it will work. 2. Use TLS for JMX connections. Technically speaking, this will not transmit your credentials in cleartext, though anyone who can connect can read your credentials. See below. 3. Use client certificates and/or username/password authentication to access your JMX connector. Anyone who can connect to those resources will probably be able to connect to other things, so having your trustStore password is probably the least of your worries. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9/ESgACgkQ9CaO5/Lv0PCnjQCfbUzxll2yk5usNQlQrBkvNh7R DCIAoJPEG65KmenExYgGtVpgGG7J880c =9y5M -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: jdbc pool properties
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel, On 4/4/12 8:46 AM, Daniel Mikusa wrote: - Original Message - My db connections seem to be lost after an extended period of inactivity (for a web application). And the only way to get the connections to work again is to restart tomcat. My tomcat.jdbc.pool.Datasource settings have: property name=maxActive value=100/ property name=maxIdle value=30/ property name=maxWait value=1000/ property name=defaultAutoCommit value=true/ property name=removeAbandoned value=true/ property name=removeAbandonedTimeout value=60/ You probably want to add testOnBorrow=true and validationQuery=SELECT 1 (or some other valid query for your DB). +1 See the following link for an explanation of those properties. https://commons.apache.org/dbcp/configuration.html - -1 This is the wrong documentation for tomcat-pool. You're looking for http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html On the other hand, there was no mention of a Tomcat version, what type of pool is actually being used (I inferred tomcat-pool from the subject line as well as the use of tomcat.jdbc.pool.DataSource) and the use of property elements seems antiquated, so I must admit I'm a little confused. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9/MWAACgkQ9CaO5/Lv0PCcOgCeJcRA6Oq2KcVSDE6vIAmQ+5Ji lJUAoL4QiLp1oZSBVkiaFYTrJTlK6Gkv =wFzD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: jdbc pool properties
I'm using tomcat 7, in a spring mvc application. The properties is in my spring-context.xml file. bean id=dataSource class=org.apache.tomcat.jdbc.pool.DataSource destroy-method=close property name=driverClassName value=com.mysql.jdbc.Driver/ property name=url value=jdbc:mysql://localhost/mydb/ property name=username value=testuser/ property name=password value=abc/ property name=maxActive value=100/ property name=maxIdle value=30/ property name=maxWait value=1000/ property name=defaultAutoCommit value=true/ property name=removeAbandoned value=true/ property name=removeAbandonedTimeout value=60/ property name=testOnBorrow value=true / property name=validationQuery value=SELECT 1 / /bean On Fri, Apr 6, 2012 at 2:09 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel, On 4/4/12 8:46 AM, Daniel Mikusa wrote: - Original Message - My db connections seem to be lost after an extended period of inactivity (for a web application). And the only way to get the connections to work again is to restart tomcat. My tomcat.jdbc.pool.Datasource settings have: property name=maxActive value=100/ property name=maxIdle value=30/ property name=maxWait value=1000/ property name=defaultAutoCommit value=true/ property name=removeAbandoned value=true/ property name=removeAbandonedTimeout value=60/ You probably want to add testOnBorrow=true and validationQuery=SELECT 1 (or some other valid query for your DB). +1 See the following link for an explanation of those properties. https://commons.apache.org/dbcp/configuration.html - -1 This is the wrong documentation for tomcat-pool. You're looking for http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html On the other hand, there was no mention of a Tomcat version, what type of pool is actually being used (I inferred tomcat-pool from the subject line as well as the use of tomcat.jdbc.pool.DataSource) and the use of property elements seems antiquated, so I must admit I'm a little confused. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9/MWAACgkQ9CaO5/Lv0PCcOgCeJcRA6Oq2KcVSDE6vIAmQ+5Ji lJUAoL4QiLp1oZSBVkiaFYTrJTlK6Gkv =wFzD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
can't find handler for element type
Hello, I use Tomcat 5.5 and java 5. I use: mmclient-webinterface-bin.war version1.2 from the site: http://www.semwebcentral.org/frs/?group_id=44 I have a problem by clicking on a button to access a JSP page. I get the following error in the log file of juddi: [http-8083-Processor25] ERROR org.juddi.handler.HandlerMaker - can't find handler for element type capability_search knowing that: capability_search is a java class. In in the command prompt of Tomcat, I get the following error: ERROR [http-8083-Processor23] (StandardWrapperValve.java:253) - Servlet.service () pour la servlet UDDIMatchMakerServlet a gÚnÚrÚ une exception Please, have you any idea about this problem? Thank you very much in advance.
Re: can't find handler for element type
2012/4/7 Fairouz Fakhfakh fairouz.fakhf...@gmail.com: Hello, I use Tomcat 5.5 and java 5. I use: mmclient-webinterface-bin.war version1.2 from the site: http://www.semwebcentral.org/frs/?group_id=44 I have a problem by clicking on a button to access a JSP page. I get the following error in the log file of juddi: [http-8083-Processor25] ERROR org.juddi.handler.HandlerMaker - can't find handler for element type capability_search knowing that: capability_search is a java class. In in the command prompt of Tomcat, I get the following error: ERROR [http-8083-Processor23] (StandardWrapperValve.java:253) - Servlet.service () pour la servlet UDDIMatchMakerServlet a gÚnÚrÚ une exception Please, have you any idea about this problem? No. It is not something from Tomcat. It should be something specific to that web application or framework that it is using. The error message was printed by org.juddi.handler.HandlerMaker class. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Accessing USB drive content from pages served from tomcat6 server
Hello Chris, Thanks a lot for responding to my post. [Chris]What do you mean not able to access its content? Do you get 404s? 500s? Does the thread hang? Does the JVM crash? [Souvik]: When I am trying to access the content of usb_1, I am getting 404 error. Here are the details: HTTP Status 404 message This is blank description The requested resource () is not available. [Souvik] [Chris]Q:What about starting Tomcat with no USB devices, then trying to access the resources, then attaching the devices and trying again? Ans: Only usb_0 works. [Chris]Q:What happens when both devices are connected *before* you start Tomcat? Ans: Only in this case I could access both the devices. [Chris] Honestly, I'm not sure why you'd want to run a web server off a device which isn't guaranteed to be available. [Souvik] Actually I am developing a HTML5 App which would run on an embedded target. One of the functionalities of the application is to allow user to playback and browse the media content available in an USB stick. Since I am using Webkit browser so some features of HTML5 do not run from file:// url and therefore the pages need to be served from a local web server. I have chosen tomcat for that. So it seems to achieve my goal, I need to first connect usb sticks to all the available usb ports on my target and then start tomcat6. As mentioned by you,is the server keeping this information in the cache so that in future when a USB device is connected to a port, it is able to make that out? Is this understanding correct? Regards, Souvik From: Christopher Schultz [ch...@christopherschultz.net] Sent: Friday, April 06, 2012 9:10 PM To: Tomcat Users List Subject: Re: Accessing USB drive content from pages served from tomcat6 server -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Souvik, On 4/4/12 12:23 AM, souvik.da...@wipro.com wrote: I have a NPAPI plugin which gets a notification from my middleware whenever a USB MSD device is connected to the system. The HTML page which loads the plug-in then plays the Media (audio/video/pictures) that are present in the USB drive. This html page is served from a local tomcat server (the same PC to which the USB MSD device has been connected). To enable access to USB Device from the HTML page (served from tomcat6 server), I have added following lines in /etc/tomcat6/server.xml (in Ubuntu 10.10): Context path=/usb_0 docBase=/media/WCF/usb_0// So, first, you shouldn't put Context in server.xml. Search the archives and read the Tomcat User Guide for many reasons why not. Léa has the proper prescription for how to deploy a context outside of your appBase. When I am pluggin in the first USB device (which is mounted at /media/WCF/usb_0), I am able to access the device content from my HTML page (served from my tomcat6 server ) but when I am connecting the second USB device which is mounted at /media/WCF/usb_1, I am not able to access its content. What do you mean not able to access its content? Do you get 404s? 500s? Does the thread hang? Does the JVM crash? Tomcat caches certain information about the contexts it deploys. I suspect that by removing the webapp's docBase (or suddenly having it appear out of nowhere when a USB device is connected) is surprising to say the least. In the browser when I am trying to check the content of http://localhost:8080/usb_1/ by typing the URL in the address bar, I am getting error resource not available. For usb_0, I am able to see the resources. Does usb_0 always work and usb_1 never works? What happens when both devices are connected *before* you start Tomcat? What about when neither of them are connected beforehand? What about starting Tomcat with no USB devices, then trying to access the resources, then attaching the devices and trying again? All of those things would be good to know in order to help you out. Honestly, I'm not sure why you'd want to run a web server off a device which isn't guaranteed to be available. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9/DoMACgkQ9CaO5/Lv0PBfAACfVXlHAj4e5uNvBdXCZr2tkb+W WhgAn29GaUK25ShtOA4J0nvpGMgMPhRU =MQjC -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message