- This topic has 26 replies, 4 voices, and was last updated 12 years, 6 months ago by support-swapna.
-
AuthorPosts
-
MaryMemberI have Tomcat 6.0 installed as my server within MyEclipse 6.5. I’m having problems delivering pages at different times so would definitely find it useful to be able to readily go to the log files. i just can’t seem to find the Tomcat log files. Can you help me?
Thanks.
ernestzMemberWhen using the integrated “MyEclipse Tomcat6”, the location of the log files would depend on your log configuration. Are you logging to ${catalina.home}, or ${catalina.base}?
Either way, to find theses locations, use Window -> Preferences -> MyEclipse Enterprise Workbench -> Servers -> Integrated Sandbox -> MyEclipse Tomcat 6 -> Launch, click on Create Launch Configuration, select the Arguments tab and the VM Arguments will show the default values for these two properties.
MaryMemberThank you so very much for the information you provided. I have used the VM arguments in an ordinary Eclipse environment. I am not familiar with using Tomcat integrated into MyEclipse so I’m struggling with the configuration.
Here are my VM arguments:
-Dcatalina.home=C:/Java/JavaSource/plugins/com.genuitec.eclipse.easie.tomcat.myeclipse_6.5.0.zmyeclipse650200806/tomcat
-Dcatalina.base=C:/development/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat
-Djava.endorsed.dirs=C:/Java/JavaSource/plugins/com.genuitec.eclipse.easie.tomcat.myeclipse_6.5.0.zmyeclipse650200806/tomcat/common/endorsed
-Djava.io.tmpdir=C:/development/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/temp
-Djava.library.path=”C:/Program Files/Java/jre1.6.0_05/bin;C:/Java/JavaSource/plugins/com.genuitec.eclipse.easie.tomcat.myeclipse_6.5.0.zmyeclipse650200806/tomcat/bin”
-Dsun.io.useCanonCaches=false
I don’t believe I have logging configured. Can you tell me how to do that in this environment?
Thank you so much.
ernestzMemberHow is your application logging information? Using something like Apache Commons Logging? Log4J? Both of these use configuration files.
Or, are you simply using System.out/System.err?
MaryMemberI am realizing I have not set up any logging. What do you recommend? This is the first project I’ve done that wasn’t already in the works so to speak. Usually the logging was already configured. What I am most wanting to see now is why I’m getting “404’s” instead of the page I am trying to access. I thought if I could see the server logs, I would know what the path the server is using to try to locate the files I’m not delivering or accessing. These are the servlets i want to access from my jsp’s. They are in a package within the application. So, I’m wanting to see what Tomcat is writing to it’s log files, not application error message right now.
ernestzMemberI don’t really use the integrated MyEclipse Tomcat server very much, and just tested and realized that even my own apps (which to do logging) when deployed to the MyEclipse Tomcat 6 server are not producing log files. There is something about the integrated MyEclipse Tomcat 6 server that is different than my stand-alone Tomcat 6 server.
I would have to examine/compare a standard Tomcat 6 server setup with the integrated MyEclipse Tomcat 6 server, but don’t really have time at the moment.
This may be something MyEclipse support may be able to address and possibly explain the logging differences in the integrated MyEclipse Tomcat 6 and standard/standalone Tomcat6 servers.
ernestzMember@ernestz wrote:
I don’t really use the integrated MyEclipse Tomcat server very much, and just tested and realized that even my own apps (which to do logging) when deployed to the MyEclipse Tomcat 6 server are not producing log files.
I just discovered I tested with a simple application which does not actually log (oops). Another application I am working on that does do logging actually logs as expected. So application logging should work as expected.
It is just regular Tomcat logging that appears to be an issue.
MaryMemberI appreciate your help; you have given me some things to think about and implement. Can you recommend a tutorial or guide to implementing either of the application logging mechanisms you mentioned?
Thanks again.
ernestzMemberTypically I use Log4J http://logging.apache.org/log4j/1.2/index.html.
As far as logs for the integrated MyEclipse Tomcat 6 server, I found out that the default configuration fails to define the required properties to perform server logging.
You will have to add the following property definitions to the integrated MyEclipse Tomcat 6 configuration. Use the following menu items, Window -> Perferences -> MyEclipse Enterprise Workbench -> Servers -> Integrated Sandbox -> MyEclipse Tomcat6 -> JDK. On the right pane, you will see a text box labelled Optional Java VM arguments. You should be able to copy/paste the following property definitions into that text box and save the changes.
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=”C:/development/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat /conf/logging.properties”(The path use above is the catalina.base property you specified in your earlier post.)
MaryMemberThanks; I will try this tonight and review the use of log4j. I know I have used it in the past. Coming along here now. Thank you.
MaryMemberI am thinking these two values do not make sense:
-Dcatalina.home=C:/Java/JavaSource/plugins/com.genuitec.eclipse.easie.tomcat.myeclipse_6.5.0.zmyeclipse650200806/tomcat
-Dcatalina.base=C:/development/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat
They should be more the same I think; your comment made me take a closer look.
ernestzMemberFor a normal Tomcat install, catalina.home and catalina.base default to the same value. But, catalina.home specifies the path to the actual Tomcat binaries.
catalina.base can be set to another path for the actual ‘data’ files, such as logs, configuration, webapps, etc.
MaryMemberUnfortunately I am still very confused. How can I determine which of my values are correct for the embedded Tomcat server with MyEclipse? How can I confirm where the “actual Tomcat binaries” are that I am using? I had read the home and base should be the same if I am using one install of Tomcat which I believe I am. I do have an independent installation of Tomcat on my laptop; but I am trying to use the embedded server. That is supposed to be simpler. that is my goal right now.
MaryMemberUnfortunately I am still very confused. How can I determine which of my values are correct for the embedded Tomcat server with MyEclipse? How can I confirm where the “actual Tomcat binaries” are that I am using? I had read the home and base should be the same if I am using one install of Tomcat which I believe I am. I do have an independent installation of Tomcat on my laptop; but I am trying to use the embedded server. That is supposed to be simpler. that is my goal right now.
Basically I am not sure whether the value of the base or the home is correct as they are now configured. My deepest appreciation.
ernestzMemberThe values supplied for the embedded Tomcat6 server in MyEclipse are correct. The catalina.home points to the binaries for the Tomcat server. The catalina.base points to the location of your conf/, webapps/, temp/, logs/.
MyEclipse’s Tomcat configuration is setup by default and works ‘out of the box’. With the exception of server logging which was pointed out in another thread.
-
AuthorPosts