facebook

myeclipse + tomcat examples

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

    Kathy Kurth
    Participant

    i am a new myeclipse user and i would like to set up a project to run the tomcat servlet/jsp examples. i would prefer to have as little impact on the actual examples as possible. please advise how i would do this … or if this is something myeclipse will happily do.

    thanks. bob munger.

    #202768 Reply

    Riyad Kalla
    Member

    bob,
    I’ll outline the minimal steps you will need to do to get this working with MyEclipse so you can deploy/run/experiment with the examples.

      1) Install Eclipse 2.1.2 and MyEclipse 2.7RC2 (if you haven’t done so already)
      2) Launch MyEclipse
      3) Go to Window>Preferences>Java>Installed JREs
      * Select your JRE, click “Edit”. Change the JRE directory home to point to an installation of the JDK on your machine
      * Note that you need a JDK to run the application server, you cannot use a JRE (App Server needs javac, tools.jar, etc.)

      <OPTIONAL: Restart MyEclipse to make sure settings stick>

      4) Go to Window>Preferences>MyEclipse>Application Servers>Tomcat 5
      * setup the Tomcat Home directory here, I suggest you install it to some short path “C:\Tomcat 5” or something equivalent
      * click the “Launch” node and make sure that “Run in Debug mode” is selected. This isn’t necessary, but will allow you to debug
      * click the “JDK” tab and make sure the JRE you changed to a JDK is selected to run the app server
      5) Go to Window>Preferences>MyEclipse>J2EE>Project Templates
      * setup your key project directories here to match the ones from the samples. For example, say the examples call the webroot directory “web” or “www”, you would enter that name for the “Web root folder” field. This allows MyEclipse to know how to handle this app.
      * also setup the “Web project source folder” to match the folder from the examples that have the source code (For servlets and such) in them.
      6) Now what you can do is create a new Project “J2EE/Web Module Project” and point the directory to the example you want to load up.
      7) After the project is created, right click and go to project properties. Setup the correct build path (if it hasn’t been setup already) to point to your WEB-INF/classes folder (this is usually already set correctly).

      <Now we need to setup a deployment so you can deploy the example to the container while you work/tweak it.>

      8) Click the deployments button, select your project from the dropdown and click “Add”
      9) Select the server you want to deploy to from the drop down (probably just Tomcat 5.0 listed)
      10) Select the style of deployment (exploded or packaged). Exploded should work fine.
      11) You’re project will be deployed when you hit ok (which is fine, we just haven’t done any work yet)

      Now you can work/deploy/run your project. You run the application server via the Server Execution button right next to the deployments button. You should only *need* to start the server once and just keep redeploying the project hwen things change. The MyEclipse deployment tool is actually pretty good about deploying changes automatically for you so you might not even need to do that. I’ve only had to do it when I make major changes and want o make sure Tomcat picks them up.

      Please come back if you have any questions or get hung up on something.

    #202783 Reply

    support-michael
    Keymaster
    #202784 Reply

    Riyad Kalla
    Member

    <wheezing> yea…. he could do that too.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: myeclipse + tomcat examples

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