isRequestedSessionIdFromURL() returns false
Hi, I hope am I in the right mail-list with this question. I guess that if I use Tomcat, then HttpRequest.isRequestedSessionIdFromURL() is implemented by Tomcat. I have a request, which contains *both* session ID in cookie *and* session ID in the rewritten URL. isRequestedSessionIdFromCookie() return true, but isRequestedSessionIdFromURL() returns false. It seems that isRequestedSessionIdFromURL() should return true. Is this a bug? I am using Tomcat 4.1.31. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shell command to stop and start a webapp without using the manager?
[EMAIL PROTECTED] wrote: Hi all, I'd like to know if there's a shell command to stop and start separate web applications. With our configuration, we are unable to use the manager. * We are running Tomcat 5.5 and Apache 2 with the JK Connector (mod_jk) on RedHat Linux. * We have several virtual hosts. When we used 1 service with multiple hosts, we had the problem that our different webapps were sharing the same memory space and they kept stepping on each other. So we split things up. Each host is using a separate service on a different port (see example below). Take a look at Ant Tomcat task. It is used to deploy new webapp from Ant and Ant works from command line. I think this is your best bet. Not to mention that Ant has such a wide variety of other tasks, it is a great boost to your work. You might need to do some other tasks at that time and Ant can help a lot. Of course, if something *is* a job for a shell script, it might be better to do it a s shell script job :-) Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
It's Urgent. Network Adapter
hi All, i am having problem of java.sql.SqlException Network Adapter Could not Establish Connection on tomcat consol. and i am not getting database access. Can Anyone tell me The answer for this It's Urgent. Thank You - Discover Yahoo! Get on-the-go sports scores, stock quotes, news more. Check it out!
Making ${expr} work like c:out value=${expr}/
The JSP/JSTL spec has a very sensible default regarding the escaping of XML characters in c:out. That is to say, they are escaped unless you explicitly disable escaping. In the days of JSTL 1.0, this had the effect of preventing most web designers from inadvertently introducing XSS vulnerabilities into their apps. When JSP 2.0 came out with the free placement of naked ${expr} in JSP bodies, I naturally assumed that this expression would do the sensible, expected thing and escape XML characters. I'm horrified to discover that this is not the case. Is there any configuration parameter that tells Tomcat to do the *smart* thing rather than follow the spec? I'd really rather not have to type c:out everywhere, including inside HTML attributes. Not to mention search-and-replacing through all my existing JSP pages. How did this behavior get into the spec?? Jeff Schnitzer Voodoodyne Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: It's Urgent. Network Adapter
Hi bhupendra, try to check your driverClassName and host setup. try setting up localhost instead od ip. - Original Message - From: bhupendra bendale [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Thursday, June 16, 2005 4:55 PM Subject: It's Urgent. Network Adapter hi All, i am having problem of java.sql.SqlException Network Adapter Could not Establish Connection on tomcat consol. and i am not getting database access. Can Anyone tell me The answer for this It's Urgent. Thank You - Discover Yahoo! Get on-the-go sports scores, stock quotes, news more. Check it out! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNI + Tomcat
Hi, I am new in JNI area. I would like to call a library written in C from my web application. Unfortunately, it does not work well, but when I call it from a standard Java application with same parameters it works well. In addition, I attempted to put some logging information to a file with some simple code fragment like FILE *fp; fp = fopen(/log.log, w); fputs(..., fp); fclose(fp); but it does not work too (the file is not created) when I call it from the web application and it does work when I call from standard Java application. The C written library must be in java.library.path, because Can anyone help me to tell what I can fail? Thx, Andras
JSP pre-compile and Apache
I used to precompile my JSP's (which worked great and was a big time saver in testing), but since running Tomcat 4.1.31 together with Apache, all sorts of weird errors occurred. I remember reading somewhere that Apache expected the actual jsp file, not the compiled version. So I reverted back to *not* precompiling JSP's and everything worked as expected. Question now, obviously there is a first-time-compile penalty per jsp, but once compiled, should performance be the same? How about the overhead to check if the .jsp file indeed matches the compiled version? Has someone managed to get precompiled JSP's running in combination with Apache? Thanks Charl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Use JSPC
Hi, I'd like to compile the JSP pages when I upload some new files on server (tomcat 4.0.3) . I use the utility JSPC, but this generate only java file but not the class file. I read that JRun has JSPC with -compile argument while my JSPC utilty doesn't have thi argument. Is possible to generate class file with tomcat and JSPC? Or there is another utility to use? Thanks in advance. Bye Mino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use JSPC
If you have the generated java files, you can compile them like any other java class (remember to setup your classpath correctly, including some jars in the Tomcat libraries). Trickier to figure out first time round is to dynamically create the web.xml settings. Every .jsp now effectively becomes a servlet which needs to be added to your web.xml. Using ant its all done automatically, but getting it set up first time round can be tricky. Charl --- Giacomino Raccuia [EMAIL PROTECTED] wrote: Hi, I'd like to compile the JSP pages when I upload some new files on server (tomcat 4.0.3) . I use the utility JSPC, but this generate only java file but not the class file. I read that JRun has JSPC with -compile argument while my JSPC utilty doesn't have thi argument. Is possible to generate class file with tomcat and JSPC? Or there is another utility to use? Thanks in advance. Bye Mino - 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]
AW: Use JSPC
Hi Mino, just one thing to add to the very good answer from Charl: I post you my ant sccript, which does all together precompiling and automatic generation of the web.xml file. You might take it as a basis for your stuff. Cheers Bernhard !-- do the precompilation -- target name=jspc depends=get-properties-stage mkdir dir=${webapproot}/src/ !-- define the jasper task -- taskdef classname=org.apache.jasper.JspC name=jasper2 classpath id=jspc.classpath pathelement location=${java.home}/../lib/tools.jar/ fileset dir=${tomcat.home}/bin include name=*.jar/ /fileset fileset dir=${tomcat.home}/server/lib include name=*.jar/ /fileset fileset dir=${tomcat.home}/common/lib include name=*.jar/ /fileset fileset dir=${webapproot}${webappname}/WEB-INF/lib include name=*.jar/ /fileset /classpath /taskdef !-- execute jasper, creates the servlet source files -- jasper2 validateXml=false uriroot=${webapproot}${webappname} webXmlFragment=${webapproot}${webappname}/WEB-INF/generated_web.xml outputDir=${webapproot}/src / !-- compile the source files -- javac destdir=${webapproot}${webappname}/WEB-INF/classes optimize=off debug=on failonerror=false srcdir=${webapproot}/src excludes=**/*.smap classpath pathelement location=${webapproot}${webappname}/WEB-INF/classes/ pathelement location=${tomcat.home}/common/classes/ pathelement location=${tomcat.home}/shared/classes/ fileset dir=${tomcat.home}/common/lib include name=*.jar/ /fileset fileset dir=${tomcat.home}/shared/lib include name=*.jar/ /fileset fileset dir=${tomcat.home}/bin include name=*.jar/ /fileset fileset dir=${webapproot}${webappname}/WEB-INF/lib include name=*.jar/ /fileset /classpath include name=** / exclude name=tags/** / /javac !-- Load your precompiled snippet into a property -- loadfile property=precompiled srcFile=${webapproot}${webappname}/WEB-INF/generated_web.xml encoding=ISO-8859-1/ !-- Now replace the web.xml with a predifined snippet -- replace file=${webapproot}${webappname}/WEB-INF/web.xml value=${precompiled} replacetoken![CDATA[!-- precompile include --]]/replacetoken /replace /target -Ursprngliche Nachricht- Von: Charl Gerber [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 16. Juni 2005 11:24 An: Tomcat Users List Betreff: Re: Use JSPC If you have the generated java files, you can compile them like any other java class (remember to setup your classpath correctly, including some jars in the Tomcat libraries). Trickier to figure out first time round is to dynamically create the web.xml settings. Every .jsp now effectively becomes a servlet which needs to be added to your web.xml. Using ant its all done automatically, but getting it set up first time round can be tricky. Charl --- Giacomino Raccuia [EMAIL PROTECTED] wrote: Hi, I'd like to compile the JSP pages when I upload some new files on server (tomcat 4.0.3) . I use the utility JSPC, but this generate only java file but not the class file. I read that JRun has JSPC with -compile argument while my JSPC utilty doesn't have thi argument. Is possible to generate class file with tomcat and JSPC? Or there is another utility to use? Thanks in advance. Bye Mino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xmlns-declaration missinterpreted as custom-tag library prefix
Hallo I'm creating JSP out of XML using XSLT; and I wasn't able to find a way of transforming XML using XSLT (without a post-production) without creating new xmlns-declaration attributes. Those declarations are later missinterpreted as tagLib prefixes so I'm unable to parse the result as JSP. :o( Why at all Tomcat/Jasper looks after any attribute prefixes and tries to bind them with any tag libraries? ... when (to my knowledge) attribute always must belong to a custom-tag which already contains the tagLib-prefix? I'm not claiming this is unavoidably wrong behaviour and must-be-fixed! (although I'm close to it); but if I knew how to tell Tomcat/Jasper ignore atribute-prefixes when parsing custom-tags I would be a very happy person. :o/ Or is there a way one could ommit xmlns-declarations when transforming XML using XSLT (while preserving MY OWN custom-tags with their tagLib prefixes) ... ? Right now it seems to me that one simply can't easily create JSP's with custom-tags out of XML. (I'm quite a beginner in the business; so I don't want to make experts angry and I'm only questioning and searching for help. :o) bye Jaroslav Zruba - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: isRequestedSessionIdFromURL() returns false
Michael Jouravlev wrote: Hi, I hope am I in the right mail-list with this question. I guess that if I use Tomcat, then HttpRequest.isRequestedSessionIdFromURL() is implemented by Tomcat. I have a request, which contains *both* session ID in cookie *and* session ID in the rewritten URL. isRequestedSessionIdFromCookie() return true, but isRequestedSessionIdFromURL() returns false. It seems that isRequestedSessionIdFromURL() should return true. Is this a bug? Interesting question. The Servlet 2.3 spec says: public boolean isRequestedSessionIdFromURL() Checks whether the requested session ID came in as part of the request URL. Returns: true if the session ID came in as part of a URL; otherwise, false I would interpret it this way: if the session id, which should be used was extracted from the URL, then return true. If however the cookie contains the same id and was checked first (which is default I think) then the requested session id came from the cookie! Imagine what would happen if always both would be checked and URL and cookie would contain 2 different ids. Christoph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP pre-compile and Apache
Apache doesn't care about the existence of a jsp. There is one exception - default pages when / (or /stuff/) is requested. In that case - apache will look for index.jsp (Assuming that is a default page to be served) and then on seeing the existence of that file - pass the request onto tomcat. I have had webapps where *.html is served by tomcat, so I had to create dummy index.html files so trcik apache into forwarding the request to tomcat. But there is also a JK option to forward the serving of directory requests to tomcat (but I'm too lazy to look it up at the moment) -Tim Charl Gerber wrote: I used to precompile my JSP's (which worked great and was a big time saver in testing), but since running Tomcat 4.1.31 together with Apache, all sorts of weird errors occurred. I remember reading somewhere that Apache expected the actual jsp file, not the compiled version. So I reverted back to *not* precompiling JSP's and everything worked as expected. Question now, obviously there is a first-time-compile penalty per jsp, but once compiled, should performance be the same? How about the overhead to check if the .jsp file indeed matches the compiled version? Has someone managed to get precompiled JSP's running in combination with Apache? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP pre-compile and Apache
OK, so it migth be well worth my while to look into the issue again and see if I can get the precompiled JSP's running with Apache. (I originally did this a year ago). Charl --- Tim Funk [EMAIL PROTECTED] wrote: Apache doesn't care about the existence of a jsp. There is one exception - default pages when / (or /stuff/) is requested. In that case - apache will look for index.jsp (Assuming that is a default page to be served) and then on seeing the existence of that file - pass the request onto tomcat. I have had webapps where *.html is served by tomcat, so I had to create dummy index.html files so trcik apache into forwarding the request to tomcat. But there is also a JK option to forward the serving of directory requests to tomcat (but I'm too lazy to look it up at the moment) -Tim Charl Gerber wrote: I used to precompile my JSP's (which worked great and was a big time saver in testing), but since running Tomcat 4.1.31 together with Apache, all sorts of weird errors occurred. I remember reading somewhere that Apache expected the actual jsp file, not the compiled version. So I reverted back to *not* precompiling JSP's and everything worked as expected. Question now, obviously there is a first-time-compile penalty per jsp, but once compiled, should performance be the same? How about the overhead to check if the .jsp file indeed matches the compiled version? Has someone managed to get precompiled JSP's running in combination with Apache? - 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]
TC 5.5.9 - JMX - jconsole
Opening a remote connection with jconsole to a tomcat 5.5.9 (jdk 1.5) running with security manager works fine when disabling authentication (com.sun.management.jmxremote.authenticate=false). Using client auth no security manager works well, too. Using client auth security manager throws security exceptions: access: access denied (javax.management.MBeanPermission -#-[-] queryNames) java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1158) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:253) at java.security.AccessController.checkPermission(AccessController.java:427) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.checkMBeanPermission(DefaultMBeanServerInterceptor.java:1707) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.queryNames(DefaultMBeanServerInterceptor.java:500) at com.sun.jmx.mbeanserver.JmxMBeanServer.queryNames(JmxMBeanServer.java:600) at com.sun.jmx.remote.security.MBeanServerAccessController.queryNames(MBeanServerAccessController.java:466) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427) at javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1245) at java.security.AccessController.doPrivileged(Native Method) In my opinion all packages and classes in the stack trace are in rt.jar, so they do have AllPermission. Why do I get these excpetion(s) and which jars I have to give more permissions? Gernot - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
configure HTTP1.1 pipline depth on Tomcat 5.0
Hi, Is there any way to configure HTTP1.1's persistent connection's pipeline length on Tomcat 5.0 ? By pipeline length, I mean the number of HTTP request could be sent by the HTTP/1.1 client before it gets back the first response. Thanks in advance, Feng
Re: isRequestedSessionIdFromURL() returns false
If both methods return true, they would identify the first request after session has been established with browser which supports cookies. I try to keep GET requests clean to encourage browser to keep its page history from growing. When I detect this request, I perform a redirect to the same location to clean URL up. After redirection URL will be clean, because session ID will be contained in cookie only. I need to do this only once. With isRequestedSessionIdFromURL() returning false I cannot do what I need :-( Any ideas? Michael. Interesting question. The Servlet 2.3 spec says: public boolean isRequestedSessionIdFromURL() Checks whether the requested session ID came in as part of the request URL. Returns: true if the session ID came in as part of a URL; otherwise, false I would interpret it this way: if the session id, which should be used was extracted from the URL, then return true. If however the cookie contains the same id and was checked first (which is default I think) then the requested session id came from the cookie! Imagine what would happen if always both would be checked and URL and cookie would contain 2 different ids. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: prevent tomcat from setting cookies
Hi! Rui Alberto schrieb: I don't want tomcat to set cookies on the client. In any situation. I've configured a Context in server.xml to my application: EX: Context cookies=false docBase=cocoon path=/ reloadable=false/ I've got the same problem. There's also an older posting here on the list from Andrew Steady (2004-12-02) about the same. That really seems to be a bug as http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html clearly says about the cookies attribute in Context: Set to true if you want cookies to be used for session identifier communication if supported by the client (this is the default). Set to false if you want to disable the use of cookies for session identifier communication, and rely only on URL rewriting by the application. Do we have to file a bugreport? Best regards, boris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Webdav on Tomcat 5.0.28 fails
Hi Mark, I modified the web.xml under \conf folder to change the url_pattern as follows: !-- The mapping for the default servlet -- servlet-mapping servlet-namedefault/servlet-name url-pattern/*/url-pattern /servlet-mapping But that didn't help. I am not that familiar with tomcat configuration settings. If I am doing something wrong, please correct me. Any help would be greatly appreciated. Thanks Sheeba -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 15, 2005 3:01 PM To: Tomcat Users List Subject: Re: Webdav on Tomcat 5.0.28 fails What URL mapping are you using? For MS clients /* works better than /. Mark Padmanabhan, Sheeba wrote: Our Webdav Server works fine with Tomcat 4.0. But when it is configured to use it through Tomcat 5.0, it just won't work. The Webfolders, Office Appilications - all are failing. Am I missing any configuration settings specific to 5.0? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 3.2.3 / JDK 1.4.2_04-b05
Hi, Can somebody help me find out how my tomcat is dying. As far as I know it's not triggered by any url access or memory leak or stack overflow. It dies on it's own( I guess). Is there any kind of hook I can provide that will tell me when it dies? If this subject is already covered , please atleat point me there. Thanks, Samit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can't find workers file
I'm running Apache 2.0.52 and Tomcat 5.5.9 on Fedora Core 3. Both are working properly. I installed mod_jk, but when I edit httpd.conf to add JkWorkersFile I get an error starting Apache: Can't find workers file. I've checked the path, tried changing locations, nothing seems to work. Anyone seen this error before? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat startup error
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi, if i start tomcat 5.5.9 i get the following AssertionError: Exception in thread main java.lang.ExceptionInInitializerError Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.AssertionError (Caused by java.lang.AssertionError) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:538) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351) at org.apache.catalina.startup.Bootstrap.clinit(Bootstrap.java:53) Caused by: java.lang.AssertionError at org.apache.juli.ClassLoaderLogManager$LogNode.findParentLogger(ClassLoaderLogManager.java:434) at org.apache.juli.ClassLoaderLogManager.addLogger(ClassLoaderLogManager.java:118) at java.util.logging.Logger.getLogger(Logger.java:232) at org.apache.commons.logging.impl.Jdk14Logger.getLogger(Jdk14Logger.java:152) at org.apache.commons.logging.impl.Jdk14Logger.init(Jdk14Logger.java:53) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529) ... 4 more my JAVA_OPTS are JAVA_OPTS=-Xms256m -Xmx384m -ea assertions are enabled for my webapp-tests. what's wrong? marco machmer -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFCsZ8POREMKO0oAdcRAozZAKCuHp/YihVRjAW/LNOx8mNfDZ1jTACgrmBk PHUhV0HoKPvekbXXLyFrfb8= =G+N9 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
threads in tomcat
Hello, If I use threads, through the Thread class, how can I can finish them whenever Tomcat reloads the application that created them. Thanks. Regards. Daniel Molina Wegener - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: isRequestedSessionIdFromURL() returns false
Something like this maybe: String url = request.getRequestURL().toString(); if (url.indexOf(jsessionid)-1 url.indexOf(request.getRequestedSessionId())-1) { // do redirect } Jon Michael Jouravlev wrote: If both methods return true, they would identify the first request after session has been established with browser which supports cookies. I try to keep GET requests clean to encourage browser to keep its page history from growing. When I detect this request, I perform a redirect to the same location to clean URL up. After redirection URL will be clean, because session ID will be contained in cookie only. I need to do this only once. With isRequestedSessionIdFromURL() returning false I cannot do what I need :-( Any ideas? Michael. Interesting question. The Servlet 2.3 spec says: public boolean isRequestedSessionIdFromURL() Checks whether the requested session ID came in as part of the request URL. Returns: true if the session ID came in as part of a URL; otherwise, false I would interpret it this way: if the session id, which should be used was extracted from the URL, then return true. If however the cookie contains the same id and was checked first (which is default I think) then the requested session id came from the cookie! Imagine what would happen if always both would be checked and URL and cookie would contain 2 different ids. - 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: threads in tomcat
You should hold a reference to your thread in your app. Set a flag that the thread watches to notify it that it is time to terminate. Place this code in the servlet's destroy() body. Calling the destroy() on the thread object is a little drastic because it will terminate the thread without calling cleanup methods. Thread.stop() is deprecated because it does not clean up well either. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Daniel Molina (Inter-Media) [mailto:[EMAIL PROTECTED] Sent: Thursday, June 16, 2005 10:29 AM To: Tomcat Users Subject: threads in tomcat Hello, If I use threads, through the Thread class, how can I can finish them whenever Tomcat reloads the application that created them. Thanks. Regards. Daniel Molina Wegener - 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: Shell command to stop and start a webapp without using the manager?
Nikola Milutinovic wrote: [EMAIL PROTECTED] wrote: Hi all, I'd like to know if there's a shell command to stop and start separate web applications. With our configuration, we are unable to use the manager. * We are running Tomcat 5.5 and Apache 2 with the JK Connector (mod_jk) on RedHat Linux. * We have several virtual hosts. When we used 1 service with multiple hosts, we had the problem that our different webapps were sharing the same memory space and they kept stepping on each other. So we split things up. Each host is using a separate service on a different port (see example below). Take a look at Ant Tomcat task. It is used to deploy new webapp from Ant and Ant works from command line. I think this is your best bet. Not to mention that Ant has such a wide variety of other tasks, it is a great boost to your work. You might need to do some other tasks at that time and Ant can help a lot. Of course, if something *is* a job for a shell script, it might be better to do it a s shell script job :-) Ant is also using the manager and Nikola says that they cannot use it for some reason. Nikola, you cannot use the web interface of the manager or you cannot use the manager at all? You can easily write scripts that use wget for example to remotely control Tomcat through the manager (no need to use the web interface in a browser but it has to be accessible). Have a look at: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/manager-howto.html#Supported%20Manager%20Commands Marius - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connector for apache and tomcat
I fixed the problem already. thanks, Christine --- Christine Ho [EMAIL PROTECTED] wrote: Thanks. I have tried it and I still cant make it work. But it is better than before. I got HTTP status 404 - /jsp-eg/index.html. In error.log in apache, I got the following: [Wed Jun 15 15:33:04 2005] [emerg] No JkShmFile defined in httpd.conf. LoadBalancer will not function properly! No JkShmFile defined in httpd.conf. LoadBalancer will not function properly! [Wed Jun 15 15:33:08 2005] [emerg] No JkShmFile defined in httpd.conf. LoadBalancer will not function properly! In mod_jk.log in apache, I got the following: [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1024): received from ajp13 pos=0 len=96 max=8192 [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_unmarshal_response::jk_ajp_common.c (606): status = 404 [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_unmarshal_response::jk_ajp_common.c (613): Number of headers is = 2 [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_unmarshal_response::jk_ajp_common.c (669): Header[0] [Content-Type] = [text/html;charset=utf-8] [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_unmarshal_response::jk_ajp_common.c (669): Header[1] [Content-Length] = [1019] [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1024): received from ajp13 pos=0 len=1023 max=8192 [Wed Jun 15 16:42:34 2005] [3800:] [debug] ws_write::mod_jk.c (380): writing 1019 (1019) out of 1019 [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1024): received from ajp13 pos=0 len=2 max=8192 [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_done::jk_ajp_common.c (2046): recycling connection cache slot=0 for worker ajp13 [Wed Jun 15 16:42:34 2005] [3800:] [debug] jk_handler::mod_jk.c (1959): Service finished with status=404 for worker=ajp13 I am not sure what went wrong. In httpd.conf in apache, I added/modified the following lines: ServerRoot /export/chrisho/apache2 LoadModule jk_module libexec/mod_jk.so Directory /export/chrisho/jakarta-tomcat-5.5.9/webapps/jsp-examples/WEB-INF Options -Indexes FollowSymLinks Deny from all /Directory JkWorkersFile conf/workers.properties JkLogfile logs/mod_jk.log JkLogLevel debug Alias /jsp-eg /export/chrisho/jakarta-tomcat-5.5.9/webapps/jsp-examples Alias /servlets-eg /export/chrisho/jakarta-tomcat-5.5.9/webapps/servlets-examples JkMount /jsp-eg/*.jsp ajp13 JkMount /jsp-eg/*.html ajp13 JkMount /servlets-eg/*.html ajp13 The workers.properties in apache2 looks like the following: workers.tomcat_home=/export/chrisho/jakarta-tomcat-5.5.9 ps=/ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 In server.xml in tomcat 5.5.9, I added/modified the following lines: Listener className=org.apache.jk.config.ApacheConfig configHome=/export/chrisho/jakarta-tomcat-5.5.9 modJk=/export/chrisho/apache2/libexec/mod_jk.so jkWorker=ajp13 forwardAll=False jkLog=/export/chrisho/apache2/logs/jk-tomcat.log jkDebug=debug noRoot=False workersConfig=/export/chrisho/apache2/conf/workers.properties / Connector port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 protocol=AJP/1.3 / Then I restart the tomcat and apache respectively. I have no problem to go to the following link through tomcat: http://localhost:8080/jsp-examples/index.html But I have problem to go to the following link through apache: http://localhost/jsp-eg/index.html Can somebody please help me. thanks, Christine --- [EMAIL PROTECTED] wrote: Please refer to message 128209 for a complete howto. Request it by sending an email to : [EMAIL PROTECTED] __ Discover Yahoo! Get on-the-go sports scores, stock quotes, news and more. Check it out! http://discover.yahoo.com/mobile.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HowTo Change default Pool MaxSize for SingleThreadModel Servlets
Hi all; I have a servlet that implements the SingleThreadModel interface. I have noticed that, under heavy weight, tomcat is restricting the servlet pool size to 22 instances. My question is: How can I do to change this limit? Regards. Martn. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 267.6.6 - Release Date: 08/06/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: threads in tomcat
From: Daniel Molina (Inter-Media) [EMAIL PROTECTED] If I use threads, through the Thread class, how can I can finish them whenever Tomcat reloads the application that created them. You can use a ServletContextListener which will be notified when the webapp starts and stops. Implement the 'contextDestroyed' method, and do your cleanup there. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Out of memory
This is no doubt a java-related question, but it seems that with virtual memory, my JVM should never run out of memory (aside from a nasty bug and lack of swap disk space). Is there a way to allow my web application to have as much memory as the OS will give it, yet not have the JVM attempt to consume all that space before the GC reclaims the space? I'd like the JVM to start with 64M, max out around 1GB in terms of holding the memory, yet allow it to use more memory when it needs it, and then have it attempt to release that memory so as not to cause swapping once the high memory need has disappeared. Can this be done? Thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Connector for apache and tomcat
Please verify first that you did not added a secont connector on port 8009 in tomcat/conf/server.xml for they cannot listen both on the same port. Second, the instructions i've provided are for mod_jk.so version 1 minor 13. Please make sure you've got the right module library. It seems to me that your module is expecting something that I didn't configure and This particular configuration works fine for me. Luc Boudreau Universit du Qubec Canada -Message d'origine- De: Christine Ho [mailto:[EMAIL PROTECTED] Envoy: 15 juin 2005 20:15 : Tomcat Users List Objet: RE: Connector for apache and tomcat Thanks. I have tried it and I still cant make it work. But it is better than before. I got HTTP status 404 - /jsp-eg/index.html. In error.log in apache, I got the following: [Wed Jun 15 15:33:04 2005] [emerg] No JkShmFile defined in httpd.conf. LoadBalancer will not function properly! No JkShmFile defined in httpd.conf. LoadBalancer will not function properly! [Wed Jun 15 15:33:08 2005] [emerg] No JkShmFile defined in httpd.conf. LoadBalancer will not function properly! In mod_jk.log in apache, I got the following: [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1024): received from ajp13 pos=0 len=96 max=8192 [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_unmarshal_response::jk_ajp_common.c (606): status = 404 [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_unmarshal_response::jk_ajp_common.c (613): Number of headers is = 2 [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_unmarshal_response::jk_ajp_common.c (669): Header[0] [Content-Type] = [text/html;charset=utf-8] [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_unmarshal_response::jk_ajp_common.c (669): Header[1] [Content-Length] = [1019] [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1024): received from ajp13 pos=0 len=1023 max=8192 [Wed Jun 15 16:42:34 2005] [3800:] [debug] ws_write::mod_jk.c (380): writing 1019 (1019) out of 1019 [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1024): received from ajp13 pos=0 len=2 max=8192 [Wed Jun 15 16:42:34 2005] [3800:] [debug] ajp_done::jk_ajp_common.c (2046): recycling connection cache slot=0 for worker ajp13 [Wed Jun 15 16:42:34 2005] [3800:] [debug] jk_handler::mod_jk.c (1959): Service finished with status=404 for worker=ajp13 I am not sure what went wrong. In httpd.conf in apache, I added/modified the following lines: ServerRoot /export/chrisho/apache2 LoadModule jk_module libexec/mod_jk.so Directory /export/chrisho/jakarta-tomcat-5.5.9/webapps/jsp-examples/WEB-INF Options -Indexes FollowSymLinks Deny from all /Directory JkWorkersFile conf/workers.properties JkLogfile logs/mod_jk.log JkLogLevel debug Alias /jsp-eg /export/chrisho/jakarta-tomcat-5.5.9/webapps/jsp-examples Alias /servlets-eg /export/chrisho/jakarta-tomcat-5.5.9/webapps/servlets-examples JkMount /jsp-eg/*.jsp ajp13 JkMount /jsp-eg/*.html ajp13 JkMount /servlets-eg/*.html ajp13 The workers.properties in apache2 looks like the following: workers.tomcat_home=/export/chrisho/jakarta-tomcat-5.5.9 ps=/ worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 In server.xml in tomcat 5.5.9, I added/modified the following lines: Listener className=org.apache.jk.config.ApacheConfig configHome=/export/chrisho/jakarta-tomcat-5.5.9 modJk=/export/chrisho/apache2/libexec/mod_jk.so jkWorker=ajp13 forwardAll=False jkLog=/export/chrisho/apache2/logs/jk-tomcat.log jkDebug=debug noRoot=False workersConfig=/export/chrisho/apache2/conf/workers.properties / Connector port=8009 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 protocol=AJP/1.3 / Then I restart the tomcat and apache respectively. I have no problem to go to the following link through tomcat: http://localhost:8080/jsp-examples/index.html But I have problem to go to the following link through apache: http://localhost/jsp-eg/index.html Can somebody please help me. thanks, Christine --- [EMAIL PROTECTED] wrote: Please refer to message 128209 for a complete howto. Request it by sending an email to : [EMAIL PROTECTED] __ Discover Yahoo! Get on-the-go sports scores, stock quotes, news and more. Check it out! http://discover.yahoo.com/mobile.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't find workers file
Fedora Core 3 uses a special security system called [something I've forgot...] which runs the Apache process a it's own user name/group and prevents it from accessing files that doesn't belong to him. Search in that direction and you should find what you are looking for. Consider placing the workers.properties file in the Apache2/conf/ directory and chown and chmod it. It seems like a good old permission problem... Luc Boudreau Universit du Qubec Canada -Message d'origine- De: naidim [mailto:[EMAIL PROTECTED] Envoy: 16 juin 2005 11:08 : tomcat-user@jakarta.apache.org Objet: Can't find workers file I'm running Apache 2.0.52 and Tomcat 5.5.9 on Fedora Core 3. Both are working properly. I installed mod_jk, but when I edit httpd.conf to add JkWorkersFile I get an error starting Apache: Can't find workers file. I've checked the path, tried changing locations, nothing seems to work. Anyone seen this error before? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Out of memory
Hi, first: You should start a new discussion thread, if you have a new question instead of answering to an existing one. Readers may not see your question if you don't. -XX:+UseAdaptiveSizePolicy works good for me (with Java 5.0). Just give the VM a very big maximum heap size and the gc algorithm will determine for itself how much of the memory it needs. Here is more info: http://java.sun.com/developer/JDCTechTips/2005/tt0216.html#2 hth, Christoph David Wall wrote: This is no doubt a java-related question, but it seems that with virtual memory, my JVM should never run out of memory (aside from a nasty bug and lack of swap disk space). Is there a way to allow my web application to have as much memory as the OS will give it, yet not have the JVM attempt to consume all that space before the GC reclaims the space? I'd like the JVM to start with 64M, max out around 1GB in terms of holding the memory, yet allow it to use more memory when it needs it, and then have it attempt to release that memory so as not to cause swapping once the high memory need has disappeared. Can this be done? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't find workers file
It's SELinux I copied it to /etc/httpd/conf/workers.properties, chown and chmod, still the same error, so I disabled SELinux until I can learn more about configuring it and it works. Thanks. On 6/16/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Fedora Core 3 uses a special security system called [something I've forgot...] which runs the Apache process a it's own user name/group and prevents it from accessing files that doesn't belong to him. Search in that direction and you should find what you are looking for. Consider placing the workers.properties file in the Apache2/conf/ directory and chown and chmod it. It seems like a good old permission problem... Luc Boudreau Universit du Qubec Canada -Message d'origine- De: naidim [mailto:[EMAIL PROTECTED] Envoy: 16 juin 2005 11:08 : tomcat-user@jakarta.apache.org Objet: Can't find workers file I'm running Apache 2.0.52 and Tomcat 5.5.9 on Fedora Core 3. Both are working properly. I installed mod_jk, but when I edit httpd.conf to add JkWorkersFile I get an error starting Apache: Can't find workers file. I've checked the path, tried changing locations, nothing seems to work. Anyone seen this error before? 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: Shell command to stop and start a webapp without using the manager?
He should be able to use the manager but he'll have to run a copy of it in each Host instance for it to work. On 6/16/05, Marius Scurtescu [EMAIL PROTECTED] wrote: Nikola Milutinovic wrote: [EMAIL PROTECTED] wrote: Hi all, I'd like to know if there's a shell command to stop and start separate web applications. With our configuration, we are unable to use the manager. * We are running Tomcat 5.5 and Apache 2 with the JK Connector (mod_jk) on RedHat Linux. * We have several virtual hosts. When we used 1 service with multiple hosts, we had the problem that our different webapps were sharing the same memory space and they kept stepping on each other. So we split things up. Each host is using a separate service on a different port (see example below). Take a look at Ant Tomcat task. It is used to deploy new webapp from Ant and Ant works from command line. I think this is your best bet. Not to mention that Ant has such a wide variety of other tasks, it is a great boost to your work. You might need to do some other tasks at that time and Ant can help a lot. Of course, if something *is* a job for a shell script, it might be better to do it a s shell script job :-) Ant is also using the manager and Nikola says that they cannot use it for some reason. Nikola, you cannot use the web interface of the manager or you cannot use the manager at all? You can easily write scripts that use wget for example to remotely control Tomcat through the manager (no need to use the web interface in a browser but it has to be accessible). Have a look at: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/manager-howto.html#Supported%20Manager%20Commands Marius - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Virtually, Andre Van Klaveren Architect III, SCP Enterprise Transformation Services Unisys Corporation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't find workers file
You mean Security Enhanced Linux...aka SELinux. Yes that is true, it will prevent you from reading directorys not owned by apache. You can also turn off SELinux, which seems to easy to do. Randall -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 16, 2005 11:42 AM To: tomcat-user@jakarta.apache.org Subject: RE: Can't find workers file Fedora Core 3 uses a special security system called [something I've forgot...] which runs the Apache process a it's own user name/group and prevents it from accessing files that doesn't belong to him. Search in that direction and you should find what you are looking for. Consider placing the workers.properties file in the Apache2/conf/ directory and chown and chmod it. It seems like a good old permission problem... Luc Boudreau Universit du Qubec Canada -Message d'origine- De: naidim [mailto:[EMAIL PROTECTED] Envoy: 16 juin 2005 11:08 : tomcat-user@jakarta.apache.org Objet: Can't find workers file I'm running Apache 2.0.52 and Tomcat 5.5.9 on Fedora Core 3. Both are working properly. I installed mod_jk, but when I edit httpd.conf to add JkWorkersFile I get an error starting Apache: Can't find workers file. I've checked the path, tried changing locations, nothing seems to work. Anyone seen this error before? 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: Webdav on Tomcat 5.0.28 fails
It is the webdav servlet mapping that needs to change, not the default servlet. Mark Padmanabhan, Sheeba wrote: Hi Mark, I modified the web.xml under \conf folder to change the url_pattern as follows: !-- The mapping for the default servlet -- servlet-mapping servlet-namedefault/servlet-name url-pattern/*/url-pattern /servlet-mapping But that didn't help. I am not that familiar with tomcat configuration settings. If I am doing something wrong, please correct me. Any help would be greatly appreciated. Thanks Sheeba -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 15, 2005 3:01 PM To: Tomcat Users List Subject: Re: Webdav on Tomcat 5.0.28 fails What URL mapping are you using? For MS clients /* works better than /. Mark Padmanabhan, Sheeba wrote: Our Webdav Server works fine with Tomcat 4.0. But when it is configured to use it through Tomcat 5.0, it just won't work. The Webfolders, Office Appilications - all are failing. Am I missing any configuration settings specific to 5.0? - 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]
Uploading files to another server
Hi, We have an application which uploads files to a machine where tomcat is running. Now we want to change it to upload files to a central server in the network. We were using multipart request to upload the files till now. How can we upload files to a different server than where the tomcat is running. Any suggestions are appreciated. Can you please point me to some examples. Thanks, Anna. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Webdav on Tomcat 5.0.28 fails
Hi Mark, I couldn't find any webdav servlet entry in the \conf\web.xml. Could you please tell me which tag exactly I should modify? Also the litmus test for Webdav, return the OPTIONS method as server does not claim webdav compliance error. This happens only with Tomcat 5.0. Tomcat 4.0 and all other appServers are working fine with the same server. Thank you very much in advance. Thanks Sheeba -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Thursday, June 16, 2005 2:11 PM To: Tomcat Users List Subject: Re: Webdav on Tomcat 5.0.28 fails It is the webdav servlet mapping that needs to change, not the default servlet. Mark Padmanabhan, Sheeba wrote: Hi Mark, I modified the web.xml under \conf folder to change the url_pattern as follows: !-- The mapping for the default servlet -- servlet-mapping servlet-namedefault/servlet-name url-pattern/*/url-pattern /servlet-mapping But that didn't help. I am not that familiar with tomcat configuration settings. If I am doing something wrong, please correct me. Any help would be greatly appreciated. Thanks Sheeba -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 15, 2005 3:01 PM To: Tomcat Users List Subject: Re: Webdav on Tomcat 5.0.28 fails What URL mapping are you using? For MS clients /* works better than /. Mark Padmanabhan, Sheeba wrote: Our Webdav Server works fine with Tomcat 4.0. But when it is configured to use it through Tomcat 5.0, it just won't work. The Webfolders, Office Appilications - all are failing. Am I missing any configuration settings specific to 5.0? - 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]
mod_jk works as localhost only
I'm running Apache2.0.52 and Tomcat 5.5.9 on FC3. Both work fine locally and remotely. mod_jk is configured but it only works as localhost. Browsing by name or IP fails to find the files in the webapp directory. What do I need to change so it finds them when browseing remotely? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Possible bug in request parameter decoding
In Tomcat 5.5.9, class org.apache.catalina.connector.Request, lines 2307-2312, the charset used to decode request parameters is identified as org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING, i.e. ISO-8859-1. According to http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars request parameters are encoded in UTF-8. A simple form test suffices to confirm that my user-agents (Camino and Safari) correctly encode both POST and GET request parameters in UTF-8. It seems this may be a long-standing bug in Tomcat, preventing the posting of non-ASCII text from standards-compliant user-agents. I can't find anything matching in Bugzilla though. Is there a good reason for using Latin-1 here? -- Chris Burdess - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Possible bug in request parameter decoding
The HTTP spec is vague. It has many references to ISO8859-1. IIRC, there is a connector option to decode parameters as UTF-8. -Tim Chris Burdess wrote: In Tomcat 5.5.9, class org.apache.catalina.connector.Request, lines 2307-2312, the charset used to decode request parameters is identified as org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING, i.e. ISO-8859-1. According to http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars request parameters are encoded in UTF-8. A simple form test suffices to confirm that my user-agents (Camino and Safari) correctly encode both POST and GET request parameters in UTF-8. It seems this may be a long-standing bug in Tomcat, preventing the posting of non-ASCII text from standards-compliant user-agents. I can't find anything matching in Bugzilla though. Is there a good reason for using Latin-1 here? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Webdav on Tomcat 5.0.28 fails
On 6/16/05, Padmanabhan, Sheeba [EMAIL PROTECTED] wrote: Hi Mark, I couldn't find any webdav servlet entry in the \conf\web.xml. Could you please tell me which tag exactly I should modify? It would be \webapps\webdav\WEB-INF\web.xml -- 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]
RE: Webdav on Tomcat 5.0.28 fails
Thanks Jason for the reply. Actually that url_pattern was already set to /*. Could you think of any other configuration settings that I am missing for having this issue only Tomcat 5.0? Thanks Sheeba -Original Message- From: Jason Bainbridge [mailto:[EMAIL PROTECTED] Sent: Thursday, June 16, 2005 3:18 PM To: Tomcat Users List Subject: Re: Webdav on Tomcat 5.0.28 fails On 6/16/05, Padmanabhan, Sheeba [EMAIL PROTECTED] wrote: Hi Mark, I couldn't find any webdav servlet entry in the \conf\web.xml. Could you please tell me which tag exactly I should modify? It would be \webapps\webdav\WEB-INF\web.xml -- 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]
Mailing list problems
We are having some problems with our mail server at the moment. You may receive a message that your message has not been sent when in fact it has. Whilst this problem is ongoing please refrain from sending the same message repeatedly as this just makes things worse. The infrastructure team are on the case and I will post an update when I have one. Thanks, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk works as localhost only
It's not a firewall blocking it as far as I can tell, but I tried your suggestion with no change. Locally, I can browse localhost, localhost:8080, localhost:8080/jsp-examples and localhost/jsp-examples, showing that mod_jk is working okay. However, also locally, I can also browse by ip, ip:8080, ip:8080/jsp-examples, I CANNOT browse ip/jsp-examples. I get The requested URL /jsp-examples/ was not found on this server. Remotely I get the same results. On 6/16/05, Randall Svancara [EMAIL PROTECTED] wrote: Have you turned off iptables. /etc/init.d/iptables stop That will kill the firewall rules that is built in to Fedora Core3. Randall -Original Message- From: naidim [mailto:[EMAIL PROTECTED] Sent: Thursday, June 16, 2005 12:41 PM To: Tomcat Users List Subject: mod_jk works as localhost only I'm running Apache2.0.52 and Tomcat 5.5.9 on FC3. Both work fine locally and remotely. mod_jk is configured but it only works as localhost. Browsing by name or IP fails to find the files in the webapp directory. What do I need to change so it finds them when browseing remotely? 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: Possible bug in request parameter decoding
From: Chris Burdess [mailto:[EMAIL PROTECTED] Subject: Possible bug in request parameter decoding According to http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars request parameters are encoded in UTF-8. Well, that's not quite how I read it. By definition (RFC 2396), URIs are not supposed to contain non-ASCII values. The HTML 4.0 appendix referred to above makes the somewhat contradictory suggestion to use UTF-8 to handle non-ASCII, ignoring the fact that UTF-8 encoding produces byte values outside of the ASCII range. Since the discussion in this area of the appendix is related to browser, not server, behavior, it's not really relevant to what Tomcat should do when it encounters illegal (non-ASCII) values in a URI supplied on a browser request. In any event, as Tim noted, you can configure how the connector should interpret non-ASCII bytes by specifying a value for URIEncoding in your server.xml file. I suspect that the default value of ISO-8859-1 is there largely for historical reasons, since it was the predominant encoding before UTF-8 became popular. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache/Tomcat in-process
hi, Anybody knows how to make apache and tomcat are running in the same process? I read somewhere and said that it can be done but it is not easy. Anyone tried it? if so, please give me some pointers. thanks, Christine __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk works as localhost only
send me the httpd.conf and the server.xml and worker.properties ... i will have a look ... Regards guru - Original Message - From: naidim [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, June 16, 2005 7:40 PM Subject: mod_jk works as localhost only I'm running Apache2.0.52 and Tomcat 5.5.9 on FC3. Both work fine locally and remotely. mod_jk is configured but it only works as localhost. Browsing by name or IP fails to find the files in the webapp directory. What do I need to change so it finds them when browseing remotely? 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: Can't find workers file
I am using Fedora Core 3 more my apache/tomcat installation. Also make note that I created a separate mod_jk.conf file and put it into the /etc/httpd/conf.d/ directory, instead of putting it into the httpd.conf file like you are doing. Here is my mod_jk.conf if that helps you. # # Mod_jk is a connector that communicates with tomcat using the # ajp13 protocol. # LoadModule jk_module modules/mod_jk.so #Where to find the workers.properties JkWorkersFile /etc/httpd/conf/workers.properties #Where to find the workers.properties JkWorkersFile /etc/httpd/conf/workers.properties #Where to put the jk logs JkLogFile /var/log/httpd/mod_jk.log #Log File Level JkLogLevel all #Log file format JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkRequestLogFormat %w %V %T JkShmFile /var/log/httpd/jksmfile JkShmSize 20M -Original Message- From: naidim [mailto:[EMAIL PROTECTED] Sent: Thursday, June 16, 2005 9:08 AM To: tomcat-user@jakarta.apache.org Subject: Can't find workers file I'm running Apache 2.0.52 and Tomcat 5.5.9 on Fedora Core 3. Both are working properly. I installed mod_jk, but when I edit httpd.conf to add JkWorkersFile I get an error starting Apache: Can't find workers file. I've checked the path, tried changing locations, nothing seems to work. Anyone seen this error before? 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: Uploading files to another server
Create a share on the Central Server and map the share onto each machine tomcat is running with the same path and then upload the docs. - Original Message - From: Anna Bikkina [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Thursday, June 16, 2005 7:12 PM Subject: Uploading files to another server Hi, We have an application which uploads files to a machine where tomcat is running. Now we want to change it to upload files to a central server in the network. We were using multipart request to upload the files till now. How can we upload files to a different server than where the tomcat is running. Any suggestions are appreciated. Can you please point me to some examples. Thanks, Anna. - 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 pre-compile and Apache
Have you granted the site accessClassInPackage runtime permission? -Terence M. Bandoian [EMAIL PROTECTED] I used to precompile my JSP's (which worked great and was a big time saver in testing), but since running Tomcat 4.1.31 together with Apache, all sorts of weird errors occurred. I remember reading somewhere that Apache expected the actual jsp file, not the compiled version. So I reverted back to *not* precompiling JSP's and everything worked as expected. Question now, obviously there is a first-time-compile penalty per jsp, but once compiled, should performance be the same? How about the overhead to check if the .jsp file indeed matches the compiled version? Has someone managed to get precompiled JSP's running in combination with Apache? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk works as localhost only
According to your httpd.conf your servername is flex.homelinux.org:80 Seems that your server.xml is wrong ... Change Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Listener className=org.apache.jk.config.ApacheConfig append=true jkWorker=ajp13/to Host name=flex.homelinux.org appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Listener className=org.apache.jk.config.ApacheConfig append=true jkWorker=ajp13/and try http://flex.homelinux.org:80/RegardsGuru- Original Message - From: Gurumoorthy [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org; naidim [EMAIL PROTECTED] Sent: Thursday, June 16, 2005 11:28 PM Subject: Re: mod_jk works as localhost only send me the httpd.conf and the server.xml and worker.properties ... i will have a look ... Regards guru - Original Message - From: naidim [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Thursday, June 16, 2005 7:40 PM Subject: mod_jk works as localhost only I'm running Apache2.0.52 and Tomcat 5.5.9 on FC3. Both work fine locally and remotely. mod_jk is configured but it only works as localhost. Browsing by name or IP fails to find the files in the webapp directory. What do I need to change so it finds them when browseing remotely? 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]
How to set JPDA Options in Tomcat 5.5
Hi, Old versions of tomcat had catalina.bat where we can set jpda options. New versios only hava Tomcat.exe. Any idea how to pass JPDA options Regards, Haneef - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Container Managed Security and mod_jk/Static Contents
Hello! In order to improve performance for static contents I have setup Apache with mod_jk. Now only Struts' *.do requests are served by Tomcat, the rest is done by Apache. Works fine. Now I want to restrict access to some resources using using container managed security. That also works fine, but, and that is now my question: I also want to protect static contents, but that won't work with container managed security, because these requests are handled by Apache and don't even make it to Tomcat. Of course I could just mount the contents to be protected to Tomcat, but then I'll lose the performance advantage of having them served by Apache. Do I have to live with that or do I have a stupid setup? Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Container Managed Security and mod_jk/Static Contents
Hi, Why don`t you use Apache to protect your static contents?? You might want to use .htaccess ?? http://www.csoft.net/docs/micro/htaccess.html.en Mit freundlichem Gru / kind regards Dr. Aliye Edao -Ursprngliche Nachricht- Von: Torsten Rmer [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 17. Juni 2005 00:42 An: Tomcat Users List Betreff: Container Managed Security and mod_jk/Static Contents Hello! In order to improve performance for static contents I have setup Apache with mod_jk. Now only Struts' *.do requests are served by Tomcat, the rest is done by Apache. Works fine. Now I want to restrict access to some resources using using container managed security. That also works fine, but, and that is now my question: I also want to protect static contents, but that won't work with container managed security, because these requests are handled by Apache and don't even make it to Tomcat. Of course I could just mount the contents to be protected to Tomcat, but then I'll lose the performance advantage of having them served by Apache. Do I have to live with that or do I have a stupid setup? Torsten - 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]