Embedded example
Hi Can someone tell me where to find an example with tomcat 5.5 embedded? It seems there is nothing... Or even better: Is there a way to use the http(s) connector without tomcat? I want to direct ALL requests to ONE pure servlet and there do not need most parts of tomcat. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
Threads / Tomcat Lite
Hi 1. Question I need to store some information which differs for each request. My problem: I need it at a place where I have no access to the request, the response or the session. Now, I can also do it using ThreadLocal variables, but these take time. I would prefer to use a custom Thread class for the Processors and to extend that by an aditional variable. I could then cast Thread.currentThread() to my own Thread class and use the variable. So, is it possible to specify, which class is used? 2. Question Is it possible to use the HTTP connector of tomcat only? Everything I have is served by a single servlet. I do NOT need logging, filters, mappings (other than the single one), and so on. Every request goes all the way through tomcat's valves and filters. This takes a little time. A little time I'd like to save. Any way? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Can't do log rotation on windows
Hi I've got tomcat 4 running on a win2003 server and it spits it's log messages to a catalina.out file. Once a day I want to rotate the log - copy it, zip up the copy and truncate the original. I do this on linux with a simple shell script. Tomcat is running during all of this and has its mitts into the file but linux doesn't seem to care. Different story on windows, however. The short story is that catalina.out is corrupted big time. Lesson: Never modify a file that another process is actively writing to. This is not supposed to work. Neighter on windows, nor on linux. Luck for you, that this works on Linux. The os should lock that file inbetween, but since stdout is redirected different way on both oses, there are different possibilities. One is to stop the service before truncating the file and start it up again afterwards. This works but win2003 can't always restart the service, like 50% of the time. So I've given up on this route. I need a solution that works while tomcat is running. Propably you got bind: port in use. Stop the service, wait some time, do your work, restart the service. This should work. At least it works here. Basically to stop means to tell the service that it shall stop. Tomcat might take some more time. Furthermore, the os might take some time to realise, that the socket is available again. The only idea I've had for this is to try to get tomcat to use a filelogger like it provides for it's contexts. I made the changes to server.xml but then never did doodly squat. I know I'm not the only one that's had trouble doing this on windows as I've seen other notes to list about it. I posted a note a while back (attached) but no response. Is it because no one runs tomcat on windows? This would be the best way, but involved changing your logging scheme in your application. stdout redirection is not possible through loggers, afaik. Regards Steffen smime.p7s Description: S/MIME cryptographic signature
AW: HTMLArea and SpellCheck plugin
See http://www.fckeditor.net/ -Ursprüngliche Nachricht- Von: David Wall [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 11. Februar 2005 19:15 An: Tomcat Users List Betreff: Re: HTMLArea and SpellCheck plugin Anybody successfully implemented a tomcat webapp that uses the HTMLArea editor and the SpellChecker plugin (both free from Interactive Tools and Dynarch) ? What do people think about HTMLArea? It seems one of the only free HTML textarea type widgets out there. I think the latest has greater support than just IE, which is critical in a public web site. David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
AW: HTTPS: more than one certificate
Hi Just because I'm interested: If I had more than one certificate in my keystore, which certificate would be used by tomcat for https? Is there a way to specify which certificate to use? I don't know. But you can use different keystores: Use the following attributes for CoyoteConnector: keystoreFile=___.p12 keystorePass=___ keystoreType=PKCS12 Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: AW: certificate question for 2 domains pointing to same website
Hi Wait a second...Tomcat will determine which cert to send down based upon the IP address that the browser went to? I guess that makes sense...so does the web server never get to see what domain the browser was looking up to come to the site, or is that info available? That info is available, but already encrypted. I'm just trying to figure out if there's a way to run the website for a limited time with 2 domains and 2 certs--I mean, the 2 domains, each with their own cert, but with one single public IP address. One single public IP will NOT work. Forget it. We have a bigIP load balancer in front of our Tomcat servers...so do our Tomcat servers still see the public IP address that was used to reach them? I think not, but I dunno. I ask because those boxes only have private IPs, and the load balancer has the only public IP. If there's no way to do it, then I guess we just arbitrarily switch at some point and don't worry about the people using the old domain seeing invalid certificate messages... You'll need to. What happens with https is: a) The client get's the ip for the domain by dns lookup. b) The client connects to that ip and immediately get's the server's cert. c) The client encrypts the page request (including headers and a one time key) and sends this encryped. d) The server decrypts that request. (it know's the private key of the cert sent in b.) e) The server sends the response encrypted with the one time key of c. f) The lcient decrypts the response. (it know's the one time key send in c.) Basically the server sees the ip the client connects to and must supply a cert. Only after step d, when the server decrypted the request, it knows about the domain name. You see, no change to go with two certs. HOWEVER, for x509 email-certs extensions where developed which allow more then one address per cert. Maybe there are extensions for Server-certs that allow more then one domain name. If you get two domain names in one cert, you shoud be ready to go. Additionally newer versions of SSL/TLS support other kinds of authentication algorithms that are designed to allow more then one cert per ip. Exspecially they transmit domain names before they transmit the cert. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: certificate question for 2 domains pointing to same website
Hi If we do this and get that new certificate into the keystore used by our Tomcat 4, will everything be fine, or will Tomcat present 2 certificates to users accessing the site? I mean, will it correctly present the certificate for the old domain to the user when they go to the old domain, and the new certificate to those entering via the new domain? No. This is impossible. The information which domain is used is already encrypted. So if you need 2 certs, you need 2 ips. If you configure 2 ips with 2 connectors and 2 certs, everything is fine. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Tomcat belches out megabytes of white space during log rotation
Hi I have this weird problem with an instance of tomcat 4.1.30 running on Windows Server 2003. Tomcat output (log messages) is directed into CATALINA_HOME/logs/catalina.out. Every 4 hours a little log rotation script runs while tomcat is active. It zips catalina.out into an archived logs folder and then truncates it. All this seems to work ok and you end up with a small 1KB file. The problem is that the next log entry to catalina.out (from the next request) is preceded by around 9MB of white space! After heaving this load it settles down and writes log messages normally. Until the next rotation that is. Then the same thing happens. At the first http request to the server after catalina.out is trucated, boom, around 9 more MB of white space is dumped into it. Not the exact same amount as before. Actually, the amount has been going on for several months and the actual amount of white space spew has been increasing. It started out around 4MB. You simply may not modify files, which are in use by other processes. In fact, you may not modify the log at all, while the jvm has an open handle on it. I assume, that the whitespace is the result of truncating the log file. I assume there are as many spaces in the new log as characters in the old log. Simple lesson: Don't do it. Use another logging mechanism, which has build in rotation support. I'd also assume the same problem to be present on linux. It is not surprising that this does not work on windows, it is more surprising that it works on linux. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Meaning of threads
Hi the number of threads will depend on the size of your machine, but to support many concurrent users, you will want to turn off keep alive connections, as these will have the opposite effect. Wouldn't it make more sense to enable keep alive connections and increase the thread count - if memory suffices? Even if not, the keep-alive timeout should be decreased instead of disabled all together. Additionally I'd like to see tomcat to be able to drop keep-alive connection exactly then, when all threads are busy and a new connection is to be etablished. That would give us the benefit of keep alive connections - faster data delivery for users - as well as optimal thread usage even on small thread pools. What is your opinion? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Virtual Hosts and SSL
Hi I can't find anything specific to my question in the FAQs but I'm trying to set up a tomcat server with virtual hosts using https. I have two ips, each with its own SSL cert as I understand is necessary for https. What I want is to have each ip use port 443 with its own document tree (virtual host) but I cannot seem to get this to work. When I set up an additional ip to use port 443 I get an error 400 (bad request). This should absolutely work. Have 2 different engnies, each with it's own https-connector. Bind these https-connectors to different IPs using it's address parameter. If this does not work, submit a bug. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Too many BackGround Java Threads
Hi When i do a check on the back ground threads i see many jvm threads running .. 27288 pts/0S 0:34 /usr/local/j2sdk1.4.2_06/bin/java -Xms700m -Xmx800m -XX:+UseConcMarkSweepGC - 27289 pts/0S 0:01 /usr/local/j2sdk1.4.2_06/bin/java -Xms700m -Xmx800m -XX:+UseConcMarkSweepGC - 27290 pts/0S 0:01 /usr/local/j2sdk1.4.2_06/bin/java -Xms700m -Xmx800m -XX:+UseConcMarkSweepGC - 27291 pts/0S 0:06 /usr/local/j2sdk1.4.2_06/bin/java -Xms700m -Xmx800m -XX:+UseConcMarkSweepGC - 27292 pts/0S 0:00 /usr/local/j2sdk1.4.2_06/bin/java -Xms700m -Xmx800m -XX:+UseConcMarkSweepGC - 27293 pts/0S 0:00 /usr/local/j2sdk1.4.2_06/bin/java -Xms700m -Xmx800m -XX:+UseConcMarkSweepGC - 27294 pts/0S 0:00 /usr/local/j2sdk1.4.2_06/bin/java -Xms700m -Xmx800m -XX:+UseConcMarkSweepGC - 27295 pts/0S 0:00 /usr/local/j2sdk1.4.2_06/bin/java -Xms700m -Xmx800m -XX:+UseConcMarkSweepGC - 27296 pts/0S 0:00 /usr/local/j2sdk1.4.2_06/bin/java -Xms700m -Xmx800m -XX:+UseConcMarkSweepGC - 27297 pts/0S 0:03 /usr/local/j2sdk1.4.2_06/bin/java -Xms700m -Xmx800m -XX:+UseConcMarkSweepGC - 27298 pts/0S 0:18 /usr/local/j2sdk1.4.2_06/bin/java -Xms700m -Xmx800m -XX:+UseConcMarkSweepGC - 27302 pts/0S 0:01 /usr/local/j2sdk1.4.2_06/bin/java -Xms700m -Xmx800m -XX:+UseConcMarkSweepGC - Only such a few? Our servers are running with about 100 threads all the time. This is not a bug, this is a feature. Each threads handles one request at a time. So many concurrent requests create many threads. Tomcat is very well designed to work that way. restarting tomcat is the only option left. Why? not able to quite understand where the problem is ?? Neither do I. Give us more information? What hardware, what os, how much memory, some configuration information, some information about your application... Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
Analysing dead threads
Hi I have a situation, where a lot of threads seem to stop working right in my servlet. From debug output, I know they entered the servlet but never leave it. My problem is that this never occurs on our development system, but only on the production system. I need to stop tomcat end even do a killall -9 java to get everything to stop. Then I restart tomcat. But I don't know what happened. I know there is a way to kill the JVM, so that I see the stack trace of kill threads. How can I do it? (Is there another way to see what those threads are waiting for?) Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: wrong version 49.0
Sorry, http://learn.to/quote Regards, Steffen -Ursprüngliche Nachricht- Von: Phillip Mangwiro [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 10. November 2004 08:06 An: Tomcat Users List Betreff: Re: wrong version 49.0 Wei Wei wrote: After installed 5.0.29 TC, I tried to bring up the new application I just start today. I get the following error message. Can some tell me what is wrong here. 2004-11-04 10:42:39 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\gallery\org\apache\jsp\index_jsp.java:7: cannot access java.lang.Object Generated servlet error: bad class file: C:\Program Files\Java\jre1.5.0\lib\rt.jar(java/lang/Object.class) class file has wrong version 49.0, should be 48.0 Please remove or make sure it appears in the correct subdirectory of the classpath. public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase ^ 1 error at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:84) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3 32) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:432) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:492) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:471) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:459) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 11) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 95) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:684) at java.lang.Thread.run(Unknown Source) 2004-11-04 10:44:25 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\gallery\org\apache\jsp\index_jsp.java:7: cannot access java.lang.Object Generated servlet error: bad class file: C:\Program Files\Java\jre1.5.0\lib\rt.jar(java/lang/Object.class) class file has wrong version 49.0, should be 48.0 Please remove or make sure it appears in the correct subdirectory of the classpath. public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase ^ 1 error at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:84)
AW: problem - BindException: JVM_Bind: 80
Hi Get tcpview pro (it's free) and check what binds this port. Regards, Steffen -Ursprüngliche Nachricht- Von: Stephen Charles Huey [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 10. November 2004 22:01 An: Tomcat User Betreff: problem - BindException: JVM_Bind: 80 I'm seeing a strange error message. We only run Tomcat as a service on Windows 2000, and no IIS or anything else, so I can't see anything else holding onto port 80. Any idea what would be causing this? Would it be something as simple as choosing to Start or Restart the service when it's already started and Tomcat isn't releasing hold of port 80 as it stops and restarts? Catalina.start: LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:80 LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:80 at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:11 19) at org.apache.catalina.core.StandardService.initialize(StandardService.java:579 ) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246) at org.apache.catalina.startup.CatalinaService.load(CatalinaService.java:236) at org.apache.catalina.startup.CatalinaService.load(CatalinaService.java:258) 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.BootstrapService.init(BootstrapService.java:231) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:297) Bootstrap: Starting service Starting service Tomcat-Standalone Apache Tomcat/4.1.24-LE-jdk14 Catalina.start: LifecycleException: Protocol handler start failed: java.net.BindException: Address already in use: JVM_Bind:80 LifecycleException: Protocol handler start failed: java.net.BindException: Address already in use: JVM_Bind:80 at org.apache.coyote.tomcat4.CoyoteConnector.start(CoyoteConnector.java:1143) at org.apache.catalina.core.StandardService.start(StandardService.java:506) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:273) 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.BootstrapService.start(BootstrapService.java:245 ) at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307) Bootstrap: Service started - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
AW: can't run a simple servlet on tomcat5.5 server
Hi ... and placed in a folder called web-inf/classes and I have placed sevlet.jar file in web-inf/lib folder. First, to start read the docs. Second, to start I would prefer a stable release, go back to 5.0. Third, tomcats libs are fine where they are. Don't copy them, remove the copies. Fourth, your sentence seems to tell me, you made a packageless servlet. This is not possible. Put your servlet in a package and put the compiled class file in matching subfolder of web-inf/classes. Fifth, I hope it is WEB-INF/classes instead of web-inf/classes. Sixth, did you map your servlet? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Upload MS DOC or Image file errors.
Hi Hi, I am use the File Upload. I need to read the whole file contents in a String buffer. Why into a String buffer? This is propably a charset encoding problem. Do NOT read it into a stringbuffer. See FileWriter documentation: FileWriter is meant for writing streams of characters. For writing streams of raw bytes, consider using a FileOutputStream. So change your method: . int nSize=0; // now !item.isFormField() java.io.InputStream fstrm = item.getInputStream(); int rnum=0; buf = new byte[262144]; // the doc file size I am testing is 13 buyes. while (rnum=0){ // I have to read all the contents rnum = fstrm.read(buf, (int)nSize, 100); if (rnum 0) nSize += rnum; } fstrm.close(); if ( nSize0) { // I like to test if it read correctly: FileOutputStream fileOut = new FileOutputStream(C:/DocAttachment/strFileName.doc); fileOut.write(buf, 0, nSize); fileOut.flush(); fileOut.close(); .. } Beside that: You know that you could simply do: item.write( new File( C:/DocAttachment/strFileName.doc ) ); Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: proxy support and X-Forwarded-For
Hi Does Tomcat support the headers: X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Server when running behind a proxy? I'm running Tomcat 5.0.25 behind Apache 1.3/mod_proxy and doesn't look like Tomcat uses these headers. What would you expect tomcat to do when these headers are present? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Upload MS DOC or Image file errors.
Hi This is much more than a character encoding problem. No. Daxin simply wanted to upload binary data (he even mentioned images...). So he didn't want to extract text from word documents. What he did was, he loaded binary data, converted that to a string and finally wrote the string to a file. But java's character encodings changed the binary data on that way, thus the binary files (ms-doc or images) were damaged. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Upload MS DOC or Image file errors.
Thanks. It works. Fine. But what? Switching to FileOutputStream or just using item.write? (They should both work, though the second seems to make more sence. Just asking for interest.) Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: AW: Session Definition Bug?
Hi I'm using the firefox browser and have no proxy definitions. First try another browser. Then, maybe your tomcat is configured to use cookies as session ids and your browser is configured not to accept cookies? However, since there is no different code for local and remote clients, I cannot believe this were a bug in tomcat. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Session Definition Bug?
Hi I am using jakarta-tomcat-5.0.27 standalone on windows xp pro. When I connect from a browser on the same host as Tomcat, the session listener is invoked on every request to to tomcat from the client... Are you sure? This doesn't happen to me. And as tomcat usually doesn't care about wether the request is local or not, this seems odd. Check for proxy configuration of your local browser... Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Session ID in URL
Hi How do I deal with a situation where a user logged in and found something interesting on my site and decided to give the URL address (with jsessionid) of the page to his/her friend? Since the URL has the session id of the sender, the receiver clicks on the link and will have access to the sender account details. You can do some things: 1. If the remote ip changes, drop the session. 2. If referer of the request is not set, drop the session. Both have their drawbacks tough: 1. will fail if the dynamic ip changes: The legitimate user will be logged out. 2. will fail if the browser or a proxy removes the referer: The user will not be able to login. Also, this will no secure everything: Two users behind one proxy will not be destinguishable, therefor if they copy urls, the problem recurs. Obviously, there is another solution: Switch to cookies instead of SID in urls. And on the other hand: Warn the user upon login not to share urls. It is their liability not to share their password, so if they are warned, it can be their liability not to share session ids. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: New User needing urgent help
Hi import Account; No. No. No. Import is used to make classes of foreign packages available. Classes in the same package are always available. And you should never have any package-less class, hence no problems. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Upgrading for the sake of it?
Hi So is the best advice to go with what I know best (and can be sure my websites run under) and install old versions. Or to go with the very latest of everything. I would recommend to use some recent version. Not the lastest, because they are alpha/beta versions. Simply try it and if it works, okay. If not, remove them and use your old versions. Two thinks to remember: - Tomcat 5 uses newer specifications than 4.1.x. does. Your App MIGHT be incompatible. - Tomcat 5 improved a lot in terms of speed over Tomcat 4. - Sun JDK 1.5.0 improved a lot of JDV 1.4.2 which is already much faster than 1.3.x... So yes, you should take some recent versions, but be sure to test before putting that into production. If so then is it a good idea to keep updating Tomcat and Apache (httpd) or should I get one thing working and stick with what works? Ths is a had decition. Read anounces for new stable releases and read the changelog. If there is something in for you, update. Otherwise keep your version as long as no leaks are found in them. The answer to a previous post of mine about Tomcat 4.1.31 told me that is was a 'maintenance release', if this is the case then should all 4.1.x administrators have updated to it? AFAIK 4.1.x is in maintainance mode and no new features are added to it. Development takes place in 5.0.x and 5.5.x, mostly the later which is still in alpha/beta stages. About updates see my statement above. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
Embedded tomcat
Hi Is there any place where I can find information about embedded tomcat? I mean beyond the docs - Examples and such? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Mysterious session behavior across browsers
Hi When I open a new browser, I am getting session data in the new browser that was in another browser. Actually, at least for my IE it works as follows: If I spawn a new browser window pressing ctrl-n, it is seen as a second view for the same content and as such, IE keeps the cookies and therefor the session. If I open a new browser window through the start menu, it is a new instance and therefor has no shared cookies and no shared session. As this makes sense to me, I supose other browsers handle things similar. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Apache 2.0 - mod_proxy, mod_cache - and Tomcat 4.1.29
Hi The backend apache does not only serve static pages like GIF or JS. It also handles PHP, Perl-scripts and some SSL. This can not be done with tomcat. Tomcat CAN do SSL just fine. For some seldomly used php and perl-scripts, tomcat is also just fine. But I agree, if lots of php and perl is involved, tomcat is not the best choise. However check wether it is possible for you situation and the proxy you will set up, if it can pass jsp requests directly to tomcat and other requests directly to apache. Then the connection between tomcat and apache is not nessessary and you once again safe the overhead... Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Apache 2.0 - mod_proxy, mod_cache - and Tomcat 4.1.29
Hi For your problem, remove apache completely, use tomcat standalone and use squid as frontend cache. As static content will also be cached by squid, you can completely remove the overhead of apache and mod_jk. Regrads, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: How to redirect http to https automatically?
Hi Actually, I'm a big advocate against staying in HTTPS, because of the overhead. However, this is a problem with Tomcat, because in the 4.x and 5.x lines it was decided by someone that if a session started in HTTPS it is only valid in HTTPS (basically, the session cookie is turned into a secure cookie only). I do not understand this. I always thought cookies where only valid for ONE domain and ONE Protocol, so the following would be pairwise different and thus cannot share a cookie: http://www.domaina.com http://www.domainb.com http://www.domaina.com http://domainb.com http://www.domaina.com https://www.domaina.com Is my view wrong? Is there a way to reattach a session to a request, if the old sessionID is kown? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: AW: mod_jk2 Ready/Recommended For Production?
Hi However, here's an interesting/fairly recent thread: http://marc.theaimsgroup.com/?l=tomcat-userm=106036177509367w=2 30K file: Server #of Samples Average Deviation Median Apache 1000 182ms 277 90 Tomcat 1000 185ms 249 80 And that way 4.1.27, over which 5.x improved! I agree that I should not hide the result for small files (82byte): Server #of Samples Average Deviation Median Apache 1000 17ms2510 Tomcat 1000 29ms4410 But still 5.x has improved and 82byte files are rare. And remember, that this is the result of pure-apache against pure-tomcat for static files. It is wrong to assume that dynamic files are equally fast comparing tomcat with tomcat/apache. apache/mod_jk add overhead to the process and thus slow down tomcat. And since static files can be cached while dynamic ones cannot, that overhead overhelms the IMHO little speed saving of apache for static files. just my $0,03. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Servlet caching?
Hi If I write a java program to list the services and run the program from the command line, I can see the newly added service right away. Modify your program to list the services, wait one minute, list the services again. Install a printer in that time. See, if the application reflects that change. If not, the Lookup is caching information. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Tomcat smtp SSL transport?
Hi Tomcat and QMail are installed on same host. Currently clients (Mozilla-mail, KMail, ect) send email using SSL encryption. If tomcat is on the same host as your mail daemon, ssl encryption makes no sense. Send the mail without ssl. It might be nessessary to configure this in QMail, but since I only use exim4, I cannot help you on this. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: mod_jk2 Ready/Recommended For Production?
Hi But if you run tomcat standalone, you have to run tomcat as root. NO. There are ways to run tomcat using jsvc and others. Search the archive - I haven't done so myself yet. Apache does not run as root, so if you run Apache in front of tomcat, you can avoid exposing the root account. And opening a lot of other possible security issues. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: mod_jk2 Ready/Recommended For Production?
Hi Apache is likely much better than tomcat in serving static content, ... I assume you cannot prove that, right? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
DefaultServlet
Hi I just read the DefaultServlet code and found in doGet(...) the following: try { serveResource(request, response, true); } catch( IOException ex ) { // we probably have this check somewhere else too. if( ex.getMessage() != null ex.getMessage().indexOf(Broken pipe) = 0 ) { // ignore it. } // HERE throw ex; } It seems there is a else missing ? Otherwise, it is just NOT ignored the the complete catch Statement makes no sense. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Need reseller hosting with Tomcat support
Hi Can anyone recommend a very reputable company that provides reliable unix reseller hosting with knowledgeable Tomcat support? Hi. Try www.ipx-server.de together with [EMAIL PROTECTED]@apache.org... Works fine for me. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: DefaultServlet
Hi I see the code now. Its dead code. At one time - when tomcat was serving resources and the client pressed the stop button - a broken pipe exception would be logged. But since then in other code spots - the non-logging of broken pipe has been implemented. So you agree to remove it from the code? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: DefaultServlet
Hi if ( len buffer.length ) break; seems to be dead code too in DefaultServlet.copyRange( InputStream, ServletOutputStream, long, long ). Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: DefaultServlet
Hi Please don't make a habit of posting every bit of what you think is dead code on this list ;) There's enough traffic on here as-is. Ok, I see. Although I tried to keen it in one thread to make it easy to ignore it for others. If you feel like auditing the code, that's a great thing, and we welcome your contributions... But before posting something to bugzilla, I'd like to mail someone who knows to code, since I am just starting to get acustomed to that. And there are lots of questions. I see that this is not the right place, so can someone tell me an email adress for that code part? Regads, Steffen PS: Since I am already sending another mail, let me append a pending question: I often see code like this in the servlet: while (...) { try { ... } catch ( ... ) { ... } } which could be replaced with try { while (...) { ... } } catch ( ... ) { ... } which is faster in my imagination. Is there a reason or is my imagination false? smime.p7s Description: S/MIME cryptographic signature
AW: [OT] Re: AW: DefaultServlet
Hi Actually, I like these kind of patches and would be happy to evaluate/commit them ;) Okay, so for a start, can I do some changes that I think would be good for the code, make a diff and send that to you? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: StringBuffer memory optimization
Hi There is a known StringBuffer memory leak in a certain version of the jvm (which I can't remember now offhand). But I'm pretty sure I mentioned on this list before, so search the archives. (or just wait.. someone will chime in with the exact version). I think it was around 4.1.2_05 ? First, you propably mean 1.4.2_05. Second, no, that's the current 1.4.x one without that error. I thing 1.4.2_02 hat that. However 1.5.0 is fine and stable. Upgrade. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: DefaultServlet
Hi But that makes the archives useless: for example any discussions not-related to DefaultServlet don't belong in this thread. Right now, I am just reading that single file... Have confidence in yourself and do your testing ;) If your tests work, we'll most likely trust you. If they don't, you'll know and fix it yourself. I will. See my other post. There's the tomcat-dev list. I will go there soon propably. There is a critical functional difference between the above two approaches: one keep running if a single go within the loop fails, the other one quits on the first failure. There are use-cases for both, but they're by no means identical in functionality, and so you can't simple interchange the two. Okay, I should have stated, that the inner catch-Block sets a variable to quit the loop. So if an exception occurs inside, the loop is always left. Usually I think such a little difference in speed is not so important, however this is the most important inner loop of the DefaultServlet, which servs every static file. This will add up to a lot of time. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Newbe to Tomcat, Jakara and Apache
Hi This has a combination of Jakarta-Tomcat (4.1.2) and Apache (1.3.27). Upgrade to the latest tomcat of the 4.1.x release. 4.1.2 is fairly old and there are newer versions of the same core. 5.0 is a newer spec, so that might not be what you want, but I would definitly upgrade to 4.0.30. Does anyone know if there is a problem with running legacy versions of Tomcat and Apache on Server 2003? I dont know of any, but be sure that you disabled iis completely. Stop web publishing service AS WELL AS iisadmin service. Try again. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Newbe to Tomcat, Jakara and Apache
Hi I've thought of upgrading to a newer version of both but have a concern that since the software was written for the older 4.1.2. Are there any good sources which could help me through the upgrade? The tomcat docs. Upgrading should only be a problem for major version changes, since they tend to apply to a new version of the spec, which is not backwards compatible in all cases (but in most). Upgrading in the same product line (3.3.x, 4.0.x, 4.1.x, 5.0.x, 5.5.x) should not be a problem. [I upgraded from 4.0.6 to a lot of 4.1.x and 5.0.x versions without even modifing my config files. Only one of the lastest upgrades (5.0.27 or so) forced me to use URIEncoding-attribute.] Surely, test first. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Threads in Tomcat 5
Hi Are there any solution about limit the process or threads count?. Remember that Tomcat server.xml parameters don`t work. For me, these settings work. However, remember what they describe. They set the numbers of workers, not total threads. You applicaton might spawn threads, tomcat might spawn daemon threads, even the vm might spawn threads (gc such). You cannot limit anything other then worker threads. However, tomcat and the vm will only spawn a very few daemon threads and you have control over your application. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Mod JK2 Mapping and SSL
Hi If you have apache2 in front of it, you can create two different virtualhosts with VirtualHost 1.2.3.4:80 mount unsecure here /VirtualHost VirtualHost 1.2.3.4:443 mount secure here /VirtualHost Regards, Steffen -Ursprüngliche Nachricht- Von: Scott Ahten [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 6. Oktober 2004 20:38 An: Tomcat Users List Betreff: Mod JK2 Mapping and SSL I'm stumped. Perhaps someone here can point me in the right direction? I have Apache 2 configured with domain based virtual hosting for several domains. However, I need to forward secure and unsecured requests to separate webapps for one of these domains. Example: HTTP://www.domain.com /var/httpd/client/unsecure/ HTTPS://www.domain.com /var/httpd/client/secure/ Apache2 is talking to Tomcat and HTTPS requests for a folder show a correct directory listing, but direct requests for JSP pages are showing up as 404 errors from Tomcat. If I move these files to the unsecured document root, they are processed as normal. I've successfully used this technique with different subdomains (secure.domain.com vs www.domain.com) , but in this case the secure and unsecure subdomains are the same (both www.domain.com). My problem is indicating that port 443 traffic should go to a different host in Tomcat, even though the domain signature is the same. I've tried adding a port attribute to the host element in server.xml, but it's not documented and does not work. Here are relevant parts of my workers2.properties and server.xml files Thanks in advance, - Scott - - - - - - - - - - - - - - - - - # workers2.properties ... # define the worker [ajp13:/usr/local/tomcat/work/jk2.socket] channel=channel.un:/opt/tomcat/work/jk2.socket ... # # Client X Apache Tomcat # #Uri mapping : domain.com [uri:domain.com:80/*.jsp] #Uri mapping :www.domain.com [uri:www.domain.com:80/*.jsp] #Uri mapping :staging.domain.com [uri:staging.domain.com:80/*.jsp] #Uri mapping :www.domain.com [uri:www.domain.com:443/*.jsp] - - - - - - Server.xml - - - - - - - ... /Host Host appBase=/var/httpd/client/unsecure/ debug=1 name=domain.com port=80 Aliaswww.domain.com/Alias Aliasstaging.domain.com/Alias Context path= docBase= debug=1 ... /Context /Host /Host Host appBase=/var/httpd/client/secure/ debug=1 name=www.domain.com port=443 Context path= docBase= debug=1 ... /Context /Host ... - - :: [EMAIL PROTECTED] :: http://www.pixelfreak.net - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Delegating to default Servlet
Hi I want to archieve the following: I want to map everything to a special servlet that checks for permissions and a lot other things and finally invokes other servlets or modules of my system for dynamic content. however, I do not want to reinvent the wheel, so I would like to pass static requests after permission checking to the default servlet of tomcat. Mapping, permission analysing and all that is already done and no problems, delegating to my own servlets and modules also works as expected. However, how can I pass control to the default servlet of tomcat transparently, so that it does work as if it were invoked directly? Any hint would be great. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Search engine friendly URLs
Hi If you want to be able to scale your application, you need to be able to move the static image handling out of tomcat to a separate web server. Using Tomcat to handle both application chores and web serving chores will limit the overall scalability of your system. I strongly disagree. Tomcat is nearly as fast as apache in serving images. So, yes, you can save a little time using apache, BUT remeber that the apache slows tomcat down. You need cpu-cycles for apache, for mod_jk and additionally for tomcat. Those cycles for apache and mod_jk are not nessesary, since tomcat can work standalone. So the question comes down to decide wether the overhead of handling apache and mod_jk for dynamic content is smaller then the difference of apache and tomcat in serving images. I guess with current versions of tomcat the overhead to apache and mod_jk is even bigger. Hence, tomcat alone will be faster. (Please also consider, that static content will mostly be taken from the browsers cache, whereas dynamic content needs to be received from tomcat. That means that the time won by using apache for static content needs to be a magnitude higher than the overhead of mod_jk. That's simply not the case.) Tomcat cannot do rewriting, that is correct, but it does not need to: I use url such as: /content/pages/test.htm where content is mapped to my servlet. The parameter is simply the rest of the url. You could do: http://localhost/site.do/books/architecture and parse the rest of the url to section = books and subsection = architecture Simply map site.do to your servlet. Reagrds, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: newbie questions
Hi Finally for the stupid question of the day. I notice alot of information re: merging apache and tomcat. My question is why? I'm assuming the Apache is better at serving web pages that Tomcat but is that the only reason? It would seem that for a small website, just having Tomcat would be fine. Any thoughts? Most webmasters started with apache and somewhen decided to do dynamic stuff with tomcat. So they didn't want to break with apache and use tomcat as add-on, as they did with php. And people tend not to change running systems. Moreover older tomcat versions, exspecially older java vms were slower then apache was. Nowadays, java vms are faster and tomcat is faster as well. And there are really big sites, which use tomcat without apache or another web server. [1] So, YES, it IS fine just having Tomcat for a small website, as well as for larger sites. The only scenario in that I would use apache as webserver in front of tomcat if the site also requires php or another scripting language additionally to java. Tomcat has it's CGI servlets, but it is far from beating apaches mod_php in speed (up to now...). Regards, Steffen [1] I was very impressed finding jake2, which is an java implementation of quake2. I always thought java would be fast for servlets and such but leaked speed in graphics and video compared to non-vm languages, but jake2 reaches about 99% of the frame rate of quake2 on the same hardware... smime.p7s Description: S/MIME cryptographic signature
AW: Multiple arguments in a GET URL
Hi I am attempting to redirect to a URL that is similar to the following http://www.mysite.com/index.jsp?mainFrame=somePage.jsp?item1=info1item2=inf o2 However, I can only do a request.getParameter on item1 in the somePage.jsp JSP. When I attempt to do it for item2, it fails.. This is correct behavior. Tomcat splits the url (at ?) as follows: Called page: http://www.mysite.com/index.jsp Parameters: mainFrame=somePage.jsp?item1=info1item2=info2 Then the parameters are split (at ): Parameter1: mainFrame=somePage.jsp?item1=info1 Parameter2: item2=info2 So mainFrame is a paramter to index.jsp, but item2 is ALSO. You want only one Parameter. So you need to urlEncode that one: Called page: http://www.mysite.com/index.jsp Parameters: mainFrame=somePage.jsp?item1=info126item2=info2 You just jeed to replace with 26. Propably it would be best to replace the ? as well, but I just don't have it's ascii code in mind. You complete URL would be: http://www.mysite.com/index.jsp?mainFrame=somePage.jsp?item1=info1%26item2=i nfo2 No code change needed. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Recursive stack trace with Tiles and Filter - any ideas?
Hi Please: http://learn.to/quote -Original Message- Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: method level synchronization doesn't work
Hi I have to synchronize on the method ... No you do not need to synchonize on the method, you need to synchronize. You can synchronize on anything. The easiest would be to do the following: public static synchronized void amethod() { //some code that access the database and needs to be synchronized } Just make your method static. Synchonization will not occur on the instance object any more, but on the Class object of your instance. Since tomcat may instantiate multiple servlets, it may only do so in the same classloader. Therefor all instances belong to the same Class object and will synchronize as you required. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: ___Close xml for reading from browser. how?
Hi Hello Users! I'm using xml files like configuration files for servlets. Is it possible to prevent these xml's from reading in browser but do not close access to servlet for read these files. Any ideas how to achieve this? Put these files in the webapps WEB-INF folder. Everything there should be readable from the servlet, but if anything is readable in browser, your configuration is flawed. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Servlet mapping problem
Hi I wrote a servlet with mapping as / . But when it is forwarded to subdirectory it is coming to same servlet and executing in a loop. You cannot map a single url. Tomcat only maps prefixes. So, you cannot map / with tomcat. (Resin can, but this is another story.) Here is a workaround: Map /root as a servlet and define root as world welcome-file (see docs). Depending on the tomcat version in use, you need to create a empty file named root. Remember this is a Struts list. Nope. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: AW: ___Close xml for reading from browser. how?
Hi limit get locationmach /WEB-INF /location /limit or somthink like that? Might be, I dunno. Using apache directives to seldom. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: How can I deploy 2 tomcat and work on both of them at the same time?
Hi I have tomcat jakarta-tomcat-5.0.19 installed on my machine under /opt Now, I have installed another tomcat (same version) under another root directory. I need to have two versions working at the same time. Under one, I will have a client web version and under the other one, my test version. Both can be working at the same time but I can't manage to make it running. Make a copy of you working version, correct all paths in configuration files and adjust listening port in the connector as well as the engine's shutdown port. Then you can start both at the same time. (Things tend to get more complicated, if this is a windows machine and you want to start both as service. But that is indeed no good idea. Run the productive system as service, but the test system by catalina.bat run.) Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: AW: Servlet mapping problem
Hi I cant grasp what you said. I am using Tomcat 4.1.x. I searched in Google for world welcome-file and could'nt find anything on it. Are you talking about welcome-file-list ?. Yes. It's entry is welcome-file. welcome-file-list welcome-fileroot/welcome-file /welcome-file-list If someone accesses /, tomcat will search for /root and will find the empty file. Then it will start to process that file, but since /root is mapped, your servlet is called. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Servlet mapping problem
Hi You cannot map a single url. Tomcat only maps prefixes. Really? Where did this nugget come from? ;) I nearly choked on my (otherwise fabulous) croissant. Your assertion above is wrong. Tomcat implements servlet mapping exactly as required by the Servlet Specification (SRV 11). That includes path, extension, and default mappings. That also includes specific handling of the / mapping (which is valid and is used in Tomcat all the time, usually without the user being aware of it). Okay, I am sorry, my sentence may be wrong, I agree. However, I am sure about the fact, that you cannot map a single url such as /. (Yes, you can define a mapping of /, but that maps to EVERY request, NOT to the root url only.) Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Servlet mapping problem
Hi No. You're mistaking the default configuration for something that's hard-coded. Out of the box, / is mapped to Tomcat's DefaultServlet, which handles static content. This is routine for other containers as well and is not a particular Tomcat trick. No, I did understand this. However, I think the original poster wanted to archieve, what I had to do once: To KEEP the default servlet mapping for all my html, js and css files and additionally have a servlet that get's ONLY called for the domain root /. This works as I described, with the trick of using welcome file and (at least for some older versions) an empty file. There is direct no way to map /. In the sense of what I want to archieve, not in the sense of the specification, that / means default. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
Strings in VARCHAR or BLOB
Hi I need to store webpages in the database. Until now I used BLOBs for this, but I think about switching to VARCHARs. It would not be a problem to limit the content to say 1 CHARs. However I am using ISO8859_1. (I think this is a one-byte-charset?) What would you recommend? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Using shutdown script for different port
Hi Some documentation that I did manage to find suggested the following would work: shutdown.sh port 8015 but I get the usage message when I try that. I cannot tell you for shutdown.sh, but for me it works that way: catalina.sh start == to start as daemon catalina.sh stop == to stop daemon catalina.sh run== to run against console start|stop options read the configuration and use the right port automagically. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: start IE after tomcat start
Hi Use a script as follows: ---8 tomcat.bat net stop tomcat net start tomcat start iexplore.exe http://127.0.0.1:8080 exit ---8 tomcat.bat Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: sending signed mails from servlet
Hi I've used javamail-crypto, it's cool. It worked fine. The environment was very low stress as far as usage goes, something like one message every couple of days. Okay, I will give both a try: javamail-crypto AND bouncycastle.org. It detailed the meaning of alpha, beta, and stable ;) Those are clear to me. I do use some beta software and I do not insist on stable. For example, my whole system is testing since about one year, it is sarge. However, if developers write early alpha about their own product, I become carefull. That's why I am asking for experience of others. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Problem!
Hi I have installed j2re-1_4_2_01-windows-i586 and jakarta-tomcat-5.0.25 on a Windows server 2003 SE. This will not work. Tomcats needs a java compiler, which is not part of the jre. Install the sdk. And better install j2sdk-1_4_2_05 instead of ..._01, because there were a lot of bug fixes, including some important memory leak fixes. (Tomcat 5.5 will work with jre only, but is in early non-stable stages.) Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: sending signed mails from servlet
Hi I have seen those already. - http://javamail-crypto.sourceforge.net/ early alpha makes me nervous for productive systems. - http://jpgpmime.sourceforge.net/ this is pgp, i need x509 s/mime. - http://www.wedgetail.com/jcsi/smime/ there is no information about pricing or license. - http://java.sun.com/products/javamail/Third_Party.html. checked most of this. the interesting ones are those above. However, do you have any experience with those? Or others? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: sending signed mails from servlet
Hi We are using www.bouncycastle.org to send s/MIME signed mails with javamail. I have seen this as well, as it is used as base of - http://javamail-crypto.sourceforge.net/ early alpha makes me nervous for productive systems. But there are no exsamples. Could you please provide me a short part of that source code to start with? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: IIS with Tomcat integration
Hi Solved. Need to restart windows, whenever the settings in uriworkermap.properties is modified. Seems like the isapi_redirect.dll can only get reloaded by windows restart and not by restarting the IIS website. Try restarting the website AND the iisadmin service. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Tomcat Hanging up !!!
Hi Come on, Tomcat 3.2.1??? This is way tooo old. JDK 1.3.1_13? The same! IBM_HTTP_SERVER? predecessor of Apache httpd? Again. Remove them altogether! Install jdk1.4.2_05 and tomcat 5.0.28. No neither use httpd NOR mod_jk. You will be fine and happy with this. I doublt, you will find someone to assist you with that old version of tomcat. Additionally, you propably won't find current mod_jk versions, which are tested against that version. Even in the 3.x branch, 3.3.2 is current! Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Tomcat Hanging up !!!
Hi If I install Apache 2.0 and Tomcat 4.1 and use mod_jk that is compatible for that I don't what issues will be raised by that. Right, that is why I suggest using tomcat ONLY. This works, and even when tomcat 3.2.1 might be slower that ibm_httpd, tomcat 5.0 is really fast and is at almost at the level of apache. Just put tomcat 5 on a test mashine, put your app in and test, you will see, this works within a few minutes! Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
urlencoding and Tomcat 5.0
Hi I used tomcat 4.0.6, 4.1.x, 5.0.x and more without problems. But now, I have a problem with character encoding. I use iso-8851-1 all over the place. My javascript takes a input.value and passes them to my servlet using an url such as http://server/servlet?data=; + encodeURIComponent(value). This workes for some time and I wondered why people are heaving problems here. Surprisingly, now I have the same problem. The german ss ß is correctly sent as %C3%9F. But tomcat does not decode this any more! What can I do ? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Not listening on Shutdown port TC 4.0.6 on Win XP Pro
Hi I have successfully installed TC 4.0.6 on Win XP Pro and it starts fine at boot time. Is there any reason, you did that? 4.0.6 is VERY old. Try 5.0.x at least. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Https, mod_proxy and mod_jk
Hi If you do not have that much SSL traffic, you can use mod_proxy to forward requests to servlet containers using SSL! You only need to install a low-bit certificate in your container and make that certificate accepted by your apache. It can even be self-signed. However, your container will have request.isSecure() set to true! But be carefull with high-load sites. Additional SSL will take more cpu time. However, running multiple servlet containers seems to be a development szenario for me, since you would not do all that on one system on a productive site, would you? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Https, mod_proxy and mod_jk
Hi And I would say the opposite, mod_proxy is great, as a matter of fact, the next version of it will have the AJP protocol in it, and mod_proxy is proven to be very stable. This is great news for me. Is there any date when this will be stable / public?? If you are into advanced config, you an use mod_rewrite, its true voodoo, you can accomplish pretty much anything you want. No, you cannot use mod_rewrite, if you need *remoteHost* information in your servlet... This is a limitation of http which cannot be circumvented. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Https, mod_proxy and mod_jk
Hi just use your imagination. I'm sure you can figure out how to pass the remote host to tomcat, one way or the other, but to say it cannot be circumvented, thats a little strong :) You can do that, if you pass parameters, but then you have to change your webapp, wich is not possible, if you have no control over that. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Https, mod_proxy and mod_jk
Hi (1) how I make a certificate accepted by apache Hm, I don't know, maybe someone else can answer this. Try a selfsigned at first. (2) how I make mod_proxy redirect requests from port 443 to my tomcat on port 8443 and request from port 80 to tomcat on port 8080 VirtualHost :443 SSLEngine on SSLCertificateFile SSLCertificateKeyFile ServerName ProxyRequests Off ProxyPass / https://127.0.0.1:8443 ProxyPassReverse / https://127.0.0.1:8443 /VirtualHost VirtualHost :80 ServerName ProxyRequests Off ProxyPass / http://127.0.0.1:8080 ProxyPassReverse / http://127.0.0.1:8080 /VirtualHost Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: How to configure crystal report 10 in Tomcat 4.1
Hi I have a web application using tomcat 4.1. I want to access a crystal report. I have installed crystal report 10. Can I view that from Tomcat 4.1? What are the configuration steps? I found the instruction for Tomcat 5.0 in the web, but not for Tomcat 4.1. Please help me. Have you tried to follow these instructions? First, if CR10 uses the newest servlet specification, then it can't work, as only Tomcat5+ implements these. Second, if CR10 uses a older specification, you should be able to use tomcat5 as it where tomcat4. I moved all my webapps and had NO problem. Anyway, I am using servlets nearly all of the time with no JSPs. So go ahead, try it. (On a testing server.) Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: once again: can't send request over my network ip
Hi I'm using Tomcat 5.0.27. I can access it from my computer via 127.0.0.1:8080, but not via 192.168.1.172:8080. But I can reach Tomcat from another computer in the network via 192.168.1.172:8080. I didn't change any Tomcat settings. I'm using WinXP Professional and no firewall is running. Maybe it is simply a proxy setting? Are you sure there is no proxy set in your browser? Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
Sorry, Test, please ignore
PLEASE IGNORE. Hi Some month ago I could not subscribe using my usual mail account, so I subscribed with an alternative one. Now, I test to get on the list again. Since I got a confirmation, that I am on the list using this account, I decided to send a test message. Hope, it works. Sorry, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: why is tomcat-users.xml rewritten ?
Hi Each time tomcat is restarted the file tomcat-users.xml is rewritten. It is horrible since my umask being 0022 the file which stores passwords become world readable. Obviously this file has to be read my the server but I do not see any valuable reason to write it back opening a serious security hole. PLEASE, search the archive of this list before mailing. This question, including some ways around it have been on the list recently. See also posting of Yoav below. Regards, Steffen -Ursprüngliche Nachricht- Von: Shapira, Yoav [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 15. September 2004 20:48 An: Tomcat Users List Betreff: RE: Why does startup of Tomcat 5.0.28 server make tomcat-users.xml world-readable?... Hi, However, I still wonder: 1. Why does Tomcat re-write the tomcat-users.xml file at startup? This I already answered: Tomcat rewrites the tomcat-users.xml at startup to ensure it has permissions on it, because the admin webapp must have these permissions to allow editing of user information. 2. Why does it use the umask value instead of just leaving the protections as they were before it updated the file? This is the java.io.File default behavior: we don't modify anything and don't want to have platform-specific or native code in Tomcat. If you look at the java.io.File JavaDoc, you'll see there's no portable way to control this. 3. Isn't this a problem for most Tomcat installations, since without the umask I had applied to my tomcat user, the default umask is 002, not 022, so the tomcat-users.xml file would be changed to 664, not merely 644, at each startup? Seems like the default Tomcat behavior introduces a security risk. Judging by the fact this is raised about once a year on the mailing list, I'd say the majority of people don't care. Secure installations take care with their umasks from the beginning, so for them this is not an issue. Yoav smime.p7s Description: S/MIME cryptographic signature
AW: Linking Sessions
Hi If I understand your setup, you could look into Single Sign-On. Tomcat has a special Valve for this. Search the docs/archives for details. Sorry, no. Single Sign-On only works on the same domain, as it requires sessions itself. If that doesn't work for you -- granted, there are some limitations -- you could use a shared database for intra-app data sharing. This is similar to your HashMap but lets the various domains live in physically different processes/servers. Actually, it is just about a single application. No intra-app or such things. Thanks anyway, Regards, Steffen smime.p7s Description: S/MIME cryptographic signature