Re: Exception loading custom Realm
Where did you put the classes? They have to go in either common/lib, or server/lib. Larry On 10/10/05, Surya Mishra [EMAIL PROTECTED] wrote: Hi, I created my own realm by extending UserDatabaseRealm. But when I start the tomcat server, I get the following exception. If I use UserDatabaseRealm, everything works fine. That means Tomcat can and does load the UserDatabaseRealm class without any problem. java.lang.NoClassDefFoundError: org/apache/catalina/realm/UserDatabaseRealm at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at org.apache.catalina.loader.StandardClassLoader.findClass( StandardClassLoader.java:485) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:820) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:721) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:803) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:721) at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java :252) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.catalina.util.CatalinaDigester.startElement( CatalinaDigester.java:65) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement (UnknownSource) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.Catalina.load(Catalina.java:489) at org.apache.catalina.startup.Catalina.load(Catalina.java:528) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424) java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424) Caused by: java.lang.NoClassDefFoundError: org/apache/catalina/realm/UserDatabaseRealm at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at org.apache.catalina.loader.StandardClassLoader.findClass( StandardClassLoader.java:485) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:820) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:721) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:803) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:721) at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java :252) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.catalina.util.CatalinaDigester.startElement( CatalinaDigester.java:65) at
Re: Exception loading custom Realm
Are both classes loaded by the same classloader? Larry On 10/10/05, Surya Mishra [EMAIL PROTECTED] wrote: common/lib But it doesn't have problem loading my custom realm. The problem is actually in loading the UserDatabaseRealm: java.lang.NoClassDefFoundError: org/apache/catalina/realm/UserDatabaseRealm Thanks -Surya On 10/10/05, Larry Meadors [EMAIL PROTECTED] wrote: Where did you put the classes? They have to go in either common/lib, or server/lib. Larry On 10/10/05, Surya Mishra [EMAIL PROTECTED] wrote: Hi, I created my own realm by extending UserDatabaseRealm. But when I start the tomcat server, I get the following exception. If I use UserDatabaseRealm, everything works fine. That means Tomcat can and does load the UserDatabaseRealm class without any problem. java.lang.NoClassDefFoundError: org/apache/catalina/realm/UserDatabaseRealm at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java :123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at org.apache.catalina.loader.StandardClassLoader.findClass( StandardClassLoader.java:485) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:820) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:721) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:803) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:721) at org.apache.commons.digester.ObjectCreateRule.begin( ObjectCreateRule.java :252) at org.apache.commons.digester.Rule.begin(Rule.java:200) at org.apache.commons.digester.Digester.startElement(Digester.java:1273) at org.apache.catalina.util.CatalinaDigester.startElement( CatalinaDigester.java:65) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement (Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement (UnknownSource) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch (Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument (Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.Catalina.load(Catalina.java:489) at org.apache.catalina.startup.Catalina.load(Catalina.java:528) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java :39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424) java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java :39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424) Caused by: java.lang.NoClassDefFoundError: org/apache/catalina/realm/UserDatabaseRealm at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java :123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at org.apache.catalina.loader.StandardClassLoader.findClass( StandardClassLoader.java:485) at org.apache.catalina.loader.StandardClassLoader.loadClass( StandardClassLoader.java:820
Can someone remove RTE - Meridian Club [EMAIL PROTECTED] from this list
No, not my email address, I know how to subscribe/unsubscribe, thatnks. This one needs to be removed: RTE - Meridian Club [EMAIL PROTECTED] Please? Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie question - Tomcat 5.0 and external Javascript files
You may be able to use this instead: src=js/EdiHost.js IDEA will get pissed about it, but it should work (I know it does for images). It is nice, because you can rename your context, and not break your webapp. :) Larry On 10/5/05, Pigott, Paul [EMAIL PROTECTED] wrote: Greetings, I'm having problems executing functions in an external javascript file. It's like the .js file can't be found. I was able to do this under Tomcat 4.0 but for some reason it's not working under Tomcat 5.0. The folder under webapps is /EdiHost and I've got another folder, /js, under /EdiHost. In my HTML, I've got the attribute SRC=/js/EdiHost.js in my SCRIPT tag. Any ideas anyone? TIA, Paul CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie question - Tomcat 5.0 and external Javascript files
Yeah, i just hate the tag inatag / / stuff. Messy. ;-) Larry On 10/5/05, Hassan Schroeder [EMAIL PROTECTED] wrote: Larry Meadors wrote: You may be able to use this instead: src=js/EdiHost.js It is nice, because you can rename your context, and not break your webapp. :) Or, if you're using JSTL, use: src=c:url value=/js/EditHost.js/ which has the added advantage of *not* being a relative path that'll only work if referenced from the base directory of the webapp, but *will* work regardless of changes to the webapp name... -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where'd catalina.sh go in 5.5.x ?
Hm, in my 5.5.9, it is in the bin directory... Larry On 10/4/05, Barnett, Brian W. [EMAIL PROTECTED] wrote: I am going through a tuturial on setting up JAAS with Tomcat. It says to modify $CATALINA_HOME/bin/catalina.sh or $CATALINA_HOME/bin/catalina.bat. The edit it suggests is something like this: JAVA_OPTS=-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas-myfile .conf Where would a change like this be made in Tomcat 5.5.x? TIA, Brian Barnett This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FAQ? shutdown.bat not killing java process on Windows
So, once you know the threads that are left, what is the cleanest way to kill them? I have had this problem too, but since it was on a *nix platform, and just used 'kill' to get rid of the parent process. Larry On 10/3/05, Jon Wingfield [EMAIL PROTECTED] wrote: Yep. It's a FAQ, but not in the FAQ. Tomcat not quitting generally means your webapp has started a non-daemon thread which does not exit when the webapp is destroyed. If so, shut them down in a ServletContextListener. If you aren't explicitly creating threads in your webapp then the usual culprits are database connections that haven't been closed (or any other client api to remote services that uses asynchronous messaging and/or keepalive semantics). To see a dump of the threads still active after you've run shutdown.bat do a CTRL-BREAK in the tomcat dos console. HTH, Jon Charles Fineman wrote: I started Tomcat using startup.bat. Everything goes fine. I use shutdown.batto bring it down. The server fields the request and shuts down a bunch of services (as evidenced by the messages I see). Sure enough, the server no longer responds to any requests. Unfortunately, the java process does not die. I have this problem whether I start Tomcat by hand or if I use the Sysdeo Eclipse plugin. This problem has been a thorn in my side for some time but since it only affects my development environment (we use it as a service in production and there are no problems) and I can kill the process by hand, I've not worried about it. It's annoying as heck though and I'm wondering if someone can shed some light. I searched around but (surprisingly!!) I didn't find anything similar to my situation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FAQ? shutdown.bat not killing java process on Windows
Heh, I'll call IBM and have them do just that. ;-) It happens in their JT400 classes. Larry On 10/3/05, David Delbecq [EMAIL PROTECTED] wrote: That's quite a problem ;) Actually your threads should be coded in such a way you may a send a notification in java telling him to finish his job. eg: myNonDaemonThreadICreatedMySelf.stopWorking(); which would set some flag in Thread and then code in your Thread reading the flag knows it has to stop in a clean way. In the past there was a way in java to 'kill' a Thread but this has been deprecated in the Thread api. Tomcat sends a ThreadDeathError to the thread if it tries to interact with its classloader after shutdown, unfortunately, this is not always enough has some Threads do a catch(Error) and then continue their job. The best thing you can do when you have the list of threads still alive after shutdown is to locate the irresponsible threads and fix their code :D Larry Meadors a écrit : So, once you know the threads that are left, what is the cleanest way to kill them? I have had this problem too, but since it was on a *nix platform, and just used 'kill' to get rid of the parent process. Larry On 10/3/05, Jon Wingfield [EMAIL PROTECTED] wrote: Yep. It's a FAQ, but not in the FAQ. Tomcat not quitting generally means your webapp has started a non-daemon thread which does not exit when the webapp is destroyed. If so, shut them down in a ServletContextListener. If you aren't explicitly creating threads in your webapp then the usual culprits are database connections that haven't been closed (or any other client api to remote services that uses asynchronous messaging and/or keepalive semantics). To see a dump of the threads still active after you've run shutdown.bat do a CTRL-BREAK in the tomcat dos console. HTH, Jon Charles Fineman wrote: I started Tomcat using startup.bat. Everything goes fine. I use shutdown.batto bring it down. The server fields the request and shuts down a bunch of services (as evidenced by the messages I see). Sure enough, the server no longer responds to any requests. Unfortunately, the java process does not die. I have this problem whether I start Tomcat by hand or if I use the Sysdeo Eclipse plugin. This problem has been a thorn in my side for some time but since it only affects my development environment (we use it as a service in production and there are no problems) and I can kill the process by hand, I've not worried about it. It's annoying as heck though and I'm wondering if someone can shed some light. I searched around but (surprisingly!!) I didn't find anything similar to my situation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Capturing User Passwords
Here is the code (this is for tomcat 4.1.x): if(log.isDebugEnabled()){ Principal principal = req.getUserPrincipal(); PropertyDescriptor[] pds; pds = PropertyUtils.getPropertyDescriptors(principal.getClass()); for(int i = 0; i pds.length; i++){ try { String name = pds[i].getName(); Object value = PropertyUtils.getProperty(principal, name); log.debug(pds. + name + = + value); } catch (Exception e) { e.printStackTrace(); } } } Larry On 9/28/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am trying to find a way of capturing a user's password so that I can have the user login to one of my web applications (which acts as a client), and pass it to a second application (which acts as the server). I know that I can retrieve the user from the ServletRequest using req.getUserPrincipal(). However, I do not know how I can retrieve the password. Can anyone offer any advice on whether this can be done and if so, the best way of doing it? [ I did attempt to use forms-based authentication and use a filter to capture the password whenever the j_security_check action was invoked. However, I read in another post that Tomcat does not allow filters to be placed on j_security_check. ] Once I have the password, I'd ideally be looking at converting it to a Credentials object, so that I could pass that to my second app, rather than passing the raw password. Does anyone know whether this can be achieved by using Tomcat's UserPasswordCredentials class? Also, to prevent the password been exposed in the URL posted from the login page, I'd also be looking to implement SSL. I presume that this will cause encryption problems. Does anyone have any advice about how I could work around this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Does Tomcat run better on Linux or Windows?
Eeek, this is almost like a which is better: vi or emacs? thread... Having used tomcat in both environments, here is my $0.02 on the topic: - Linux + more secure out of the box + simpler for more complex configurations + simpler for upgrades + usually more uptime + more controlled environment - Windows + simpler for simple configurations + easier to setup YMMV, Larry On 8/30/05, Chad Lester [EMAIL PROTECTED] wrote: Is Tomcat more stable on Linux or Windows 2003? What are the pros/cons of using it on each platform? Thank you in advance for your help and advice, Chad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making a Database Image Show Up on a Jsp Page
You could do it easily with a servlet - read the blob as a byte[], and server it up in response to a request to /myservlet/imageid/image.jpg, where /imageid/ is used to provide the id of the record that contains the image. Larry On 8/24/05, Philip Cote [EMAIL PROTECTED] wrote: I'm trying to write to binary data from a MySQL database into a jpeg file so I can show it on a jsp page but I'm not having much luck. My bean can create files outside the servlet / jsp context using the usual java.io classes. As I understand it, java.io classes aren't allowed for EJBs. Does this apply to plain java beans as well? If so, what are the alternatives for doing what I'm trying to do? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re: MAIL FAILURE
Come on, do we have a list admin who can remove this address? Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Please kill the MAIL FAILURE user
Do we have a list admin who can do this? Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Context-specific System.properties
Not by the looks of the javadocs..fwiw, what 3rd-party dependency is this, so I know to steer clear of it? Larry On 8/15/05, Nelson, Lorrin [EMAIL PROTECTED] wrote: I've got some 3rd-party dependencies that rely on System.Properties for part of their configuration. I'd like to use these same dependencies in multiple Contexts in a single Tomcat deployment. However, I'll want each Context to have different values for those System.Properties. Is there any way to pull this off? Thanks -Lorrin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: can I prevent DoS (Denial of Service) Attacks in JSP?
Hmm, that is like asking how to avoid automobile accidents. Larry On 8/2/05, Ben Bookey [EMAIL PROTECTED] wrote: Dear List, I have been asked if its possible to prevent DoS attacks inside Java (JSP/Servlet). I guess it is ... is this something however that TC would be configured to deal with, or must I do something myself. Whats normal ? Many thanks in advance! Best wishes Ben Bookey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie: Connection refused first time on Tomcat
You need the compatibility stuff: http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi Search for compat on that page, and you'll see it. Larry On 25 Jul 2005 18:52:00 GMT, David E. Shapiro [EMAIL PROTECTED] wrote: I have the same problem here. If you tail -f the catalina log it never completes the startup. It hangs trying to set the context for admin for me. Can somebody let us know what we are doing wrong? Bruce E. Stemplewski wrote on 7/25/05 2:54 am: I just installed Tomcat for the first time ever so please forgive the newbie question. I installed Apache Tomcat 5.5.9 Server and J2RE JSE 5.0 on an XP operating system. Tomcat starts up fine but when I try to go to the Welcome page, or the Manager Page. I get The connection was refused attempting to contact 127.0.0.1:8080 http://127.0.0.1:8080 in FireFox, IE gives me this page cannot be displayed. I check the Tomcat logs and the stdout log has a few entries that read: This release of Apache Tomcat was packaged to run on J2SE 5.0 or later. It can be run on earlier JVMs by downloading and installing a compatibility package from the Apache Tomcat binary download page. Any ideas what I should look at first? Bruce Stemplewski www.stempsoft.com http://www.stempsoft.com We are all in the same boat in a stormy sea, and we owe each other a terrible loyalty. G. K. Chesterton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dubugging tomcat
Start it with this (from $CATALINA_HOME/bin): ./catalina.sh jpda run Larry On 7/25/05, blackwater dev [EMAIL PROTECTED] wrote: Hello, I have fedora core 3 and have tomcat installed. I can start it up successfully using startup.sh but can't connect to localhost at localhost:8080. How can I debug this to see what is going on? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Max thread/session timeouts
Whoa! Someone forgot to take their meds today... To unsubscribe, e-mail: [EMAIL PROTECTED]http://a.apache.org Larry On 7/21/05, Warren Taylor [EMAIL PROTECTED] wrote: To unsubscribe, e-mail: [EMAIL PROTECTED]
Re: [OT] Relating source code to class code
Wehn you compile, you have to included debugging information. This can be done with the javac task in ant (debug=true), or on the commnad line for javac using the -g option. Larry On 7/5/05, Ciaran Hanley [EMAIL PROTECTED] wrote: Hi, Is there a way to build a webapp so that once deployed when an error is thrown that the stack trace will include the line in the java code which caused the error? Instead of (Unknown Source) coming up, have for example (LoginAction.java:115) as it does with other classes. Anybody know the steps to do this? Thanks application.db.DataManagerException: There was an error trying to sign user in at application.db.SQLManager.doLogin(Unknown Source) at application.actions.LoginAction.verifyUser(Unknown Source) at application.actions.LoginAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:245) _ Ciaran Hanley Software Development Sentenial Ltd. Tel: 00 353 (1) 629 2403 Fax: 00 353 (1) 629 2147 Mob: 00 353 (0) 87 916 4943 E-Mail: [EMAIL PROTECTED] Web: www.sentenial.ie http://www.sentenial.ie/ _ Notice: The information in this e-mail is intended only for the named recipient and may be privileged or confidential. If you are not the intended recipient, please notify us immediately and do not copy, distribute or take any action based on this e-mail. Sentenial Ltd will not be liable for direct, special, indirect or consequential loss as a result of any virus being passed on or arising from alteration of the contents of this e-mail by a third party. All e-mail sent to or from this address is subject to archive and review by someone other than the intended recipient. Any opinions expressed in this e-mail are those of the individual and not necessarily those of Sentenial Ltd. All Personal Data acquired by Sentenial Ltd for which the Data Protection Act 1998 (the Act) applies shall be stored and processed in accordance with the Act. Should you wish to check, amend or remove the details of your Personal Data held by Sentenial Ltd, please contact us at mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in Resource declaration
Without more info, my guess is that it doesn't work. Maybe you could tell us *how* it doesn't work. Do you get an error? Does smoke pour out of your server? Do the lights dim? Throw us a bone here. Larry On 6/28/05, Behrang Saeedzadeh [EMAIL PROTECTED] wrote: Hi I want to define a DBCP pooled MySQL connection for a test application. The following definition is not working: ?xml version=1.0 encoding=UTF-8? Context path=/Hibernate-02 Resource name=jdbc/Hibernate02 scope=Shareable type=javax.sql.DataSource auth=Container/ ResourceParams name=jdbc/Hibernate02 parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- DBCP database connection settings -- parameter nameurl/name valuejdbc:mysql:///Hibernate02?user=rootamp;password=bsaku2633amp;autoReconnect=true/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter !-- DBCP connection pooling options -- parameter namemaxWait/name value3000/value /parameter parameter namemaxIdle/name value100/value /parameter parameter namemaxActive/name value10/value /parameter /ResourceParams /Context But the following definition works: ?xml version=1.0 encoding=UTF-8? Context path=/Hibernate-02 Resource name=jdbc/Hibernate02 auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=root password=bsaku2633 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql:///Hibernate02?autoReconnect=true/ /Resource /Context Any ideas what's wrong with the first declaration? -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa Using Opera's revolutionary e-mail client - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Q] when to share jars
How many web apps do you have? Put the jar in shared, and you get to restart them all anyway...on each shared jar update. I am sure your users will love that. ;-) Larry On 6/15/05, teknokrat [EMAIL PROTECTED] wrote: delbd wrote: Then put those libs in WEB-INF/lib too And if we need to fix a problem in a shared library, redeploy all our webapps?? I don't think so - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Q] when to share jars
Amen brother! Sharing jars between web apps is just a Bad Idea (tm). Disk is cheap, and so is the time required to copy a jar. ...unless you are an ISP with 1000+ web apps running on a sinlge box, then it *might* be OK, but even then, I would stop and think very carefully before doing it. Larry On 6/14/05, Tim Funk [EMAIL PROTECTED] wrote: Never. I share jars. I wish I hadn't. When you upgrade JSTL, struts, etc - all get the upgrade for free - but that means ultra stable apps which haven't been touched in years may magically break. [Exception - log4j ... I like have a common/lib log4j] -Tim Charl Gerber wrote: When do you share jars (struts, log4j, jstl, etc) for webapps in the common/lib directory and when does each app need its own copy of the jars? Log4j we've found by trail and error is better to have a jar per webapp, as the loggers seems to overwrite each other, but which commonly used jars (struts, jstl) can be shared? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get user's password from tomcat
The principle may contain it, but you would have to get it via reflection or cast it to it's original type to see it. Larry On 6/2/05, Jo [EMAIL PROTECTED] wrote: Hi all, Once Tomcat has authenticated a login, we can get the the authenticated user's name from the request's getRemoteUser() or getUserPrincipal() methods. Is there a way to get the user's password when the authentication type is form-based or single-sign-on ? Thanks a lot. Jo.- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get user's password from tomcat
Since we're talking tomcat, you can generally cast the principle to generic principle: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/realm/GenericPrincipal.html It has a getPassword() method. I do not know if that password gets hashed...it never was with any of the realms i have used. Larry On 6/4/05, Digby [EMAIL PROTECTED] wrote: I'm not sure you're supposed to be able to get it. Also, what would you expect to get if the password was hashed? Can you not just read the password from the database / ldap source? Digby Larry Meadors wrote: The principle may contain it, but you would have to get it via reflection or cast it to it's original type to see it. Larry On 6/2/05, Jo [EMAIL PROTECTED] wrote: Hi all, Once Tomcat has authenticated a login, we can get the the authenticated user's name from the request's getRemoteUser() or getUserPrincipal() methods. Is there a way to get the user's password when the authentication type is form-based or single-sign-on ? Thanks a lot. Jo.- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot download files with IE through tomcat. SSL with no-cache problems?
Hey! I had that problem too, and the fix is as sexy as any windows fix: Edit the registry! [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings] BypassSSLNoCacheCheck=dword:0001 This tells IE that it is OK to use cached data that was delivered over SSL. I know of no other way to set this value. Larry On 5/6/05, Donny R Rota [EMAIL PROTECTED] wrote: On Apache Tomcat/5.0.28, I've got SLL installed, and whenever I try to download a doc file I get: Some files can harm your computer. If the file information below looks suspicious, or you do not fully trust the source, do not open or save this file File name: x.doc File type: Microsoft Word Document From: yyy.ibm.com http://yyy.ibm.com Open Save Cancel More Info I click Open and then the folloing file download dialog comes up: Internet Explorer cannot download .doc from y.ibm.comhttp://y.ibm.com Internet Explorer was not able to open this Internet Site. The requested site is either unavailable or cannot be found. Please try again later. OK Downloading works fine in FireFox. Downloading works fine if I turn off SSL. We have an apache server (full httpd server) inhouse where this type of SSL download works fine too. Is there a SSL no-cache setting I have to put in server.xml or something? Thanks ...Don... -- Don Rota, CTG Operations Rational Software, IBM Software Group 20 Maguire Road, Lexington, MA 02421-3104 Tel: 781 676 2655, Fax: 781 676 7645 [EMAIL PROTECTED]
Re: Common vs. Shared
Common is available globally to the server, and to all of the web-applications. Shared is available globally, but only to all of the web-applications. IMO, both are bad places to put stuff unless you *really need* to. Larry On 5/5/05, Michael Oliver [EMAIL PROTECTED] wrote: I am quite sure this has been asked and answered but I googled a bunch of combinations and didn't find the answer, so I am sure someone here will know and share. What is the difference between the /common/ and /shared/ I understand this is a class loader issue, and I have read the comments in catalina.properties. What would go into 'common' that wouldn't go into 'shared' and vice versa? If a jar is in /common/lib/ and a different version of that jar is in /shared/lib/ what will be the effect? Similarly, if I modify catalina.properties and add something to 'common' that is already in 'shared', etc. Understanding the relationship between 'common' and 'shared' and the intended use thereof should be of interest to more than just me. Ollie http://www.sourceonenet.com Loosely Coupled *Mike Oliver* *CTO* *Alarius Systems LLC* 6800 E. Lake Mead Blvd Apt 1096 Las Vegas, NV 89156http://maps.yahoo.com/py/maps.py?Pyt=Tmapaddr=6800+E.+Lake+Mead+Blvdcsz=Las+Vegas%2C+NV+89156country=us [EMAIL PROTECTED] [EMAIL PROTECTED] IM: [EMAIL PROTECTED] http://www.alariussystems.com/ tel: fax: mobile: (702)643-7425 (702)974-0341 (518)378-6154 *Add me to your address book...*https://www.plaxo.com/add_me?u=25769982367v0=355403k0=305933374 *Want a signature like this?* http://www.plaxo.com/signature
Re: Unsubscribe me!!!!!!!!!!!!!!!!!!!!!!!
At the bottom of EVERY EMAIL you get from this list, you'll find this: To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] It is even in english for your benefit. :-) Try it. If it does not work, read the response. It will tell you WHY it did not work. Follow those instructions. Larry
Re: development environment
Gentoo (2.4 kernel) on Intel 2.8GHz w/ 1GB RAM - IntelliJ IDEA.
Re: class path (UNCLASSIFIED)
Oh, and spaces in your install directory (despite that being the default) is a bad idea. On 4/13/05, Samara, Fadi N Mr ACSIM/ASPEX [EMAIL PROTECTED] wrote: Classification: UNCLASSIFIED Caveats: NONE Try compiling the class by including the path for servlet.jar in your javac command, if you haven't done that yet. -Original Message- From: S M [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 10:33 AM To: Tomcat Users List Subject: RE: class path (UNCLASSIFIED) I compiling it from the command prompt. The sourse code is in c:\javacode so i on cmd... i change directory to c:\javacodejavac HelloWorld.java Samara, Fadi N Mr ACSIM/ASPEX [EMAIL PROTECTED] wrote: Classification: UNCLASSIFIED Caveats: NONE I am sorry, but how are you compiling your class ? Are you using any IDE (i.e Eclipse, Jdeveloper) ? -Original Message- From: S M [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 10:07 AM To: Tomcat Users List Subject: RE: class path (UNCLASSIFIED) The same as before. C:\javacodejavac HelloWorld.java HelloWorld.java:2: package javax.servlet does not exist import javax.servlet.*; ^ HelloWorld.java:3: package javax.servlet.http does not exist import javax.servlet.http.*; ^ HelloWorld.java:5: cannot resolve symbol symbol : class HttpServlet location: class HelloWorld public class HelloWorld extends HttpServlet { ^ HelloWorld.java:7: cannot resolve symbol symbol : class HttpServletRequest location: class HelloWorld public void service(HttpServletRequest request, HttpServletResponse response) th rows ServletException, IOException { ^ HelloWorld.java:7: cannot resolve symbol symbol : class HttpServletResponse location: class HelloWorld public void service(HttpServletRequest request, HttpServletResponse response) th rows ServletException, IOException { ^ HelloWorld.java:7: cannot resolve symbol symbol : class ServletException location: class HelloWorld public void service(HttpServletRequest request, HttpServletResponse response) th rows ServletException, IOException { ^ 6 errors - Samara, Fadi N Mr ACSIM/ASPEX wrote: Classification: UNCLASSIFIED Caveats: NONE What errors are you getting again ? -Original Message- From: S M [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 9:47 AM To: Tomcat Users List; Jason Bainbridge Subject: Re: class path Hi These are the env. variables that I have set explicitly for tomcat 4.1installation lJAVA_HOME = C:\java\bin lCATALINA_HOME = C:\Program Files\Apache Group\Tomcat 4.1 CLASSPATH= .;C:\javacode;%CATALINA_HOME%;%CATALINA_HOME%\common\lib\servlet.jar;%J2EE_ HOME%\lib\j2ee.jar; I have the path =C:\java\bin; when i installed J2sdk1.4.2_06 These being the variables I am still getting that error log where the compiler cannot locate the servlet pakages. Hope you can assit further. Thanks. Jason Bainbridge wrote: On Apr 12, 2005 3:39 PM, S M wrote: sorry for the confusion, but i have set CLASSPATH, i echoed on cmd as mentioned and yes it shows me the CLASSPATH as listed below .;C:\javacode;%CATALINA_HOME%;%CATALINA_HOME%\common\lib\servlet.jar;%J2EE_ HOME%\lib\j2ee.jar; where ;C:\javacode had the source code. Have you explicityly set CATALINA_HOME as well? Does it have spaces in it? If so surround it with double quotes or move it to a path with no spaces. I don't think having servlet.jar and j2ee.jar in the same classpath is a good idea either. Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now Classification: UNCLASSIFIED Caveats: NONE - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now Classification: UNCLASSIFIED Caveats: NONE - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now Classification: UNCLASSIFIED Caveats: NONE
Re: multiple parameters and Laszlo
Use String.split(,) if you are on JDK1.4 or later to make it a String[]. If you are pre JDK1.4, you can use a java.util.StringTokenizer to accomplish a similar thing. Larry On 4/13/05, Guillaume Lederrey [EMAIL PROTECTED] wrote: Hello ! This is not directly Tomcat related, but more of a general servlet API question. I am developping an application with laszlo (www.openlaszlo.orghttp://www.openlaszlo.org) as the front end and a servlet backend. Laszlo is a rich-client framework based on flash. My problem is that when using a multiple select list, laszlo sends the parameters as : url?list=1,2,3,... instead of url?list=1list=2list=3 That means that I cannot use request.getParameterValues(). Do you know if there is an easy work around ? Or should I parse manually the , in the param string ? Thanks for your help ! Guillaume - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Retrieving driver-specific implementation of ResultSet
Why do you need that? On Apr 12, 2005 9:05 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, as Marco helped me to solve my previous problem, i'm now facing the next one. It seems the org.apache.tomcat.dbcp.dbcp.DelegatingResultSet does not provide any facility to retrieve the wrapped ResultSet. What i need is access to the driver specific implementation of the ResultSet for the used connection pool. DelegatingResultSet.getInnermostDelegate() only returns the innermost DelegatingResultSet instance. Is there any hack out there which provides something like DelegatingResultSet.getWrappedResultSet() ? Or does anyone have another/better idea to get access to the low-level implementation ? Thanx, so far Sebastian _ Diese E-Mail (ggf. nebst Anhang) enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind, oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail (and any attachment/s) contains confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _ _ Diese E-Mail (ggf. nebst Anhang) enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind, oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail (and any attachment/s) contains confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: class path
*http://tinyurl.com/6t89b* On Apr 12, 2005 2:03 PM, S M [EMAIL PROTECTED] wrote: Hi all, I am a first time user of Tomcat. I am able to see the Tomcat default page on http://localhost:8080/index.jsp Now, I want to compile HelloWorld.java using JDK 1.4, the program does not compile and fails with the following log --- C:\javacodejavac HelloWorld.java HelloWorld.java:2: package javax.servlet does not exist import javax.servlet.*; ^ HelloWorld.java:3: package javax.servlet.http does not exist import javax.servlet.http.*; ^ HelloWorld.java:5: cannot resolve symbol symbol : class HttpServlet location: class HelloWorld public class HelloWorld extends HttpServlet { ^ HelloWorld.java:7: cannot resolve symbol symbol : class HttpServletRequest location: class HelloWorld public void service(HttpServletRequest request, HttpServletResponse response) th rows ServletException, IOException { ^ HelloWorld.java:7: cannot resolve symbol symbol : class HttpServletResponse location: class HelloWorld public void service(HttpServletRequest request, HttpServletResponse response) th rows ServletException, IOException { ^ HelloWorld.java:7: cannot resolve symbol symbol : class ServletException location: class HelloWorld public void service(HttpServletRequest request, HttpServletResponse response) th rows ServletException, IOException { ^ 6 errors --- as it is not able to locate the servlet pakages. I have set the class_path as .;C:\javacode;%CATALINA_HOME%;%CATALINA_HOME%\common\lib\servlet.jar;%J2EE_HOME%\lib\j2ee.jar; where ;C:\javacode had the source code. Please help to get this compiled. Thanks in advance S. - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now
Re: Application Data sharing -- store large object?
Maybe I am missing something, but this sounds like a data model that should live in a database. That way, you could have your database layer (iBATIS or Hibernate) cahce it for you, and use standard APIs to get to the data. Larry On Apr 11, 2005 11:59 AM, Daxin Zuo [EMAIL PROTECTED] wrote: Stefan, Thank you for your reply. It is very helpful. I may use a CACHE as you mentioned. I like to ask another question. 1) The object I am going to cache is large, and dynamically changed according to users actions. 2) Currently our program runs with Tomcat/Apache, it has to support other java application servers -- Weblogic, ..., and different platforms -- Unix, Linux, Windows. Do you have instruction for the selection among the various CACHE plug-in? Thanks again. -Original Message- From: Stefan Frank [mailto:[EMAIL PROTECTED] Sent: Monday, April 11, 2005 12:04 AM To: 'Tomcat Users List' Subject: RE: Application Data sharing -- store large object? You should maybe take a look into the various caching-libraries available (ehcache, swarmcache, jboss-treecache etc.) - these libraries deal with cacheing, which is a little different from what the application/session-objects offer, as application and session have to be absolutely reliable. If you store something in it, you can safely expect to find it again. Therefore, this objects cannot deal with things like running out of memory - they cannot simply throw out objects, when things get too crowded. On the other hand, Cacheing-Systems always have policies to deal with such situations(eg. Swarm-cache dynamically adapts to your usage-patterns) and can throw out old or un-needed objects, whenever it gets too crowded - therefore, you cannot always expect an object that you put into the cache to be still present after a while - so you have to deal with refetching it, when you have nop cache-hit. You may want to look into O\R-Mapping Frameworks like hibernate: they already have these caches built in and take care of re-fetching objects, when they have expired from the cache. From a pure memory point of view, there is no difference. If you absolutely need your complex object 100% of the time, it makes no difference, if you keep it in the application or if you put it in an in-memory cache. Hope this helps stf -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Sonntag, 10. April 2005 19:23 To: Tomcat Users List Subject: Application Data sharing -- store large object? In my program, an object that contains a large amount of data (complicated data strustures) is used in many pages. When I start doing it, I heard that it is better to not store large object in Application. So I let the program create a new one when ever this object is needed. Now I like to question if it is good to put this object in Application. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Debugging tomcat startup
Realm implementations should go into server/lib. On Apr 2, 2005 12:16 AM, Anto Paul [EMAIL PROTECTED] wrote: On Apr 2, 2005 1:27 AM, Sasha Borodin [EMAIL PROTECTED] wrote: What is the motive to place jars in server/lib. These jars are not visible to applications.
Re: Debugging tomcat startup
Hey Sasha, I have been wanting to do an iBATIS realm for a while. Glad to see I am not alone. ;-) You have a couple of options. I use IDEA, and run tomcat externally. When I want to debug startup code, I set JPDA_OPTS (in setenv.sh/bat) to this: JPDA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y Most of that is already there (in tomcat 5.0.27 line 141 of catalina.sh), and tells the JVM to start the debugger in server mode using sockets, to listen on address 8000, and to suspend immediately, until a debugger attaches. Then, set your breakpoints, and start tomcat using this: $CATALINA_HOME/bin/catalina.sh jpda start Once it starts, you can attach, and debug everything starting at the beginning. Java rocks! :-D Larry On Apr 1, 2005 12:57 PM, Sasha Borodin [EMAIL PROTECTED] wrote: I'd like to solicit suggestions for debugging Tomcat startup - specifically various class initializations. I've written a custom Realm implementation; in it, I use some data access classes which use iBatis; these classes work great when used in a web application (all jars residing in the apps WEB-INF/lib); but I'm getting errors when these classes are initialized from jars in the server/lib directory at startup. If you have suggestions for how to debug the startup, especially from an IDE like Idea, please post. Also, if there are guidelines for where to place certain types of jars (common vs. server), please post a link. Right now I've got my jdbc jars in common/lib, and my custom Realm and data access classes (including ibatis related jars) in server/lib. Thanks for your help, -Sasha Borodin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using hibernate
I have used straight JDBC, Hibernate, and iBATIS. For me, the sweet spot is iBATIS. It provides very near the performance of JDBC, without the complexity. IMO, I will use ORM when database vendors support it directly, not when I have to wrap my database in a ORM layer. Larry On Sun, 13 Mar 2005 20:00:08 +0200, haim [EMAIL PROTECTED] wrote: We are planing to use object/relational persistence and query service like hibernate or Castor JDO. Does anyone have any recomaidations for the above? Does anyone has good/bad experience using similar technologies? Thanks Haim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
PDFs with IE - a fix
Sorry for the cross-post, but if anyone is having issues serving up pdfs to IE users over ssl, here is a fix for the browser: === [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings] BypassSSLNoCacheCheck=dword:0001 === It took us a few days to find this, so hopefully this will help someone else get it taken care of sooner. :-) Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Throughput and scalability
I do not think that anyone can answer that but you. It is so application specific that any answers we give would be SWAGs at best. Larry On Wed, 23 Feb 2005 14:25:32 -0800, Ross Poppel [EMAIL PROTECTED] wrote: Hi Tomcat Users - We are implementing Tomcat (with Axis) for HTML translation to a proprietary format (as a pass-thru). This is for submission to an external system (its pretty simple data) and back again. We were wondering if anyone has any ideas how you would size a box (Solaris/HP-UX based) if you want to get a specific throughput (x number of messages per second). Is there any guidelines anyone can recommend? --- Ross Poppel - [EMAIL PROTECTED] Solutions Architect, PORTAL Software Cell: (609) 744-2050 EFax: (617) 344-2585 SMS: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting userid of current authenticated user
look at the request, there is a user principle there that is the current user On Wed, 23 Feb 2005 22:58:32 -0600, J Malcolm [EMAIL PROTECTED] wrote: Is it possible to obtain the userid within a servlet of the person that has logged in via a realm authentication? I want to use the standard authentication to manage access. But once a person is into a certain page, I'd like to know which user it is so I can display, for instance, that user's account info. Thanks in advance. Jerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Putting JDBC drivers in common/lib
if you are using jndi, i think they have to be in common/lib. If not, they can go in WEB-INF/lib instead. Larry On Sat, 19 Feb 2005 02:42:35 +0330, Behrang Saeedzadeh [EMAIL PROTECTED] wrote: Is it mandatory to put the JDBC drivers in the common/lib? Or can I put the JDBC drivers in each context's WEB-INF/lib? As long as I can remember I read somewhere that these drivers most be placed in the common/lib directory cause otherwise it introduces class loader problems. But what if I have two different Web applications and each of them use a different version of the JDBC driver for the same RDBMS? Regards, -- Behrang Saeedzadeh http://www.jroller.com/page/behrangsa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The requested resource (/myApp/servlet/TestingServlet) is not available.
Do some reading before trying to code: http://www.coreservlets.com/Apache-Tomcat-Tutorial/ There are several issues with your example - too many to answer in a simple email. You need to get a deeper understanding of the process before building things. If you learn best by doing, follow the steps of the tutorial, and you will do fine. Larry On Sat, 12 Feb 2005 16:33:45 +1100, Marco Mastrocinque [EMAIL PROTECTED] wrote: Hi All, I'm new to Tomcat and Servlets, I'm having a problem with one of my first Servlets: This is my program: import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; public class TestingServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println(HTML); out.println(HEAD); out.println(TITLEServlet Testing/TITLE); out.println(/HEAD); out.println(BODY); out.println(Welcome to the Servlet Testing Center); out.println(/BODY); out.println(/HTML); } } This is my web.xml file: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; wep-app servlet servlet-nameTesting/servlet-name servlet-classTestingServlet/servlet-class /servlet /wep-app I'm using Tomcat version 5.0.28. I create the Directory structure under Tomcat, underneath the webapps subdirectory: myApp | WEB-INF | classes I compile the file TestingServlet.java using javac -classpath C:\tomcat\common\lib\servlet-api.jar TestingServlet.jar Place the file TestingServelt.jar in the classes subdirectory. Place the file web.xml file in the WEB-INF subdirectory. I start Tomcat. The manager application says it there, and it seems to be okay. I type in the address bar of IE the following http://locahost:8080/myApp/servlet/TestingServlet I get the following message, from Tomcat The requested resource (/myApp/servlet/TestingServlet) is not available. I know it should be pretty simple, but sometimes the simplest things are the hardest to correct! Any suggestions most appreciated. Thanks Marco Mastrocinque - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Version control tool
Eclipse?! For version control, go with CVS or subversion. Most apache projects these days are going to subversion. It integrates very nicely with Windows. For bug tracking, I have yet to find a free bug tracking too that does not suck. If there is anyway, drop the $1200 and get JIRA. IMO, it is FAR better than bugzilla...yes, even $1200 better. Larry On Mon, 7 Feb 2005 15:27:48 -, Dale, Matt [EMAIL PROTECTED] wrote: Eclipse -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: 07 February 2005 15:25 To: Tomcat Users List Subject: OT: Version control tool Does anyone know a good version control tool for code management that is free? Also, a bug tracking application would be nice also. These need to be run on Windows. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.awt.headless=true in tomcat startup
no no no - it should go in setenv.sh - that is what it is for - that way you do not have to tweak the existing files. On Fri, 04 Feb 2005 12:04:36 -0500, Charles N. Harvey III [EMAIL PROTECTED] wrote: You set this somewhere in either the tomcat-home/bin/catalina.sh or tomcat-home/bin/startup.sh. If you don't want to do any of that, have an InitServlet that does System.setProperty( java.awt.headless, true ); That will do the same thing. Charlie Rodrigo Avila said the following on 2/4/2005 11:57 AM: Hi! I try to use some awt\swing classes to convert rtf strings to html in an jsp page. But I receive the following Exception: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. But, to resolve this problem, I find the following tip: assuming you're using a 1.4 JVM, add the following line to your startup command: $JAVA_COMMAND -Djava.awt.headless=true ... But, how I put this option in the Tomcat startup? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: isUserInRole question
Use a debugger, set a breakpoint in your code and examine the principle that represents the user. IIRC, the request has a reference to the user principle. On Thu, 3 Feb 2005 08:54:20 -0800 (PST), Denny Lee [EMAIL PROTECTED] wrote: Hello, Thanks for your reply. When I use IE to bring up the page I get a dialogbox asking for user name and password. If I put in a user name and password of a user on the workstation I can login. The page shows the correct user name and says that I have successfully logged in. But I get 2 false for the isUserInRole statements. I don't know why that is the case. Thanks. - Hi! I'm not sure, but I think your code is OK. The question is: How did you configure your security realm in web.xml and server.xml. (request.isUserInRole only works, if the user has already been authenticated against the web server.) Best regards, Tex Hello, I am trying to use isUserInRole in an app within Tomcat. The problem is that I consistently get false as the return regardless of what I pass in. I am using J2SE 1.4.2_06 and Tomcat 5.0. Here is the code and any help would be great: import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class NtlmHttpAuthExample extends HttpServlet { public void doGet( HttpServletRequest req, HttpServletResponse resp ) throws IOException, ServletException { PrintWriter out = resp.getWriter(); resp.setContentType( text/html ); out.println( HTMLHEADTITLENTLM HTTP Authentication Example/TITLE/HEADBODY ); out.println( h2NTLM HTTP Authentication Example/h2 ); out.println( req.getRemoteUser() + successfully logged in ); out.println(req.isUserInRole(admin)); out.println(br-); out.println(req.isUserInRole(Administrators)); out.println( h3Please submit some form data using POST/h3 ); out.println( form action=\NtlmHttpAuthExample\ method=\post\ ); out.println( input type=\text\ name=\field1\ size=\20\/ ); out.println( input type=\submit\/ ); out.println( /form ); out.println( field1 = + req.getParameter( field1 )); out.println( /BODY/HTML ); } public void doPost( HttpServletRequest req, HttpServletResponse resp ) throws IOException, ServletException { doGet( req, resp ); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat's Java parameters
The $JAVA_OPTS variable is ignored by the service, you have to add them in the registry. On Tue, 1 Feb 2005 16:45:15 -0500, Jared Ingersoll [EMAIL PROTECTED] wrote: No takers? Should I take this question to the Dev list? jared -Original Message- From: Jared Ingersoll [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 11:19 AM To: 'tomcat-user@jakarta.apache.org' Subject: Tomcat's Java parameters Hi, I am running Tomcat 4.1.X with Java 1.4 as a service on a Win2K box. A software provider has instructed us to change an environment variable in the system tab, which is to add the JAVA_OPTS variable with 3 parameters. However, another document provided by the same company instructs us to make changes to the HKLM\system\currentControlSet\Service\Apache TomCat 4.1\ registry keys (i.e. JVM OPTION COUNT and JVM OPTION Number 1, etc.), which has a total of 7 command line parameters for Java. My questions: 1. Do the system environment variables get called if the app is running as a service? 2. If they are called, do the registry changes trump the $JAVA_OPTS variable, or is it vice versa? We are having performance related problems, and need the proper java settings running under the tomcat service. Not only that, but I would like to know where we should make these settings. Jared * PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Basic Authentication Window
If you are using basic authentication, that is out of your control - the browser will resend the authentication with every request. I does not care at all about your session. I think your simplest solution is to switch to form-based authentication. Larry On Thu, 27 Jan 2005 19:58:16 -0800 (PST), Gia Thornton [EMAIL PROTECTED] wrote: Hi, I am using Tomcat Container managed security: Basic Authentication by adding the following to web.xml. security-constraint web-resource-collection web-resource-nameThe Entire Web Application/web-resource-name url-pattern/XMLServlet/url-pattern /web-resource-collection auth-constraint role-nametomcat/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameUserDatabase/realm-name /login-config security-role description An example role defined in conf/tomcat-users.xml /description role-nametomcat/role-name /security-role - I have used a form in my jsp: form name=update method=POST action=/abc/XMLServlet input type=button name=save_change value=Save onclick=saveChange(event) input type=button name=cancel_change value=Cancel onclick=cancelChange(event) input type=button name=edit value=Edit onclick=checkLogin(event) /form If I click on Edit button, the javascript checkLogin will submit the form. If the user has not logged in, an authentication window will pop up. After the first-time authentication, the page is directed to the same page containing the above form. I intentionally set setMaxInactiveInterval to be like 10 seconds in XMLServlet. When the session expires, I click the Edit button again, now the page directly go to XMLServlet without the authentication window poped up. Does anyone know what causes this? How can I get the authentication window pop up when the session expires? Thank you for your help. Gia - Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Realms getting confused in context reload
I was equally surprised to see this behavior, but my hat is off to the people who read this specification, and implemented it - the RFCs are a can of worms. The RFC for this (#2617 - HTTP Authentication: Basic and Digest Access Authentication - http://www.ietf.org/rfc/rfc2617.txt) says that The realm directive (case-insensitive) is required for all authentication schemes that issue a challenge. The realm value (case-sensitive), in combination with the canonical root URL (the absoluteURI for the server whose abs_path is empty; see section 5.1.2 of [2]) of the server being accessed, defines the protection space. The reference to [2] there is to RFC #2616 - Hypertext Transfer Protocol -- HTTP/1.1 (http://www.ietf.org/rfc/rfc2616.txt), and section 5.1.2 of that says nothing about abs_path, which is defined in RFC #2396 - Uniform Resource Identifiers (URI): Generic Syntax (http://www.ietf.org/rfc/rfc2396.txt), and says that abs_path is essentially any path starting with a / character. Bottom line: Server name + Realm name = protection space. The protocol HTTP knows nothing of contexts, so when we define a realm in tomcat, and do not specify a name that includes the context, this should be expected. It would be nice if there were a way in tomcat to say include the context in the authentication realm name. Larry On Wed, 26 Jan 2005 15:31:46 -0700, Brandon Goodin [EMAIL PROTECTED] wrote: Here is what solved this. My web.xml in the admin and in the customer app were defined as follows: login-config auth-methodBASIC/auth-method realm-nameOrder Inquiry/realm-name /login-config Apparently in tomcat you cannot have two contexts with a web.xml that shares the the same login-config/realm-name. The behavior is VERY bizarre. It would seem that the right way to deal with this would be to identify the realms based on context. So, if i use the same realm name in my web.xml it is totally irrelevant, because the realm is scoped in the context. Is this a bug? Brandon On Wed, 26 Jan 2005 11:51:54 -0700, Brandon Goodin [EMAIL PROTECTED] wrote: I have some strange behavior showing up with Tomcat 5.0.30. I have a host configured with two contexts. The contexts are deployed as wars. But, they have configuration information in the server.xml. Each context has it's own realm defined within the context tag. The contexts are named /admin and /customer. The /customer context is configured to use a DatasourceRealm for authentication. The /admin is configured to use a custom realm called ReverseProxyRealm5. Both contexts share a jndi datasource resource defined in the DefaultContext tag. The odd behavior that i am experiencing happens during an auto reload of the context after both of the war files have been changed. Once the contexts have reloaded and the new war files have been autoDeployed I lose the use of my ReverseProxyRealm5 on the admin context. But, not only do i lose it, it also switches to using the DatasourceRealm as defined in the customer context. After i stop and start tomcat everything is fine again. I have tested this out running Tomcat from the command line and within eclipse with the same resulting behavior. I deleted the /conf/Catalina directory and the /work/Catalina directory for good measure. But, all the behavior continues. Attached is my server.xml host file without the sensitive info. Host name=oi debug=0 autoDeploy=true appBase=D:\myappbase\projects\oi\dist\war Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=orderinquiry_log. suffix=.txt timestamp=true / DefaultContext Resource name=jdbc/oi auth=Container type=javax.sql.DataSource / ResourceParams name=jdbc/oi parameter namefactory/name value org.apache.commons.dbcp.BasicDataSourceFactory /value /parameter parameter namedriverClassName/name valuecom.ibm.as400.access.AS400JDBCDriver/value /parameter parameter nameurl/name value jdbc:as400://some.url.here.org;naming=system;date format=iso /value /parameter parameter nameusername/name valuedudesusername/value /parameter parameter namepassword/name valuedudespassword/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value
Re: How to identify automatically in spite of a Realm
This may work: http://www.sys-con.com/story/?storyid=37660DE=1 On Wed, 26 Jan 2005 00:08:18 +0100, Philippe Mathieu [EMAIL PROTECTED] wrote: I develop a war with Tomcat 5.0.28 and in this application some users are already known by the system and must be authentified (via a Realm and LOGIN form) to acces to private JSP, and new users must give information via a public JSP to be known (like login and password choosen but also other informations) and then redirected to the private zone. My pb is that I am an not able to automatically log a new user after he has given his information. In spite of he has given his login/password on the public JSP, the user will be asked once again for his login/password by the Authenticated Form from the Realm when he will access to the private zone. thus he will give his login/password twice :-( How to avoid That ? -- Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat does not evaluate jspf extension files
See the problem below? On Mon, 24 Jan 2005 17:01:38 -0800 (PST), Norris Shelton wrote: Everytime I try to use a .jsfp extension for a file, tomcat does not evaluate it. Comments come out, code is displayed, etc. servlet-mapping servlet-namejsp/servlet-name url-pattern*.jspx/url-pattern /servlet-mapping One of these things is not like the other one... Come on! Sing along! You know the words! Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ?? Sharing the JSTL JARS and Classloading ??
Call me a realist, but the jars you are talking about are only 375k...if 375k of memory kill your web app, go to ebay, and pick up another gig of ram, and it will be fine. :-) Seriously, I have been down the path you are describing (I only want one copy of my jars, so when I upgrade, I only have to do it once!), and trust me...it sucks. The first time you upgrade one and it breaks 3 others, you (not to mention your customers) will be very, very unhappy. And no, I thought it would work! will not be an acceptable response. In addition, jars in the shared/lib classloader may or may not use the appropriate classloader to load configuration resources - it they your this.getClass().getClassloader(), it just plain will not work if it is not in the WEB-INF/lib directory. Ever. Larry On Sat, 22 Jan 2005 16:43:20 -0600, Tony LaPaso [EMAIL PROTECTED] wrote: Call me a minimalist but I don't like the idea of having the same JAR file duplicated if I don't have to. It takes more memory since each web app's classloader needs to have the same classes in memory. It seems much cleaner to have the JARs in one central location. - Original Message - From: QM [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Saturday, January 22, 2005 8:57 AM Subject: Re: ?? Sharing the JSTL JARS and Classloading ?? On Sat, Jan 22, 2005 at 01:24:54AM -0600, Tony LaPaso wrote: : The problem is that I have several web applications that use JSTL and : therefore several WEB-INF/lib directories. Rather than copy the : aforementioned JAR files to *every* WEB-INF/lib directory I'd rather put : them in one central location and have them available for *ALL* web : applications. Webapps are supposed to be self-contained, and as such, it's considered a best practice to pack up a webapp with all the JARs it needs. If it's a hassle to copy the JARs around by hand, why not fold that into an automated build process? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fatal Error] :2:1: Content is not allowed in prolog.
http://tinyurl.com/6d7dz On Sat, 22 Jan 2005 19:01:55 +0100, Omar Adobati [EMAIL PROTECTED] wrote: Does anybody know what this line of log mean: [Fatal Error] :2:1: Content is not allowed in prolog.?? I'm using tomcat 5.0.28, JDK 1.5.0_01 and Win XP SP2 -- Adobati Omar [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: You cannot do that!
I know, I know, I am working on it... ;-) On Sat, 22 Jan 2005 00:00:37 +0530, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Let'us be short: you have no experience in writing letters!!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] a website run on Tomcat and powered by Struts
Gah! Get rid of that book.gif, that looks like something from a late 80's BBS. ;-) Grab one from here instead: http://art.gnome.org/art-icons/ Larry On Wed, 19 Jan 2005 06:59:07 -0800 (PST), t t [EMAIL PROTECTED] wrote: Hi, all, I just updated www.sportslovers.net using tiles. Take a look. Any comments or suggestions will be appreciated! T.T. - Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Modifying Reply-To header in list messages
Werks fer me. On Thu, 20 Jan 2005 09:59:03 +0530, Antony Paul [EMAIL PROTECTED] wrote: Hi all, What people here think about this article. http://www.unicom.com/pw/reply-to-harmful.html The Apache lists modifies reply-to field and put in the list address. Is this acceptable ? rgds Antony Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling Exceptions thrown from a Filter
is this before or after the call to the filter chain? On Tue, 18 Jan 2005 15:51:01 -0700, Wendy Smoak [EMAIL PROTECTED] wrote: If a ServletException is thrown from a Filter, is there a way to show a nice error page? I have put this in web.xml: error-page exception-typejavax.servlet.ServletException/exception-type location/WEB-INF/jsp/exceptionServlet.jsp/location /error-page which I thought was the way to do it (I've also tried JSP's directly in the root of the webapp in case the WEB-INF part was causing trouble) but I still get an HTTP Status 500 and stack trace when a ServletException is thrown. What am I doing wrong? Thanks, Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: more benchmark results
On Fri, 14 Jan 2005 09:07:37 -0500, Peter Lin [EMAIL PROTECTED] wrote: what a concept Schnapps over speed. Wonder what would happen if someone made a redbull + Schnapps + speed cocktail 8-) Use it to chase the diet pills and nodoz, and you may never sleep again. :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory leak
Another (simpler) solution is to let someone else write that code. ;-) I know there are times when you need JDBC directly, but tools like iBATIS make it darn easy to handle the other 99% of the cases. Here is a tutorial on using struts with iBATIS that could be helpful if people are interested. http://www.reumann.net/struts/ibatisLesson1.do The current iBATIS version is 2.x, and this covers 1.x, but the basics are the same. If someone wanted to convert it to use 2.x and put it on the iBATIS wiki, that would rock. http://wiki.apache.org/ibatis/ Larry On Wed, 12 Jan 2005 10:41:28 +, Harry Mantheakis [EMAIL PROTECTED] wrote: Possibly. If you are using a connection pool and do not close the connection, it will not be released back to the pool, so subsequent calls to the pool will create new connections. There's a simple procedure to help you avoid this problem, even when errors occur during your JDBC calls, and that is to close connections within a finally block: Connection con = null; try { // initialise and create connections here // do all your other JDBC stuff here too } catch ( SLQException e ) { // handle exceptions here } finally { if ( con != null ) { try { con.close(); } catch ( SQLException ignored ) {} } } As you know, finally blocks are guaranteed to execute, even if an exception is thrown. HTH Harry Mantheakis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache, Tomcat, WebDAV, and Web Folders... Oh, my!
Uhh, that is what I was thinking. On Tue, 11 Jan 2005 19:17:00 +0200 (EET), [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Laba diena. Dkojame, kad mums parate. Js atsista inut isaugota ms duomen bazje. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory leak
Possibly. If you are using a connection pool and do not close the connection, it will not be released back to the pool, so subsequent calls to the pool will create new connections. In addition, as if that were not bad enough, any resources created that are referenced by that connection (statements, prepared statements, resultsets, etc...) will not be collected, because they still have references. Bottom line: Be sure that when you use JDBC directly, that you manage the resources very carefully. To simplify things, you may want to use a tool like iBATIS SQL Maps to remove some of the burden of resource management. Larry On Wed, 12 Jan 2005 09:57:42 +0530, Rajaneesh wrote: Taking the context of nullifying the object in Java, when we do not nullify the database connections, statements and result set, does these objects just fill the momory or even cause the database connection bottleneck? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can anyone see this message?
No. [EMAIL PROTECTED] 01/06/05 4:02 PM Thanks, Troy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying XML in Safari
If you have a String, you could use c:out, and the escapeXml attribute. [EMAIL PROTECTED] 12/8/2004 1:33:00 PM Hi, The current version of Safari has no support for pure XML à la Internet Explorer. What a pity ! I was wondering if there is a simple way to convert an XML document to HTML that would display properly in Safari. This is merely an utility, and all I'm looking for is something that will make XML look like XML. No special features.
Re: Profilers for Tomcat
JProbe is the coolest profiler on the planet, expensive, but you can get a 2-week trial version...if that is enough time. If not, netbeans has one called JFluid as a plug-in that is free. Larry [EMAIL PROTECTED] 12/08/04 4:29 PM Hey guys Just wondering if there are any profilers for Tomcat5 that are free, currently a student working on a final year project and it would be nice to run a profiler over our webapp, but being a student, cost is an issue! Any info very much appreciated! Cheers Rich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Profilers for Tomcat
WOW! Awesome! I did not know about that version! Thanks for mentioning it! Larry (downloading now ;-) [EMAIL PROTECTED] 12/08/04 5:24 PM Thank you to Larry for suggesting JProbe, there is a community edition that does all i need, Cheers Rich QM wrote: On Wed, Dec 08, 2004 at 11:29:09PM +, Cumbers wrote: : Just wondering if there are any profilers for Tomcat5 that are free, : currently a student working on a final year project and it would be nice : to run a profiler over our webapp, but being a student, cost is an : issue! Any info very much appreciated! You could first try a free search engine, or free mailing list archives. ;) This question comes up every so often, and people usually chime in with answers. -QM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best place to store files ?
Put them in a database instead? [EMAIL PROTECTED] 12/07/04 3:11 PM Hi, I'm developing a servlet which needs to handle file uploads and downloads. I manage to store the files in a directory inside my servlet, but each time I upload a new version of my servlet, the files are destroyed. Is there a preferred place to store such files in Tomcat, or is this entirely up to the developer and the catalina.policy file ? Is there a way to tell Tomcat NOT to erase existing files in a servlet, but only overwrite them with files from the war file ? --- Eric VERGNAUD - JLynx Software Cutting-edge technologies and services for software companies web: http://www.jlynx.com --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jsp on windows/linux
For crying out loud! GOOGLE IS YOUR FRIEND! http://tinyurl.com/5pzjb - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: jsp on windows/linux
Open up $CATALINA_HOME/conf/web.xml, search for fork, set it to false. Larry [EMAIL PROTECTED] 12/03/04 1:18 PM I saw a lot posting, but they are almost all talking about space in dirs on windows. -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: December 3, 2004 3:14 PM To: [EMAIL PROTECTED] Subject: RE: jsp on windows/linux For crying out loud! GOOGLE IS YOUR FRIEND! http://tinyurl.com/5pzjb - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JAVA_OPTS for multiple apps running under 1 tomcat
They are all sharing one JVM and it's resources. Java knows nothing of tomcat or contexts. [EMAIL PROTECTED] 11/19/04 8:59 AM Hi! I have 3 virtual hosts in tomcat, each with it's own java app/context (total of 3 apps). When I set JAVA_OPTS=-Xmx 512m, in the bin/setenv.sh on UNIX, does this max out 512m for each context, or does it set it for everthing that runs under tomcat? --Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: secure jsp using web.xml in tomcat 5.0.19
You told tomcat to only allow post and get access to your jsp files. Uhh, that is about all you can possibly allow. What are you trying to do? [EMAIL PROTECTED] 11/17/2004 3:06:18 PM Hi I want to secure all my jsp in my web application, I added following security constraint in my web.xml file, but some how seems it does not work security-constraint web-resource-collection web-resource-nameBlock Access to jsp files/web-resource-name descriptionThis is to block access to all jsp files/description url-pattern*.jsp/url-pattern http-methodPOST/http-method http-methodGET/http-method /web-resource-collection /security-constraint what may be the reason??
Re: My Context don't workie
I wonder if it is the docBase=../../webroot thingy. Use a full path, and see if it works. [EMAIL PROTECTED] 11/09/04 12:01 PM Hello to all, I have an app that works fine on Red Hat, Susie, Debian, or even Windows. I built a Gentoo box and it wont work. TomCat runs but the webapp is ignored. The Server.xml has: !-- WebCTRL Context -- Context path= docBase=../../webroot debug=1 Manager distributable=false className=org.apache.catalina.session.PersistentManager saveOnRestart=false Store className=org.apache.catalina.session.FileStore / /Manager /Context Again this works on any other linux box but my new Gentoo. When TomCat runs I get: Nov 9, 2004 6:28:16 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 80 Starting service Tomcat-Standalone Apache Tomcat/4.1 Nov 9, 2004 6:28:19 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 80 Everything is ok except the webapp normally adds several lines of text under Apache Tomcat/4.1 and the app is not up. Could there be some sort of dependency issue? I am pulling my hair out ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: My Context don't workie
Is this using gentoo's tomcat install? If so, you may want to download and setup tomcat manually, to see if the problem persists. Gentoo's java tools are...umm..interesting at times. Larry [EMAIL PROTECTED] 11/09/04 4:24 PM Thanks but this is a tried and true app that has been out for two years now. It works on windows, multiple Linux and Solaris Just this one Gentoo box (my first actually). The vendor provides a config util which I have run a million times after deleting the server.xml file. It regenerates a server.xml which I ran on another box fine. It can't be the app it has to be the box. I will try to set debug and enable the default logger. Thanks. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 4:20 PM To: Tomcat Users List Subject: RE: My Context don't workie Hi, You can add debug=99 attributes to all the containers in server.xml to get additional debugging data. Tomcat 5.x has better debugging support via commons-logging. Try commenting out pieces, like the Realm, to maybe isolate the problem component further. Yoav Shapira http://www.yoavshapira.com -Original Message- From: K. Mike Bradley [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 4:16 PM To: 'Tomcat Users List' Subject: RE: My Context don't workie Is there any way to turn on some sort of debugging? BTW here is mt entire server.xml ?xml version=1.0 encoding=UTF-8? !-- Webserver Configuration File WARNING ** Don't edit this file directly, use the command 'config' from the installation directory-- Server port=8005 shutdown=SHUTDOWN debug=0 !-- Define the Tomcat Stand-Alone Service -- Service name=Tomcat-Standalone !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 80 -- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort$ !-- Define a SSL Coyote HTTP/1.1 Connector on port 443 -- Engine name=Standalone defaultHost=localhost debug=0 !-- This is a replacement logger written for the CJGreen project by copying the FileLogger class and making slight modifications. The need was to provide a default verbosity to messages that are logged without a specific verbosity. FileLogger ALWAYS logs these messages, but they occur frequently and are usually (always?) informational in nature. A defaultVerbosity of 3 makes these messages informational and the verbosity setting of less than 3 then makes sure that we never log any informational messages. There is a quirk to how this works, however. Tomcat executes each element as it reads it from this file. Therefore, any logging done during startup (before this element) will not use the default verbosity specified by the attribute defaultVerbosity. Instead, it uses the hard-coded default of 3 (INFORMATIONAL). Therefore, to see logged messages during startup, you must use the original FileLogger and not use CJFileLogger. -- Logger className=com.controlj.green.jakarta.catalina.FileLogger prefix=catalina_log. suffix=.txt timestamp=true verbosity=0 defaultVerbosity=3 / !-- This is the default logging for Tomcat. We have replaced it with CJFileLogger above to suppress log messages that don't have a verbosity level. This logger will ALWAYS log messages without a verbosity level and there are quite a few of these message. Uncomment this logger (and also comment out the above logger) to revert to the previous amount of logging. -- !-- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true verbosity=0/ -- !-- Because this Realm is here, an instance will be shared globally -- Realm digest=SHA-1 className=com.controlj.green.jakarta.catalina.Realm hostPort=80 ssl=off / !-- Define the default virtual host -- Host name=localhost debug=0 appBase=webapps unpackWARs=true !-- WebCTRL Context -- Context path= docBase=/opt/WebCTRL2.5/webroot debug=1 Manager distributable=false className=org.apache.catalina.session.PersistentManager saveOnRestart=false Store className=org.apache.catalina.session.FileStore / /Manager /Context /Host /Engine /Service /Server -Original Message- From: K. Mike Bradley [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 2:01 PM To: [EMAIL PROTECTED] Subject: My Context don't workie Hello to all, I have an app that works fine on Red Hat, Susie, Debian, or even Windows. I built a Gentoo box and it wont work. TomCat runs but the webapp is ignored. The
Re: reinstalled SDK - NT Service doesn't start
Search the registry for your old sdk path. When you find it, replace it with the new one. Repeat as necessary. [EMAIL PROTECTED] 11/05/04 2:24 PM The Tomcat config app has been long gone. Is there any way to do it without the interface? - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, November 05, 2004 4:14 PM Subject: Re: reinstalled SDK - NT Service doesn't start From the tomcat config screen, click the Java tab and update the path to your jvm. On Fri, 2004-11-05 at 16:01, David Aleksanyan wrote: Hello guys, After reinstalling the SDK. Tomcat 4.1.28 works from console but the NT doesn't start Do you guys know how to fix this? I'm suspecting that some config files are pointing to the old SDK install. Or maybe some registry value? Thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: reinstalled SDK - NT Service doesn't start
Chicken. :-D [EMAIL PROTECTED] 11/05/04 2:56 PM But, before you edit your registry, I would strongly recommend backing it up. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: which Linux Platform is best for Tomcat?
..nor mine - gentoo! [EMAIL PROTECTED] 10/26/04 9:02 AM What the heck.. haven't heard mine yet. Slack 9, no problems at all. :) -Original Message- From: Giuseppe Briotti [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 26, 2004 9:18 AM To: [EMAIL PROTECTED] Subject: Re: which Linux Platform is best for Tomcat? I use both Suse 9.1 and Mandrake 10 and all works great! :-) G - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New User needing urgent help
Correct. When you import w/o a package like you have, it will import from the current package - that is org.apache.somethingorother. Put them in a package, and change the imports. Larry [EMAIL PROTECTED] 10/23/04 11:47 AM Hi Steve! I don't belive that you can import at root-level. You have to put your classes in a package (folder) that you then put in the web-inf/classes. Regards Roland - Original Message - From: Steven R. Christensen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, October 23, 2004 7:42 PM Subject: New User needing urgent help Hello, I am new to using Tomcat and am having difficulty getting an application to work. Any help would be greatly appreciated. I have a web app that is giving me the following errors and can't seem to find why. Thanks in advance for your help. org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:6: '.' expected import Account; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:7: '.' expected import Banner; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:8: '.' expected import CalDate; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:9: '.' expected import Campaign; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:10: '.' expected import Dates; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:11: '.' expected import DB; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:12: '.' expected import DetectOSBrowser; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:13: '.' expected import Environment; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:14: '.' expected import GetAdServlet; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:15: '.' expected import GetLinkServlet; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:16: '.' expected import Javamail; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:17: '.' expected import Keys; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:18: '.' expected import LicenseCheck; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:19: '.' expected import LogError; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:20: '.' expected import LogonValidation; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:21: '.' expected import LogsCutover; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:22: '.' expected import Msgsend; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:23: '.' expected import Popwindow; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:24: '.' expected import Region; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:25: '.' expected import Sendmail; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:26: '.' expected import servletUpload; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:27: '.' expected import SmartHello; ^ Generated servlet error: D:\christensen2.m6.net\Tomcat5\work\Catalina\localhost\advert_java\org\apache\jsp\setup_jsp.java:28: '.' expected import Stats; ^ Generated
RE: Tomcat classloading...a theory question..
Yoav, I could not agree with you more! I think a lot of people are abusing comon/lib (and shared/lib) and learning this lesson the hard way (like I have). Hopefully, your advice will help others learn it the easy way! :-) We have tried so many clever schemes to make sure that we have only one copy of x.jar and every single one of them have bitten us in the butt so many times that it hurts to sit down. ;-) Lately, we have started putting everything that we can in the web app, and only what we *absolutely must* in common/lib, and it has made everyone's life s much simpler. Whenever I can update a jar in application A without breaking application B and getting a call at 3am, it is a good thing. Whenever I can manage the movement of a jar from development, to test, then to production independent of all other applications, it is a good thing. Larry [EMAIL PROTECTED] 10/21/2004 8:22:32 AM Hi, javax.* org.xml.sax.* org.w3c.dom.* org.apache.xerces.* org.apache.xalan.* Can I put the above class pattern in my WEB-INF/lib path or not ? You can, but those JARs will be ignored as they have already been loaded from an endorsed location. Here's a short summary of my two cents to go on top of the classloader how-to which you've already read: - Putting stuff in jre/lib/ext is evil and people should be fired for doing it ;) - Putting stuff in common/endorsed is dangerous but sometimes permissible, the notable cases being to use later versions of classes in the above packages. For example, if you want a recent version of Xalan, you must put it in common/endorsed. Thankfully provides like Xerces and Xalan are doing a much better job recently to split impl and API, so that you can put the impl jars in WEB-INF/lib and not worry about endorsed stuff. Other than these special cases, don't put anything in common/endorsed. - Putting stuff in common/lib is only sometimes worth it. Usually, it's better to keep it in WEB-INF/lib so that you can keep your webapp self-contained. Some people like to use server-managed connection pooling and other resources, and it's sort of the J2EE way. But give careful consideration to packaging your own. Things like DBCP are trivial to use in your own webapp, don't automatically use stuff in common/lib just because it's there. The argument of I don't want N versions of my xxx.jar all over the place is naïve at best: disk space is cheap, self-containment is extremely valuable, and you should have rudimentary configuration management in place to be able to deploy/redeploy from scratch in a reproducible manner. This applies to one developer working on his free time in the middle of the night as much as it does to a huge company I think. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Run a war file without unpacking?
I asked this a while back, and really did not get any responses... Can you run a web app from a war file without having tomcat unpack it anywhere? I see that in TC4, you can tell it in the Host configuration not to unpack it, but it seems that what that *really* means is to unpack it into the work directory instead of the web app directory. I do not want that. What I am looking for is a way to run it without unpacking it *at all*, and running it totally from the war file. Is there any way to do that with TC4 or TC5? Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Run a war file without unpacking?
The motivation: Overzealous SOX auditing. [EMAIL PROTECTED] 10/19/04 10:15 AM Hi, No, there's no way. The unpackWARs directive applies the webapp directory, and more generally to the part of the server visible to the users. It does not apply to the work directory, whose contents and management are internal to Tomcat. Other Servlet Containers and J2EE servers employ a similar division. What's your motivation? Yoav Shapira http://www.yoavshapira.com -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 12:08 PM To: [EMAIL PROTECTED] Subject: Run a war file without unpacking? I asked this a while back, and really did not get any responses... Can you run a web app from a war file without having tomcat unpack it anywhere? I see that in TC4, you can tell it in the Host configuration not to unpack it, but it seems that what that *really* means is to unpack it into the work directory instead of the web app directory. I do not want that. What I am looking for is a way to run it without unpacking it *at all*, and running it totally from the war file. Is there any way to do that with TC4 or TC5? Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Run a war file without unpacking?
Hmm, it seems that keeping it in memory would provide better performance than writing it to disk...admittedly with a higher cost in terms of overhead. I guess I still do not see the difference between a war file and a jar file other than the size - they are both zip files, they are both intended to simplify deployment, etc. It is just that the war file has to be unpacked while the jar file does not. That is what I do not understand...what makes it so much more difficult with a war file than a jar file? Larry [EMAIL PROTECTED] 10/19/04 12:09 PM FWIW, Tomcat 5.5 relies (or will rely) more and more on the work directory, as do other servers, for performance optimizations, hot deploy support, and other key features. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Run a war file without unpacking?
Hmm, doesn't it do that already? ...just in either the work directory, or the webapp directory instead of a zip file. In all cases, it looks like an InputStream is used. The JRE *does* support url based class loading...I wonder if you could use the jar:file! syntax to get an InputStream from the war and make it load jar files from it that way? Larry [EMAIL PROTECTED] 10/19/04 1:25 PM One item for emphasis: the JRE provides the feature of adding a JAR to the classpath. The JRE does not offer direct support for WAR semantics, such as JAR files in the WEB-INF/lib directory. Tomcat would have to, for example, have a classloader that searched the WAR file in the specified order. This would be a massive effort. That's the difference between 'stuff in a JAR' and 'stuff in a WAR'. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Run a war file without unpacking?
[EMAIL PROTECTED] 10/19/04 1:19 PM You can, and Tomcat does this, for the relevant parts of the WAR. But a WAR can contain an unlimited amount of resources, including for example 2 GB of static .html files ;) Heheh, yeah, and i *could* write my entire web application using inner classes (and doing so would be tremendously retarded), but does that mean we should not allow any inner classes? Trying to run a 2GB war file w/o unpacking it would be equally retarded. :-) I admit, that is not the greatest analogy, but it makes the point. Common sense should dictate how you deploy your application, not worst case scenarios. Preventing people from doing bad things is a good thing as long as they can still do the good stuff. ;-) The WAR file does not *have* to be unpacked. In fact, the Servlet Spec requires its Containers to support running a packed WAR, and not vice versa. Whether to unpack a WAR partially, fully, transparently, or optionally are all Servlet Container implementation choices. Umm, huh? So why does it always unpack it? I am sorry if I sound like an ungrateful pig. Don't get me wrong, I love tomcat, and it does 99% of what I want. I am just an ungrateful pig who wants 100%. ;-) Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: IO error: request.getReader(); readLine(); on Netscape
http://tinyurl.com/6llx2 [EMAIL PROTECTED] 10/18/04 2:12 PM Yes, it is on the server. Our application by default is Tomcat. But if the customer insists in different application server, we need to support customer's server. So I like to ask if the Jakarta Commons Fileupload is a standard component? If not, does other application server has similar component? Like database connection pool, all application servers have it. So I may be able to wrap it. Thanks -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 12:33 PM To: Tomcat Users List Subject: RE: IO error: request.getReader(); readLine(); on Netscape Hi, This code is on the server, I'd image. My advice: don't re-invent the wheel, use Jakarta Commons Fileupload. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 3:23 PM To: Tomcat Users List Subject: Re: IO error: request.getReader(); readLine(); on Netscape Where is this code? On the client? the server? On Mon, 2004-10-18 at 15:11, Daxin Zuo wrote: Hi, I have code like: BufferedReader breader = request.getReader(); String rdata = breader.readLine(); while (rdata != null) { .. } It run's well with IE. On Netscape7.1, I get java.io.IOException My purpose is to upload a file. Could you please give me instruction? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: org.apache.catalina.Realm
IIRC, it is in $CATALINA_HOME/server/lib/catalina.jar, and that is where you would put your implementation, too (if it is in a jar...if it is a class, put it in $CATALINA_HOME/server/classes). Larry [EMAIL PROTECTED] 10/15/04 9:21 AM Can someone help me get started building my own custom realm? I can't seem to locate which jar file this class is in. Also, once I create the Realm in, say for example, package my.realm.package, where do I place the class files so that the custom realm can be accessed from Tomcat? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: org.apache.catalina.Realm
Download the source distribution? [EMAIL PROTECTED] 10/15/04 9:51 AM Is there somewhere I can find the implementation of the JDBCRealm class? Looking at the Realm how-to I don't get a lot of information about sequence of calls, what methods are overridable, etc. Can anyone point me to the implementation of this class? -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Friday, October 15, 2004 11:30 AM To: [EMAIL PROTECTED] Subject: Re: org.apache.catalina.Realm IIRC, it is in $CATALINA_HOME/server/lib/catalina.jar, and that is where you would put your implementation, too (if it is in a jar...if it is a class, put it in $CATALINA_HOME/server/classes). Larry [EMAIL PROTECTED] 10/15/04 9:21 AM Can someone help me get started building my own custom realm? I can't seem to locate which jar file this class is in. Also, once I create the Realm in, say for example, package my.realm.package, where do I place the class files so that the custom realm can be accessed from Tomcat? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MySQL driver randomly not found?
Just curious...Why are you using a symlink? [EMAIL PROTECTED] 10/14/04 9:59 AM Hello! I'm having an interesting problem wherein about 5-10% of the time, for no apparent reason whatsover, the MySQL driver just can not be found. I have a symlink to it in TOMCAT_DIR/common/lib. I just replaced the symlink with a copy of the actual library to see if that would make a difference, but it doesn't make sense that it would work 90-95% of the time and then fail the rest of the time if that were the problem. The traceback I get is as follows: // NOTE: replaced org.apache. with ''. Cannot load JDBC driver class 'com.mysql.jdbc.jdbc2.optional.MysqlDataSource' java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlDataSource at catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:854) at catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:721) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760) at commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) at RequestFilterServlet.getUrlMapping(RequestFilterServlet.java:187) at RequestFilterServlet.doFilter(RequestFilterServlet.java:277) at catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at catalina.core.StandardContextValve.invoke(StandardContextValve.java:144) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at catalina.core.ContainerBase.invoke(ContainerBase.java:929) at coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) at jk.common.SocketConnection.runIt(ChannelSocket.java:866) at tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) Any suggestions welcome. Thanks. --Kaleb PS: I'm using tomcat 5.0.28 and version 3.0.15 of the MySQL connector. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: MySQL driver randomly not found?
Interesting question...how does that impact classloading? [EMAIL PROTECTED] 10/14/04 10:15 AM Hi, Does it happen without the connectors/Apache in front? Yoav Shapira http://www.yoavshapira.com -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Thursday, October 14, 2004 12:13 PM To: [EMAIL PROTECTED] Subject: Re: MySQL driver randomly not found? Just curious...Why are you using a symlink? [EMAIL PROTECTED] 10/14/04 9:59 AM Hello! I'm having an interesting problem wherein about 5-10% of the time, for no apparent reason whatsover, the MySQL driver just can not be found. I have a symlink to it in TOMCAT_DIR/common/lib. I just replaced the symlink with a copy of the actual library to see if that would make a difference, but it doesn't make sense that it would work 90-95% of the time and then fail the rest of the time if that were the problem. The traceback I get is as follows: // NOTE: replaced org.apache. with ''. Cannot load JDBC driver class 'com.mysql.jdbc.jdbc2.optional.MysqlDataSource' java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlDataSource at catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java: 854) at catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java: 721) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760) at commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) at RequestFilterServlet.getUrlMapping(RequestFilterServlet.java:187) at RequestFilterServlet.doFilter(RequestFilterServlet.java:277) at catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilter Chai n.java:186) at catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.ja va:1 57) at catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214 ) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.java :104 ) at catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at catalina.core.StandardContextValve.invokeInternal(StandardContextValve. java :198) at catalina.core.StandardContextValve.invoke(StandardContextValve.java:144 ) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.java :104 ) at catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.java :104 ) at catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.java :102 ) at catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.java :104 ) at catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at catalina.core.ContainerBase.invoke(ContainerBase.java:929) at coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) at jk.common.SocketConnection.runIt(ChannelSocket.java:866) at tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) Any suggestions welcome. Thanks. --Kaleb PS: I'm using tomcat 5.0.28 and version 3.0.15 of the MySQL connector. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
RE: MySQL driver randomly not found?
Hahah, similar reasoning wth my symlink question...shouldn't matter, but... [EMAIL PROTECTED] 10/14/04 10:47 AM Hi, It might not, but it's always a question, because it's part of the KISS principle. The simpler the environment, the easier it is for the OP to test and for others to reproduce the OP's test results. The less moving pieces, the less chance for error. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Thursday, October 14, 2004 12:38 PM To: [EMAIL PROTECTED] Subject: RE: MySQL driver randomly not found? Interesting question...how does that impact classloading? [EMAIL PROTECTED] 10/14/04 10:15 AM Hi, Does it happen without the connectors/Apache in front? Yoav Shapira http://www.yoavshapira.com -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Thursday, October 14, 2004 12:13 PM To: [EMAIL PROTECTED] Subject: Re: MySQL driver randomly not found? Just curious...Why are you using a symlink? [EMAIL PROTECTED] 10/14/04 9:59 AM Hello! I'm having an interesting problem wherein about 5-10% of the time, for no apparent reason whatsover, the MySQL driver just can not be found. I have a symlink to it in TOMCAT_DIR/common/lib. I just replaced the symlink with a copy of the actual library to see if that would make a difference, but it doesn't make sense that it would work 90-95% of the time and then fail the rest of the time if that were the problem. The traceback I get is as follows: // NOTE: replaced org.apache. with ''. Cannot load JDBC driver class 'com.mysql.jdbc.jdbc2.optional.MysqlDataSource' java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlDataSource at catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java : 854) at catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java : 721) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760 ) at commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) at RequestFilterServlet.getUrlMapping(RequestFilterServlet.java:187) at RequestFilterServlet.doFilter(RequestFilterServlet.java:277) at catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilte r Chai n.java:186) at catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.j a va:1 57) at catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:21 4 ) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.jav a :104 ) at catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at catalina.core.StandardContextValve.invokeInternal(StandardContextValve . java :198) at catalina.core.StandardContextValve.invoke(StandardContextValve.java:14 4 ) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.jav a :104 ) at catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.jav a :104 ) at catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.jav a :102 ) at catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at catalina.core.StandardValveContext.invokeNext(StandardValveContext.jav a :104 ) at catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at catalina.core.ContainerBase.invoke(ContainerBase.java:929) at coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) at jk.common.HandlerRequest.invoke(HandlerRequest.java:374) at jk.common.ChannelSocket.invoke(ChannelSocket.java:743) at jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) at jk.common.SocketConnection.runIt(ChannelSocket.java:866) at tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683 ) at java.lang.Thread.run(Thread.java:534) Any suggestions welcome. Thanks. --Kaleb PS: I'm using tomcat 5.0.28 and version 3.0.15 of the MySQL connector. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business
Re: mandatory packages for beans in Tomcat 5.0?
Yes, this was added in tomcat 4.x, and is required. [EMAIL PROTECTED] 10/14/04 2:27 PM I'm evaluating TC 5.0 on Windows XP, coming from TC 3.3.1 on RH7.3. I can't get TC 5.0 to recognize any beans I put in the WEB-INF/classes directory(windows perms all good). If I put the bean into a package and create the proper subdirectory under WEB-INF/classes/ it sees the bean. I don't have to use a package in TC3.3.1 - is this something new or ??? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unpackWARs=false = hot unzip for static resources
From what I have seen, everything gets unpacked anyway...just into the work directory instead of the webapps directory (with my version of tomcat - 4.1.29). Larry [EMAIL PROTECTED] 10/12/04 3:54 AM Hello ! I would like to have confirmation for this topic : Says a XML context file myapp.xml like this : Context docBase=C:\app.war path=/agoodapp reloadable=false privileged=false/ and unpackWARs set to false in Host tag and server.xml file. What does happen when the client call static resource (like HTML file) ? Is there an unzip call each time ? or something else (files stored in temp dir) ? Thanks, Arnaud - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Does unpackWARs setting work?
OK, here is my config: Host name=localhost debug=0 appBase=webapps unpackWARs=false autoDeploy=false Context path=/ngts reloadable=false docBase=/tmp/ngts/ngts/dist/ngts.war debug=0 / /Host When I start tomcat, I see everything unpacked into my work directory. What's up with that? Am I missing something here? Does unpackWARs=false mean something else? Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HOW INCREASE URL length size ?
You can't. :-D That is a browser limitation. Most are in the range of 2000 chars, but at any rate that is out of your control. You will need to POST if you have a form sending more data than that. If you have urls that are longer than that, then you are in a bad place. ;-) Larry [EMAIL PROTECTED] 09/26/03 6:43 AM Hi, Url limit size is to 451 characters. How can increase it to 800 in Tomcat 4.1.24 ? Thanks Philipe Philippe COUAS Responsable Développement INFODEV S.A. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: can't setup
I have a friend named google who can help you. www.google.com :-D [EMAIL PROTECTED] 09/24/03 2:34 PM Hi, I've just installed Tomcat 4.1.24-LE-jdk14 for Windows and I have Sun's J2SDK1.4.2. The installation seems to go on perfect, but when I try to see http://localhost:8080 on my browser I get this message (I exclude the exceptions): org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. What is this? Is there a conflict between Java an Tomcat? Thanx For Your Help Poblanno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: That ever-popular 'wrong version:46, expected 45' message
You have a old version of the tools.jar file. Get rid of it. Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: That ever-popular 'wrong version:46, expected 45' message
the one in tomcat [EMAIL PROTECTED] 08/20/03 2:07 PM Larry Meadors writes: You have a old version of the tools.jar file. Get rid of it. I checked yesterday after looking through old message on this archive and I don't see how that can be the problem. I have precisely two copies of the tools.jar file, one in my j2sdk1.4.2, and one in my Tomcat4.1.27 directory. Each is 4.85 M, and contains 1373 (or whatever) entries. They are, as far as I can tell, new, current, and entirely identical. If they aren't -- if I have missed some subtle difference -- which one should be consigned to oblivion? Paul Gazis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Post-authentication tasks
I did this with a filter. Happens on each requests, but the performance was acceptable. Another alternative is to extend the Realm you are using to meet your needs. Larry [EMAIL PROTECTED] 07/28/03 1:53 PM AFAIK, this is the appropriate list. You could try tomcat-dev, but that is more for discussions about developing Tomcat itself, not using Tomcat. If you haven't received a reply here, it is most likely because nobody has an answer. People here are pretty good about responding whenever they can help. It might take a day or two, as welllots of people are on holiday for the summer. John Sasha Borodin wrote: If this is not an appropriate list to ask design questions, could someone point me to a more suitable resource? Perhaps the tomcat-dev list? Thank you, -Sasha Borodin On 7/28/03 11:35, Sasha Borodin [EMAIL PROTECTED] wrote: I'd like to get some suggestions for performing post-authentication tasks while using Container Managed Authentication. Craig Berry suggested a filter that checks the session for necessary attributes, and creates them if they're missing. This check would be performed on every request however. Has anyone implemented a different approach to this problem? I'd like to find a solution in which the extra tasks are performed just ONCE, somehow triggered by the container authentication. Please reference my previous post on a filter vs. session attribute listener approach. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Post-authentication tasks
I do all requests on version 4.1.24 of tomcat. Larry [EMAIL PROTECTED] 07/28/03 2:26 PM Larry, Did you apply the filter to all requests or were you successful in assigning it only to the j_security_check URL? If you were successful, what version of Tomcat are you running? Thanks, -Sasha Borodin On 7/28/03 14:59, Larry Meadors [EMAIL PROTECTED] wrote: I did this with a filter. Happens on each requests, but the performance was acceptable. Another alternative is to extend the Realm you are using to meet your needs. Larry [EMAIL PROTECTED] 07/28/03 1:53 PM AFAIK, this is the appropriate list. You could try tomcat-dev, but that is more for discussions about developing Tomcat itself, not using Tomcat. If you haven't received a reply here, it is most likely because nobody has an answer. People here are pretty good about responding whenever they can help. It might take a day or two, as welllots of people are on holiday for the summer. John Sasha Borodin wrote: If this is not an appropriate list to ask design questions, could someone point me to a more suitable resource? Perhaps the tomcat-dev list? Thank you, -Sasha Borodin On 7/28/03 11:35, Sasha Borodin [EMAIL PROTECTED] wrote: I'd like to get some suggestions for performing post-authentication tasks while using Container Managed Authentication. Craig Berry suggested a filter that checks the session for necessary attributes, and creates them if they're missing. This check would be performed on every request however. Has anyone implemented a different approach to this problem? I'd like to find a solution in which the extra tasks are performed just ONCE, somehow triggered by the container authentication. Please reference my previous post on a filter vs. session attribute listener approach. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JDK for Linux on Power PC
Did you try blackdown? [EMAIL PROTECTED] 07/23/03 7:34 AM where can I find JDK for Linux on Power PC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how-to specify Java runtime options -Xmx128m, w/ Tomcat 4as Win2k service
Or you can edit the registry, it is not that bad. Search for your service name... [EMAIL PROTECTED] 07/24/03 12:26 PM You must rebuild the service with the new options. $CATALINA_HOME$\bin\tomcat.exe -install Apache Tomcat 4.1 $JAVA_HOME$\jre\bin\client\jvm.dll -Xmx512m -Xms256m -Djava.class.path=$CATALINA_HOME$\bin\bootstrap.jar -Djava.endorsed.dirs=$CATALINA_HOME$\common\endorsed -Dcatalina.home=$CATALINA_HOME$ -start org.apache.catalina.startup.BootstrapService -params start -stop org.apache.catalina.startup.BootstrapService -params stop -err $CATALINA_HOME$\logs\stderr.log Replace $CATALINA_HOME$ and $JAVA_HOME$ with the appropriate values. Change -Xmx and -Xms as appropriate. We use instsrv with the REMOVE command to remove the old service before running the above, or rename the service. This is easier than re-installing tomcat. -Original Message- From: Paul [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 1:53 PM To: [EMAIL PROTECTED] Subject: how-to specify Java runtime options -Xmx128m, w/ Tomcat 4 as Win2k service after assigning the following environment variables the java runtime options as follows: eg: JAVA_OPTS=-Xmx128m -Xms128m tried with: CATALINA_OPTS JAVA_OPTS amount of RAM memory used stayed aprox the same. Though i was expecting more memory to be used because of the extra memory that should have been allotted to java instance for Tomcat. Consequently, i am assuming that options were not applied by simply setting these environment variables, at least when Tomcat is started as a service. Where and how are java runtime options to be specified with Tomcat 4.1 (JDK 1.4.2) when it is started as a win2k service? [EMAIL PROTECTED] This electronic transmission is strictly confidential to Smith Nephew and intended solely for the addressee. It may contain information which is covered by legal, professional or other privilege. If you are not the intended addressee, or someone authorized by the intended addressee to receive transmissions on behalf of the addressee, you must not retain, disclose in any form, copy or take any action in reliance on this transmission. If you have received this transmission in error, please notify the sender as soon as possible and destroy this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Remote debugging on linux for TOMCAT 4.1.24
I use './catalana.sh jpda run' fron the $CATALINA_HOME/bin directory. Larry [EMAIL PROTECTED] 07/15/03 8:20 AM The documentation states add SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 to catalina.bat. Does anyone know what the correct procedure for linux is? Regards John Gustavson Enterprise Central Software Services (ECSS) 570 Washington Street - 2nd floor New York, New York, 10080-6802 Telephone: 1-212-647-3793 Fax: 1-212-647-3321 Email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: display tag
If you are going through another struts action, this should work: display:table name=results width=55% pagesize=15 cellpadding=3 cellspacing=0 border=0 requestURI=results.do summary=Table summary blah blah Larry [EMAIL PROTECTED] 06/16/03 9:15 AM Why can I not do the following: display:table name=results width=55% pagesize=15 cellpadding=3 cellspacing=0 border=0 requestURI=%= request.getContextPath() %/results.do summary=Table summary blah blah ? Am I doing something wrong, what other option would I have besides hard-coding in the path. -Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: getResourceAsStream cached by Tomcat's Classloader?
Hey Brandon, Are you using this code to get a classloader? Thread.currentThread().getContextClassLoader(); If not, you are not getting tomcat's you are getting the system one. Larry [EMAIL PROTECTED] 06/05/03 8:04 AM Yes, it is closed. Brandon Goodin -Original Message- From: Dominic Parry [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 7:44 AM To: Tomcat Users List Subject: Re: getResourceAsStream cached by Tomcat's Classloader? did you close the original stream before making changes and reloading? - Original Message - From: Brandon Goodin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 05, 2003 3:45 PM Subject: getResourceAsStream cached by Tomcat's Classloader? I saw a question similar to this asked in the Archives early in 2002. I didn't see a response to it. So, I hope there is an answer. I have a generic config file that is an xml file. We'll call it my-config.xml. When I load my-config.xml using Classloader.getResourceAsStream(my-config.xml) everything works great. However, when I make a change to that file and again call Classloader.getResourceAsStream(my-config.xml) the changes are not picked up and the same initial resource is returned. How do I get the Classloader to reconginze the resource changes? I'm using Tomcat 4.1.18. Brandon Goodin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]