facebook

Pleasehelp me start using Eclipse with my half done J2EE app

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

    cmikos
    Member

    What operating system and version are you running?

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    &

    SuSE Professional 9.0, however, I am trying to get
    working with Eclipse and XP right now, I have not tried to do what
    I am doing on the linux box yet

    What Eclipse version and build id are you using? (Help > About Eclipse Platform)

    Eclipse Platform
    Version: 3.0.1
    Build id: 200409161125

    – Was Eclipse freshly installed for MyEclipse?

    ???

    – If not, was it upgraded to its current version using the update manager?

    Yes Eclipse and MyEclipse have been upgraded through the update manager.

    – Are any other external plugins installed?

    No

    – How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*

    8

    What MyEclipse version are you using? (Help > About Eclipse Platform > Features)

    3.8.4

    What JDK version are you using to run Eclipse? (java -version)

    C:\Documents and Settings\cmikos>java -version
    java version “1.4.2_06”
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
    Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)

    What JDK version are you using to launch your application server?

    1.4.0_01

    What steps did you take that resulted in the issue?

    ‘File’ -> ‘New’ -> ‘Project’ -> ‘J2EE’ -> ‘Web Project’

    What application server are you using?

    Tomcat 5.0.12

    Are there any exceptions in the Eclipse log file? (<workspace>/.metadata/.log)

    I don’t have a directory called ‘.metadata’
    ————————————————————————

    Hello:

    I tried to find some paid support but could not, as my questions do not really refer to problems with MyEclipse, rather my inexperience with the products.

    I am trying to use MyEclipse with an existing J2EE project using ‘File’ -> ‘New’ -> ‘Project’ -> ‘J2EE’ -> ‘Web Project’ wizard, so that my project still conforms to the directory structure detailed in the general purpose build script

    http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/build.xml.txt

    (I have never used an IDE…I used textPad to develop this app, so please be gentle)

    I have a working directory i.e.

    /home/username/testapp (which contains my build.xml file for ant which I am using to ‘dist’)

    Which contains:

    /home/username/testapp/src
    /home/username/testapp/src/testapp
    /home/username/testapp/src/testapp/domain
    /home/username/testapp/src/testapp/util
    /home/username/testapp/src/testapp/web (contains servlets)
    /home/username/testapp/src/testapp/web/taglib
    /home/username/testapp/web (contains jsp & html) /home/username/testapp/docs (empty 4 now)

    /home/username/testapp/build } output of ant target
    /home/username/testapp/dist } output of ant target

    Would like to exclude these from the project list?

    Then my deploy directory(to tomcat5):

    /opt/jakarta/tomcat/webapps/testapp

    I tried

    Project Name — testapp
    Location — /home/username/testapp
    Source folder — /home/username/testapp/src/testapp
    Web root folder — /home/username/testapp/web Context root URL — /testapp

    But I get all of these unnecessary files created in /home/username/testapp:

    Why do I need these directories/files? They seem like they are trying to mirror what is already deployed by ant to my CATALINA_HOME/webapps/testapp directory. How can I better define my “Web Project Details”
    to avoid unnecessary directories/files being created? i.e.:

    /home/username/testapp/testapp
    /home/username/testapp/testapp/src/kms (empty) /home/username/testapp/testapp/web/META-INF
    /home/username/testapp/testapp/web/META-INF/MANIFEST.MF
    /home/username/testapp/testapp/web/WEB-INF/classes (empty) /home/username/testapp/testapp/web/WEB-INF/lib (empty) /home/username/testapp/testapp/web/WEB-INF/web.xml (not a copy of my web.xml)

    I am wondering which values to use for these “Details” to avoid the above or to use the existing:
    Project Name — testapp?
    Location — ?
    Source folder — ?
    Web root folder — ?
    Context root URL — /testapp?

    Eventually I would like to use ant and Tomcat through Eclipse…but I am not running Eclipse on my server?

    #226360 Reply

    Riyad Kalla
    Member

    Project Name — testapp? (YES)
    Location — /home/username/testapp/testapp
    Source folder — /src
    Web root folder — /web
    Context root URL — /testapp? (YES)

    #226414 Reply

    cmikos
    Member

    Project Name — testapp
    Location — /home/username/testapp/testapp

    > I have no directory /home/username/testapp/testapp
    > that directory is created by eclipse when I give it the
    > following ‘Details’
    >
    > Project Name — testapp
    > Location — /home/username/testapp
    > Source folder — /home/username/testapp/src/testapp
    > Web root folder — /home/username/testapp/web
    > Context root URL — /testapp

    Source folder — /src
    Web root folder — /web
    Context root URL — /testapp

    My directory structure looks like this

    /home/username/testapp

    within that directory there are 3 others

    src
    web
    docs

    in addition to directories for output of ant targets:

    dist
    build

    Why does another directory always get created???

    i.e.

    /home/username/testapp/testapp

    containing mostly empty directories

    src (empty)
    web(containing WEB-INF/web.xml and /classes (empty) and /lib (empty) and META-INF/MANIFEST.MF

    #226418 Reply

    Riyad Kalla
    Member

    The reason Eclipse is creating a subdirectory is because you can’t overlap a new project like you are trying to do, what I suggest you do is create a new Web Project in the default location, let it load up, then open (in Windows explorer or equivalent file explorer) your old project directory (/home/username/testapp) and then drag (piece of piece) the portions of the app over.

    For example, drag and drop your /home/username/testapp/src contents into your /src folder of your project, make sure it all compiles. Then drag over your /home/username/testapp/web contents into your WebRoot folder (or whatever name you ended up naming the webroot dir), then drag and drop your /home/username/testapp/docs folder into your project root (the docs folder, NOT it’s contents) and then you should now have a project that looks like:

    
    /TestAppProject
      + /src (source folder containing source from your test app)
      + /docs (containing documents for this project)
      + /WebRoot (or whatever you named it)
        + /WEB-INF
          + /classes (output dir where your /src folder is compiled to)
          + /lib (location for any libs your project needs)
          + web.xml (generated empty web.xml file for your project).
    
Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Pleasehelp me start using Eclipse with my half done J2EE app

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