- This topic has 5 replies, 3 voices, and was last updated 20 years, 2 months ago by Riyad Kalla.
-
AuthorPosts
-
dafortinMemberWindows XP
JVM 1.4.2
Eclipse 3.0.1
MyEclipseIDE 3.8.2GA
Tomcat 5.0.28I tried to startup Tomcat 5 with security enabled. I added the argument -security into the field Optional Program Arguments in the Preferences pane of the Tomcat 5 connector.
I get the following at the top of the Tomcat output window:
usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -debug ] [ -nonaming ] { start | stop }
Although Tomcat starts OK after this message, the security policy is ignored.
I have searched all the command files in the bin directory but cannot find any that would produce this message, so I cannot find which one needs to be fixed (I’m assuming it is a simple parameter ordering error).
Please tell me how I can start Tomcat 5 from MyEclipse with security enabled?
BTW- if I use the startup.bat file like this: “startup.bat -security” from the bin directory, it works just fine.
Robert VargaParticipant@dafortin wrote:
Windows XP
JVM 1.4.2
Eclipse 3.0.1
MyEclipseIDE 3.8.2GA
Tomcat 5.0.28I tried to startup Tomcat 5 with security enabled. I added the argument -security into the field Optional Program Arguments in the Preferences pane of the Tomcat 5 connector.
I get the following at the top of the Tomcat output window:
usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -debug ] [ -nonaming ] { start | stop }
Although Tomcat starts OK after this message, the security policy is ignored.
I have searched all the command files in the bin directory but cannot find any that would produce this message, so I cannot find which one needs to be fixed (I’m assuming it is a simple parameter ordering error).
Please tell me how I can start Tomcat 5 from MyEclipse with security enabled?
BTW- if I use the startup.bat file like this: “startup.bat -security” from the bin directory, it works just fine.
MyEclipse starts the starting java class of tomcat, and does not call the batch file.
Therefore you need to supply parameters that the java class expects.
Look at what additional parameters the startup.bat passes to the java or javaw command starting Tomcat if you specify -security to the batch file compared to if it is not specified.
Add those parameters to the configuration, and it will work.
Regards,
Robert Varga
dafortinMemberOK, I’ve tried your suggestion. The only differences between starting Tomcat with security and without are the following two command line parameters:
-Djava.security.manager -Djava.security.policy==”D:\tools\jakarta-tomcat-5.0.28\conf\catalina.policy”
Yet when I added these as the “Optional Program Arguments” I STILL (yes, STILL) get the usage message and these parameters are ignored. So, it appears that something else is happening.
Is there any way for me to see the actual command that is being executed to start Tomcat from inside MyEclipse?
Riyad KallaMemberAdd them to the “optional JVM arguments” in your “JDK” settings for the Tomcat connector, see if that does the trick.
dafortinMemberThat worked perfectly. Thanks.
Your help and support have been fast and first-rate!
😛
Riyad KallaMemberGlad it worked!
Your help and support have been fast and first-rate!
Managements makes each of us have an expresso machine at our desk, so we don’t sleep 😀
-
AuthorPosts