aspose file tools*
The moose likes Tomcat and the fly likes How to set VM arguments in Tomcat 5.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to set VM arguments in Tomcat 5.0" Watch "How to set VM arguments in Tomcat 5.0" New topic
Author

How to set VM arguments in Tomcat 5.0

Amrita Anilkumar
Greenhorn

Joined: Jan 08, 2008
Posts: 3
We are trying to run an application on Tomcat. Project is placed in webapps folder inside Tomcat 5.0 folder. We want the logs for applcation to be on our machine for which there are two log4j xml and dtd files that shall help in mapping via server. VM arguments are to be set so that startup.bat reads these files. I am not aware about the file where I need to modify and the statement to code. Is there any way to do this??

In case if the tomcat server is started in RAD,then we start the server and then Go to Run -> Debug� or Run -> Run and Select �Arguments� tab and add the followinglog4j.configuration="file:\C:\logfile\log4j.xml".

We want to do the same when the application is run only in Tomcat without RAD/eclipse.


Thanks in advance,
Amrita
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I can't help with the IDE version but if you tell me what OS and how you're starting Tomcat (Windows service or startup scripts) I can help with that part.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Amrita Anilkumar
Greenhorn

Joined: Jan 08, 2008
Posts: 3
It's Windows OS. We are just starting Tomcat from bin folder "startop.bat", having the main application folder inside webapps. After starting of Tomcat we hit the localhost url to run the application.

Thanks for the prompt response.

Amrita
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42935
    
  68
The startup script starts the catalina script, which is in the same directory. Inside of it you'll find the actual java invocation, where you can set VM arguments. Search for "JAVA_OPTS".
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set VM arguments in Tomcat 5.0