Re: classloader
while I am not completely familiar with classloading in 3.3, you need to have your classes in the same directory(or higher in the classloading heirarchy) so that they are loaded by the same classloader. Therefore 2.jar must go into /lib/apps. There should be a classloader document with 3.3 that explains this. well, I understand the way tomcat loads its classes and that tomcat can't expand the classpath after loading the VM (so tomcat would need to know all contexts *before* the VM is started - but tomcat is written in java, so it can't do that without the VM ... ;-) ) my problem: I have many jar-files only needed by *one* context, but I have to put all that jar-files into the same directory (/lib/apps) - that's not very easy to maintain!!! so I thought of writing a kind of classloader, that additionaly loads classes from jar-files in /webapps/context/WEB-INF/lib (but I never did this before - and I don't know if it's possible!!!) this classloader is instantiated by the servlet; and all classes that are not found by the VM-classloader, are loaded using MY classloader ... any idea??? thanks any hints appreciated michi Hi! (using tomcat 3.3.1) I use a package in 1.jar, visible to all tomcat-contexts - so I put it into $TOMCAT_HOME/lib/apps the servlet creates an instance of a class a (that is included in 1.jar) a reads 'getServletContext().getInitParameter(config-file)' from this config-file a reads the name of another class (b) a creates an instance b using the reflection-package of java my question: the jar-file 2.jar holding class b *must* be in tomcat's classpath!!! so I have to put it also in tomcat/lib/apps - but I would prefer to put the jar file into: '/tomcat/webapps/context/WEB-INF/lib' but how to make a find class b ??? thanks michi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
need X running tomcat
Hi! I'm running tomcat 3.3.1 on a linux box! my servlets need some fonts to generate some images. Now I have to do the following to start tomcat: (no X is running) login as root startx export DISPLAY=myserver:0 tomcat.sh start or start xdm login as root tomcat.sh start 1. Am I on the right way??? 2. How to automate this, so my tomcat runs after a reboot ... thanks michi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: need X running tomcat
Am Donnerstag, 6. Juni 2002 11:05 schrieben Sie: It was not a bug, but a missing feature. Yes it is solved from 1.4 on, if you use an additional headless option. thanks - works great!!! michi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: clean-up when stopping tomcat
Am Freitag, 24. Mai 2002 18:06 schrieben Sie: Another option might be the Runtime.getRuntime().addShutdownHook() method. From JDK 1.3: A shutdown hook is simply an initialized but unstarted thread. When the virtual machine begins its shutdown sequence it will start all registered shutdown hooks in some unspecified order and let them run concurrently. thanks for your answer! sounds interesting ... can u help me, where/when/how I should register the ShutdownHook within tomcat-startup? thanks michi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
clean-up when stoping tomcat
Hi! I use tomcat 3.3.1! How can I tell tomcat, to run some code (delete temporary files in some directories) when shuting down (is there something like a ContextListener - like a SessionListener)? thanks michael -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: mime-types?
Am Donnerstag, 23. Mai 2002 19:26 schrieben Sie: your browser needs to be mime-typed AND your tomcat application needs to be mime-typed you can set tomcat's mime-types in your web.xml file. search google for tomcat web.xml mime types As far as your browser -- many browsers are not preconfigured to view png images alone -- this happens to me all the time. If the image appears in context, the browser will guess that it is a PNG image and display it, but coming over the wire with no page, many browsers don't know what to do with it. Some browsers allow you to tell them what to do with specific mime-types (i'm thinking IE 5 on the mac specifically) -- if your browser does, try it. otherwise you might be out of luck on the browser front (but DO fix the web.xml first and see if that helps). thanks for your help! I fixed the mime-type in web.xml, but the problem stays on the client-side :-( looks like there is no general solution for this problem ... regards michael fillup On 5/23/02 5:24 AM, Michael Reutter [EMAIL PROTECTED] wrote: Hi! I'm using tomcat 3.3.1! I have 2 pictures: pic1.gif pic1.png When I use these pics in html (e.g.: img src=pic1.png) both pics are displayed correctly! BUT when I access the pics' URL directly, I see the gif correct, but instead of the png-image, I see the png's raw data displayed in my browser (I tried with MSIE, NS4, NS6, Opera, Konqueror)! what is happening??? thanks michi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
mime-types?
Hi! I'm using tomcat 3.3.1! I have 2 pictures: pic1.gif pic1.png When I use these pics in html (e.g.: img src=pic1.png) both pics are displayed correctly! BUT when I access the pics' URL directly, I see the gif correct, but instead of the png-image, I see the png's raw data displayed in my browser (I tried with MSIE, NS4, NS6, Opera, Konqueror)! what is happening??? thanks michi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: processing page
The server push example is very cool, but it only works on Netscape 4 (not Internet Explorer or Netcape 6). I would recommend using the following instead: same opinion!!! here is some code (don't be angry - it's written in php - but there are less lines to be posted in php than in java ;-)) file:test2.php --begin-- ? if (isset($forwarded)){ $wait=rand(10,30); sleep($wait); # this simulates the time nedded for processing! ? htmlbody ?= date(H:i:s); ? THIS IS THE REAL RESULT AFTER ?= $wait ? SECONDS!/body/html ? exit; } ? htmlheadtitleto be forwarded .../title/head body ?= date(H:i:s); ? please wait, while the page is created! form action=test2.php name=forward METHOD=POST TARGET=_self input type=hidden name=forwarded value= / noscript Please activate Javascript or click on the button below!br / input type=submit / /noscript /form script type=text/javascript language=JavaScript!-- window.setTimeout(document.forward.submit(), 1000); //--/script /body /html --end-- or you can do it with a link to test2.php?forwarded= for noscript and window.location.href='test2.php?forwarded=' for script The only question - what about timeouts (client and tomcat)??? regards michi - Original Message - From: Ken Anderson [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, 18 April 2002 15:34 Subject: Re: processing page see the server push example - countdown.java http://www.servlets.com/jservlet2/examples/ch06/index.html#ex06_13 On 2002.04.17 03:54 Michael Reutter wrote: Hi! PLEASE HELP ME how to implement this with servlets: A page is requested - but tomcat needs 15-30 seconds to create the result! What I want is a page Please wait ... Your page is being processed, and the moment tomcat has created the output, the real page is being loaded by the browser!!! if this isn't a real tomcat-issue, please let me know where to ask my question instead thanks for any help michi -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
apache+tomcat behind firewall
Hi! My tomcat is connected to apache with mod_jserv - and both are behind a firewall: server1.com ... firewall (connected to internet and private network) server2.intra ... apache and tomcat (private network) DNAT: server1.com:80 - server2.intra:80 (apache) server1.com:8080 - server2.intra:8080 (tomcat) and apache's /examples is mapped to tomcat's /root everything works fine BUT: request: http://server1.com:80/examples/servlet/ this should return a redirect to: http://server1.com:80/examples/servlet/index.html but the redirect goes to: http://server2.intra:80/examples/servlet/index.html which isn't possible from outside! if I do the request directly from tomcat: http://server1.com:8080/examples/servlet/ the redirect works correctly! so what can I do, to force apache/tomcat, to do redirects to server1.com with mod_jserv, too ??? thanks michi -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]