facebook

Java files and classes lost when Tomcat is started

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

    Brian Godden
    Member

    There’s a chance I may be doing something wrong here… I have classes and java files in the <Project Root>/Web Root/WEB-INF/classes/<sub directories> directory before running the Tomcat 5 deployment.

    Once I run the deployment, a “Java Source” folder is created in the Project Root folder and the sub directories folder under <Project Root>/Web Root/WEB-INF/classes/ is deleted so all my files are gone. I have a backup of these files so I dind’t lose them, but where should I be putting these before deployment. Seems like deleting them in such a fashion is a bug nevertheless, no?

    Eclipse 3.0M6, MyEclipse 3.7RC2, Windows XP Pro. No exception in the log…

    Thanks,
    -Brian

    #202443 Reply

    Riyad Kalla
    Member

    Brian, your project hierarchy should look like this:

    
    + Project Name
      + src/ <-- Java src files
      + docs/ <-- README's, LICENSE, whatever
        + api/ <-- Generated Javadoc  (Project's Javadoc dir)
      + lib/ <-- 3rd party libs you are using to build the src
      + webroot/ <-- Root of your web app, this is the root that gets deployed
        + index.jsp <-- intro page
        + /WEB-INF <-- importnat for web apps
          + lib/ <-- jars needed for your webapp
          + classes/ <-- the build target for your src/ dir above
    

    So when you deploy, “webroot” and everything below it gets copied out to the application server. And when i say “should look like this” I mean “its a good idea to use something like this” but of course structure is really up to the programmer or team.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Java files and classes lost when Tomcat is started

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