facebook

Tomcat configuration Q’s [Closed]

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

    jsmyth1969
    Member

    Hi,

    win2kpro
    eclipse 3
    myeclipse 3

    Ive manged to get tomcat 5 running standalone from the command line so that my app works. I run a shell script to set up some environment then use $CATALINA_HOME/bin/startup.sh

    I would like to control this through myeclipse to allow for debug etc. I have some probs:

    1. classloading is not clear – which classpath does ‘prepend/append to library path’ modify? is it the windows classpath?

    2,although I added my native libs to myeclipse->appservers->tomcat5->append to librbary path, I still needed to add them to the (windows) system environment variable, ‘Path’ (otherwise I got a ***.dll could not be found on <Path> windows alert…

    3. I assume I dont need to deploy to the server to make it work? (All I want to see for now is correct start-up)

    #209372 Reply

    support-michael
    Keymaster

    MyEclipse is configured to run Tomcat5 or 4 directly from within the IDE via a Java subprocess. No external shell scripts are invoked or environment variables referenced during the process; its straight internal Java API stuff within ME. Doing this enables ME to support hot-swap debugging and JSP native debugging.

    1. classloading is not clear – which classpath does ‘prepend/append to library path’ modify? is it the windows classpath?

    ME builds a classpath for the internal Tomcat instance it spins up. The ME Tomcat connector’s prepend/append classpath options enable you to manipulate this classpath by adding libraries at the head or tail of the classpath used by the new Tomcat instance.

    2,although I added my native libs to myeclipse->appservers->tomcat5->append to librbary path, I still needed to add them to the (windows) system environment variable, ‘Path’ (otherwise I got a ***.dll could not be found on <Path> windows alert…

    The library path preference of the Tomcat connector is how you make DLLs known to a Tomcat instance. Under the covers the Tomcat connector adds your DLLs to the equivalent of Java’s “java.libraries” system property. This property is a concatenated path of directories the JVM uses to dynamically search and load DLLs required by JNI dependent classes of your webapp such as a native DB driver. So if you have DLLs required by your MyEclipse webapp make sure that the directories containing these DLLs is specified in the library paths of the Tomcat connector.

    3. I assume I dont need to deploy to the server to make it work? (All I want to see for now is correct start-up)

    Hmm! I’m not sure what you mean by deploy the server. The terminology we use is that the Tomcat connector configures a Tomcat instance. Webapps are deployed to this instance.

    Q: can you do a basic start/stop of a configured Tomcat instance, i.e., the Tomcat connector is configured to point to an installed Tomcat distro.

    #209374 Reply

    jsmyth1969
    Member

    MIchael,

    thanks for your comments.

    1. I can start/stop/deploy to my Tomcat instance.

    2. I still have issues with ‘Append to library path’ = it seems that this is not enough info for MYEclipse – unless I add these directories to windows environment ‘PATH’ variable I get a windows alert about missing dlls from my native libs – even though the dlls are in the directories specified by ‘append to lib path’ setting…

    3. If I start tomcat separately using jpda option, I can connect as remote debug option – this is straightforward.

    Until I find the answer for 2, I have to use 1. and 3. – Still great, but wish I could do 1 & 2…

    thanks again
    jim

    #209375 Reply

    Scott Anderson
    Participant

    Jim,

    There is a known bug in the library path management in 3.8 Beta 1, but it has to do with the incorrect path seperator being used on non-Windows platforms. We’re not aware of any problems on Windows, but there might be one if multiple directories were appended, rather than just one. In any case, this will be fixed in the Beta 2 release which will be available very shortly. Sorry for the inconvenience.

    #209376 Reply

    jsmyth1969
    Member

    Thanks – Ill be waiting for beta 2 then!

    jim

    #209384 Reply

    jsmyth1969
    Member

    Ok – I wont wait for beta 2 – been giving it a go and found that I could make it work by including all lib dirs in windows PATH, as well as in MyEclipse.

    I can now deploy, start and stop from the workbench, and debug into JSP even works witout extra effort – even breakpoints in html!!

    thanks for all the help!

    jim

    #209390 Reply

    Scott Anderson
    Participant

    Jim,

    Nice workaround. Thanks for posting it. Another workaround would be to create a single library directory, place a copy of all the libs you need in it, and specify that single directory in the ‘Append to Library Path’ setting for the server. The bug in beta 1 only affects the path separator used for 2 or more entries, but will include a single entry just fine.

    I can now deploy, start and stop from the workbench, and debug into JSP even works witout extra effort – even breakpoints in html!!

    Of course, if I already had it working I wouldn’t touch anything. 🙂 I’m just posting the alternative for anyone else that might be hitting the same issue.

    #211487 Reply

    mika
    Member

    Hi

    I’m currently using Beta 2 of ME 3.8… seems the “multiple library paths”-problem hasn’t been fixed yet. The [second] lib path is in the path, though the windows drive letter is missing (after closing and reopening the prefs page as well as in the System.getProperty(“java.library.path”). It looks like this:

    “C:\some\path;C:\other\path;/my/path/set/in/me”

    The path in question is also in the Windows PATH variable, but tomcat (5) can’t find the libs 🙁

    Searching a workaround…

    Cheers,
    Mika

    #211490 Reply

    Riyad Kalla
    Member

    Mika,
    It is fixed in HEAD but hasn’t been released it. It will be released with our GA release… we appologize for this bug as its a real PIA.

    #211629 Reply

    mika
    Member

    I’m looking forward then to 3.8 GA 😉

    I’ve just copied all the libraries to the location of my first library path. That works for instance..

    Cheers,
    Mika

    #211634 Reply

    Riyad Kalla
    Member

    Ugg, while I’m glad that worked I’m sorry you had to jump through so many hoops to get it working.

    Thanks for hanging in there with us.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Tomcat configuration Q’s [Closed]

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