facebook

Security policy with Tomcat & MyEclipse [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #218336 Reply

    dafortin
    Member

    Windows XP
    JVM 1.4.2
    Eclipse 3.0.1
    MyEclipseIDE 3.8.2GA
    Tomcat 5.0.28

    I 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.

    #218340 Reply

    Robert Varga
    Participant

    @dafortin wrote:

    Windows XP
    JVM 1.4.2
    Eclipse 3.0.1
    MyEclipseIDE 3.8.2GA
    Tomcat 5.0.28

    I 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

    #218341 Reply

    dafortin
    Member

    OK, 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?

    #218342 Reply

    Riyad Kalla
    Member

    Add them to the “optional JVM arguments” in your “JDK” settings for the Tomcat connector, see if that does the trick.

    #218343 Reply

    dafortin
    Member

    That worked perfectly. Thanks.

    Your help and support have been fast and first-rate!

    😛

    #218344 Reply

    Riyad Kalla
    Member

    Glad 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 😀

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Security policy with Tomcat & MyEclipse [Closed]

You must be logged in to post in the forum log in