Re: standard valve / errors handling
Bill Barker a écrit : Problem: because of the valve problem, my jsp is not called. This jsp is supposed to handle displaying of this NullPointerException's stacktrace(). Is there a way to configure the standard valve so that is dumps the stacktrace in tomcat log? Well, it isn't really the valve's problem, so much as it a problem with the webdav servlet :). Tomcat has already send the Response headers back to the browser (and probably part of the Response body as well), so there is no way (under the HTTP protocol) for it to tell the browser oops, this is what I meant to send. I know that, an my question is still Is there a way to configure the standard valve so that is dumps the stacktrace in tomcat log? My problem is to get access to that NullPointerException so i can fix the servlet :) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logging.properties not found
Your assignment to JAVA_OPTS seems to consist of multiple lines. You need to end all apart from the last with a backslash \, so that the shell executing the script understands, that the following lines still contain content for the variable. The error doesn't say, that it can't file a config file, it tells us that the shell tried to execute a file named -Djava.util.logging.config.file=/export/home/lakshmi/Tomcat/conf/logging.properties which it couldn't find. BTW: It's not the original shutdown script, so it's not a bug in Tomcat. Regards, Rainer Lakshmi Venkataraman wrote: We use Tomcat 5.5.23 on all platforms (Solaris, Linux and Win XP). On Solaris, I see the following message when Tomcat is shutdown. ./shutdown.sh: -Djava.util.logging.config.file=/export/home/lakshmi/Tomcat/conf/logging .properties: not found Here is an excerpt from the shutdown script: -- BEGIN EXCERPT - MAINCLASS=org.apache.catalina.startup.Bootstrap export MAINCLASS ACTION=stop export ACTION JAVA_OPTS=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogMana ger -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties export JAVA_OPTS LD_LIBRARY_PATH=$CATALINA_HOME/bin:$CATALINA_HOME/libexec:$CATALINA_HOME /conf:$LD_LIBRARY_PATH export $LD_LIBRARY_PATH PATH=$CATALINA_HOME/bin:$INM_HOME/bin:$CATALINA_HOME/conf:$PATH export $PATH CLASSPATH includes $CATALINA_HOME/conf/logging.properties $JAVA_HOME/bin/java $JAVA_OPTS -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -classpath $CLASSPATH -Dcatalina.base=$CATALINA_BASE -Dcatalina.home=$CATALINA_HOME -Djava.io.tmpdir=$CATALINA_TMPDIR $MAINCLASS $ACTION - END EXCERPT As you can see, $PATH, $LD_LIBRARY_PATH, $CLASSPATH all point to $CATALINA_HOME/conf location. Any clue why the message about logging.properties not being found is printed? Thanks Lakshmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
docBase application directory
Hello forum, As you can see in http://i16.photobucket.com/albums/b45/jeusdi/doubt.png , from a CSS file I refer to /img/pageheader_background.png, but when I load the HTML page, the image isn't loaded. So, I believe tomcat doesn't found the image: CSS file is under css folder and the image is under img folder. I don't know why Tomcat doesn't found this image? META-INF/context.xml-- ?xml version=1.0 encoding=UTF-8? Context path=/web_gm reloadable=true docBase=web_gm workDir=web_gm/work /Context I believed that docBase tell to tomcat that / of the web application deployed is $docBase. So, if in my CSS file I write /img/file.png implies that tomcat searches file under $CATALINA_HOME/webapps/web_gm/img folder. Can you help me please? I want to refer to my resources using /img/..., I don't want to use ../../img/ Thanks for all in advanced. -- View this message in context: http://www.nabble.com/docBase-application-directory-tf4293850.html#a12223169 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: docBase application directory
From: jeusdi [mailto:[EMAIL PROTECTED] Subject: docBase application directory META-INF/context.xml-- ?xml version=1.0 encoding=UTF-8? Context path=/web_gm reloadable=true docBase=web_gm workDir=web_gm/work /Context If you're using any reasonably recent version of Tomcat (you didn't bother to tell us), neither the path nor the docBase attribute are allowed in the Context element when it's in META-INF/context.xml. Remove those, and then let's work on your real problem. What is the deployed directory structure of your webapp? (Not interested in what shows up in your IDE - we need to look at reality.) - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
POJO Application Server for Tomcat
I'd like to show you guys something that I think may blow your minds. Firstly let me just say that I call myself a hobbyist, dont consider myself in the same league as the guru's that work on Tomcat and Apache, but I do spend an enormous amount of time playing with technology. One can almost measure how much I like a technology by how much time I stay in the mailing lists, on Postgresql I think it was 3 months, and I really like that product, on Tomcat it must be close to a year and still counting, what a fantastic product. In our office Tomcat is now officially the delivery mechanism for everything. First I was impressed with Tomcats web abilities, then more and more with its container ability, we discovered that it can run any code, and even if it wasnt intended for the web, we started sticking applications into Tomcat anywaythat idea has now come a long way. I call it a POJO Application server, I've mentioned before that we actually popping full java applications out of browsers, but then it was very much something only I could use, messy libraries etc. What I've done now is (try) make a more professional package, and it would be really nice if the guru's just have a little read about this unbelievable servlet, and let me know what you think, if just to see how someone is using your Tomcat, in a very unusual way. As you will see, I dont like EJB containers, but I love Tomcat, and it was almost inevitable that this would happen. All I will say is that this is no ordinary application server... not unless I missed something and you can also just drop a POJO application into the others and make it remoteable. I think its a new way of looking at application servers, it feels like a discovery to me, but then who knows maybe there is something out there like this, I dont know, all I do know is that when we drop this servlet into Tomcat, we run POJO applications over the wire as if they were right their on the client machine, the same applications that will also run standalone on the machine. Its so different that I really struggled to find the relevent theory behind this technology, I think I'm close, but any pointers or corrections would be much appreciated there as well. Anyway, would just like to thank all the Tomcat'ers that have helped me out, people like Chuck, Bill, Christopher, Leon, David, Mark, Mladen... and if I forgotten you, sorry, so many, it really is the best mailing list on the web. Oh! you'll see its only certified for Tomcat ;) Only thing left to do now is see if I get Tomcat to make coffee, and clean the pool... and maybe get this to run on something fishy, you know, just in case someone needs a real application server ;) Thanks http://coolharbor.100free.com/index.htm Johnny
RE: docBase application directory
[EMAIL PROTECTED]:/usr/local/tomcat/webapps$ ls web_gm conf content css dtd img index.htm js META-INF tlds WEB-INF [EMAIL PROTECTED]:/usr/local/tomcat/webapps$ ls web_gm/* web_gm/index.htm web_gm/conf: log4j.properties web_gm/content: admin current errors web_gm/css: elements.css estructura.css gmsoft.css NiftyCorners web_gm/dtd: web_gm/img: background_posttittle.png pageheader_background.png web_gm/js: NiftyCorners web_gm/META-INF: context.xml MANIFEST.MF web_gm/tlds: web_gm/WEB-INF: classes lib web.xml Caldarale, Charles R wrote: From: jeusdi [mailto:[EMAIL PROTECTED] Subject: docBase application directory META-INF/context.xml-- ?xml version=1.0 encoding=UTF-8? Context path=/web_gm reloadable=true docBase=web_gm workDir=web_gm/work /Context If you're using any reasonably recent version of Tomcat (you didn't bother to tell us), neither the path nor the docBase attribute are allowed in the Context element when it's in META-INF/context.xml. Remove those, and then let's work on your real problem. What is the deployed directory structure of your webapp? (Not interested in what shows up in your IDE - we need to look at reality.) - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/docBase-application-directory-tf4293850.html#a12223923 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: docBase application directory
I think your assumption regarding how tomcat uses docBase is in error. Path's in a HTML file are resolved by the BROWSER and as such there is no awareness of a webapp. Your path /img/pageheader_background.png would be a site relative path to either a webapp named img or in absense of that, a folder named img in the ROOT webapp. If you want this to be correct, it should be /web_gm/img/pageheader_background.png. Since this is in a css file, you could also do a relative reference to your css file. If the css is in a folder named css on the same level as the img folder, the reference would be ../img/pageheader_background.png --David jeusdi wrote: Hello forum, As you can see in http://i16.photobucket.com/albums/b45/jeusdi/doubt.png , from a CSS file I refer to /img/pageheader_background.png, but when I load the HTML page, the image isn't loaded. So, I believe tomcat doesn't found the image: CSS file is under css folder and the image is under img folder. I don't know why Tomcat doesn't found this image? META-INF/context.xml-- ?xml version=1.0 encoding=UTF-8? Context path=/web_gm reloadable=true docBase=web_gm workDir=web_gm/work /Context I believed that docBase tell to tomcat that / of the web application deployed is $docBase. So, if in my CSS file I write /img/file.png implies that tomcat searches file under $CATALINA_HOME/webapps/web_gm/img folder. Can you help me please? I want to refer to my resources using /img/..., I don't want to use ../../img/ Thanks for all in advanced. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: docBase application directory
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeusdi, jeusdi wrote: when I load the HTML page, the image isn't loaded. You need to use paths in your CSS that are relative to the page being loaded -- it's kind of a pain. You need to put the context path into your CSS, and not as a variable, unless you are serving dynamic CSS files. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGyJw69CaO5/Lv0PARAgHVAJ46vMVrvyUjbSGaCbTXZJkdSfDcwwCfQqvK 4On1ONGoB4NrdVDBMHwCrSA= =u2OX -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: docBase application directory
Well.. not exactly. Per the CSS spec (http://www.w3.org/TR/CSS21/syndata.html#value-def-uri), if the url is in a separate css file, it's relative to the css file, not the page. --David Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeusdi, jeusdi wrote: when I load the HTML page, the image isn't loaded. You need to use paths in your CSS that are relative to the page being loaded -- it's kind of a pain. You need to put the context path into your CSS, and not as a variable, unless you are serving dynamic CSS files. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGyJw69CaO5/Lv0PARAgHVAJ46vMVrvyUjbSGaCbTXZJkdSfDcwwCfQqvK 4On1ONGoB4NrdVDBMHwCrSA= =u2OX -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: POJO Application Server for Tomcat
The link to your site times out. On 8/19/07, Johnny Kewl [EMAIL PROTECTED] wrote: I'd like to show you guys something that I think may blow your minds. Firstly let me just say that I call myself a hobbyist, dont consider myself in the same league as the guru's that work on Tomcat and Apache, but I do spend an enormous amount of time playing with technology. One can almost measure how much I like a technology by how much time I stay in the mailing lists, on Postgresql I think it was 3 months, and I really like that product, on Tomcat it must be close to a year and still counting, what a fantastic product. In our office Tomcat is now officially the delivery mechanism for everything. First I was impressed with Tomcats web abilities, then more and more with its container ability, we discovered that it can run any code, and even if it wasnt intended for the web, we started sticking applications into Tomcat anywaythat idea has now come a long way. I call it a POJO Application server, I've mentioned before that we actually popping full java applications out of browsers, but then it was very much something only I could use, messy libraries etc. What I've done now is (try) make a more professional package, and it would be really nice if the guru's just have a little read about this unbelievable servlet, and let me know what you think, if just to see how someone is using your Tomcat, in a very unusual way. As you will see, I dont like EJB containers, but I love Tomcat, and it was almost inevitable that this would happen. All I will say is that this is no ordinary application server... not unless I missed something and you can also just drop a POJO application into the others and make it remoteable. I think its a new way of looking at application servers, it feels like a discovery to me, but then who knows maybe there is something out there like this, I dont know, all I do know is that when we drop this servlet into Tomcat, we run POJO applications over the wire as if they were right their on the client machine, the same applications that will also run standalone on the machine. Its so different that I really struggled to find the relevent theory behind this technology, I think I'm close, but any pointers or corrections would be much appreciated there as well. Anyway, would just like to thank all the Tomcat'ers that have helped me out, people like Chuck, Bill, Christopher, Leon, David, Mark, Mladen... and if I forgotten you, sorry, so many, it really is the best mailing list on the web. Oh! you'll see its only certified for Tomcat ;) Only thing left to do now is see if I get Tomcat to make coffee, and clean the pool... and maybe get this to run on something fishy, you know, just in case someone needs a real application server ;) Thanks http://coolharbor.100free.com/index.htm Johnny - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: POJO Application Server for Tomcat
Worked for me too. I read up on it, and it sounded interesting. I'm looking forward to trying it out and bookmarked it. Wade --- Steve Ochani [EMAIL PROTECTED] wrote: The link to your site times out. Works fine for me http://coolharbor.100free.com/index.htm On 8/19/07, Johnny Kewl [EMAIL PROTECTED] wrote: I'd like to show you guys something that I think may blow your minds. Firstly let me just say that I call myself a hobbyist, dont consider myself in the same league as the guru's that work on Tomcat and Apache, but I do spend an enormous amount of time playing with technology. One can almost measure how much I like a technology by how much time I stay in the mailing lists, on Postgresql I think it was 3 months, and I really like that product, on Tomcat it must be close to a year and still counting, what a fantastic product. In our office Tomcat is now officially the delivery mechanism for everything. First I was impressed with Tomcats web abilities, then more and more with its container ability, we discovered that it can run any code, and even if it wasnt intended for the web, we started sticking applications into Tomcat anywaythat idea has now come a long way. I call it a POJO Application server, I've mentioned before that we actually popping full java applications out of browsers, but then it was very much something only I could use, messy libraries etc. What I've done now is (try) make a more professional package, and it would be really nice if the guru's just have a little read about this unbelievable servlet, and let me know what you think, if just to see how someone is using your Tomcat, in a very unusual way. As you will see, I dont like EJB containers, but I love Tomcat, and it was almost inevitable that this would happen. All I will say is that this is no ordinary application server... not unless I missed something and you can also just drop a POJO application into the others and make it remoteable. I think its a new way of looking at application servers, it feels like a discovery to me, but then who knows maybe there is something out there like this, I dont know, all I do know is that when we drop this servlet into Tomcat, we run POJO applications over the wire as if they were right their on the client machine, the same applications that will also run standalone on the machine. Its so different that I really struggled to find the relevent theory behind this technology, I think I'm close, but any pointers or corrections would be much appreciated there as well. Anyway, would just like to thank all the Tomcat'ers that have helped me out, people like Chuck, Bill, Christopher, Leon, David, Mark, Mladen... and if I forgotten you, sorry, so many, it really is the best mailing list on the web. Oh! you'll see its only certified for Tomcat ;) Only thing left to do now is see if I get Tomcat to make coffee, and clean the pool... and maybe get this to run on something fishy, you know, just in case someone needs a real application server ;) Thanks http://coolharbor.100free.com/index.htm Johnny - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
datbase connection user name
When a connection is made in the web.xml to the database, what username is it connecting with? I saw nowhere to enter a username. My entry looks as follows: resource-ref descriptionThe fantasy database/description res-ref-namejdbc/fantasyDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth res-sharing-scopeShareable/res-sharing-scope /resource-ref - Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
Re: datbase connection user name
Nevermind. :-) Mike Peremsky [EMAIL PROTECTED] wrote: When a connection is made in the web.xml to the database, what username is it connecting with? I saw nowhere to enter a username. My entry looks as follows: The fantasy database jdbc/fantasyDB javax.sql.DataSource Container Shareable - Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. - Shape Yahoo! in your own image. Join our Network Research Panel today!
Re: Can we use output/extras/tomcat-juli.jar by default?
Matthew Kerle wrote: let me know if I read that right... Bill Barker wrote: When you have the log4j jar in WEB-INF/lib, the it ends up being used by Tomcat for some of it's logging. As a result, it can cause memory leaks and other weird errors when a context is stopped and started. This isn't a problem with j.u.l since the classes are loaded by the system classloader. That is why Tomcat decided to use j.u.l for it's internal logging by default. does this mean that including log4j in my deployment WAR could potentially cause memory leaks and problems with tomcat? I've never heard of this, I thought that log4j played well with others, has anyone else experienced this / are there any links that describe this problem/ Yes. Have a look in Bugzilla for details. Most have been fixed but I think there are still a few scenarios that can cause trouble. FWIW, I use log4j in my own web apps at work and they stay up for months with a fair number of reloads and no obvious memory leaks. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we use output/extras/tomcat-juli.jar by default?
ok, found the following: http://issues.apache.org/bugzilla/show_bug.cgi?id=26372 http://issues.apache.org/bugzilla/show_bug.cgi?id=27371 (depended-on) is that the one you mean? we use commons-logging so we've never encountered any of these issues, but now I know a good reason not to use log4j on tomcat, thanks! Mark Thomas wrote: Matthew Kerle wrote: let me know if I read that right... Bill Barker wrote: When you have the log4j jar in WEB-INF/lib, the it ends up being used by Tomcat for some of it's logging. As a result, it can cause memory leaks and other weird errors when a context is stopped and started. This isn't a problem with j.u.l since the classes are loaded by the system classloader. That is why Tomcat decided to use j.u.l for it's internal logging by default. does this mean that including log4j in my deployment WAR could potentially cause memory leaks and problems with tomcat? I've never heard of this, I thought that log4j played well with others, has anyone else experienced this / are there any links that describe this problem/ Yes. Have a look in Bugzilla for details. Most have been fixed but I think there are still a few scenarios that can cause trouble. FWIW, I use log4j in my own web apps at work and they stay up for months with a fair number of reloads and no obvious memory leaks. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- * Matthew Kerle * * IT Consultant * * Canberra, Australia* Mobile: +61404 096 863 Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Web: Matthew Kerle http://threebrightlights.blogspot.com/ - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Enable file downloads outside the application tree
Hi I have a bulletin board scenarion (i.e. people can download files = that others have uploaded). The easiest solution is to simply save the uploaded files within my = application's directory tree (e.g. .../webapps/myapp/files or similar). = The problem with this is that if I deploy a new version of the web app, = any previously uploaded files are nuked with the rest of the old version = as my new version is being deployed. My preferred solution is (at this point) to map the path /myapp/files = to another directory. To do this, I'm looking for a mapping entry to = put into my web.xml that would map the /myapp/files path to a directory = outside my tomcat server (e.g. /myapp/files - /downloads or similar). = Unfortunately I just can't seem to find anything that would allow this = other than writing a servlet or creating a whole new application (I can = specify this alternate directory in the context ... element via the = docBase attribute) but it would be a whole new application and cause me = problems elsewhere. Can I achieve this with a mapping entry in my web.xml (or = context.xml)? And if so, how? Ideally this would return correct real = path for a call to ServletContext.GetRealPath (myapp/files). Thanks